/* Steven Kim portfolio
   Dark gallery canvas, monochrome, hard edges.
   Reference language: Palantir (framed panels, inset gallery layout),
   Anduril (typographic restraint, image-led sections, easeOutExpo reveals).
   Reveal: opacity+transform, easeOutExpo cubic-bezier(0.19, 1, 0.22, 1).
   Panel rhythm after palantir.com.
   Type: Geist throughout, Geist Mono for metadata. Radius: all-sharp. */

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}

:root {
  --bg: #111417;
  --surface: #171C21;
  --text: #E9ECEF;
  --muted: #9BA4AD;
  --line: #2A3138;
  --line-strong: #3C454E;
  --body: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --container: 1480px;
  --reveal-ease: cubic-bezier(0.19, 1, 0.22, 1); /* easeOutExpo */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-padding-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
img, video { max-width: 100%; height: auto; display: block; }
::selection { background: var(--text); color: var(--bg); }

/* accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--text); color: var(--bg);
  padding: 10px 16px; font-weight: 500; text-decoration: none;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: 64px;
  background: rgba(4, 5, 6, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 32px;
  height: 100%; display: flex; align-items: center; justify-content: center;
}
.nav nav { display: flex; gap: 16px; }
.nav nav a {
  color: var(--muted); text-decoration: none; font-size: 14.5px;
  padding: 10px 12px;
  transition: color 160ms var(--ease);
}
.nav nav a:hover { color: var(--text); }

/* type */
h1 {
  font-weight: 600;
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.05; letter-spacing: -0.03em;
  margin-bottom: 24px;
}
h2 {
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em;
  margin-bottom: 32px;
}
h3 {
  font-weight: 600; font-size: 1.25rem; letter-spacing: -0.015em;
  margin-bottom: 6px;
}

/* hero */
.hero { padding: 136px 0 40px; }
.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 66ch; margin-bottom: 18px; }
.hero-meta { margin-bottom: 30px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }

/* buttons and links */
.btn {
  display: inline-flex; align-items: center;
  background: var(--text); color: var(--bg);
  font-weight: 500; font-size: 15px; text-decoration: none;
  padding: 13px 26px; min-height: 44px;
  transition: background 160ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
  border-bottom: 1px solid var(--text);
  padding-bottom: 1px;
  transition: opacity 160ms var(--ease);
}
.text-link:hover { opacity: 0.65; }

/* sections */
.section { padding: 64px 0; }
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-contact { padding-bottom: 88px; }

/* project text shared by cards and compact rows */
.meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tools { font-size: 14px; margin-top: 22px; }

/* section-number eyebrow above each project title */
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px;
}

/* framed media — shared container for every figure on the page */
.frame { background: var(--surface); border: 1px solid var(--line); }
.frame img, .frame video { width: 100%; }
.frame figcaption {
  border-top: 1px solid var(--line);
  padding: 13px 18px;
  color: var(--muted); font-size: 0.85rem; line-height: 1.55;
}
/* light-background renders (CFD plots, CAD views) sit on white so they
   don't float in a dark void with a hard rectangular edge */
.frame-light img, .frame-light video { object-fit: contain; padding: 16px; background: #fff; }

/* at-a-glance metrics under a flagship project */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin-top: 30px;
  background: var(--line); border: 1px solid var(--line);
}
.stats > div { background: var(--bg); padding: 16px 18px; }
.stats dt {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.stats dd { font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em; }

/* the project gallery: two columns, one card per project */
.cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; margin-bottom: 56px;
}
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); background: var(--surface);
}
.card > .frame { border: 0; border-bottom: 1px solid var(--line); }
/* title banner above the main image */
.card-head { padding: 18px 28px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.card-head .eyebrow { margin-bottom: 6px; }
.card-head h3 { margin: 0; font-size: 1.4rem; }
/* Uniform tile height across the grid. */
.card .frame img, .card .frame video { aspect-ratio: 16 / 10; object-fit: cover; }
.card .frame-light img, .card .frame-light video { object-fit: contain; }
/* cut-out photos and UI captures sit whole on the dark surface */
.card .frame-fit img { object-fit: contain; padding: 16px; }
/* collage: sub-photos tiled flush under the main image, inside the same box;
   hairline dividers only, each tile links to the full-size figure */
.thumbs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border-bottom: 1px solid var(--line);
}
.thumbs-2 { grid-template-columns: 1fr 1fr; }
.thumbs .frame { display: block; border: 0; background: var(--surface); }
.thumbs .frame img { aspect-ratio: 16 / 10; object-fit: cover; transition: opacity 160ms var(--ease); }
.thumbs .frame:hover img { opacity: 0.85; }
.card-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.card-body .meta { margin-bottom: 16px; }
.card-body .lede { color: var(--text); font-size: 1rem; }
.card-body .stats { grid-template-columns: 1fr 1fr; margin: 6px 0 20px; }
.card-body .stats > div { background: var(--surface); padding: 12px 14px; }
.card-body .tools { margin-top: auto; padding-top: 8px; font-size: 13.5px; }
.card-body .text-link { align-self: flex-start; margin-top: 16px; font-size: 14.5px; }

.also-head { margin-top: 8px; }
.project-rows { border-top: 1px solid var(--line); }
.project-row { padding: 28px 0; }
.project-row + .project-row { border-top: 1px solid var(--line); }
.project-row p { color: var(--muted); max-width: 65ch; }

/* skills */
.skills-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 44px 72px;
}
.skill-group h3 { font-size: 1.1rem; margin-bottom: 12px; }
.skill-group ul { list-style: none; }
.skill-group li {
  color: var(--muted); font-size: 0.95rem;
  padding: 8px 0;
}
.skill-group li + li { border-top: 1px solid var(--line); }

/* contact */
.availability {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; margin-bottom: 30px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #52A657; flex-shrink: 0;
}
.contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted); font-size: 14px;
}

/* scroll reveal: transition opacity + transform, easeOutExpo
   cubic-bezier(0.19, 1, 0.22, 1). Duration tuned between Anduril's 1s
   and Palantir's 0.4-0.5s. */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--reveal-ease), transform 0.8s var(--reveal-ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* stagger grouped items */
.skills-grid .skill-group:nth-child(2) { --reveal-delay: 0.08s; }
.skills-grid .skill-group:nth-child(3) { --reveal-delay: 0.16s; }
.skills-grid .skill-group:nth-child(4) { --reveal-delay: 0.24s; }
.cards .card:nth-child(2n) { --reveal-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* responsive */
@media (max-width: 900px) {
  .hero { padding: 112px 0 32px; }
  .skills-grid { grid-template-columns: 1fr; gap: 36px; }
  .skills-grid .skill-group { --reveal-delay: 0s; }
  .cards { grid-template-columns: 1fr; }
  .cards .card:nth-child(2n) { --reveal-delay: 0s; }
}
@media (max-width: 640px) {
  .container, .nav-inner { padding: 0 20px; }
  .section { padding: 48px 0; }
  .nav nav a { padding: 10px 8px; font-size: 13.5px; }
  .card-body { padding: 22px; }
  .stats dd { font-size: 0.98rem; }
}
