/* =====================================================
   CONCEPTUAL INDEX — Dark Mode
   Portfolio of Alonso Boggiano · abdc.work
   ===================================================== */

/* ─── BASTELEUR FONT ─── */
@font-face {
  font-family: 'Basteleur';
  src: url('fonts/Basteleur-Bold.woff2') format('woff2'),
       url('fonts/Basteleur-Bold.woff')  format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Basteleur';
  src: url('fonts/Basteleur-Moonlight.woff2') format('woff2'),
       url('fonts/Basteleur-Moonlight.woff')  format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

/* ─── DESIGN TOKENS ─── */
:root {
  --lime:    #ff5e14;
  --lime-dk: #260b00;
  --orange:  #ff5e14;
  --orange-dk: #260b00;

  --bg:      #0a0b09;
  --surface: #141512;
  --surf-lo: #1a1b18;
  --surf-hi: #252623;
  --surf-hx: #303230;

  --text:    #e4e2dd;
  --text-dim: #9e9a9a;
  --outline: #6e6868;
  --outline-dim: #343130;

  --font-display: 'Basteleur', Georgia, serif;
  --font-body:    'Lato', system-ui, sans-serif;
  --font-mono:    'Courier New', Courier, monospace;

  --margin-d: 80px;
  --margin-m: 24px;
  --gap:      32px;
  --section-gap: 140px;

  /* Squarish subtle radii — unified 8px curvature */
  --r-sm:   4px;
  --r:      8px;
  --r-md:   8px;
  --r-lg:   8px;
  --r-xl:   8px;
  --r-full: 8px;
  --r-btn:  8px;
  --r-card: 8px;

  --nav-h: 68px;

  /* ─── EASING TOKENS (Emil Kowalski / animate skill) ─── */
  /* Strong ease-out for UI: enters fast, settles softly */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  /* Strong ease-in-out for on-screen movement */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  /* iOS-like drawer/panel curve (Ionic) */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  /* Snappy UI spring (approx.) */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ─── DURATION TOKENS ─── */
  --dur-press:   120ms;  /* button press feedback */
  --dur-hover:   200ms;  /* tooltips, small popovers */
  --dur-panel:   300ms;  /* dropdowns, selects */
  --dur-modal:   380ms;  /* modals, drawers */
  --dur-reveal:  850ms;  /* scroll reveals */
}

/* ─── BASE ─── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── UTILITIES ─── */
.mono-label {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--text-dim);
}

.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rule {
  border: none;
  border-top: 1px solid var(--outline-dim);
}

/* ─── NAVIGATION ─── */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  transition: background var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(10, 11, 9, 0.85);
  border-bottom-color: var(--outline-dim);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 var(--margin-d);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #ffffff;
  transition: color var(--dur-press) var(--ease-out);
}
.nav-logo:hover { color: var(--lime); }

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  transition: color var(--dur-press) var(--ease-out),
              background var(--dur-press) var(--ease-out),
              border-color var(--dur-press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--lime);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
  }
}

/* ── Language Switcher Button ── */
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--outline-dim);
  border-radius: var(--r-full);
  padding: 6px 14px;
  margin-left: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  transition: border-color var(--dur-press) var(--ease-out),
              background var(--dur-press) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
  user-select: none;
}
.lang-switch-btn:hover {
  border-color: rgba(255, 94, 20, 0.5);
  background: rgba(255, 255, 255, 0.09);
}
.lang-switch-btn:active {
  transform: scale(0.95);
}
.lang-opt {
  color: var(--text-dim);
  transition: color var(--dur-press) var(--ease-out);
}
.lang-opt.active {
  color: var(--orange);
  font-weight: 900;
}
.lang-divider {
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

/* ═══════════════════════════════════════════════════
   HERO — Scroll-driven video background
═══════════════════════════════════════════════════ */
.hero-track {
  position: relative;
  height: 240vh; /* Smooth scroll runway for the video */
  background: var(--bg);
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--nav-h) var(--margin-d) 40px;
  z-index: 2;
}

/* Background video — full screen cover */
.hero-bg-video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 0;
}

/* Subtle cinematic dark overlay for readability */
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 11, 9, 0.12) 0%, rgba(10, 11, 9, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Tagline in Hero — Scroll-driven fade in at second 6 */
.hero-tagline {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.tagline-text {
  font-family: var(--font-body);
  font-size: clamp(20px, 3.2vw, 36px);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85);
}


/* ═══════════════════════════════════════════════════
   LOGO MARQUEE — Side scroll ticker
═══════════════════════════════════════════════════ */
.logo-marquee-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 36px 0 0;
  background: var(--bg);
  z-index: 1;
}

.marquee-track {
  display: flex;
  width: 100%;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 84px;
  flex-shrink: 0;
  min-width: 100%;
  animation: marqueeScroll 26s linear infinite;
  padding-right: 84px;
}

.marquee-track:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 44px;
  padding: 0 4px;
}

.marquee-logo {
  display: block;
  height: 32px;
  max-height: 36px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.45;
  transition: opacity var(--dur-panel) var(--ease-out),
              transform var(--dur-panel) var(--ease-out),
              filter var(--dur-panel) var(--ease-out);
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .logo-item:hover .marquee-logo {
    opacity: 1;
    transform: scale(1.06);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 94, 20, 0.25));
  }
}

.marquee-divider {
  padding: 36px var(--margin-d) 0;
}

/* ═══════════════════════════════════════════════════
   INTRO — Presentation of Alonso
═══════════════════════════════════════════════════ */
.intro-section {
  position: relative;
  padding: 40px var(--margin-d) 110px;
  background: var(--bg);
  z-index: 1;
}

.intro-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.intro-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro-headline,
.intro-subtext--display {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
}

.intro-subtext {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 540px;
}

.intro-action {
  margin-top: 8px;
}

.btn-arrow {
  display: inline-block;
  transition: transform var(--dur-press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover .btn-arrow {
    transform: translateX(4px);
  }
}

.intro-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Photo floats freely — no card, no background */
.intro-photo-float {
  display: block;
  max-width: 380px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-card);
  animation: floatSlow 6s ease-in-out infinite alternate;
  will-change: transform;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 30px rgba(255, 94, 20, 0.1));
}

@keyframes floatSlow {
  0%   { transform: translateY(0px) rotate(0deg); }
  50%  { transform: translateY(-12px) rotate(0.35deg); }
  100% { transform: translateY(-22px) rotate(-0.35deg); }
}

/* Keep old card styles in case referenced elsewhere */
.intro-photo-card {
  position: relative;
  max-width: 360px;
  width: 100%;
  overflow: hidden;
  animation: floatSlow 6s ease-in-out infinite alternate;
  will-change: transform;
}

.intro-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════
   WORK — Selected Work 2-column square grid
═══════════════════════════════════════════════════ */
.work {
  position: relative;
  padding: 80px var(--margin-d) 80px;
  z-index: 1;
  background: var(--bg);
}

.work-header-bar {
  margin-bottom: 48px;
}

.work-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
}

.work-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  color: var(--text);
  margin-top: 0;
  padding-top: 6px;
}

/* 2x3 Square Grid */
.selected-work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  width: 100%;
}

.project-square-card {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1343 / 1078;
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: pointer;
  background: var(--surf-lo);
  border: 1px solid var(--outline-dim);
  transition: border-color var(--dur-panel) var(--ease-out),
              box-shadow  var(--dur-panel) var(--ease-out),
              transform   var(--dur-panel) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .project-square-card:hover {
    border-color: rgba(255, 94, 20, 0.4);
    box-shadow: 0 16px 40px -10px rgba(0,0,0,0.8), 0 0 30px -5px rgba(255,94,20,0.22);
    transform: translateY(-4px);
  }
}

.card-square-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .project-square-card:hover .card-square-img {
    transform: scale(1.05);
  }
}

.card-square-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px 24px;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.23, 1, 0.32, 1),
              visibility 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  z-index: 2;
}

.card-square-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  max-width: 88%;
  transform: translateY(6px);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-square-title {
  font-family: var(--font-body);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.card-square-cat {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.90);
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

/* Hover reveal — overlay appears with 30% black and centered text */
@media (hover: hover) and (pointer: fine) {
  .project-square-card:hover .card-square-overlay {
    opacity: 1;
    visibility: visible;
  }
  .project-square-card:hover .card-square-content {
    transform: translateY(0);
  }
}

.project-square-card:focus-visible .card-square-overlay,
.project-square-card:active .card-square-overlay {
  opacity: 1;
  visibility: visible;
}
.project-square-card:focus-visible .card-square-content,
.project-square-card:active .card-square-content {
  transform: translateY(0);
}

/* Call To Action below grid */
.work-footer-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 56px;
}
.btn-large {
  font-size: 15px;
  padding: 16px 36px;
}


/* ═══════════════════════════════════════════════════
   PROJECT MODAL OVERLAY
═══════════════════════════════════════════════════ */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
  transition:
    background var(--dur-modal) var(--ease-out),
    backdrop-filter var(--dur-modal) var(--ease-out),
    -webkit-backdrop-filter var(--dur-modal) var(--ease-out);
}
.project-modal.open {
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  pointer-events: auto;
}

.modal-inner {
  position: relative;
  width: min(520px, 90vw);
  max-height: 85vh;
  overflow-y: auto;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 52px 44px 44px;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition:
    opacity var(--dur-panel) var(--ease-out),
    transform var(--dur-modal) var(--ease-spring);
}
.project-modal.open .modal-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  cursor: pointer;
  transition:
    border-color var(--dur-press) var(--ease-out),
    color var(--dur-press) var(--ease-out),
    background var(--dur-press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .modal-close:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }
}

.modal-emoji {
  font-size: 52px;
  margin-bottom: 20px;
  line-height: 1;
}
.modal-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}
.modal-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.15;
}
.modal-category {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.40);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.modal-agency {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 28px;
}
.modal-desc {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 28px;
}
.modal-awards {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

/* ═══════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════ */
.about { padding: 0 var(--margin-d) var(--section-gap); }
.about-inner { max-width: 1200px; }
.about-header-bar { margin-bottom: 72px; }
.about-header-inner { padding-top: 14px; }

.about-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 72px;
  align-items: start;
}

.about-photo-col { display: flex; flex-direction: column; gap: 16px; }

.about-photo-wrap {
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--surf-lo);
  box-shadow: 0 0 60px -10px rgba(255,94,20,0.08);
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease-out), filter var(--dur-modal) var(--ease-out);
  filter: grayscale(0.1);
}
@media (hover: hover) and (pointer: fine) {
  .about-photo-wrap:hover .about-photo { transform: scale(1.03); filter: grayscale(0); }
}

.about-avail {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 2px;
}

.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

.about-text-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 4px;
}

.about-headline {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.2vw, 60px);
  font-weight: 300; /* Moonlight weight */
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
}
.about-headline em {
  font-style: italic;
  color: var(--text-dim);
  font-family: var(--font-display);
}

.about-bio { display: flex; flex-direction: column; gap: 14px; max-width: 500px; }
.about-bio p { font-size: 17px; line-height: 27px; color: var(--text-dim); }

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

.skill-tag {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--surf-lo);
  color: var(--text-dim);
  border: 1px solid var(--outline-dim);
  transition:
    background var(--dur-press) var(--ease-out),
    color var(--dur-press) var(--ease-out),
    border-color var(--dur-press) var(--ease-out);
  cursor: default;
}
@media (hover: hover) and (pointer: fine) {
  .skill-tag:hover {
    background: var(--lime);
    color: var(--lime-dk);
    border-color: var(--lime);
  }
}

.about-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 13px 26px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background var(--dur-press) var(--ease-out),
    color var(--dur-press) var(--ease-out),
    border-color var(--dur-press) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
  user-select: none;
}
.btn:active {
  transform: scale(0.97);
  transition-duration: 60ms;
}

.btn-primary {
  background: var(--text);
  color: #111210;
  border-color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--lime);
    color: var(--lime-dk);
    border-color: var(--lime);
  }
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--outline-dim);
}
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { border-color: var(--outline); }
}

/* ═══════════════════════════════════════════════════
   8-BIT GAME
═══════════════════════════════════════════════════ */
.game-section {
  padding: 0 var(--margin-d) var(--section-gap);
}

.game-inner { max-width: 860px; margin: 0 auto; }

.game-header {
  padding-top: 14px;
  margin-bottom: 48px;
}

.game-teaser {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Game canvas wrapper */
.game-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #0d0d0d;
  border: 1px solid var(--outline-dim);
  cursor: pointer;
  /* scanline overlay */
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.game-start-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  transition: opacity 0.3s ease;
}
.game-start-overlay.hidden { opacity: 0; pointer-events: none; }

.game-start-text {
  font-size: 14px;
  color: var(--lime);
  animation: blink 1.2s step-end infinite;
}

/* Score bar */
.game-score-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.game-score-bar strong {
  color: var(--lime);
  font-family: var(--font-mono);
}

.score-track {
  width: 100%;
  height: 4px;
  background: var(--outline-dim);
  border-radius: var(--r-full);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  width: 0%;
  background: var(--lime);
  border-radius: var(--r-full);
  transition: width 0.3s ease;
}

/* ─── CONTACT POPUP ─── */
.contact-popup {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  animation: fadeIn var(--dur-hover) var(--ease-out) both;
}
.contact-popup[hidden] { display: none; }

.popup-box {
  background: var(--surf-lo);
  border: 1px solid var(--outline-dim);
  border-radius: var(--r-xl);
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: popIn var(--dur-modal) var(--ease-spring) both;
}

.popup-emoji { font-size: 48px; }

.popup-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.popup-sub { font-size: 12px; }

.popup-btn {
  width: 100%;
  justify-content: center;
  font-size: 15px;
  padding: 16px;
  margin-top: 8px;
}

.popup-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--outline);
  transition: color var(--dur-press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .popup-close:hover { color: var(--lime); }
}

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.site-footer { padding: 0 var(--margin-d) 60px; }

.footer-layout,
.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  padding-top: 28px;
}

.footer-location {
  margin-left: 16px;
}

.footer-left { display: flex; flex-direction: column; gap: 4px; }

.footer-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.footer-center { display: flex; justify-content: center; }

.footer-email {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 32px);
  font-weight: 300;
  font-style: normal;
  color: var(--text);
  transition: color var(--dur-press) var(--ease-out);
}
.footer-email:hover { color: var(--lime); }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.footer-nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  transition: color var(--dur-press) var(--ease-out);
}
.footer-nav-link:hover { color: var(--lime); }

/* ═══════════════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(255,94,20,0.5); }
  50%     { opacity:.85; box-shadow: 0 0 0 5px rgba(255,94,20,0); }
}
@keyframes blink {
  0%,100% { opacity:1; }
  50%     { opacity:0; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */

/* ── iPad landscape / small laptop (≤1024px) ─────── */
@media (max-width: 1024px) {
  /* Horizontal padding */
  .work        { padding-left: 40px; padding-right: 40px; }
  .about       { padding-left: 40px; padding-right: 40px; }
  .game-section{ padding-left: 40px; padding-right: 40px; }
  .site-footer { padding-left: 40px; padding-right: 40px; }
  .nav-inner   { padding: 0 40px; }
  .intro-section { padding: 64px 40px 90px; }
  .marquee-divider { padding: 28px 40px 0; }

  /* About layout → 1 column */
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-photo-wrap { max-width: 220px; }

  /* Footer */
  .footer-layout,
  .footer-bottom { grid-template-columns: 1fr auto; gap: 24px; }
  .footer-right  { align-items: flex-end; flex-direction: column; gap: 6px; }
}

/* ── Tablet — iPad portrait / large Android (≤768px) */
@media (max-width: 768px) {
  :root {
    --nav-h: 58px;
    --section-gap: 100px;
  }

  /* Horizontal padding → tighter */
  .work        { padding: 56px var(--margin-m) 60px; }
  .about       { padding-left: var(--margin-m); padding-right: var(--margin-m); }
  .game-section{ padding-left: var(--margin-m); padding-right: var(--margin-m); }
  .site-footer { padding-left: var(--margin-m); padding-right: var(--margin-m); }
  .nav-inner   { padding: 0 var(--margin-m); }
  .intro-section { padding: 40px var(--margin-m) 80px; }
  .marquee-divider { padding: 24px var(--margin-m) 0; }

  /* Hero sticky inner padding */
  .hero-sticky { padding-left: var(--margin-m); padding-right: var(--margin-m); }

  /* Tagline — bigger on mobile screens */
  .tagline-text { font-size: clamp(16px, 5.5vw, 30px); letter-spacing: 0.08em; }

  /* Nav links — smaller */
  .nav-links { gap: 2px; }
  .nav-link  { font-size: 13px; padding: 7px 12px; }
  .nav-logo  { font-size: 19px; }

  /* Intro stacks — photo goes on top and centered */
  .intro-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .intro-right {
    order: -1;
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .intro-left {
    align-items: center;
    text-align: center;
  }
  .intro-action {
    display: flex;
    justify-content: center;
  }
  .intro-headline { font-size: clamp(32px, 6vw, 48px); }
  .intro-photo-card, .intro-photo-float {
    max-width: 280px;
    margin: 0 auto;
  }

  /* Work grid on tablet */
  .selected-work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .card-square-overlay { padding: 22px 24px; }
  .card-square-title { font-size: clamp(19px, 2.5vw, 26px); }
  .card-square-cat { font-size: 14px; }

  /* About */
  .about-photo-wrap { max-width: 180px; }
  .about-headline   { font-size: clamp(28px, 6.5vw, 48px); }
  .about-bio p      { font-size: 16px; line-height: 25px; }

  /* Footer email */
  .footer-email { font-size: clamp(16px, 3.5vw, 24px); }

  /* Game */
  .game-title { font-size: 26px; }

  /* Work header */
  .work-header-inner { flex-wrap: wrap; gap: 6px; }
}

/* ── Mobile phones (≤640px) ─────────────────────── */
@media (max-width: 640px) {
  .selected-work-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ── Mobile — phones (≤480px) ───────────────────── */
@media (max-width: 480px) {
  :root {
    --nav-h: 54px;
    --section-gap: 80px;
  }

  /* Body font smaller */
  body { font-size: 16px; line-height: 26px; }

  /* Nav — compact */
  .nav-logo  { font-size: 17px; }
  .nav-links { gap: 0; }
  .nav-link  { font-size: 12px; padding: 6px 9px; }
  .lang-switch-btn {
    padding: 5px 8px;
    margin-left: 4px;
    font-size: 11px;
    gap: 3px;
  }

  /* Hero */
  .tagline-text { font-size: clamp(14px, 5vw, 22px); letter-spacing: 0.06em; }

  /* Intro mobile */
  .intro-section { padding: 32px 16px 64px; }
  .marquee-divider { padding: 20px 16px 0; }
  .marquee-content { gap: 48px; padding-right: 48px; }
  .intro-headline { font-size: 30px; }
  .intro-subtext { font-size: 16px; }
  .intro-photo-card, .intro-photo-float { max-width: 220px; margin: 0 auto; }

  /* Work section */
  .work { padding: 44px 16px 44px; }
  .work-header-bar { margin-bottom: 28px; }
  .work-title { font-size: 28px; }
  .card-square-overlay { padding: 18px 20px; border-radius: var(--r-card); }
  .project-square-card { border-radius: var(--r-card); }
  .card-square-title { font-size: 21px; }
  .card-square-cat { font-size: 13px; }
  .work-footer-cta { margin-top: 40px; }

  /* About */
  .about { padding-left: 16px; padding-right: 16px; }
  .about-header-bar { margin-bottom: 40px; }
  .about-photo-wrap { max-width: 140px; }
  .about-headline   { font-size: clamp(26px, 8vw, 40px); }
  .about-bio p      { font-size: 15px; line-height: 24px; }
  .about-actions    { flex-direction: column; }
  .btn              { width: 100%; justify-content: center; }

  /* Modal */
  .modal-inner {
    padding: 40px 20px 28px;
    border-radius: 16px;
  }
  .modal-emoji  { font-size: 40px; margin-bottom: 14px; }
  .modal-title  { font-size: clamp(22px, 6vw, 30px); }
  .modal-desc   { font-size: 14px; line-height: 1.65; }

  /* Game */
  .game-section{ padding-left: 16px; padding-right: 16px; }
  .game-title  { font-size: 22px; }

  /* Footer */
  .site-footer { padding-left: 16px; padding-right: 16px; padding-bottom: 40px; }
  .footer-email { font-size: clamp(15px, 5vw, 20px); }
  .footer-layout,
  .footer-bottom { gap: 16px; }

  /* Contact popup */
  .popup-box { padding: 36px 24px; }
  .popup-title { font-size: 22px; }
}


/* ═══════════════════════════════════════════════════
   SCROLL ANIMATIONS & MOTION LAYER
═══════════════════════════════════════════════════ */

/* ── Scroll progress bar ────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 9999;
  pointer-events: none;
}

/* ── Nav hide ───────────────────────────────────── */
.site-nav {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}
.site-nav.nav-hidden { transform: translateY(-100%); }

/* ── Hero parallax will-change ──────────────────── */
.hero-3d,
.hero-tagline { will-change: transform; }

/* ── Ambient orbs ───────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(72px);
  z-index: 0;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,94,20,0.14) 0%, transparent 70%);
  top: -100px; left: 50%; transform: translateX(-50%);
  animation: orbDrift1 9s ease-in-out infinite;
}
.orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,107,43,0.08) 0%, transparent 70%);
  bottom: 10%; right: 5%;
  animation: orbDrift2 11s ease-in-out infinite;
}
.orb-3 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,140,0,0.06) 0%, transparent 70%);
  top: 40%; left: 3%;
  animation: orbDrift1 8s ease-in-out infinite reverse;
}

@keyframes orbDrift1 {
  0%,100% { transform: translateX(-50%) translate(0,0); }
  33%     { transform: translateX(-50%) translate(22px,-30px); }
  66%     { transform: translateX(-50%) translate(-14px,20px); }
}
@keyframes orbDrift2 {
  0%,100% { transform: translate(0,0); }
  40%     { transform: translate(-18px,26px); }
  70%     { transform: translate(16px,-14px); }
}

/* ── Floating dots ──────────────────────────────── */
.hero-dots {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
}
.hero-dot {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--lime);
  animation: dotFloat 4s ease-in-out infinite;
}
@keyframes dotFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  25%     { transform: translate(7px,-11px) scale(1.3); }
  50%     { transform: translate(-4px,-18px) scale(0.8); }
  75%     { transform: translate(9px,-7px) scale(1.1); }
}

/* ── Grain overlay ──────────────────────────────── */
/*
 * Grain suavizado (-20% de intensidad):
 *   contrast(175%) + brightness(145%) para una textura más fina y limpia
 *   grayscale(45%) desatura el tinte naranja para un acabado sutil
 */
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;

  filter: grayscale(45%) contrast(175%) brightness(145%);

  background:
    linear-gradient(
      180deg,
      rgba(255, 110, 30, 0.45) 0%,
      rgba(180,  70,  20, 0.15) 45%,
      rgba(0,   0,   0,   0)    82%
    ),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");

  background-size:
    100% 100%,
    250px 250px;

  mix-blend-mode: overlay;
}

/* Hero content above orbs */
.hero-3d, .hero-tagline { position: relative; z-index: 2; }

/* ── Reveal animations ──────────────────────────── */
.reveal { will-change: opacity, transform; }

.reveal.reveal-up {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
}
.reveal.reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
}
.reveal.reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* ── 3D Card tilt ───────────────────────────────── */
.project-card {
  transform-style: preserve-3d;
  transform:
    perspective(900px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  transition:
    transform    var(--tilt-dur, 0.7s) var(--ease-out),
    border-color var(--dur-hover) var(--ease-out),
    box-shadow   var(--dur-hover) var(--ease-out);
  will-change: transform;
}

/* Specular shine */
.project-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--shine-x, 50%) var(--shine-y, 50%),
    rgba(255,255,255,0.07) 0%, transparent 55%
  );
  opacity: var(--shine-op, 0);
  transition: opacity var(--dur-hover) var(--ease-out);
  pointer-events: none;
  z-index: 10;
}

.project-card:hover {
  transform:
    perspective(900px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translateZ(6px);
  box-shadow: 0 28px 70px -10px rgba(0,0,0,0.6), 0 0 0 1px var(--outline-dim);
}

/* ── About photo parallax ───────────────────────── */
.about-photo-col {
  will-change: transform;
  transition: transform 0.08s linear;
}

/* ── Magnetic buttons (transition merge) ────────── */
.btn, .hero-cta, .nav-link {
  transition:
    transform    0.35s var(--ease-out),
    background   var(--dur-press) var(--ease-out),
    color        var(--dur-press) var(--ease-out),
    border-color var(--dur-press) var(--ease-out);
}


/* ── Reduced motion (Emil Kowalski / animate skill guidance) ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *, *::before, *::after {
    animation-iteration-count: 1 !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  /* Retain gentle opacity fades for state transitions */
  .project-modal,
  .modal-inner,
  .site-nav,
  .btn,
  .nav-link,
  .skill-tag {
    transition: opacity var(--dur-hover) ease !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .intro-photo-float,
  .orb,
  .hero-dot {
    animation: none !important;
    transform: none !important;
  }

  .marquee-content {
    animation: none !important;
    overflow-x: auto;
  }
}

/* ═══════════════════════════════════════════════════
   SUBPAGES: PROJECT DETAIL, ABOUT & CONTACT
═══════════════════════════════════════════════════ */
.subpage-wrap {
  padding: calc(var(--nav-h) + 48px) var(--margin-d) var(--section-gap);
  max-width: 1240px;
  margin: 0 auto;
}

.subpage-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease, transform 0.2s ease;
}
.subpage-back:hover {
  color: var(--orange);
  transform: translateX(-3px);
}

.subpage-header {
  margin-bottom: 44px;
}

.subpage-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.subpage-subtitle {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.8vw, 22px);
  color: var(--text-dim);
  max-width: 700px;
  line-height: 1.5;
}

/* Project Detail Meta Bar */
.project-meta-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--outline-dim);
  border-bottom: 1px solid var(--outline-dim);
  margin-bottom: 48px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.meta-value {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* Project Hero Showcase & Media Galleries — adapts to content's native dimensions */
.project-hero-media,
.project-media-item {
  width: 100%;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--outline-dim);
  background: var(--surf-lo);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-hero-media {
  margin-bottom: 56px;
}

.project-hero-img,
.project-hero-video,
.project-media-item img,
.project-media-item video {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.project-hero-video,
.project-media-item video {
  background: #000;
  outline: none;
}

/* Multi-item flow and grids */
.project-media-flow {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-bottom: 56px;
}

.project-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  width: 100%;
  margin-bottom: 36px;
}

.project-media-grid.is-reels {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.project-media-grid.is-reels-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  gap: 24px;
}

.project-media-grid.is-reels-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 960px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 36px;
}

.project-media-grid.is-reels-4 video {
  max-height: 460px;
}

.project-media-grid.is-photos-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  margin-bottom: 36px;
}

.project-media-grid.is-2-cols {
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  margin-bottom: 36px;
}

.project-media-grid.is-square {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

@media (max-width: 900px) {
  .project-media-grid.is-reels-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .project-media-grid,
  .project-media-grid.is-reels,
  .project-media-grid.is-reels-3,
  .project-media-grid.is-photos-3,
  .project-media-grid.is-2-cols,
  .project-media-grid.is-square {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.project-standalone-media {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 36px;
}

.project-standalone-media img,
.project-media-item.is-borderless {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Editorial Masonry Collage (e.g. Kilo photo series) */
.project-media-masonry {
  column-count: 3;
  column-gap: 24px;
  width: 100%;
  margin-bottom: 56px;
}

.project-masonry-item {
  break-inside: avoid;
  margin-bottom: 24px;
  display: block;
  border-radius: var(--r-card);
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}

.project-masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-card);
  transition: transform 0.3s ease;
}

.project-masonry-item img:hover {
  transform: scale(1.015);
}

@media (max-width: 900px) {
  .project-media-masonry {
    column-count: 2;
    column-gap: 20px;
  }
  .project-masonry-item {
    margin-bottom: 20px;
  }
}

@media (max-width: 560px) {
  .project-media-masonry {
    column-count: 1;
  }
}

/* 2-Column Split Layout (e.g. Hush Puppies: Image on Left + Text on Right) */
.project-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto 80px;
}

.project-split-media {
  display: flex;
  justify-content: center;
}

.standalone-image {
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border-radius: var(--r-card);
}

@media (max-width: 768px) {
  .project-split-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .standalone-image {
    max-width: 100%;
  }
}

/* Prevent image & video dragging / selection for download protection */
img, video {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* Project Body Content */
.project-body {
  max-width: 860px;
  margin: 0 auto 80px;
}

.project-body-centered {
  text-align: center;
  margin: 0 auto 56px;
}

.project-description {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-narrative {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.65;
  color: var(--text);
}

.project-narrative p {
  margin-bottom: 16px;
}

.project-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px;
  background: var(--surf-lo);
  border: 1px solid var(--outline-dim);
  border-radius: var(--r-card);
  height: fit-content;
}

.sidebar-heading {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.sidebar-list li {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.45;
}

.sidebar-list strong {
  color: var(--text);
}

/* Bottom Project Pagination */
.project-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-top: 40px;
  border-top: 1px solid var(--outline-dim);
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease;
}

.project-nav-prev {
  align-items: flex-start;
  text-align: left;
}

.project-nav-next {
  align-items: flex-end;
  text-align: right;
}

.project-nav-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.project-nav-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--outline-dim);
  background: var(--surf-lo);
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease;
}

.project-nav-link:hover .project-nav-label {
  color: var(--orange);
}

.project-nav-link:hover .project-nav-thumb {
  border-color: rgba(255, 94, 20, 0.55);
  transform: translateY(-2px);
}

@media (max-width: 560px) {
  .project-nav-thumb {
    width: 96px;
    height: 64px;
  }
}

/* About Page Specific Layout */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
  margin-bottom: 64px;
}

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

.about-header-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-lead {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.about-paragraph {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dim);
}

.about-paragraph p:not(:last-child) {
  margin-bottom: 14px;
}

.about-skills-block,
.about-awards-block {
  margin-top: 12px;
}

.about-skills-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}

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

.about-skill-tag {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-btn);
  background: var(--surf-lo);
  border: 1px solid var(--outline-dim);
  color: var(--text);
}

.about-awards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-award-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--r-btn);
  background: var(--surf-lo);
  border: 1px solid var(--outline-dim);
  transition: border-color var(--dur-panel) var(--ease-out),
              transform var(--dur-panel) var(--ease-out);
}

.about-award-item:hover {
  border-color: rgba(255, 94, 20, 0.45);
  transform: translateX(4px);
}

.about-award-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.about-award-project {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.about-award-item:hover .about-award-project {
  color: var(--orange);
}

.about-photo-wrapper {
  display: flex;
  justify-content: center;
}

/* Floating photo — no frame */
.about-photo-stage {
  position: relative;
  max-width: 420px;
  width: 100%;
  animation: floatSlow 6s ease-in-out infinite alternate;
  will-change: transform;
}

.about-photo-front {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-card);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 30px rgba(255, 94, 20, 0.1));
}

/* Contact Page Specific Layout */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
}

.contact-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 48px 0;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 28px;
  background: var(--surf-lo);
  border: 1px solid var(--outline-dim);
  border-radius: var(--r-card);
  transition: border-color var(--dur-panel) var(--ease-out),
              transform var(--dur-panel) var(--ease-out),
              box-shadow var(--dur-panel) var(--ease-out);
}

.contact-card:hover {
  border-color: rgba(255, 94, 20, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.8), 0 0 30px -5px rgba(255,94,20,0.2);
}

.contact-card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.contact-card-value {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.contact-card-hint {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-dim);
}

/* Responsive Subpage Layouts */
@media (max-width: 900px) {
  .subpage-wrap {
    padding: calc(var(--nav-h) + 32px) var(--margin-m) 80px;
  }
  .about-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
  }
  .about-text-content {
    min-width: 0;
  }
  .about-lead {
    font-size: clamp(20px, 3.6vw, 30px);
  }
  .about-paragraph {
    font-size: 15px;
    line-height: 1.6;
  }
  .about-photo-wrapper {
    min-width: 0;
  }
  .about-photo-stage {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .about-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    margin-bottom: 40px;
  }
  .about-text-content {
    gap: 14px;
  }
  .about-lead {
    font-size: clamp(16px, 4.4vw, 22px);
    line-height: 1.2;
  }
  .about-paragraph {
    font-size: 13px;
    line-height: 1.5;
  }
  .about-awards-block {
    margin-top: 4px;
  }
  .about-skills-title {
    font-size: 10px;
    margin-bottom: 10px;
  }
  .about-awards-list {
    gap: 8px;
  }
  .about-award-item {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 4px 10px;
  }
  .about-award-title {
    font-size: 12px;
  }
  .about-award-project {
    font-size: 10px;
  }
}
