/* Ryu Hemingway, portfolio
   Sticky identity rail + full-width content. No script, no animation.

   Layout rule: nothing splits the content column down the middle. Every
   section is a stack of full-width horizontal bands, and a band divides
   into equal cells across the whole width (auto-fit, so the cell count
   falls with the viewport). Bullets, spec lists and figures all use the
   same band so the sections read uniformly. */

:root {
  --text: #16181d;
  --muted: #55595f;
  --line: #e2e2e0;
  --line-strong: #c9c9c6;
  --link: #14459b;
  --bg: #ffffff;
  --bg-alt: #f7f7f5;
  --sans:
    "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --rail: 16rem;
  --gap: clamp(2rem, 3.5vw, 4rem);
  --pad: clamp(1.25rem, 2.5vw, 2.75rem);
  --measure: 88ch;
  /* one band cell: below this width a band drops to fewer columns.
     text bands aim for three across, figure bands for two. */
  --cell: 17rem;
  --cell-wide: 20rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover {
  text-decoration-thickness: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  background: var(--text);
  color: #fff;
  padding: 0.5rem 0.9rem;
  z-index: 10;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* ── page layout ────────────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--gap);
  max-width: 120rem;
  margin: 0 auto;
  padding: 3rem var(--pad) 0;
}

/* ── identity rail ──────────────────────────────────────── */

.rail-inner {
  position: sticky;
  top: 3rem;
  padding-bottom: 3rem;
  /* on a short laptop viewport the rail is taller than the screen; let it
     scroll on its own rather than hiding the availability note off the bottom */
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rail h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.role {
  margin: 0.35rem 0 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.rail-cta {
  margin: 1.25rem 0 0;
  max-width: none;
}

.rail-links {
  list-style: none;
  margin: 0.9rem 0 1.25rem;
  padding: 0;
  font-size: 0.875rem;
}
.rail-links li {
  margin-bottom: 0.4rem;
  overflow-wrap: anywhere;
}

.rail-note {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}
.rail-note strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.4rem;
}

/* ── buttons: the links a recruiter needs to find in one glance ── */

.btn {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.3;
  background: var(--bg);
}
.btn:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: none;
  margin: 1.75rem 0 0;
}

/* ── content column ─────────────────────────────────────── */

main {
  min-width: 0;
  padding-bottom: 1rem;
}

section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 2rem;
}
section + section {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}
#statement {
  margin-bottom: 2.5rem;
}

.statement {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.35;
  letter-spacing: -0.012em;
  margin: 0 0 1.1rem;
  max-width: 62ch;
}
.statement-sub {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  max-width: var(--measure);
}

/* ── proof row: the four numbers, above the fold ────────── */

.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 1.5rem;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  max-width: none;
}
.proof li {
  margin: 0;
}
.proof b {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.proof span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 2.5rem 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
h3.project {
  font-size: 1.15rem;
  margin: 0 0 1.1rem;
  padding: 0;
  border-bottom: 0;
}
p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}
.lead {
  color: var(--muted);
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  max-width: var(--measure);
}
li {
  margin-bottom: 0.55rem;
}
li::marker {
  color: var(--line-strong);
}

strong {
  font-weight: 600;
}

/* ── full-width sections, stacked in horizontal bands ───── */

.split {
  display: block;
  margin-bottom: 2rem;
}
.split-text p {
  max-width: var(--measure);
}
.split-aside {
  margin-top: 1.75rem;
}
.split-aside p {
  max-width: var(--measure);
}
.split-background h3:first-child,
.split-aside h3:first-child {
  margin-top: 0;
}

/* a band of bullets: equal cells across the full width, each opening
   with a rule so the row reads as one horizontal unit */
.split-text ul,
ul.band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--cell), 1fr));
  gap: 1.5rem 2.5rem;
  max-width: none;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.split-text li,
ul.band li {
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-strong);
}

/* figures sit in the same band, two or three across */
.split-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--cell-wide), 100%), 1fr));
  gap: 1.75rem 2.5rem;
  align-items: start;
  margin-top: 2rem;
}
.split-figures > * {
  min-width: 0;
}
.split-figures figure {
  margin: 0;
}

/* ── labelled field lists ───────────────────────────────── */

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--cell), 1fr));
  gap: 1.5rem 2.5rem;
  margin: 0 0 2rem;
  font-size: 0.95rem;
  max-width: none;
}
.spec > div {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-strong);
  min-width: 0;
}
.spec dt {
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.spec dd {
  margin: 0;
  overflow-wrap: anywhere;
}
/* the timeline reads better in narrower cells, more of them per row */
.spec-tight {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

/* ── figures, video and diagrams ────────────────────────── */

figure {
  margin: 1.75rem 0;
}
figure img,
figure video {
  border: 1px solid var(--line);
  width: 100%;
  background: var(--bg-alt);
}
figcaption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 68ch;
}
.demo {
  margin-top: 2rem;
}
.demo figcaption {
  color: var(--text);
}

.pipeline {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 1rem 1.15rem;
  margin: 0;
  overflow-x: auto;
}

/* ── footer ─────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  max-width: 120rem;
  margin: 0 auto;
  padding: 1.25rem var(--pad) 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner p {
  margin: 0;
}

/* ── wide screens: more air, slightly larger type ───────── */

@media (min-width: 1500px) {
  body {
    font-size: 17px;
  }
  :root {
    --rail: 18rem;
  }
}

/* the bands re-flow on their own through auto-fit, so there is no
   intermediate breakpoint to write here */

/* ── one column ─────────────────────────────────────────── */

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
  }
  .rail-inner {
    position: static;
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 1.5rem;
    max-height: none;
    overflow-y: visible;
  }
  .rail h1 {
    font-size: 1.5rem;
  }
  .role {
    margin-bottom: 1.25rem;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
  }
  .rail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
  }
  .rail-links li {
    margin: 0;
  }
  .statement {
    max-width: none;
  }
  .rail-cta {
    margin-top: 1rem;
  }
}

@media (max-width: 600px) {
  .statement {
    font-size: 1.2rem;
  }
  .spec dt br {
    display: none;
  }
  .proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.25rem;
  }
  .proof b {
    font-size: 1.3rem;
  }
  .actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .pipeline {
    font-size: 0.68rem;
  }
}

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

/* ── print ──────────────────────────────────────────────── */

@media print {
  body {
    font-size: 11pt;
  }
  .layout {
    display: block;
    padding: 0;
  }
  figure,
  .skip,
  .nav,
  .actions {
    display: none;
  }
  .btn {
    border: 0;
    padding: 0;
  }
  a {
    color: #000;
    text-decoration: none;
  }
  section + section {
    border-top: 0;
  }
}
