/* =========================================================
   Giovanka — Portfolio (Editorial × Engineer)
   ========================================================= */

:root {
  --bg:          oklch(0.972 0.012 85);
  --bg-2:        oklch(0.95  0.018 85);
  --ink:         oklch(0.21  0.012 60);
  --ink-2:       oklch(0.36  0.012 60);
  --ink-3:       oklch(0.55  0.012 60);
  --rule:        oklch(0.21  0.012 60 / 0.18);
  --rule-2:      oklch(0.21  0.012 60 / 0.08);
  --accent:      oklch(0.52  0.135 38);
  --accent-soft: oklch(0.52  0.135 38 / 0.10);
  --tag-bg:      oklch(0.21  0.012 60 / 0.06);

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-sans:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gap-section: clamp(48px, 6vw, 80px);
  --pad-x:       clamp(20px, 5vw, 64px);
  --maxw:        1240px;
  --line:        1.55;
}

[data-palette="navy"] {
  --bg: oklch(0.965 0.005 240); --bg-2: oklch(0.94 0.008 240);
  --ink: oklch(0.22 0.045 250); --ink-2: oklch(0.36 0.04 250); --ink-3: oklch(0.55 0.03 250);
  --rule: oklch(0.22 0.045 250 / 0.18); --rule-2: oklch(0.22 0.045 250 / 0.08);
  --accent: oklch(0.58 0.10 78); --accent-soft: oklch(0.58 0.10 78 / 0.14);
  --tag-bg: oklch(0.22 0.045 250 / 0.06);
}
[data-palette="mono"] {
  --bg: oklch(0.985 0.003 100); --bg-2: oklch(0.96 0.003 100);
  --ink: oklch(0.16 0.005 260); --ink-2: oklch(0.32 0.005 260); --ink-3: oklch(0.52 0.005 260);
  --rule: oklch(0.16 0.005 260 / 0.18); --rule-2: oklch(0.16 0.005 260 / 0.08);
  --accent: oklch(0.55 0.20 258); --accent-soft: oklch(0.55 0.20 258 / 0.12);
  --tag-bg: oklch(0.16 0.005 260 / 0.06);
}
[data-mode="dark"][data-palette="cream"] {
  --bg: oklch(0.18 0.012 60); --bg-2: oklch(0.22 0.014 60);
  --ink: oklch(0.95 0.012 85); --ink-2: oklch(0.78 0.012 70); --ink-3: oklch(0.55 0.012 70);
  --rule: oklch(0.95 0.012 85 / 0.18); --rule-2: oklch(0.95 0.012 85 / 0.08);
  --accent: oklch(0.72 0.135 50); --accent-soft: oklch(0.72 0.135 50 / 0.14);
  --tag-bg: oklch(0.95 0.012 85 / 0.06);
}
[data-mode="dark"][data-palette="navy"] {
  --bg: oklch(0.18 0.025 250); --bg-2: oklch(0.22 0.03 250);
  --ink: oklch(0.95 0.008 240); --ink-2: oklch(0.78 0.012 240); --ink-3: oklch(0.55 0.015 240);
  --rule: oklch(0.95 0.008 240 / 0.18); --rule-2: oklch(0.95 0.008 240 / 0.08);
  --accent: oklch(0.78 0.13 80); --accent-soft: oklch(0.78 0.13 80 / 0.14);
  --tag-bg: oklch(0.95 0.008 240 / 0.06);
}
[data-mode="dark"][data-palette="mono"] {
  --bg: oklch(0.16 0.005 260); --bg-2: oklch(0.20 0.006 260);
  --ink: oklch(0.96 0.003 100); --ink-2: oklch(0.78 0.005 100); --ink-3: oklch(0.55 0.005 100);
  --rule: oklch(0.96 0.003 100 / 0.18); --rule-2: oklch(0.96 0.003 100 / 0.08);
  --accent: oklch(0.72 0.18 258); --accent-soft: oklch(0.72 0.18 258 / 0.16);
  --tag-bg: oklch(0.96 0.003 100 / 0.06);
}
[data-mode="dark"] .nav-cta,
[data-mode="dark"] .btn { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-mode="dark"] .btn:hover { background: var(--accent); border-color: var(--accent); }

[data-density="compact"] { --gap-section: clamp(56px, 7vw, 96px); --line: 1.5; }
[data-density="relaxed"] { --gap-section: clamp(110px, 13vw, 180px); --line: 1.65; }

/* ── reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px;
  line-height: var(--line); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
::selection { background: var(--accent); color: var(--bg); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

.h-display {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.02;
}
.h-display em { font-style: italic; color: var(--ink-2); }
.h-display .accent { color: var(--accent); }

/* ── nav ────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--rule-2);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad-x); max-width: var(--maxw); margin: 0 auto;
}
.nav-logo {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  transition: color .2s;
}
.nav-logo:hover { color: var(--accent); }
.nav-logo .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  display: inline-block; align-self: center;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.nav-links {
  display: flex; gap: 26px; align-items: center;
  font-family: var(--font-mono); font-size: 13px;
}
.nav-links a { position: relative; padding: 6px 0; color: var(--ink-2); transition: color .2s; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a .num { font-size: 10px; color: var(--ink-3); margin-right: 4px; transition: color .2s; }
.nav-links a:hover .num { color: var(--accent); }
.nav-right { display: flex; gap: 10px; align-items: center; }

.mode-toggle {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.mode-toggle:hover { border-color: var(--ink); background: var(--bg-2); color: var(--accent); }
.mode-toggle svg { display: block; }

.nav-cta {
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--ink); padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: var(--bg); cursor: pointer; transition: all .2s;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); }

.menu-btn {
  display: none; border: 1px solid var(--rule); background: transparent;
  width: 36px; height: 36px; border-radius: 6px; cursor: pointer; color: var(--ink);
}
.menu-btn svg { display: block; margin: auto; pointer-events: none; }

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: flex; align-items: center; justify-content: center; }
  .nav.menu-open .nav-links {
    display: flex; position: fixed; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    background: var(--bg); border-bottom: 1px solid var(--rule);
    padding: 22px var(--pad-x); gap: 18px; font-size: 18px;
  }
  .nav.menu-open .nav-cta { display: inline-block; margin-top: 6px; }
}

/* ── hero ───────────────────────────────────────── */
.hero {
  padding-top: clamp(42px, 7vw, 84px);
  padding-bottom: 0;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(28px, 5vw, 64px); align-items: start;
}
.hero-main { display: flex; flex-direction: column; justify-content: space-between; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-main { display: block; }
}
.hero-meta { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; margin-bottom: 28px; }
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.hero-meta .available { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); min-width: 0; }
.hero-headline { font-size: clamp(36px, 8vw, 96px); max-width: 760px; }
.hero-headline .line { display: block; }
.hero-lede {
  margin-top: 16px; max-width: 600px;
  font-size: clamp(16px, 1.25vw, 18px);
  color: var(--ink-2); line-height: 1.55;
  text-align: justify; text-justify: inter-word;
}
.hero-lede strong { color: var(--ink); font-weight: 500; }
.hero-actions { margin-top: 22px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 12px 20px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; transition: all .2s;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.btn-ghost { background: transparent; color: var(--ink); }
.btn.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

.hero-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; height: 100%; }
.portrait {
  position: relative; isolation: isolate;
  width: min(100%, 440px); aspect-ratio: 1;
  align-self: end;
  background: var(--bg-2); border-radius: 8px;
  overflow: hidden; border: 1px solid var(--rule);
  box-shadow: 0 24px 70px color-mix(in oklab, var(--ink) 12%, transparent);
}
.portrait::before {
  content: "";
  position: absolute; inset: 18px -18px -18px 18px;
  z-index: -1; border-radius: inherit;
  background-image:
    linear-gradient(color-mix(in oklab, var(--accent) 18%, transparent), color-mix(in oklab, var(--accent) 18%, transparent)),
    repeating-linear-gradient(135deg, var(--rule-2) 0 1px, transparent 1px 14px);
}
.portrait::after {
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 5px; pointer-events: none; z-index: 2;
}
.portrait .stripe {
  position: absolute; inset: 0; overflow: hidden; border-radius: inherit; z-index: 1;
  background:
    linear-gradient(180deg, transparent 55%, color-mix(in oklab, var(--ink) 18%, transparent)),
    repeating-linear-gradient(135deg, var(--rule-2) 0 1px, transparent 1px 16px);
  opacity: .22; pointer-events: none;
}
.portrait img {
  position: absolute; inset: -3% -3% -1%;
  width: 106%; height: 104%;
  object-fit: cover; object-position: center 46%;
  border-radius: inherit;
  filter: saturate(.92) contrast(1.04);
  z-index: 0;
}

@media (max-width: 880px) {
  .portrait { align-self: start; width: min(100%, 420px); }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 28px;
  }
  .hero-grid {
    gap: 28px;
  }
  .hero-meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    margin-bottom: 20px;
  }
  .hero-meta .dot {
    margin-top: 6px;
  }
  .hero-meta .available {
    font-size: 10px;
    line-height: 1.5;
  }
  .hero-headline {
    font-size: clamp(34px, 9.4vw, 42px);
    line-height: .98;
  }
  .hero-lede {
    margin-top: 18px;
    max-width: none;
    font-size: 15px;
    line-height: 1.58;
    text-align: left;
  }
  .hero-actions {
    margin-top: 20px;
    gap: 10px;
  }
  .btn {
    padding: 11px 16px;
  }
  .hero-aside {
    align-items: center;
    gap: 16px;
  }
  .portrait {
    align-self: center;
    width: min(calc(100% - 14px), 340px);
  }
  .portrait::before { inset: 12px -12px -12px 12px; }
  .now-card {
    width: min(100%, 340px);
  }
  .now-row {
    gap: 10px;
  }
  .now-row .k {
    width: 58px;
  }
}

.now-card {
  width: min(100%, 440px);
  border: 1px solid var(--rule); border-radius: 6px;
  padding: 14px 16px; background: var(--bg);
}
.now-row {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; padding: 5px 0;
}
.now-row + .now-row { border-top: 1px dashed var(--rule-2); }
.now-row .k { color: var(--ink-3); width: 70px; flex-shrink: 0; }
.now-row .v { color: var(--ink); }

.metrics {
  margin-top: clamp(60px, 10vw, 120px);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.metrics .m { padding: 26px 22px; border-right: 1px solid var(--rule-2); }
.metrics .m:last-child { border-right: 0; }
.metrics .num { font-family: var(--font-display); font-size: clamp(36px, 4vw, 56px); line-height: 1; letter-spacing: -0.02em; }
.metrics .num sub { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); vertical-align: super; margin-left: 4px; }
.metrics .lab { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); margin-top: 10px; }
@media (max-width: 760px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics .m:nth-child(2) { border-right: 0; }
  .metrics .m:nth-child(1), .metrics .m:nth-child(2) { border-bottom: 1px solid var(--rule-2); }
}

/* ── section head ───────────────────────────────── */
.section {
  padding-top: var(--gap-section);
  padding-bottom: var(--gap-section);
}
.section-head {
  display: grid; grid-template-columns: 200px 1fr;
  gap: clamp(20px, 4vw, 56px); align-items: baseline;
  border-top: 1px solid var(--rule); padding-top: 28px; margin-bottom: 56px;
}
.section-head .ix { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4.5vw, 56px); letter-spacing: -0.02em; line-height: 1.05; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 12px; padding-top: 22px; margin-bottom: 36px; } }

/* ── about ──────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 80px); }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }

.about-prose p { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; text-align: justify; }
.about-prose p:first-child::first-letter {
  font-family: var(--font-display); font-style: italic;
  font-size: 4.6em; float: left; line-height: 0.9;
  margin: 6px 12px -2px 0; color: var(--ink);
}
.about-prose strong { color: var(--ink); font-weight: 500; }
.about-prose em { color: var(--accent); font-style: italic; font-family: var(--font-display); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag-row .pill { font-family: var(--font-mono); font-size: 11px; padding: 6px 11px; border-radius: 999px; background: var(--tag-bg); color: var(--ink-2); }
.tag-row .pill.accent { background: var(--accent-soft); color: var(--accent); }

.looking { border: 1px solid var(--rule); border-radius: 6px; padding: 22px; align-self: start; background: var(--bg); }
.looking h4 { margin: 0 0 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.looking li { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-bottom: 1px dashed var(--rule-2); font-size: 15px; }
.looking li:last-child { border-bottom: 0; }
.looking li .role { color: var(--ink); }
.looking li .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; }

/* ── work ───────────────────────────────────────── */
.work-list { display: flex; flex-direction: column; }
.case { padding: clamp(36px, 5vw, 64px) 0; border-bottom: 1px solid var(--rule); }
.case:first-child { border-top: 1px solid var(--rule); }

/* top: image + content */
.case-top { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 52px); align-items: center; margin-bottom: 32px; }
.case-top--showcase { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1fr); }
.case-top--no-img { grid-template-columns: 1fr; }
.case-img { width: 100%; }
.case-img > img { width: 100%; border-radius: 8px; border: 1px solid var(--rule); }
.case-img--phone { display: flex; justify-content: center; }
.case-img--phone img { display: block; width: 100%; border-radius: 7px; border: 1px solid var(--rule); }

.media-frame,
.device-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg-2);
  box-shadow: 0 18px 46px oklch(0 0 0 / 0.10);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.media-frame::after,
.device-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.14), inset 0 -48px 64px oklch(0 0 0 / 0.07);
}
.media-frame:hover,
.device-frame:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--accent) 45%, transparent);
  box-shadow: 0 24px 60px oklch(0 0 0 / 0.14);
}
.media-frame img {
  display: block;
  width: 100%;
  padding-top: 30px;
  border: 0;
  border-radius: 0;
  transition: transform 0.4s ease;
}
.case:hover .media-frame img { transform: scale(1.02); }
.device-frame--phone {
  width: min(190px, 58%);
  padding: 8px;
}

/* carousel */
.case-carousel { display: flex; flex-direction: column; gap: 10px; width: 100%; isolation: isolate; }
.carousel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg-2);
  box-shadow: 0 18px 46px oklch(0 0 0 / 0.10);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.carousel-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.14), inset 0 -56px 70px oklch(0 0 0 / 0.08);
}
.case-carousel:hover .carousel-frame {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--accent) 45%, transparent);
  box-shadow: 0 24px 60px oklch(0 0 0 / 0.14);
}
.browser-chrome {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-bottom: 1px solid var(--rule-2);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
}
.browser-chrome span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--rule);
}
.browser-chrome span:first-child { background: var(--accent); opacity: .85; }
.browser-chrome small {
  min-width: 0;
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity .28s ease;
}
.carousel-slide.is-active { opacity: 1; }
.carousel-progress {
  position: absolute;
  z-index: 7;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--rule-2);
}
.carousel-progress span {
  display: block;
  width: 33.333%;
  height: 100%;
  background: var(--accent);
  transform: translateX(0);
  transition: width .28s ease, transform .28s ease;
}
.carousel-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.carousel-btn {
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; padding: 0;
  transition: color .2s, border-color .2s;
}
.carousel-btn:hover { color: var(--accent); border-color: var(--accent); }
.carousel-dots { display: flex; gap: 5px; align-items: center; }
.carousel-dots span {
  width: 5px; height: 5px;
  border-radius: 999px;
  background: var(--ink-3);
  opacity: .35;
  transition: width .2s, opacity .2s, background .2s;
}
.carousel-dots span.is-active { width: 14px; background: var(--accent); opacity: 1; }
.carousel-caption {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); text-align: center;
}
.case-content { display: flex; flex-direction: column; }

/* number badge */
.case-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
  border: 1px solid var(--accent); border-radius: 50%;
  font-family: var(--font-mono); font-size: 10px; color: var(--accent);
  margin-right: 10px;
}
.case-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.case-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); opacity: .5; }
.case-title { font-family: var(--font-display); font-size: clamp(26px, 3vw, 42px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 16px; color: var(--ink); max-width: 26ch; }
.case-desc { color: var(--ink-2); font-size: 16px; line-height: 1.7; margin: 0; }
.case-stack { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.chip { font-family: var(--font-mono); font-size: 10px; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); }
.case-links { margin-top: auto; padding-top: 24px; display: flex; gap: 18px; flex-wrap: wrap; }
.case-link {
  font-family: var(--font-mono); font-size: 12px; padding: 6px 0;
  border-bottom: 1px solid var(--ink-3); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s, border-color .2s;
}
.case-link:hover { color: var(--accent); border-color: var(--accent); }
.case-link .arrow { transition: transform .2s; }
.case-link:hover .arrow { transform: translate(3px, -3px); }

/* P/A/O row */
.case-pao { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); padding-top: 24px; }
.pao-item { padding-right: 32px; }
.pao-item + .pao-item { padding-left: 32px; padding-right: 32px; border-left: 1px solid var(--rule-2); }
.pao-item:last-child { padding-right: 0; }
.pao-num { font-size: 16px; color: var(--accent); margin-bottom: 6px; line-height: 1; }
.pao-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.pao-text { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin: 0; }
.pao-text a { color: var(--ink); border-bottom: 1px solid var(--rule); transition: color .2s, border-color .2s; }
.pao-text a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 1120px) {
  .case-top--showcase { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .case-top,
  .case-top--showcase { grid-template-columns: 1fr; }
  .case-img { min-height: auto; }
  .case-img--phone img { width: min(180px, 58%); }
  .case-title { max-width: none; }
  .case-pao { grid-template-columns: 1fr; padding-top: 20px; gap: 20px; }
  .pao-item, .pao-item + .pao-item { padding-left: 0; padding-right: 0; border-left: 0; }
  .pao-item + .pao-item { border-top: 1px solid var(--rule-2); padding-top: 20px; }
}

/* ── timeline ───────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.tl-row {
  display: grid; grid-template-columns: 200px 1fr 200px;
  gap: clamp(16px, 3vw, 48px); padding: 28px 0;
  border-top: 1px solid var(--rule-2); align-items: baseline;
}
.tl-row:first-child { border-top: 1px solid var(--rule); }
.tl-when { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.tl-type {
  display: inline-flex; align-items: center;
  margin-bottom: 10px; padding: 5px 8px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-size: 10px;
  line-height: 1; letter-spacing: 0.08em; text-transform: uppercase;
}
.tl-type--education { background: var(--tag-bg); color: var(--ink-2); }
.tl-type--program { background: transparent; color: var(--ink-3); }
.tl-body h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: clamp(20px, 2vw, 26px); font-weight: 400; letter-spacing: -0.01em; }
.tl-body .role { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 10px; }
.tl-body p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; max-width: 60ch; text-align: justify; text-justify: inter-word; }
.tl-where { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); text-align: right; }
@media (max-width: 880px) { .tl-row { grid-template-columns: 1fr; gap: 8px; } .tl-where { text-align: left; } }

/* ── certifications ─────────────────────────────── */
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .cert-grid { grid-template-columns: 1fr; } }
.cert-group { border: 1px solid var(--rule); border-radius: 6px; padding: 24px; background: var(--bg); }
.issuer { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--rule-2); }
.issuer .badge { width: 28px; height: 28px; border-radius: 6px; background: var(--tag-bg); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.issuer .nm { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.01em; }
.issuer .ct { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.cert-item { padding: 11px 0; border-bottom: 1px dashed var(--rule-2); display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: baseline; }
.cert-item:last-child { border-bottom: 0; }
.cert-item .nme { font-size: 14px; line-height: 1.4; color: var(--ink); }
.cert-item .pd { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); text-transform: uppercase; }
.cert-item .lk { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; transition: color .2s; }
.cert-item .lk:hover { color: var(--accent); }
.cert-full .cert-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.cert-full .cert-item { grid-template-columns: 1fr; gap: 5px; min-width: 0; padding: 14px 0; }
.cert-full .cert-item:nth-last-child(-n + 2) { border-bottom: 0; }
.cert-full .cert-item .pd { grid-row: 2; }
.cert-full .cert-item .lk { grid-column: auto; margin-top: 4px; }
@media (max-width: 760px) {
  .cert-full .cert-inner { grid-template-columns: 1fr; }
  .cert-full .cert-item:nth-last-child(2) { border-bottom: 1px dashed var(--rule-2); }
}

/* ── skills ─────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 36px; max-width: 980px; margin: 0 auto; }
@media (max-width: 880px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .skills-grid { grid-template-columns: 1fr; } }
.skill-col h4 { margin: 0 0 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding-bottom: 10px; border-bottom: 1px solid var(--rule-2); }
.skill-col ul { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-col li {
  font-family: var(--font-mono); font-size: 11px; line-height: 1;
  padding: 8px 10px; border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink-2); background: var(--tag-bg);
  will-change: transform, opacity;
}

/* ── contact ────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: 36px; } }
.contact-headline { font-family: var(--font-display); font-size: clamp(48px, 7vw, 88px); letter-spacing: -0.025em; line-height: 1.02; margin: 0 0 22px; }
.contact-headline .accent-text { color: var(--accent); }
.contact-sub { font-size: 17px; color: var(--ink-2); max-width: 50ch; line-height: 1.55; margin: 0 0 32px; text-align: justify; text-justify: inter-word; }
.contact-channels { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.contact-channels a { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule-2); transition: padding .25s; }
.contact-channels a:hover { padding-left: 8px; }
.contact-channels .k { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.14em; text-transform: uppercase; }
.contact-channels .v { font-family: var(--font-display); font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -0.01em; }
.contact-channels .ar { color: var(--ink-3); transition: transform .2s; }
.contact-channels a:hover .ar { transform: translate(3px, -3px); color: var(--accent); }
.contact-form { border: 1px solid var(--rule); border-radius: 6px; padding: 22px; background: var(--bg); display: flex; flex-direction: column; gap: 14px; max-width: 440px; width: 100%; margin-top: clamp(72px, 8vw, 112px); margin-left: auto; will-change: transform; }
.contact-form h4 { margin: 0 0 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.contact-form input, .contact-form textarea { font-family: var(--font-sans); font-size: 15px; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--rule-2); border-radius: 4px; color: var(--ink); outline: none; transition: border-color .2s; width: 100%; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--ink); }
.contact-form textarea { min-height: 100px; resize: vertical; }
.contact-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .contact-form .row2 { grid-template-columns: 1fr; } }
@media (max-width: 880px) { .contact-form { max-width: none; margin-top: 0; margin-left: 0; } }
.contact-form button { margin-top: 4px; align-self: flex-start; }
.contact-form .msg { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.contact-form .msg.err { color: var(--accent); }

/* ── footer ─────────────────────────────────────── */
footer { border-top: 1px solid var(--rule); margin-top: 80px; }
.footer-strip { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 36px var(--pad-x); flex-wrap: wrap; }
.footer-copy { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.footer-elsewhere { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }
.footer-elsewhere a { font-family: var(--font-sans); font-size: 14px; color: var(--ink); font-weight: 500; transition: color .2s; }
.footer-elsewhere a:hover { color: var(--accent); }
.footer-top { background: transparent; border: 1px solid var(--rule); color: var(--ink-2); font-family: var(--font-mono); font-size: 14px; width: 32px; height: 32px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-left: 6px; transition: all .2s; }
.footer-top:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── fade-in — initial state set by GSAP ────────── */
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── case preview image ──────────────────────────── */
.case-img:not(.case-carousel):not(.case-img--phone) > img { transition: transform 0.4s ease; }
.case:hover .case-img:not(.case-carousel):not(.case-img--phone) > img { transform: scale(1.02); }

/* ── utility classes (replaces inline styles) ───── */
.hidden         { display: none; }
.nav-logo-mute  { opacity: .4; }
.cert-full      { grid-column: 1 / -1; }
.cert-inner     { display: grid; }
