/* =========================================
   GEORGIA J. SUMMERS — PORTFOLIO
   v3: narrow centered editorial, monochrome
========================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

body:not(.site-ready) {
  overflow: hidden;
  height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

svg {
  display: block;
}

/* =========================================
   TOKENS
========================================= */

:root {
  --paper: #ffffff;
  --ink: #0c0c0b;
  --grey: #96938a;
  --grey-light: #cbc8bd;
  --line: #ece9e1;

  --sans: "Inter", Arial, sans-serif;
  --mono: "DM Mono", monospace;

  --accent: #ff2f92;

  --wrap: 760px;
}

:root[data-theme="dark"] {
  --paper: #0c0c0b;
  --card: #171715;
  --ink: #f2f0ea;
  --grey: #8f8c82;
  --grey-light: #57554d;
  --line: #232320;
  --line-strong: #33322d;
}

body,
.top-bar,
.rail,
.float-btn,
.faq-panel {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-wide {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   TOP BAR — single, slim
========================================= */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.top-bar-inner {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar .logo {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.top-nav {
  display: flex;
  gap: 26px;
}

.top-nav a {
  font-size: 0.82rem;
  color: var(--grey);
  transition: color 0.2s ease;
}

.top-nav a:hover,
.top-nav a.is-active {
  color: var(--ink);
}

.top-icons {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.icon-btn svg {
  width: 13px;
  height: 13px;
}

.icon-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.menu-button {
  display: none;
  position: relative;
  width: 30px;
  height: 30px;
}

.menu-button span {
  position: absolute;
  left: 5px;
  width: 20px;
  height: 1px;
  background: var(--ink);
}

.menu-button span:first-child {
  top: 12px;
}

.menu-button span:last-child {
  top: 18px;
}

/* =========================================
   MOBILE MENU
========================================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: var(--paper);
  display: flex;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-menu-inner {
  width: 100%;
  padding: 9vw 8vw;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-label {
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--grey);
}

.mobile-menu a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2rem, 10vw, 3.4rem);
  letter-spacing: -0.02em;
}

/* =========================================
   MAIN
========================================= */

main {
  padding-top: 58px;
}

/* =========================================
   HERO
========================================= */

.hero {
  padding: 40px 0 0;
}

.hero-eyebrow {
  display: flex;
  justify-content: flex-end;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--grey);
  margin-bottom: 26px;
}

.hero-name {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-name .first {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
}

.hero-name .stat {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--grey);
}

.hero-visual {
  margin-top: 20px;
}

.hero-crop {
  font-weight: 800;
  font-size: clamp(4.4rem, 15vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

#about .hero-crop {
  font-size: clamp(5.2rem, 19vw, 13.5rem);
}

.script-heading {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(4.4rem, 15vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.hero-crop-tags {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--grey);
}

.top-search-panel {
  position: fixed;
  top: 66px;
  right: 24px;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(12, 12, 11, 0.08);
  display: none;
  z-index: 1100;
}

.top-search-panel.open {
  display: block;
}

.top-search-panel .search-bar {
  border-radius: 999px;
}

.top-search-panel .search-results {
  position: static;
  border: none;
  border-radius: 0;
  margin-top: 8px;
}

.top-search-panel .search-results.open {
  display: block;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong, var(--line));
  color: var(--grey);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--ink);
  color: var(--ink);
}

.search-bar svg {
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink);
}

.search-bar input::placeholder {
  color: var(--grey);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  z-index: 50;
}

.search-results.open {
  display: block;
}

.search-results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.search-results button:last-child {
  border-bottom: none;
}

.search-results button:hover,
.search-results button:focus-visible {
  background: var(--line);
}

.search-results .r-section {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--grey);
}

.search-results .r-empty {
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--grey);
}

.section-head.flash {
  animation: flash-highlight 1.1s ease;
}

@keyframes flash-highlight {
  0% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.pill-btn:hover {
  opacity: 0.75;
}

.pill-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong, var(--line));
}

.pill-btn.ghost:hover {
  background: var(--ink);
  color: var(--paper);
  opacity: 1;
}

/* Hot pink treatment: CV actions + Let's Talk contact links */

.pass-actions .pill-btn,
.contact-links .pill-btn {
  background: var(--accent);
  color: #ffffff;
}

.pass-actions .pill-btn.ghost,
.contact-links .pill-btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.pass-actions .pill-btn.ghost:hover,
.contact-links .pill-btn.ghost:hover {
  background: var(--accent);
  color: #ffffff;
}

/* =========================================
   HERO GAME — penalty shootout
========================================= */

.hero-game-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
  max-width: 560px;
  margin: 40px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.hero-game {
  max-width: 340px;
  flex-shrink: 0;
}

.game-invite {
  margin-top: 6px;
  max-width: 180px;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--grey);
}

.game-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

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

.game-best {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--grey-light);
}

.game-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--grey);
}

.game-score {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.pitch {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.goal {
  position: relative;
  width: 220px;
  height: 96px;
}

.net {
  position: absolute;
  inset: 0;
  border: 2px solid var(--ink);
  border-bottom: none;
  background-color: transparent;
  background-image:
    repeating-linear-gradient(
      to right,
      var(--line) 0,
      var(--line) 1px,
      transparent 1px,
      transparent 20px
    ),
    repeating-linear-gradient(
      to bottom,
      var(--line) 0,
      var(--line) 1px,
      transparent 1px,
      transparent 16px
    );
  transition: background-color 0.15s ease;
}

.net.flash {
  animation: net-flash 0.5s ease;
}

.net.shake {
  animation: net-shake 0.4s ease;
}

@keyframes net-flash {
  0% {
    background-color: var(--ink);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes net-shake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
}

.keeper {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 28px;
  height: 40px;
  margin-left: -14px;
  border-radius: 6px 6px 0 0;
  background: var(--ink);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.keeper.zone-left {
  transform: translateX(-72px) rotate(-14deg);
}

.keeper.zone-center {
  transform: translateX(0);
}

.keeper.zone-right {
  transform: translateX(72px) rotate(14deg);
}

.ball {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ball.zone-left {
  transform: translate(-72px, -66px);
}

.ball.zone-center {
  transform: translate(0, -66px);
}

.ball.zone-right {
  transform: translate(72px, -66px);
}

.shot-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.shot-buttons .pill-btn {
  padding: 9px 16px;
  font-size: 0.65rem;
}

.shot-buttons .pill-btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.game-result {
  margin-top: 14px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--grey);
  min-height: 1.4em;
}

.game-result.goal {
  color: var(--ink);
  font-weight: 600;
}

.game-result.saved {
  color: var(--grey);
}

.game-streak {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--grey);
}

.hero-role {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--grey);
  min-height: 1.4em;
}

.cursor-blink {
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 3px;
  background: var(--grey);
  vertical-align: -0.12em;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* =========================================
   SECTION SHELL
========================================= */

.section {
  padding-block: 90px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 44px;
}

.paren-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--grey);
}

.section-head h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.about-copy p {
  margin-bottom: 22px;
  font-size: 1rem;
  line-height: 1.75;
}

.inline-link {
  text-decoration: underline;
  text-decoration-color: var(--line-strong, var(--grey-light));
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.inline-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.about-copy p.lede {
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.hi-greeting {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(5.5rem, 14vw, 10rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  margin-bottom: 44px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--accent);
}

.hi-size {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(5.5rem, 14vw, 10rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
}

.talk-size {
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 6px;
}

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--grey);
}

.about-education {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.education-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--grey);
}

.about-education p {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

/* =========================================
   STATS — big number moment
========================================= */

.stats {
  padding-block: 70px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12vw;
}

.stat-num {
  display: block;
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.stat-cap {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--grey);
}

/* =========================================
   WORK — single showreel block
========================================= */

.fixture-note {
  margin-bottom: 34px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--grey);
  max-width: 480px;
}

.showreel {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: linear-gradient(150deg, #171715, #38372f);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showreel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.12) 1px,
    transparent 1.3px
  );
  background-size: 5px 5px;
}

.showreel-play {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}

.showreel-play svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

.showreel-cap {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
}

.showreel-badge {
  position: absolute;
  right: 18px;
  bottom: 16px;
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.showreel-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--grey);
}

/* =========================================
   APPROACH
========================================= */

.statement {
  padding: 100px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: end;
}

.statement-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--grey);
  display: block;
  margin-bottom: 18px;
}

.statement h2 {
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.statement-copy p {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--grey);
}

/* =========================================
   EXPERIENCE / CV
========================================= */

.cv-block {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.pass-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--grey);
  margin-bottom: 20px;
}

.pass-copy {
  max-width: 480px;
  margin: 20px 0 30px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--grey);
}

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

/* =========================================
   SKILLS — numbered list
========================================= */

.scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
}

.sb-label {
  display: block;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--grey);
}

.sb-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.sb-index {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--grey-light);
  width: 18px;
}

.sb-name {
  font-size: 0.92rem;
  flex: 1;
}

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

.contact {
  padding-top: 90px;
  padding-bottom: 60px;
  border-top: 1px solid var(--line);
}

.contact-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--grey);
  margin-bottom: 20px;
}

.contact h2 {
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 34px;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

footer {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--grey);
}

.back-to-top {
  cursor: pointer;
  transition: color 0.2s ease;
}

.back-to-top:hover {
  color: var(--ink);
}

/* =========================================
   REVEAL
========================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 760px) {
  .top-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero-crop {
    font-size: clamp(3.4rem, 17vw, 6rem);
  }

  .hero-game-row {
    flex-direction: column;
    align-items: stretch;
    margin: 20px auto 0;
    gap: 20px;
  }

  .game-invite {
    max-width: none;
  }

  .stats {
    flex-direction: column;
    gap: 34px;
  }

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

  .scoreboard {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section {
    padding-block: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

/* =========================================
   CUSTOM CURSOR
========================================= */

.cursor,
.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 3000;
}

.cursor {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.cursor-follower {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 50%;
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
}

body.cursor-hover .cursor-follower {
  width: 44px;
  height: 44px;
  border-color: var(--ink);
}

@media (hover: none), (pointer: coarse) {
  .cursor,
  .cursor-follower {
    display: none;
  }
}

/* =========================================
   SCROLL PROGRESS
========================================= */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1200;
}

/* =========================================
   RETRO LOADING SCREEN
========================================= */

.loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-text {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.loader-bar {
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

:root[data-theme="dark"] .loader-bar {
  background: rgba(0, 0, 0, 0.25);
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: var(--paper);
}

/* =========================================
   WELCOME OVERLAY
========================================= */

.welcome {
  position: fixed;
  inset: 0;
  z-index: 4900;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.welcome.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(90vw, 360px);
  text-align: left;
}

.welcome-prompt {
  font-family: var(--mono);
  font-size: 0.75rem;
  opacity: 0.6;
}

.welcome-label {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.5;
}

.welcome-input {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 1.1rem;
  padding: 8px 2px;
  outline: none;
  transition: border-color 0.2s ease;
}

.welcome-input:focus {
  border-bottom-color: var(--accent);
}

.welcome-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
}

.welcome-actions .pill-btn {
  background: var(--paper);
  color: var(--ink);
}

.welcome-skip {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
}

.welcome-skip:hover {
  color: var(--paper);
}

/* =========================================
   HI! TYPEWRITER
========================================= */

.hi-typewriter {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--grey);
  min-height: 1.4em;
  margin-bottom: 26px;
}

.hi-typewriter .cursor-blink {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 3px;
  background: var(--grey);
  vertical-align: -0.12em;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* =========================================
   WORK — reordered note + no meta row
========================================= */

.fixture-note {
  margin-top: 18px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--grey);
  max-width: 480px;
}

/* =========================================
   SKILLS — big clickable list
========================================= */

.skills-note {
  margin-bottom: 40px;
  font-size: 0.9rem;
  color: var(--grey);
  max-width: 480px;
}

.skills-stack {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.skill-big {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.2s ease, padding-left 0.25s ease;
}

.skill-big:hover {
  opacity: 0.55;
  padding-left: 14px;
}

.skill-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 12px 20px;
  border-radius: 999px;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1500;
  white-space: nowrap;
}

.skill-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================
   CONTACT — message box
========================================= */

.contact-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 50px;
  padding: 26px;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 14px;
  max-width: 420px;
}

.contact-box-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--grey);
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-field label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--grey);
}

.contact-field input,
.contact-field textarea {
  border: none;
  border-bottom: 1px solid var(--line-strong, var(--line));
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 6px 2px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--accent);
}

.contact-send {
  align-self: flex-start;
  margin-top: 4px;
}

/* =========================================
   FOOTER — 3 column
========================================= */

footer span:nth-child(2) {
  text-align: center;
}

footer span:nth-child(3) {
  text-align: right;
}

/* =========================================
   FLOATING CONTROLS
========================================= */

.float-btn {
  position: fixed;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong, var(--line));
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1400;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, color 0.2s ease;
  box-shadow: 0 6px 18px rgba(12, 12, 11, 0.08);
}

.float-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.theme-toggle {
  left: 24px;
  bottom: 24px;
}

.icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-moon {
  display: block;
}

.back-to-top {
  right: 24px;
  bottom: 84px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.faq-toggle {
  right: 24px;
  bottom: 24px;
}

@media (max-width: 640px) {
  .theme-toggle {
    left: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }

  .back-to-top {
    right: 16px;
    bottom: 70px;
    width: 40px;
    height: 40px;
  }

  .faq-toggle {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }

  .skill-toast {
    bottom: 76px;
    max-width: 88vw;
    white-space: normal;
    text-align: center;
  }
}

/* =========================================
   FAQ ASSISTANT PANEL
========================================= */

.faq-panel {
  position: fixed;
  right: 24px;
  bottom: 82px;
  width: min(92vw, 340px);
  max-height: 60vh;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(12, 12, 11, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  z-index: 1450;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.faq-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.faq-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.faq-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
}

.faq-sub {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--grey);
}

.faq-close {
  font-size: 0.85rem;
  color: var(--grey);
  line-height: 1;
}

.faq-close:hover {
  color: var(--ink);
}

.faq-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.faq-msg-bot {
  align-self: flex-start;
  background: var(--line);
  color: var(--ink);
}

.faq-msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #ffffff;
}

.faq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

.faq-chips .faq-chip {
  padding: 7px 12px;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 999px;
  font-size: 0.68rem;
  color: var(--grey);
  transition: background 0.2s ease, color 0.2s ease;
}

.faq-chips .faq-chip:hover {
  background: var(--ink);
  color: var(--paper);
}

.faq-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.faq-input-row input {
  flex: 1;
  border: none;
  outline: none;
  background: var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink);
}

.faq-input-row button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* =========================================
   WORK — featured project
========================================= */

.project {
  margin-bottom: 70px;
}

.project-tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--grey);
  margin-bottom: 12px;
}

.project-title {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.project-copy {
  max-width: 600px;
  margin-bottom: 14px;
  font-size: 1rem;
  line-height: 1.75;
}

.project-charts {
  display: grid;
  gap: 56px;
  margin-top: 40px;
}

.chart {
  margin: 0;
}

.chart a {
  display: block;
  border-radius: 4px;
  overflow: hidden;
}

.chart img {
  display: block;
  width: 100%;
  height: auto;
}

.chart a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.chart figcaption {
  max-width: 600px;
  margin-top: 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--grey);
}

.chart-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.project-watch {
  margin-top: 56px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.project-actions .pill-btn {
  background: var(--accent);
  color: #ffffff;
}

.project-actions .pill-btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.project-actions .pill-btn.ghost:hover {
  background: var(--accent);
  color: #ffffff;
}

.showreel-block {
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* =========================================
   SUBPAGES — shared
========================================= */

.subpage main {
  padding-top: 110px;
}

.top-nav a[aria-current="page"] {
  color: var(--ink);
}

.project-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #121212;
}

.project-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-play {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.project-play svg {
  width: 14px;
  height: 14px;
  margin-left: 2px;
}

.project-media:hover .project-play,
.project-media:focus-visible .project-play {
  transform: scale(1.08);
}

.project-media:focus-visible,
.case-figure a:focus-visible,
.work-link:focus-visible,
.log summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* =========================================
   WORK & LOGS — index
========================================= */

.work-head {
  padding-bottom: 50px;
}

.work-intro {
  max-width: 560px;
  margin-top: 28px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--grey);
}

.work-list {
  list-style: none;
  padding-bottom: 90px;
}

.work-item {
  border-top: 1px solid var(--line);
}

.work-item:last-child {
  border-bottom: 1px solid var(--line);
}

.work-link {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: center;
  padding: 30px 0;
}

.work-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #121212;
}

.work-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-text {
  display: block;
}

.work-item-soon .work-text {
  padding: 30px 0;
}

.work-title {
  display: block;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.work-item-soon .work-title {
  color: var(--grey);
}

.work-desc {
  display: block;
  max-width: 520px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--grey);
}

.work-more {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-link:hover .work-title {
  color: var(--accent);
}

/* =========================================
   CASE STUDY
========================================= */

.back-link {
  display: inline-block;
  margin-bottom: 40px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--grey);
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
}

.case-title {
  font-size: clamp(2.8rem, 9vw, 5.6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}

.case-lede {
  max-width: 600px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.55;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 40px;
  margin: 40px 0 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.facts dt,
.tab-list dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--grey);
  margin-bottom: 4px;
}

.facts dd {
  font-size: 0.95rem;
  line-height: 1.5;
}

.case-hero {
  padding-top: 50px;
}

.figure-caption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--grey);
}

.case-section {
  padding-block: 80px;
  border-top: 1px solid var(--line);
  margin-top: 70px;
}

.case-section + .case-section {
  margin-top: 0;
}

.case-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.case-section > p {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}

.question-list {
  max-width: 620px;
  margin: 8px 0 20px 1.2em;
  font-size: 1rem;
  line-height: 1.75;
}

.question-list li {
  padding-left: 6px;
  margin-bottom: 6px;
}

.question-list li::marker {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.case-figure {
  margin: 50px 0 0;
}

.case-figure a {
  display: block;
  border-radius: 4px;
  overflow: hidden;
}

.case-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.case-figure figcaption {
  max-width: 620px;
  margin-top: 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--grey);
}

.figure-title {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.figure-credit {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.6;
}

.tab-list {
  max-width: 620px;
  margin: 26px 0 30px;
}

.tab-list div {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.tab-list dd {
  font-size: 0.98rem;
  line-height: 1.6;
}

.tab-list dt {
  font-size: 0.72rem;
  color: var(--accent);
}

/* Development log timeline */

.log {
  list-style: none;
  margin-top: 36px;
  position: relative;
}

.log::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 30px;
  bottom: 30px;
  width: 1px;
  background: var(--line);
}

.log-item {
  position: relative;
}

.log summary {
  display: grid;
  grid-template-columns: 44px 1fr 22px;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
}

.log summary::-webkit-details-marker {
  display: none;
}

.log-num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-strong, var(--grey-light));
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--grey);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.log details[open] .log-num,
.log summary:hover .log-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.log-head {
  display: block;
  padding-top: 2px;
}

.log-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.log-goal {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--grey);
}

.log-toggle {
  position: relative;
  width: 22px;
  height: 22px;
  margin-top: 10px;
}

.log-toggle::before,
.log-toggle::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 10px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease;
}

.log-toggle::after {
  transform: rotate(90deg);
}

.log details[open] .log-toggle::after {
  transform: rotate(0deg);
}

.log-body {
  margin-left: 62px;
  padding: 4px 0 26px;
  max-width: 600px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.log-body p {
  margin-bottom: 12px;
}

.log-body ul {
  margin: 0 0 14px 1.1em;
}

.log-body li {
  margin-bottom: 8px;
}

.log-body li::marker {
  color: var(--accent);
}

.log-body code {
  font-family: var(--mono);
  font-size: 0.85em;
}

.log-label {
  margin: 20px 0 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--accent);
}

.log-body .log-label:first-child {
  margin-top: 6px;
}

.log-next {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--grey);
}

.log-next span {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  margin-bottom: 2px;
}

.log-source {
  margin-top: 26px;
  font-size: 0.85rem !important;
  color: var(--grey);
}

.case-end {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.case .project-actions .pill-btn,
.case-end .pill-btn {
  background: var(--accent);
  color: #ffffff;
}

.case .project-actions .pill-btn.ghost,
.case-end .pill-btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.case .project-actions .pill-btn.ghost:hover,
.case-end .pill-btn.ghost:hover {
  background: var(--accent);
  color: #ffffff;
}

@media (max-width: 760px) {
  .subpage main {
    padding-top: 90px;
  }

  .work-link {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .log-body {
    margin-left: 0;
  }

  .case-section {
    padding-block: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-play,
  .log-num,
  .log-toggle::before,
  .log-toggle::after {
    transition: none;
  }
}

/* Homepage teaser */
.project-body {
  margin-top: 26px;
}
.project .work-more {
  margin-top: 20px;
}

/* Restore list markers where lists carry meaning */
.log-body ul {
  list-style: disc;
  padding-left: 0.2em;
}

.question-list {
  list-style: decimal;
}

.log-body li {
  padding-left: 4px;
}

@media (max-width: 760px) {
  .log::before {
    display: none;
  }

  .log summary {
    grid-template-columns: 40px 1fr 22px;
    gap: 14px;
  }

  .log-num {
    width: 40px;
    height: 40px;
  }
}

/* Top bar follows dark mode */
:root[data-theme="dark"] .top-bar {
  background: rgba(12, 12, 11, 0.86);
}
