/* ============================================
   PERSONA 5 PORTFOLIO THEME
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { width: 100%; height: 100%; overflow: hidden; }

body {
  background: #000000;
  color: #f0f0f0;
  font-family: 'Montserrat', 'Barlow Condensed', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; }

::selection { background: #ff0000; color: #fff; }

:focus-visible {
  outline: 2px solid #ff0000;
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: 20px;
  z-index: 1200;
  width: max-content;
  max-width: calc(100vw - 40px);
  transform: translateY(-220%);
  opacity: 0;
  pointer-events: none;
  background: #120000;
  color: #ffffff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 1.5px;
  padding: 10px 16px;
  border: 1px solid #ff0000;
  box-shadow: 6px 6px 0 rgba(255,0,0,0.75);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   GLOBAL OVERLAYS
   ============================================ */

.scanlines {
  position: fixed; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 3px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 3px);
  z-index: 900; pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

/* ============================================
   SCREEN SYSTEM
   ============================================ */

.screen {
  position: fixed; inset: 0;
  display: none;
  z-index: 10;
  overflow: hidden;
  isolation: isolate;
}

.screen[hidden] {
  display: none !important;
}

.screen.active {
  display: flex;
  align-items: center;
}

.screen.entering {
  display: flex;
  align-items: center;
}

.screen:not(#screen-menu)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.82) 58%, rgba(0,0,0,0.72) 100%);
  transform: translateZ(0);
}

/* ============================================
   GLOBAL VIDEO BACKGROUND
   ============================================ */

.global-video-bg {
  position: fixed; inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #050000;
  background-image:
    linear-gradient(135deg, rgba(255,0,0,0.18) 0%, transparent 36%),
    linear-gradient(205deg, rgba(70,0,0,0.45) 0%, #050000 58%, #000 100%);
}

.global-video-bg video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.22s ease;
  will-change: opacity;
  transform: translateZ(0);
}

.global-video-bg video.is-active {
  opacity: 1;
}

.global-video-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.25);
  pointer-events: none;
}

html.media-static .global-video-bg video {
  display: none;
}

html.media-static .transition-overlay.running {
  display: none;
}

/* ============================================
   P5 MAIN MENU
   ============================================ */

#screen-menu {
  overflow: hidden;
}

.p3-bg-circle {
  position: absolute;
  right: -15vw; top: 50%;
  transform: translateY(-50%);
  width: 65vw; height: 65vw;
  max-width: 700px; max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,0,0,0.25) 0%, rgba(60,0,0,0.15) 60%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.p3-bg-word {
  position: absolute;
  bottom: -2vw; left: -1vw;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(140px, 22vw, 300px);
  color: rgba(255,0,0,0.03);
  letter-spacing: -8px;
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  z-index: 1;
}

.p3-mask {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.34) 52%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.p3-name-tag {
  position: absolute;
  top: 18px; left: 22px;
  z-index: 20;
  font-family: 'Anton', sans-serif;
  font-style: italic;
  font-size: clamp(48px, 8vw, 108px);
  line-height: 0.88;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.06);
  transform: rotate(18deg);
  transform-origin: left top;
  user-select: none;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.p3-name-tag span:first-child { color: rgba(255,0,0,0.12); }

/* Menu */
.p3-menu {
  position: relative;
  z-index: 20;
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.p3-row {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.38s ease, transform 0.38s cubic-bezier(0.22,1,0.36,1);
  margin: 2px 0;
  min-height: 56px;
}

.p3-row.mounted {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* P5 glow — red */
.p3-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(255,0,0,0.4) 0%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.p3-row.active .p3-glow { opacity: 1; }

/* P5 highlight — white with red shadow */
.p3-highlight {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scaleX(0);
  transform-origin: center;
  width: 110%; height: 100%;
  background: #ffffff;
  clip-path: polygon(0px 0px, 100% 25%, 100% 75%, 0px 100%);
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
  z-index: -1;
  box-shadow: 8px 6px 0 #ff0000;
}

.p3-row.active .p3-highlight {
  transform: translate(-50%, -50%) scaleX(1);
}

/* P5 label — all-caps RED default, dark on active */
.p3-label {
  font-family: 'Anton', sans-serif;
  font-style: italic;
  letter-spacing: 2px;
  line-height: 0.85;
  display: block;
  white-space: nowrap;
  user-select: none;
  color: #e60000;
  transition: color 0.12s ease;
  position: relative;
  z-index: 1;
}

.p3-row.active .p3-label { color: #1a0000; }
.p3-row:hover:not(.active) .p3-label { color: #ff4444; }
.p3-row[aria-current="page"] .p3-label { color: #ffffff; }
.p3-row[aria-current="page"] .p3-highlight { background: #ff0000; }
.p3-row:focus-visible .p3-highlight {
  transform: translate(-50%, -50%) scaleX(1);
}

/* Inactive items fade less than P3 */
.p3-row:not(.active) { opacity: 0.64; }
.p3-row.mounted:not(.active) { opacity: 0.64; }
.p3-row.mounted.active { opacity: 1; }

/* Hint */
.p3-hint, .screen-hint {
  position: absolute;
  bottom: 28px; right: 28px;
  z-index: 20;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 5px;
  font-family: 'Bebas Neue', sans-serif;
  opacity: 0;
  transition: opacity 0.5s ease 0.9s;
}

.p3-hint.mounted, .screen-hint { opacity: 1; }

.p3-hint-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 2px;
  color: rgba(255,255,255,0.42);
}

.p3-hint-key {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 2px;
  padding: 1px 6px; font-size: 11px;
}

/* ============================================
   TRANSITION OVERLAY — P5 STYLE
   ============================================ */

.transition-overlay {
  position: fixed; inset: 0;
  z-index: 950;
  pointer-events: none;
  display: none;
}

.transition-overlay.running { display: block; }

.transition-block {
  position: absolute; inset: 0;
  background: var(--t-color);
  transform: scaleX(0);
  transform-origin: left;
}

.transition-overlay.running .transition-block {
  animation: transBlock 0.5s cubic-bezier(0.76,0,0.24,1) var(--t-delay) forwards;
}

@keyframes transBlock {
  0%   { transform: scaleX(0); transform-origin: left; }
  40%  { transform: scaleX(1); transform-origin: left; }
  60%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ============================================
   CONTENT SCREENS — P5 THEME
   ============================================ */

.screen-content {
  position: relative;
  z-index: 3;
  width: 100%; height: 100%;
  overflow-y: auto; overflow-x: hidden;
  padding: 40px clamp(28px, 5vw, 72px) 88px;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,0,0,0.3) transparent;
}

.screen-content::-webkit-scrollbar { width: 6px; }
.screen-content::-webkit-scrollbar-track { background: transparent; }
.screen-content::-webkit-scrollbar-thumb {
  background: rgba(255,0,0,0.3);
  border-radius: 3px;
}

.screen-header {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,0,0,0.24);
}

.back-btn {
  display: flex; align-items: center; gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,0,0,0.4);
  color: #ff0000;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px; letter-spacing: 2px;
  padding: 8px 16px;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: all 0.2s ease;
  min-height: 44px;
}

.back-btn:hover {
  background: rgba(255,0,0,0.1);
  border-color: #ff0000;
}

.back-arrow {
  color: #ff0000;
  animation: arrowLeft 0.8s ease-in-out infinite;
}

@keyframes arrowLeft {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-4px); opacity: 0.5; }
}

.screen-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(36px, 6vw, 72px);
  font-style: italic;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #ff0000, 0 0 18px rgba(255,0,0,0.24);
}

.screen-title:focus {
  outline: none;
}

.screen-title:focus-visible {
  outline: 2px solid rgba(255,255,255,0.85);
  outline-offset: 8px;
}

/* ============================================
   ABOUT SCREEN
   ============================================ */

.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.about-portrait-wrap {
  position: relative;
  width: 100%; max-width: 280px;
}

.about-portrait {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  border: 3px solid #ff0000;
}

.about-portrait-frame {
  position: absolute;
  inset: -6px;
  border: 2px solid rgba(255,255,255,0.15);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  pointer-events: none;
}

.about-info {
  display: flex; flex-direction: column; gap: 24px;
}

.about-card {
  background: linear-gradient(135deg, rgba(38,0,0,0.54) 0%, rgba(12,0,0,0.72) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
  padding: 24px 28px;
  box-shadow: inset 0 0 0 1px rgba(255,0,0,0.12);
  position: relative;
}

.about-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #ff0000, transparent);
}

.about-card-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 12px;
}

.about-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  color: #fff;
  background: #1a0000;
  border: 2px solid #ff0000;
  clip-path: polygon(14% 0, 100% 0, 84% 100%, 0 100%);
  width: 48px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-8deg);
  flex-shrink: 0;
}

.about-card h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(24px, 3vw, 36px);
  color: #ff4444;
  letter-spacing: 1px;
  line-height: 1;
}

.about-meta {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: rgba(255,100,100,0.6);
  margin-top: 4px;
}

.about-details {
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}

.about-details li {
  padding-left: 16px;
  position: relative;
  font-size: 15px;
  color: #eee;
  line-height: 1.5;
}

.about-details li::before {
  content: '';
  position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px;
  background: #ff0000;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.about-body {
  font-size: 15px;
  color: #c0c0c0;
  line-height: 1.7;
}

.about-skills {
  display: flex; flex-wrap: wrap; gap: 8px;
}

.skill-chip {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  background: rgba(255,0,0,0.08);
  border: 1px solid rgba(255,0,0,0.35);
  color: #ff4444;
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: all 0.2s ease;
}

.skill-chip:hover {
  background: rgba(255,0,0,0.18);
  border-color: #ff0000;
  color: #ff0000;
}

/* ============================================
   EXPERIENCE SCREEN
   ============================================ */

.exp-section {
  margin-bottom: 40px;
}

.exp-section-tag {
  font-family: 'Anton', sans-serif;
  font-size: clamp(48px, 5vw, 80px);
  line-height: 0.9;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 0 rgba(255,0,0,0.5);
}

.exp-card {
  position: relative;
  margin-bottom: 12px;
  background: #1a0000;
  clip-path: polygon(0 0, 97% 0, 100% 100%, 3% 100%);
  box-shadow: 0 8px 0 rgba(60,0,0,0.85);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.exp-card:hover {
  background: #ffffff;
  box-shadow: 10px 8px 0 #ff0000;
  transform: translateX(6px);
}

.exp-card:hover .exp-card-title { color: #000; }
.exp-card:hover .exp-card-subtitle { color: rgba(0,0,0,0.6); }
.exp-card:hover .exp-card-badge { background: #000; border-color: #000; }
.exp-card:hover .exp-card-bar { background: #000; }
.exp-card:hover .exp-card-bar span { color: #fff; }

.exp-card-badge {
  position: absolute; top: 8px; left: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  color: #fff;
  background: #1a0000;
  border: 2px solid #ff4444;
  clip-path: polygon(14% 0, 100% 0, 84% 100%, 0 100%);
  width: 44px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-8deg);
  box-shadow: 0 4px 0 rgba(0,0,0,0.28);
  transition: background 0.22s ease, border-color 0.22s ease;
  z-index: 2;
}

.exp-card-inner {
  flex: 1;
  padding: 14px 22px 14px 52px;
  display: flex; flex-direction: column; justify-content: center;
}

.exp-card-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1;
  letter-spacing: 1px;
  color: #ff6666;
  transition: color 0.22s ease;
}

.exp-card-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: rgba(255,100,100,0.5);
  margin-top: 4px;
  transition: color 0.22s ease;
}

.exp-card-bar {
  margin-left: 52px; margin-right: 14px;
  height: 28px;
  background: #ff0000;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  display: flex; align-items: center;
  padding: 0 14px;
  transition: background 0.22s ease;
  flex-shrink: 0;
}

.exp-card-bar span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.22s ease;
}

/* ============================================
   PUBLICATIONS SCREEN
   ============================================ */

.pub-list {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 48px;
}

.pub-section-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
  color: #ffffff;
  letter-spacing: 1px;
  margin: 0 0 14px;
  text-shadow: 2px 2px 0 rgba(255,0,0,0.45);
  overflow-wrap: anywhere;
}

.pub-category-separator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 2px;
  color: rgba(255,255,255,0.82);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.pub-category-separator::before,
.pub-category-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,0,0,0.72), transparent);
}

.pub-category-separator span {
  padding: 6px 14px;
  border: 1px solid rgba(255,0,0,0.42);
  background: rgba(255,0,0,0.1);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.pub-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(34,0,0,0.52);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(255,0,0,0.1);
  transition: transform 0.16s ease, background 0.16s ease;
}

.pub-item:hover {
  transform: translateX(6px);
  background: rgba(60,0,0,0.7);
}

.pub-index {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: #ff4444;
  line-height: 1;
}

.pub-body h3 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(16px, 2vw, 22px);
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.pub-body p {
  font-size: 13px;
  color: rgba(255,100,100,0.5);
  line-height: 1.4;
  margin-bottom: 4px;
}

.pub-link {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: #ff0000;
  transition: color 0.2s ease;
}

.pub-link:hover { color: #ff4444; }

.pub-roles-section {
  margin-top: 24px;
}

.role-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px;
  background: rgba(28,0,0,0.58);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  margin-bottom: 8px;
  transition: transform 0.16s ease;
}

.role-row:hover { transform: translateX(4px); }

.role-year {
  font-family: 'Anton', sans-serif;
  font-size: 28px;
  color: #ff4444;
  flex-shrink: 0;
  min-width: 60px;
}

.role-text {
  flex: 1;
  font-size: 14px;
  color: #c0c0c0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.role-text strong {
  color: #ffffff;
}

/* ============================================
   JOURNEY SCREEN
   ============================================ */

.journey-board {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: stretch;
}

.journey-map-panel,
.journey-detail {
  background: linear-gradient(135deg, rgba(28,0,0,0.72), rgba(3,0,0,0.84));
  box-shadow: inset 0 0 0 1px rgba(255,0,0,0.18), 0 18px 60px rgba(0,0,0,0.35);
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
}

.journey-map-panel {
  position: relative;
  min-height: 560px;
  padding: 18px 18px 20px;
  overflow: hidden;
}

.journey-map-topline {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  color: #ffffff;
  margin-bottom: 10px;
}

.journey-step-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.journey-jump {
  width: clamp(96px, 16vw, 158px);
  height: 28px;
  border: 1px solid rgba(142,232,255,0.46);
  background: rgba(0,0,0,0.64);
  color: #ffffff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
}

.journey-map-topline span:last-child {
  color: #ff4d4d;
}

.journey-map {
  width: 100%;
  height: min(58vh, 470px);
  min-height: 380px;
  display: block;
  background: #050608;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.journey-map.is-unavailable {
  display: grid;
  place-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.66);
}

.journey-map .leaflet-tile {
  filter: grayscale(1) invert(0.92) contrast(0.95) hue-rotate(155deg) saturate(0.52) brightness(0.58);
}

.journey-map .leaflet-control-attribution {
  background: rgba(0,0,0,0.62);
  color: rgba(255,255,255,0.58);
  font-size: 10px;
}

.journey-map .leaflet-control-attribution a {
  color: #ff7777;
}

.journey-map .leaflet-control-zoom {
  border: 1px solid rgba(255,0,0,0.35);
  box-shadow: none;
}

.journey-map .leaflet-control-zoom a {
  background: rgba(8,0,0,0.86);
  border-color: rgba(255,0,0,0.25);
  color: #ffffff;
}

.journey-leaflet-route-shadow {
  stroke: rgba(0,0,0,0.82) !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journey-leaflet-route {
  stroke: #ff2424 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 5px rgba(255,0,0,0.85));
  animation: journeyDash 1.05s linear infinite;
}

.journey-leaflet-route.is-car {
  stroke: #8ee8ff !important;
  filter: drop-shadow(0 0 4px rgba(142,232,255,0.55));
}

.journey-leaflet-route.is-transit {
  stroke: #ffd166 !important;
  filter: drop-shadow(0 0 4px rgba(255,209,102,0.6));
}

@keyframes journeyDash {
  to { stroke-dashoffset: -22; }
}

.journey-map-marker {
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
}

.journey-map-marker-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.78);
  border: 3px solid #8ee8ff;
  box-shadow: 0 0 0 7px rgba(142,232,255,0.14), 0 0 18px rgba(0,0,0,0.9);
  color: #ffffff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  transform: translate(var(--marker-x, 0), var(--marker-y, 0));
}

.journey-map-marker.is-past .journey-map-marker-dot {
  border-color: #ffffff;
  background: #ff0000;
}

.journey-map-marker.is-planned .journey-map-marker-dot {
  background: rgba(0,0,0,0.9);
  border-color: #8ee8ff;
}

.journey-map-marker.is-active .journey-map-marker-dot {
  width: 40px;
  height: 40px;
  background: #ff0000;
  box-shadow: 0 0 0 9px rgba(255,0,0,0.26), 0 0 24px rgba(255,0,0,0.9);
}

.journey-vehicle-marker {
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  pointer-events: none;
}

.journey-vehicle-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  border: 2px solid #ff0000;
  box-shadow: 0 0 0 8px rgba(255,0,0,0.18), 0 0 28px rgba(255,0,0,0.62);
  color: #100000;
  line-height: 1;
  transform-origin: 50% 50%;
  transition: transform 0.28s ease-out;
}

.journey-vehicle-marker.is-car .journey-vehicle-icon {
  width: 74px;
  height: 46px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.journey-vehicle-marker.is-car.is-westbound .journey-vehicle-icon {
  transform: scaleX(-1);
}

.journey-car-asset {
  width: 74px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.55));
}

.journey-plane-asset {
  width: 27px;
  height: 27px;
  display: block;
  color: #120000;
  fill: currentColor;
  filter: drop-shadow(0 1px 1px rgba(255,255,255,0.55));
}

.journey-transit-asset {
  font-size: 24px;
  line-height: 1;
}

.journey-vehicle-marker.is-transit .journey-vehicle-icon {
  background: rgba(255,255,255,0.96);
  border-color: #ffd166;
  box-shadow: 0 0 0 8px rgba(255,209,102,0.18), 0 0 24px rgba(255,209,102,0.58);
}

.journey-vehicle-marker.is-air .journey-vehicle-icon {
  transform: rotate(var(--vehicle-heading, 0deg));
  transition: none;
}

.journey-tooltip {
  background: rgba(10,0,0,0.9);
  border: 1px solid rgba(255,0,0,0.45);
  color: #ffffff;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  font-size: 14px;
  box-shadow: none;
}

.journey-tooltip strong,
.journey-tooltip span {
  display: block;
}

.journey-tooltip span {
  color: rgba(255,255,255,0.72);
  font-size: 12px;
}

.journey-tooltip::before {
  border-top-color: rgba(255,0,0,0.45);
}

.journey-controls {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.journey-arrow {
  min-height: 48px;
  border: 1px solid rgba(255,0,0,0.52);
  background: rgba(255,0,0,0.08);
  color: #ffffff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.journey-arrow:hover:not(:disabled) {
  background: #ff0000;
  transform: translateY(-2px);
}

.journey-arrow:disabled {
  cursor: default;
  opacity: 0.35;
}

.journey-progress {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.72);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.journey-detail {
  padding: clamp(22px, 3vw, 32px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.journey-kind {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  color: #8ee8ff;
  border: 1px solid rgba(142,232,255,0.35);
  padding: 5px 10px;
  margin-bottom: 18px;
}

.journey-programmed {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: #101010;
  background: #8ee8ff;
  padding: 5px 9px;
  margin: 0 0 18px 8px;
  vertical-align: top;
}

.journey-programmed[hidden] {
  display: none;
}

.journey-detail h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 0.95;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #ff0000;
  margin-bottom: 14px;
}

.journey-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.journey-meta span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 1.5px;
  color: #f5f5f5;
  background: rgba(255,255,255,0.07);
  padding: 6px 10px;
}

.journey-detail p {
  font-size: 15px;
  color: #cfcfcf;
  line-height: 1.55;
  margin-bottom: 18px;
}

.journey-leg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  counter-reset: journey-leg;
  margin-bottom: 20px;
}

.journey-leg-list li {
  counter-increment: journey-leg;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  color: #d8d8d8;
  font-size: 14px;
}

.journey-leg-list li::before {
  content: counter(journey-leg, decimal-leading-zero);
  font-family: 'Bebas Neue', sans-serif;
  color: #ff4d4d;
}

.journey-photo-strip {
  position: relative;
  margin-top: auto;
}

.journey-photo-strip.is-empty {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.journey-photo-strip.is-carousel {
  padding: 0 38px;
}

.journey-photo-viewport {
  overflow: hidden;
}

.journey-photo-track {
  display: flex;
  transform: translateX(calc(var(--photo-index, 0) * -100%));
  transition: transform 0.28s ease;
}

.journey-photo,
.journey-photo-slot {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 40%),
    repeating-linear-gradient(-45deg, rgba(255,0,0,0.14), rgba(255,0,0,0.14) 8px, rgba(255,255,255,0.03) 8px, rgba(255,255,255,0.03) 16px),
    #090000;
  border: 1px solid rgba(255,255,255,0.09);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.journey-photo {
  flex: 0 0 100%;
}

.journey-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050000;
}

.journey-photo.is-missing img {
  display: none;
}

.journey-photo-slot {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 8px;
}

.journey-photo-slot span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.58);
}

.journey-photo-nav {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 44px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,0,0,0.55);
  background: rgba(10,0,0,0.82);
  color: #ffffff;
  cursor: pointer;
}

.journey-photo-nav.is-prev { left: 0; }
.journey-photo-nav.is-next { right: 0; }

.journey-photo-nav:hover {
  background: rgba(255,0,0,0.34);
}

.journey-photo-count {
  position: absolute;
  right: 44px;
  bottom: 8px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.72);
  color: #ffffff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
}

/* ============================================
   PROJECTS SCREEN
   ============================================ */

.proj-github {
  margin-bottom: 28px;
}

.proj-github-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; letter-spacing: 2px;
  color: #ff0000;
  padding: 8px 18px;
  border: 1px solid rgba(255,0,0,0.4);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: all 0.2s ease;
}

.proj-github-link:hover {
  background: rgba(255,0,0,0.1);
  border-color: #ff0000;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.proj-card {
  display: block;
  background: rgba(34,0,0,0.52);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(255,0,0,0.1);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  min-height: 100%;
}

.proj-card:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 1px rgba(255,0,0,0.4), 0 12px 40px rgba(255,0,0,0.15);
}

.proj-card.static { cursor: default; }
.proj-card.static:hover { transform: translateY(-3px); }

.proj-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a0000, #000);
  overflow: hidden;
}

.proj-card-thumb img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.22s ease;
}

.proj-card:hover .proj-card-thumb img { opacity: 1; }

.proj-card-body {
  padding: 16px 20px 20px;
}

.proj-card-tag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255,100,100,0.5);
  text-transform: uppercase;
}

.proj-card-body h3 {
  font-family: 'Anton', sans-serif;
  font-size: 28px;
  color: #ff6666;
  letter-spacing: 1px;
  margin: 4px 0 8px;
}

.proj-card-body p {
  font-size: 14px;
  color: #c0c0c0;
  line-height: 1.5;
  margin-bottom: 12px;
}

.proj-card-btn {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  padding: 8px 18px;
  background: #ff0000;
  color: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background 0.2s ease;
  min-height: 44px;
}

.proj-card-btn:hover { background: #cc0000; }

.proj-sonar-preview { display: block; }
.proj-sonar-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.proj-sonar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.proj-sonar-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  color: #c0c0c0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.proj-sonar-source:hover { color: #fff; }
.proj-sonar-preview:focus-visible { outline-offset: -4px; }

/* ============================================
   CONTACT SCREEN
   ============================================ */

.contact-panel {
  max-width: 700px;
}

.contact-panel h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  color: #ffffff;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.contact-desc {
  font-size: 16px;
  color: #c0c0c0;
  line-height: 1.6;
  margin-bottom: 32px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.contact-item {
  padding: 20px;
  background: rgba(34,0,0,0.52);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.2s ease;
}

.contact-item:hover { transform: translateX(4px); }

.contact-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  color: #ff4444;
  margin-bottom: 4px;
}

.contact-item a {
  color: #c0c0c0;
  font-size: 14px;
  word-break: break-all;
  transition: color 0.2s ease;
}

.contact-item a:hover { color: #ff0000; }

.contact-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
}

.p3-action-btn {
  display: inline-flex; align-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; letter-spacing: 2px;
  padding: 12px 28px;
  background: #ff0000;
  color: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  min-height: 44px;
}

.p3-action-btn:hover {
  background: #cc0000;
  transform: translateX(4px);
}

.p3-action-btn.outline {
  background: transparent;
  border: 1px solid rgba(255,0,0,0.5);
  color: #ff0000;
}

.p3-action-btn.outline:hover {
  background: rgba(255,0,0,0.1);
  border-color: #ff0000;
}

.cv-download { gap: 10px; }
.cv-updated {
  border-left: 1px solid rgba(255,0,0,0.45);
  padding-left: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ============================================
   FOOTER
   ============================================ */

.p3-footer {
  position: fixed;
  bottom: 12px; left: 24px;
  z-index: 100;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.22);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.p3-disclaimer {
  font-size: 10px;
  letter-spacing: 1px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.screen-content .screen-header,
.screen-content .about-layout,
.screen-content .exp-section,
.screen-content .pub-list,
.screen-content .pub-roles-section,
.screen-content .journey-board,
.screen-content .proj-github,
.screen-content .proj-grid,
.screen-content .contact-panel {
  animation: fadeInUp 0.5s cubic-bezier(0.22,1,0.36,1) both;
}

.screen-content .exp-section:nth-child(2) { animation-delay: 0.08s; }
.screen-content .exp-section:nth-child(3) { animation-delay: 0.16s; }
.screen-content .exp-section:nth-child(4) { animation-delay: 0.24s; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .global-video-bg video[data-screen-id="screen-menu"] {
    object-position: 18% center;
  }

  .p3-menu { padding: 24px; }
  .p3-label { font-size: 40px !important; }
  .p3-name-tag { font-size: 36px; top: 10px; left: 12px; }

  .screen-content { padding: 24px 20px 88px; }
  .screen-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .screen-title { font-size: 36px !important; }

  .about-layout { grid-template-columns: 1fr; gap: 24px; }
  .about-portrait-wrap { max-width: 180px; }

  .journey-board { grid-template-columns: 1fr; }
  .journey-map-panel,
  .journey-detail { min-height: auto; }
  .journey-map { height: 360px; min-height: 320px; }
  .journey-photo-strip.is-empty { grid-template-columns: repeat(3, minmax(72px, 1fr)); }

  .exp-card { min-height: 60px; }
  .exp-card-title { font-size: 18px !important; }
  .exp-card-badge { width: 34px; height: 40px; font-size: 20px; }
  .exp-card-inner { padding-left: 42px; }

  .proj-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-actions { flex-direction: column; }
  .screen:not(#screen-menu).active ~ .p3-footer,
  .screen:not(#screen-menu).active .screen-hint { display: none; }
  .p3-footer { left: 16px; right: 16px; bottom: 10px; color: rgba(255,255,255,0.18); }
  .p3-disclaimer { max-width: 72vw; }
  .p3-hint, .screen-hint { right: 20px; bottom: 22px; }

}

@media (max-width: 480px) {
  .p3-label { font-size: 32px !important; }
  .p3-name-tag { display: none; }
  .exp-section-tag { font-size: 36px !important; }
  .journey-controls { grid-template-columns: 48px 1fr 48px; }
  .journey-detail h2 { font-size: 32px; }
  .journey-photo-strip.is-empty { gap: 8px; }
  .pub-item { grid-template-columns: 44px 1fr; padding: 16px 14px; }
  .pub-index { font-size: 26px; }
  .role-row { align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
  .role-text { min-width: 0; flex-basis: calc(100% - 76px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .global-video-bg video {
    display: none;
  }

  .transition-overlay.running {
    display: none;
  }
}
