@charset "utf-8";
/* ============================================================
   Yong-Gi Hong — Resume / Portfolio
   Design language: editorial monochrome, hairline grid,
   rectilinear geometry, typography-led hierarchy.
   ============================================================ */

/* ---------- 1. Tokens ---------- */

:root {
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ink: #000000;
  --ink-soft: #3d3d3d;
  --muted: #767676;
  --muted-soft: #a3a3a3;
  --line: #e2e2e2;
  --line-mid: #c9c9c9;
  --bg: #ffffff;
  --bg-alt: #f4f4f4;
  --bg-raise: #ffffff;
  --inverse-bg: #000000;
  --inverse-fg: #ffffff;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 136px;

  --fs-xs: 0.6875rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.3125rem;
  --fs-xl: 1.75rem;
  --fs-display: clamp(2.25rem, 5.2vw, 4rem);
  --fs-hero: clamp(2.75rem, 8.2vw, 6.5rem);

  --measure: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

:root:not([data-theme="light"]) {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ffffff;
    --ink-soft: #d4d4d4;
    --muted: #9a9a9a;
    --muted-soft: #6e6e6e;
    --line: #262626;
    --line-mid: #3a3a3a;
    --bg: #0a0a0a;
    --bg-alt: #131313;
    --bg-raise: #0f0f0f;
    --inverse-bg: #ffffff;
    --inverse-fg: #000000;
    color-scheme: dark;
  }
}

html:root[data-theme="dark"] {
  --ink: #ffffff;
  --ink-soft: #d4d4d4;
  --muted: #9a9a9a;
  --muted-soft: #6e6e6e;
  --line: #262626;
  --line-mid: #3a3a3a;
  --bg: #0a0a0a;
  --bg-alt: #131313;
  --bg-raise: #0f0f0f;
  --inverse-bg: #ffffff;
  --inverse-fg: #000000;
  color-scheme: dark;
}

/* ---------- 2. Reset & base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.75;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  counter-reset: section;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.028em;
}

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

strong, b { font-weight: 700; color: var(--ink); }

::selection { background: var(--ink); color: var(--bg); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

/* ---------- 3. Layout ---------- */

.container {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 9vw, 120px);
  border-top: 1px solid var(--line);
}

.section--alt { background: var(--bg-alt); }

.section-header { margin-bottom: clamp(32px, 5vw, 64px); }

.section-label {
  counter-increment: section;
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
}
.section-label::before {
  content: counter(section, decimal-leading-zero) "  /  ";
  color: var(--ink);
}

.section-title {
  font-size: var(--fs-display);
  letter-spacing: -0.04em;
  max-width: 20ch;
}

.section-desc {
  margin-top: var(--space-5);
  max-width: 62ch;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.8;
}

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* ---------- 4. Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav.is-scrolled { border-bottom-color: var(--line-mid); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 68px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border: 1px solid var(--line-mid);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  margin-inline: auto;
}

.nav-link {
  position: relative;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: var(--space-2);
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--ink); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line-mid);
}
.lang-toggle a {
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-toggle a + a { border-left: 1px solid var(--line-mid); }
.lang-toggle a:hover { color: var(--ink); }
.lang-toggle a.is-active {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
}

.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 1px solid var(--line-mid);
  color: var(--ink);
  cursor: pointer;
  font-size: var(--fs-sm);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.theme-toggle:hover,
.nav-toggle:hover {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
}

.theme-toggle .icon-light { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-light { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-dark { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-light { display: inline; }
}

.nav-toggle { display: none; }
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 15px;
}
.nav-toggle-bar {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.nav-mobile.is-open { display: block; }
.nav-mobile-inner {
  display: flex;
  flex-direction: column;
  padding-inline: var(--gutter);
  padding-block: var(--space-2) var(--space-5);
}
.nav-mobile-link {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-mobile-link:last-child { border-bottom: 0; }

/* ---------- 5. Hero ---------- */

.hero {
  padding-block: clamp(56px, 11vw, 140px) clamp(48px, 8vw, 104px);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.72fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  border: 1px solid var(--ink);
  padding: 7px 14px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--ink);
  flex-shrink: 0;
}

.hero-title {
  font-size: var(--fs-hero);
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin-bottom: var(--space-6);
}

.hero-body .quote {
  border-left: 2px solid var(--ink);
  padding-left: var(--space-5);
  margin: 0 0 var(--space-7);
  max-width: 46ch;
}
.hero-body .quote p {
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.social-links { display: flex; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-mid);
  color: var(--muted);
  font-size: var(--fs-base);
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease);
}
.social-link + .social-link { margin-left: -1px; }
.social-link:hover {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  position: relative;
}

.hero-visual { position: relative; }
.hero-visual img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
  border: 1px solid var(--line-mid);
}

/* ---------- 6. Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px 22px;
  border: 1px solid var(--ink);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.btn-primary {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
}
.btn-primary:hover {
  background: transparent;
  color: var(--ink);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-mid);
}
.btn-outline:hover {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  border-color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding-inline: 0;
}
.btn-ghost:hover { color: var(--ink); }

.btn--sm {
  padding: 9px 15px;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
}

/* ---------- 7. Tags & badges ---------- */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--line-mid);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  line-height: 1.5;
}

.tag--accent {
  border-color: var(--ink);
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font-weight: 600;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.badge--accent { color: var(--ink); }

.text-accent {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line-mid);
  transition: border-color 0.2s var(--ease);
}
.text-accent:hover { border-color: var(--ink); }

/* ---------- 8. Cards ---------- */

.card {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  padding: clamp(20px, 2.4vw, 30px);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.card--hover:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
}

.card-icon {
  font-size: var(--fs-md);
  color: var(--muted-soft);
  margin-bottom: var(--space-5);
}

.card-title {
  font-size: var(--fs-md);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-3);
}

.card-desc {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: 0.02em;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  overflow-wrap: anywhere;
}

.skill-card .card-title {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
}

.skills-block { margin-top: clamp(48px, 6vw, 80px); }

.portfolio-link { width: 100%; }
.portfolio-link + .portfolio-link { margin-top: var(--space-2); }

/* ---------- 9. Stats (hairline grid) ---------- */

.about-stats {
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.about-stats .stat {
  background: var(--bg);
  border: 0;
  padding: clamp(20px, 2.6vw, 32px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.section--alt .about-stats .stat { background: var(--bg-alt); }

.about-stats .stat:first-child {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
}
.about-stats .stat:first-child .stat-label { color: var(--inverse-fg); opacity: 0.6; }

.stat-value {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.stat-label {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 10. Quote ---------- */

.quote {
  margin: var(--space-6) 0 0;
  padding-left: var(--space-5);
  border-left: 2px solid var(--ink);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.quote .tag-list { text-transform: none; letter-spacing: 0; }

/* ---------- 11. Timeline ---------- */

.timeline {
  --tl-gutter: clamp(20px, 3vw, 34px);
  --tl-pad: clamp(28px, 3.6vw, 48px);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: var(--tl-gutter);
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

/* One continuous record: entries are divided by a hairline, not boxed. */
.timeline-item {
  position: relative;
  padding-block: var(--tl-pad);
  border-top: 1px solid var(--line);
}
.timeline-item:first-child {
  padding-top: 0;
  border-top: 0;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--tl-gutter) - 4px);
  top: calc(var(--tl-pad) + 6px);
  width: 9px;
  height: 9px;
  background: var(--ink);
}
.timeline-item:first-child .timeline-marker { top: 6px; }

.timeline-content { padding: 0; }

.timeline-date {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--space-3);
}

.timeline-title {
  font-size: var(--fs-lg);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

/* No rule under the org line — the entry separators are already hairlines,
   and two of the same weight this close read as noise. */
.timeline-org {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  margin-bottom: var(--space-5);
}

.timeline-desc p {
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
}

.timeline-desc ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.timeline-desc ul li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.8;
}
.timeline-desc ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--line-mid);
}

/* ---------- 12. Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-7);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- 12b. Project pages ---------- */

.project-hero {
  padding-block: clamp(40px, 6vw, 88px) clamp(32px, 4vw, 56px);
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-7);
  transition: color 0.2s var(--ease);
}
.project-back:hover { color: var(--ink); }

.project-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.project-title {
  font-size: var(--fs-display);
  letter-spacing: -0.045em;
  max-width: 22ch;
  margin-bottom: var(--space-5);
}

.project-summary {
  max-width: 60ch;
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: var(--space-6);
}

.project-stack { margin-bottom: var(--space-6); }

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.project-metrics-section { padding-block: 0; border-top: 0; }
.project-metrics { margin-bottom: clamp(24px, 4vw, 48px); }

/* Prose — long-form project write-up */

.prose {
  max-width: 74ch;
  font-size: var(--fs-md);
  line-height: 1.9;
  color: var(--ink-soft);
}

.prose > * + * { margin-top: var(--space-5); }

.prose h2 {
  font-size: var(--fs-xl);
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose h3 {
  font-size: var(--fs-lg);
  color: var(--ink);
  margin-top: var(--space-7);
}

.prose p { margin-bottom: 0; }

.prose ul, .prose ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-left: 0;
}

.prose ul > li {
  position: relative;
  padding-left: var(--space-5);
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 8px;
  height: 1px;
  background: var(--line-mid);
}

.prose ol { counter-reset: prose-ol; }
.prose ol > li {
  position: relative;
  padding-left: var(--space-7);
  counter-increment: prose-ol;
}
.prose ol > li::before {
  content: counter(prose-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
}

.prose a {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line-mid);
  transition: border-color 0.2s var(--ease);
}
.prose a:hover { border-color: var(--ink); }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 2px 6px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}

.prose pre {
  overflow-x: auto;
  padding: var(--space-5);
  border: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: var(--fs-sm);
  line-height: 1.7;
}
.prose pre code { border: 0; padding: 0; background: none; }

.prose blockquote {
  margin: 0;
  padding-left: var(--space-5);
  border-left: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 500;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
}
.prose th {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: var(--line-mid);
  white-space: nowrap;
}

.prose img {
  width: 100%;
  border: 1px solid var(--line);
}

/* Markdown has no figure syntax, so a caption is an italic line right after
   the image. On consecutive lines kramdown keeps both in one <p>, so match
   the adjacent pair as well as the blank-line-separated form. */
.prose p > img { margin-bottom: var(--space-3); }
.prose p > img + em,
.prose p > em:only-child {
  display: block;
  font-style: normal;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--muted);
  padding-left: var(--space-4);
  border-left: 2px solid var(--line-mid);
}

.prose figure { margin: 0; }
.prose figcaption {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: var(--space-7);
}

/* Placeholder for a figure that has no image yet */
.figure-todo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: var(--space-6);
  border: 1px dashed var(--line-mid);
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-soft);
  text-align: center;
}

/* Project index */

.project-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.project-list-item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: baseline;
  padding: clamp(20px, 3vw, 32px) var(--space-2);
  background: var(--bg);
  transition: background-color 0.2s var(--ease);
}
.project-list-item:hover { background: var(--bg-alt); }

.project-list-index {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.project-list-title {
  font-size: var(--fs-lg);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

.project-list-summary {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.project-list-arrow {
  font-size: var(--fs-sm);
  color: var(--muted-soft);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}
.project-list-item:hover .project-list-arrow {
  color: var(--ink);
  transform: translateX(4px);
}

@media (max-width: 620px) {
  .project-list-item {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: var(--space-4);
  }
  .project-list-arrow { display: none; }
}

/* ---------- 13. Reveal motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view,
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal--delay-1 { transition-delay: 0.07s; }
.reveal--delay-2 { transition-delay: 0.14s; }
.reveal--delay-3 { transition-delay: 0.21s; }
.reveal--delay-4 { transition-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 14. Responsive ---------- */

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-brand { margin-right: auto; }
}

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-visual {
    order: -1;
    max-width: 210px;
  }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 76px; }
  .grid-3,
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-title { max-width: none; }
  .hero-actions .btn { flex: 1 1 auto; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .about-stats { grid-template-columns: minmax(0, 1fr); }
  .social-link { width: 38px; height: 38px; }
}

@media print {
  .nav, .nav-mobile, .theme-toggle, .nav-toggle, .lang-toggle,
  .hero-actions, .social-links, .footer-back, .skip-link { display: none !important; }
  body { font-size: 10pt; line-height: 1.5; }
  .section { padding-block: 18pt; break-inside: avoid; }
  .card, .timeline-item { break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
