:root {
  --bg: #050f1a;
  --panel: #0f1c30;
  --panel-soft: #152540;
  --text: #edf4fb;
  --muted: #a8c0d6;
  --brand: #50d4a0;
  --brand-2: #f0cc5f;
  --line: #254064;
  --max: 1120px;
  --radius: 16px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  --brand-glow: rgba(80, 212, 160, 0.35);
  --transition-fast: 180ms ease;
  --transition-med: 320ms ease;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --content-max: 74ch;
}

::selection {
  background: rgba(80, 212, 160, 0.3);
  color: #f8fffc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 112px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgba(80, 212, 160, 0.24), transparent 42%),
    radial-gradient(circle at 82% 102%, rgba(240, 204, 95, 0.2), transparent 35%),
    linear-gradient(140deg, rgba(11, 29, 46, 0.92), rgba(6, 14, 28, 0.9)),
    var(--bg-image, url("assets/oceanlowres.webp")),
    var(--bg);
  background-attachment: fixed;
  background-size: cover;
  background-position: center top, center bottom, center center, center top;
  line-height: 1.72;
  min-height: 100vh;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
  z-index: -1;
}

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

main a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1.4px;
  text-underline-offset: 0.2em;
  font-weight: 600;
}

main a:hover {
  color: #bff7df;
}

.btn,
.brand,
.nav a,
.btn:hover {
  text-decoration: none;
}

.site-shell {
  width: min(var(--max), 92vw);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -120%;
  z-index: 100;
  background: #f3fff9;
  color: #052113;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 0.8rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 24;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(10, 23, 38, 0.92), rgba(10, 23, 38, 0.74));
  border-bottom: 1px solid rgba(60, 101, 144, 0.45);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header {
    background: rgba(8, 20, 35, 0.95);
  }
}

.header-inner {
  display: flex;
  gap: 1rem 1.35rem;
  justify-content: space-between;
  align-items: center;
  min-height: 82px;
  padding: 0.8rem 0;
}

.brand {
  display: grid;
  gap: 0.15rem;
  position: relative;
  z-index: 2;
}

.brand-title {
  font-family: "Outfit", "Sora", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #5eedb0, var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(80, 212, 160, 0.48);
  background: rgba(80, 212, 160, 0.1);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.44rem 0.72rem;
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  background: rgba(80, 212, 160, 0.2);
  border-color: rgba(80, 212, 160, 0.7);
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.nav-toggle-icon span {
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  justify-content: flex-end;
  align-items: center;
}

.nav a {
  border: 1px solid rgba(255, 255, 255, 0);
  border-radius: 999px;
  padding: 0.52rem 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  border-color: rgba(80, 212, 160, 0.5);
  background: rgba(80, 212, 160, 0.16);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link-row {
  display: flex;
  align-items: center;
}

.nav-expand {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.nav-expand:hover,
.nav-expand:focus-visible,
.nav-item.is-open .nav-expand {
  border-color: rgba(80, 212, 160, 0.5);
  color: var(--text);
  background: rgba(80, 212, 160, 0.16);
}

.nav-chevron {
  font-size: 0.6rem;
  opacity: 0.6;
  transition: transform var(--transition-fast);
  display: inline-block;
}

.nav-item.is-open .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  max-width: min(320px, 86vw);
  padding: 0.55rem;
  padding-top: 0.75rem;
  background: linear-gradient(160deg, rgba(16, 34, 55, 0.98), rgba(10, 22, 38, 0.97));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility 0s linear var(--transition-fast);
  z-index: 30;
}

.nav-item--right .nav-dropdown {
  left: auto;
  right: 0;
}

.nav-item::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.nav-item.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.nav-dropdown a {
  display: block;
  padding: 0.48rem 0.72rem;
  border-radius: 7px;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: normal;
  line-height: 1.35;
  border: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-dropdown a:hover {
  color: var(--text);
  background: rgba(80, 212, 160, 0.18);
  border: none;
}

.nav-dropdown a[aria-current="page"] {
  color: var(--text);
  background: rgba(80, 212, 160, 0.2);
  box-shadow: inset 0 0 0 1px rgba(80, 212, 160, 0.38);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(80, 212, 160, 0.8);
  outline-offset: 2px;
}

main {
  padding: 2.5rem 0 5rem;
}

/* ---------- Hero ---------- */

.hero {
  --hero-pad: clamp(1.4rem, 2.2vw, 3.1rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background:
    linear-gradient(145deg, rgba(15, 28, 48, 0.95), rgba(9, 19, 35, 0.95)),
    radial-gradient(circle at 90% 20%, rgba(80, 212, 160, 0.22), transparent 36%);
  box-shadow: var(--shadow);
  padding: var(--hero-pad);
  margin-bottom: 2.1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -4rem -4rem auto;
  width: min(36vw, 360px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 204, 95, 0.18), transparent 68%);
  pointer-events: none;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  align-items: center;
}

.hero h1 {
  background: linear-gradient(135deg, #5eedb0, var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 0.65rem;
  text-shadow: 0 0 28px rgba(69, 184, 138, 0.2);
  text-wrap: balance;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--brand);
  margin: 0 0 0.45rem;
}

h1,
h2,
h3 {
  line-height: 1.18;
  margin: 0 0 0.72rem;
  font-family: "Outfit", "Sora", sans-serif;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 4.3vw, 3.25rem);
}

h2 {
  font-size: clamp(1.35rem, 2.35vw, 1.95rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  color: #d1e2f0;
  margin: 0 0 1.05rem;
}

p,
li {
  max-width: var(--content-max);
}

.hero p,
.panel p,
.card p,
article > p {
  text-wrap: pretty;
}

.text-center,
.section-center {
  text-align: center;
}

.section-center p,
.section-center li {
  margin-left: auto;
  margin-right: auto;
}

.section-center .btn-row,
.section-center .tag-row {
  justify-content: center;
}

.section-center-headings h1,
.section-center-headings h2,
.section-center-headings h3 {
  text-align: center;
}

.title-gradient {
  background: linear-gradient(135deg, #61f0b8 18%, #f2d572 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.max-content {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.longform {
  max-width: min(78ch, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.longform p,
.longform li {
  max-width: none;
}

.longform > :last-child {
  margin-bottom: 0;
}

/* ---------- Grid ---------- */

.grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------- Card ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(175deg, rgba(16, 33, 54, 0.88), rgba(9, 19, 35, 0.95));
  padding: 1.2rem;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--brand-glow);
  border-color: rgba(69, 184, 138, 0.5);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card--center {
  text-align: center;
}

.card--display h3 {
  text-align: center;
  font-size: clamp(1.6rem, 3.1vw, 2.45rem);
  background: linear-gradient(135deg, #61f0b8, var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.card p,
.panel p,
.timeline p {
  color: #c8dce8;
}

/* ---------- Panel ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 30, 50, 0.88), rgba(10, 22, 39, 0.94));
  padding: 1.2rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.panel + .panel {
  margin-top: 1rem;
}

.panel h2 {
  background: linear-gradient(135deg, rgba(97, 240, 184, 0.95), rgba(240, 204, 95, 0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.panel h3 {
  color: #e7f4ff;
}

#process h3,
#details h3 {
  background: linear-gradient(135deg, rgba(97, 240, 184, 0.95), rgba(240, 204, 95, 0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  width: fit-content;
  margin-inline: auto;
  font-size: 1.45rem;
}

/* ---------- KPI Row ---------- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
  margin-bottom: 1.6rem;
}

.kpi-row--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-row--centered {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.kpi {
  border: 1px solid rgba(80, 212, 160, 0.44);
  border-radius: 14px;
  padding: 0.78rem 0.75rem;
  background: linear-gradient(150deg, rgba(80, 212, 160, 0.16), rgba(80, 212, 160, 0.06));
  text-align: center;
}

.kpi strong {
  display: block;
  font-family: "Outfit", "Sora", sans-serif;
  font-size: 1.15rem;
}

.kpi-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}

/* ---------- Tag Row ---------- */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0;
}

.tag {
  display: inline-block;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(69, 184, 138, 0.15);
  border: 1px solid rgba(69, 184, 138, 0.35);
  color: var(--brand);
}

.tag--gold {
  background: rgba(212, 184, 64, 0.15);
  border-color: rgba(212, 184, 64, 0.4);
  color: var(--brand-2);
}

/* ---------- List ---------- */

.list {
  padding-left: 1.2rem;
  margin: 0;
}

.section-center .list {
  display: inline-block;
  text-align: left;
}

.list li {
  margin: 0 0 0.56rem;
  color: #cce0ea;
}

.featured-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  padding-left: 0;
  list-style: none;
}

.featured-list li {
  margin: 0;
  font-size: 1.1rem;
}

/* ---------- Buttons ---------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.2rem;
}

.btn-row--center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--brand);
  background: linear-gradient(135deg, rgba(80, 212, 160, 0.28), rgba(80, 212, 160, 0.14));
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.35rem;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  min-height: 44px;
  color: var(--text);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(80, 212, 160, 0.15);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover {
  background: linear-gradient(135deg, rgba(80, 212, 160, 0.44), rgba(80, 212, 160, 0.24));
  border-color: #8de6be;
  transform: translateY(-1px);
  box-shadow: 0 7px 22px rgba(80, 212, 160, 0.25);
}

.btn:hover::before {
  opacity: 1;
}

.btn--primary {
  border-color: rgba(80, 212, 160, 0.5);
  background: linear-gradient(135deg, rgba(80, 212, 160, 0.28), rgba(80, 212, 160, 0.12));
  color: var(--brand);
}

.btn--primary:hover {
  border-color: rgba(80, 212, 160, 0.7);
  box-shadow: 0 4px 18px rgba(80, 212, 160, 0.25);
}

.btn--secondary {
  border-color: rgba(212, 184, 64, 0.5);
  background: linear-gradient(135deg, rgba(212, 184, 64, 0.28), rgba(212, 184, 64, 0.12));
  color: var(--brand-2);
}

.btn--secondary:hover {
  border-color: rgba(212, 184, 64, 0.65);
  box-shadow: 0 4px 18px rgba(212, 184, 64, 0.25);
}

.btn--tertiary {
  border-color: rgba(184, 199, 179, 0.5);
  background: linear-gradient(135deg, rgba(184, 199, 179, 0.22), rgba(184, 199, 179, 0.08));
  color: var(--muted);
}

.btn--tertiary:hover {
  border-color: rgba(184, 199, 179, 0.65);
  box-shadow: 0 4px 18px rgba(184, 199, 179, 0.2);
}

.btn.secondary {
  color: var(--muted);
  font-weight: 600;
  border-color: rgba(212, 184, 64, 0.4);
  background: linear-gradient(135deg, rgba(212, 184, 64, 0.22), rgba(212, 184, 64, 0.1));
}

.btn.secondary:hover {
  border-color: var(--brand-2);
  color: var(--text);
  background: rgba(212, 184, 64, 0.12);
  box-shadow: 0 6px 22px rgba(212, 184, 64, 0.18);
}

/* ---------- Section ---------- */

.section-title {
  margin-top: 1.2rem;
  margin-bottom: 0.8rem;
}

.section-summary {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(80, 212, 160, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(80, 212, 160, 0.11), rgba(80, 212, 160, 0.04));
  color: #d9ebf7;
  max-width: none;
}

/* ---------- Project Flow ---------- */

.project-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.project-flow {
  min-width: 0;
}

.page-toc {
  position: sticky;
  top: 104px;
  margin: 0;
}

.page-toc h2 {
  margin-bottom: 0.55rem;
}

.page-toc .list {
  margin-bottom: 0.55rem;
}

.page-toc .list li {
  margin-bottom: 0.35rem;
}

.page-toc a {
  color: #d2eefe;
  text-decoration: none;
  font-weight: 600;
}

.page-toc a:hover {
  color: #f0fff7;
  text-decoration: underline;
}

.page-toc .caption {
  margin: 0;
}

.project-wayfinding {
  margin-top: 1.2rem;
}

/* ---------- Timeline ---------- */

.timeline {
  border-left: 2px solid rgba(69, 184, 138, 0.44);
  padding-left: 1rem;
  margin-left: 0.15rem;
}

.timeline article {
  position: relative;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
}

.timeline article::before {
  content: "";
  position: absolute;
  left: -1.36rem;
  top: 0.26rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------- Layout ---------- */

.split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
}

.caption {
  font-size: 0.84rem;
  color: var(--muted);
}

figcaption {
  text-align: center;
  font-style: italic;
  margin-top: 0.75rem;
  color: var(--muted);
}

.game-inspo img {
  height: auto;
  max-height: none;
  object-fit: contain;
}

.game-inspo .caption {
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--text);
  padding: 0.65rem 0.9rem 0.9rem;
}

/* ---------- Media ---------- */

.media-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(7, 17, 32, 0.76);
  box-shadow: var(--shadow);
  margin: 0.95rem 0;
}

.media-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-med);
}

.media-frame:hover img {
  transform: scale(1.03);
}

.hero-portrait img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
}

.hero .media-frame:hover img {
  transform: none;
}

@media (min-width: 961px) {
  .hero {
    padding: 0;
  }

  .hero-split {
    gap: clamp(1rem, 2.2vw, 1.9rem);
    align-items: stretch;
  }

  .hero-split > :first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--hero-pad) 0 var(--hero-pad) var(--hero-pad);
  }

  .hero .hero-portrait {
    margin: 0;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .hero .hero-portrait img {
    height: 100%;
    min-height: clamp(460px, 44vw, 720px);
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 18%;
  }
}

.media-frame iframe,
.media-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

.media-embed--document {
  aspect-ratio: auto;
  min-height: clamp(600px, 86vh, 980px);
}

.resume-mobile-preview {
  display: none;
}

.media-frame--narrow {
  max-width: min(560px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.archive-grid--stack {
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.archive-grid > :last-child:nth-child(3n+1) {
  grid-column: 1 / -1;
}

.archive-grid > :last-child:nth-child(3n+2) {
  grid-column: span 2;
}

.archive-grid--stack > :last-child:nth-child(3n+1),
.archive-grid--stack > :last-child:nth-child(3n+2) {
  grid-column: auto;
}

.gallery details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 28, 48, 0.78);
  padding: 0.75rem;
  margin-bottom: 0.85rem;
}

.gallery summary {
  cursor: pointer;
  font-family: "Outfit", "Sora", sans-serif;
  font-weight: 700;
  color: var(--text);
}

.media-grid .media-frame img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-media {
  margin: 0.45rem 0 0.7rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.card-media img {
  width: 100%;
  height: clamp(180px, 22vw, 280px);
  object-fit: cover;
  display: block;
  transition: transform var(--transition-med);
}

.card-media:hover img {
  transform: scale(1.05);
}

.media-frame.contain img {
  object-fit: contain;
  background: rgba(40, 55, 80, 0.85);
}

.hero-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0.9rem 0;
}

.hero-image-grid .media-frame--square {
  min-width: 0;
  max-width: none;
}

.media-frame--square {
  max-width: 100%;
}

.media-frame--square img {
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}

.media-frame--original img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.conclusion-image {
  max-width: min(760px, 92%);
  margin-left: auto;
  margin-right: auto;
}

.thumb-link {
  display: block;
  border-radius: var(--radius);
}

.thumb-link:focus-visible,
.thumb-link:hover {
  outline: 2px solid rgba(69, 184, 138, 0.65);
  outline-offset: 3px;
}

/* ---------- Project Card ---------- */

.project-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(175deg, rgba(15, 30, 50, 0.88), rgba(10, 20, 38, 0.96));
  overflow: hidden;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
  text-decoration: none;
  color: inherit;
}

.project-card:focus-visible {
  outline: 2px solid rgba(80, 212, 160, 0.85);
  outline-offset: 3px;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.45), 0 0 35px var(--brand-glow);
  border-color: rgba(80, 212, 160, 0.5);
}

.project-card-img {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.project-card-img img {
  width: 100%;
  height: clamp(190px, 22vw, 290px);
  object-fit: cover;
  display: block;
  transition: transform var(--transition-med);
}

.project-card-img--contain {
  object-fit: contain;
  background: rgba(8, 16, 30, 0.9);
}

.project-card:hover .project-card-img img {
  transform: scale(1.05);
}

.project-card--featured .project-card-img img {
  height: clamp(220px, 28vw, 360px);
}

.project-card-body {
  padding: 1.35rem 1.45rem 1.5rem;
}

.project-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.55rem;
}

.project-card-body p {
  margin-bottom: 0.65rem;
}

.project-card--center .project-card-body {
  text-align: center;
}

.project-card--center .project-card-body p {
  margin-left: auto;
  margin-right: auto;
}

.project-card--center .tag-row {
  justify-content: center;
}

.project-card--display .project-card-body h3 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  background: linear-gradient(135deg, #61f0b8, var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.showcase-header-bar {
  background: linear-gradient(90deg, rgba(80, 212, 160, 0.14), rgba(80, 212, 160, 0.06));
  border-bottom: 1px solid rgba(80, 212, 160, 0.36);
  padding: 0.75rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-header-bar .showcase-title {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d3f3e6;
}

.text-center-link {
  text-align: center;
}

/* ---------- Sightline Game ---------- */

.sightline-section {
  margin-top: 1.4rem;
}

.sightline-section h2 {
  margin-bottom: 0.3rem;
}

.sightline-hint {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 400ms ease;
}

.sightline-hint.solved {
  color: var(--brand-2);
  font-weight: 600;
}

#game-container {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 0.8rem;
}

#game-container canvas {
  display: block;
  width: 100%;
}

.sightline-reset {
  font-size: 0.84rem;
  margin-top: 0.4rem;
}

/* ---------- CTA Block ---------- */

.showcase-section {
  margin-bottom: 2rem;
}

.showcase-title {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 1.2rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.cta-block {
  border: 1px solid rgba(69, 184, 138, 0.35);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(69, 184, 138, 0.08), rgba(212, 184, 64, 0.06)),
    rgba(15, 28, 48, 0.84);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-top: 2rem;
}

.cta-block h2 {
  margin-bottom: 0.5rem;
}

.cta-block p {
  margin-bottom: 0.4rem;
}

/* ---------- Gallery Section ---------- */

.gallery-section h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background: var(--brand);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(184, 199, 179, 0.24);
  background: linear-gradient(180deg, rgba(10, 22, 38, 0.66), rgba(10, 22, 38, 0.86));
  padding: clamp(2.1rem, 3.8vw, 2.9rem) 0 clamp(2.8rem, 5vw, 3.8rem);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.6rem;
  width: min(var(--max), 96vw);
  margin: 0 auto;
  padding-inline: clamp(1rem, 2.8vw, 2.1rem);
}

.footer-left {
  flex: 0 0 auto;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.footer-contact-label {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.03em;
}

.footer-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  align-items: center;
}

.footer-contact a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: color var(--transition-fast);
}

.footer-contact a:hover {
  color: #a8e4d0;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

.footer-links a {
  color: var(--muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand);
}

/* ---------- Scroll Animation ---------- */

.fade-in {
  opacity: 1;
  transform: none;
  transition: opacity 550ms ease, transform 550ms ease;
}

.js .fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.js .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  body.nav-open {
    overflow: hidden;
  }

  body {
    background-attachment: scroll;
  }

  .grid-3,
  .grid-2,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-split {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-grid,
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    min-height: 70px;
    padding: 0.65rem 0;
    align-items: center;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav {
    display: none;
    width: 100%;
    background: rgba(8, 18, 33, 0.95);
    border: 1px solid rgba(80, 212, 160, 0.24);
    border-radius: 14px;
    padding: 0.55rem;
    margin-top: 0.45rem;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav > a {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
  }

  .nav-item {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .nav-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.2rem;
  }

  .nav-link-row > a {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
  }

  .nav-item::after {
    display: none;
  }

  .nav-dropdown,
  .nav-item--right .nav-dropdown {
    position: static;
    min-width: 0;
    max-width: none;
    width: 100%;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border: 0;
    background: rgba(80, 212, 160, 0.07);
    margin: 0.15rem 0 0.2rem;
    padding: 0.35rem;
    border-radius: 10px;
    display: none;
  }

  .nav-item:hover .nav-dropdown,
  .nav-item:focus-within .nav-dropdown {
    display: none;
  }

  .nav-item.is-open .nav-dropdown {
    display: block;
  }

  .project-card--display .project-card-body h3 {
    font-size: clamp(1.4rem, 5vw, 2.2rem);
  }

  .project-layout {
    grid-template-columns: 1fr;
  }

  .page-toc {
    position: static;
  }
}

@media (max-width: 760px) {
  .media-embed--document {
    min-height: 420px;
  }

  .resume-mobile-preview {
    display: block;
    margin-top: 0.8rem;
  }

  .resume-mobile-preview img {
    width: 100%;
    height: auto;
    display: block;
  }

  .resume-desktop-frame {
    display: none;
  }
}

@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;
  }

  .js .fade-in {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  main {
    padding-top: 1.5rem;
  }

  .site-shell {
    width: min(var(--max), 94vw);
  }

  .media-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .archive-grid > :last-child:nth-child(3n+1),
  .archive-grid > :last-child:nth-child(3n+2) {
    grid-column: auto;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }

  .tag-row {
    gap: 0.35rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
    width: min(var(--max), 94vw);
    padding-inline: clamp(1rem, 5.5vw, 1.4rem);
  }

  .footer-contact {
    align-items: center;
  }

  .footer-contact-links {
    justify-content: center;
  }

}
