/* ==========================================================================
   Taehyeon Kim — personal site
   Design tokens, layout and components.
   ========================================================================== */

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

:root {
  /* Palette — light */
  --bg:            #ffffff;
  --bg-soft:       #f7f8fb;
  --bg-elevated:   #ffffff;
  --bg-veil:       rgba(255, 255, 255, .78);
  --border:        #e6e8ee;
  --border-strong: #d3d7e0;

  --text:          #10131a;
  --text-muted:    #5b6472;
  --text-faint:    #8a93a3;

  --accent:        #0a76b4;   /* ~4.9:1 on white — safe for link text */
  --accent-soft:   #e4f2fb;
  --accent-2:      #38b6e8;
  --accent-3:      #7fd4f0;

  --gradient:      linear-gradient(115deg, #0a76b4 0%, #1a9ad4 45%, #35bde4 100%);
  --gradient-warm: linear-gradient(115deg, #35bde4 0%, #1a9ad4 100%);

  --shadow-sm: 0 1px 2px rgba(16, 19, 26, .05);
  --shadow-md: 0 4px 16px -4px rgba(16, 19, 26, .10), 0 1px 3px rgba(16, 19, 26, .05);
  --shadow-lg: 0 18px 48px -12px rgba(16, 19, 26, .18), 0 2px 8px rgba(16, 19, 26, .05);

  /* Typography */
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Metrics */
  --wrap:    1120px;
  --wrap-sm: 760px;
  --radius:      14px;
  --radius-lg:   22px;
  --radius-pill: 999px;
  --nav-h: 64px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

:root[data-theme="dark"] {
  --bg:            #0b0d13;
  --bg-soft:       #11141d;
  --bg-elevated:   #141824;
  --bg-veil:       rgba(11, 13, 19, .76);
  --border:        #232838;
  --border-strong: #333a4e;

  --text:          #e9ecf3;
  --text-muted:    #9aa3b5;
  --text-faint:    #6d768a;

  --accent:        #56bde8;
  --accent-soft:   #12283a;
  --accent-2:      #7dd3fc;
  --accent-3:      #a5e8f7;

  --gradient:      linear-gradient(115deg, #38a8e0 0%, #56c4ee 45%, #86dcf5 100%);
  --gradient-warm: linear-gradient(115deg, #86dcf5 0%, #38a8e0 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 48px -12px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .4);
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.18rem; }
h4 { font-size: 1.02rem; }

p { margin: 0 0 1.1em; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .18s var(--ease);
}
a:hover { color: var(--text); }

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .875em;
}

:not(pre) > code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .14em .4em;
}

pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: .875rem;
  line-height: 1.6;
}
pre > code { background: none; border: 0; padding: 0; }

blockquote {
  margin: 1.5rem 0;
  padding: .2rem 0 .2rem 1.15rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .94rem;
}
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; background: var(--bg-soft); }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.wrap--narrow { max-width: var(--wrap-sm); }

.stack > * + * { margin-top: 1.1rem; }

.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section + .section { padding-top: 0; }

.section__head {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  margin-bottom: 1.8rem;
}

.section__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}

.section__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .8rem;
}

/* --------------------------------------------------------------------------
   4. Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--bg-veil);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}

.site-header.is-scrolled { border-bottom-color: var(--border); }

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg); }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .58rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.02em;
  color: var(--text);
  white-space: nowrap;
}
.nav__brand:hover { color: var(--text); }

.nav__links {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  position: relative;
  display: block;
  padding: .42rem .72rem;
  border-radius: var(--radius-pill);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--bg-soft); }
.nav__link.is-active { color: var(--text); font-weight: 600; }

.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
}

.nav__actions { display: flex; align-items: center; gap: .3rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.icon-btn:hover {
  color: var(--text);
  background: var(--bg-soft);
  border-color: var(--border);
}
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav__burger { display: none; }

@media (max-width: 720px) {
  .nav__burger { display: grid; }

  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    padding: .8rem 1.25rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }

  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__link { padding: .65rem .8rem; font-size: 1rem; border-radius: 10px; }
  .nav__link.is-active::after { left: .8rem; transform: none; bottom: 50%; }
}

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

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4rem);

  /* Soft ambient colour. Radial stops reach full transparency well before the
     section edges, so nothing shows a hard clip line the way a blurred box would. */
  background:
    radial-gradient(52% 62% at 88% 4%,  rgba(26, 154, 212, .24), transparent 68%),
    radial-gradient(44% 54% at 102% 26%, rgba(53, 189, 228, .22), transparent 70%),
    radial-gradient(46% 58% at -4% 96%,  rgba(127, 212, 240, .16), transparent 72%);
}

:root[data-theme="dark"] .hero {
  background:
    radial-gradient(52% 62% at 88% 4%,  rgba(56, 168, 224, .20), transparent 68%),
    radial-gradient(44% 54% at 102% 26%, rgba(86, 196, 238, .15), transparent 70%),
    radial-gradient(46% 58% at -4% 96%,  rgba(134, 220, 245, .11), transparent 72%);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero__portrait { order: -1; justify-self: start; }
}

.hero__name {
  margin: 0 0 .35rem;
  font-size: clamp(2.3rem, 6.4vw, 3.5rem);
  letter-spacing: -.035em;
}

.hero__name .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__role {
  margin: 0 0 1.2rem;
  font-family: var(--font-mono);
  font-size: .84rem;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.hero__role a { color: var(--text-muted); border-bottom: 1px solid var(--border-strong); }
.hero__role a:hover { color: var(--accent); border-color: var(--accent); }

.hero__bio {
  max-width: 58ch;
  font-size: 1.03rem;
  color: var(--text-muted);
}
.hero__bio strong { color: var(--text); font-weight: 600; }

.hero__portrait {
  position: relative;
  width: clamp(150px, 40vw, 240px);
  aspect-ratio: 1;
}

.hero__portrait::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 26px;
  background: var(--gradient);
  opacity: .85;
  transition: transform .4s var(--ease);
}
.hero__portrait:hover::before { transform: rotate(3deg) scale(1.02); }

.hero__portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 22px;
  border: 3px solid var(--bg);
}

/* Social / contact row */

.linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.6rem;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .44rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: .855rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease),
              transform .18s var(--ease), box-shadow .18s var(--ease);
}
.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.chip svg { width: 15px; height: 15px; flex: none; }

.chip--primary {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}
.chip--primary:hover { color: #fff; }

/* --------------------------------------------------------------------------
   6. Cards & grids
   -------------------------------------------------------------------------- */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1rem;
}

.interest {
  position: relative;
  overflow: hidden;
}
.interest::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.interest:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.interest:hover::before { transform: scaleX(1); }

.interest__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: .9rem;
}
.interest__icon svg { width: 19px; height: 19px; }

.interest h3 { margin: 0 0 .45rem; font-size: 1.03rem; }

.interest p {
  margin: 0;
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Keyword pills */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .01em;
  padding: .26rem .6rem;
  border-radius: 7px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7. Timeline (education / experience / awards)
   -------------------------------------------------------------------------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline > li {
  position: relative;
  padding: 0 0 1.5rem 1.75rem;
  border-left: 1px solid var(--border);
}
.timeline > li:last-child { padding-bottom: 0; border-left-color: transparent; }

.timeline > li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: .55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.timeline > li:hover::before { border-color: var(--accent); transform: scale(1.25); }

.entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .3rem 1rem;
}

.entry__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}
.entry__title a { color: var(--text); border-bottom: 1px solid var(--border-strong); }
.entry__title a:hover { color: var(--accent); border-color: var(--accent); }

.entry__date {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .02em;
  color: var(--text-faint);
  white-space: nowrap;
}

.entry__sub {
  margin: .15rem 0 0;
  font-size: .92rem;
  color: var(--text-muted);
}

.entry__list {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  font-size: .91rem;
  color: var(--text-muted);
}
.entry__list li { margin-bottom: .25rem; }

.entry__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  padding: .12rem .45rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: 2px;
  margin-left: .35rem;
}

/* --------------------------------------------------------------------------
   8. News
   -------------------------------------------------------------------------- */

.news {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .1rem;
}

.news > li {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
}
.news > li:last-child { border-bottom: 0; }

.news__date {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .02em;
  color: var(--text-faint);
  padding-top: .22rem;
}

.news__body { margin: 0; color: var(--text-muted); }
.news__body strong { color: var(--text); font-weight: 600; }

@media (max-width: 560px) {
  .news > li { grid-template-columns: 1fr; gap: .1rem; }
}

/* --------------------------------------------------------------------------
   9. Publications
   -------------------------------------------------------------------------- */

.pubs {
  display: grid;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
  padding: 1.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}

.pub:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

@media (max-width: 780px) {
  .pub { grid-template-columns: 1fr; gap: 1.1rem; }
}

.pub__figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.pub__figure img {
  width: 100%;
  transition: transform .45s var(--ease);
}
.pub:hover .pub__figure img { transform: scale(1.03); }

.pub__figure figcaption {
  padding: .5rem .7rem;
  font-size: .74rem;
  line-height: 1.5;
  text-align: left;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.pub__venue {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .26rem .6rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: .7rem;
}

.pub__title {
  margin: 0 0 .45rem;
  font-size: 1.16rem;
  line-height: 1.35;
}
.pub__title a { color: var(--text); }
.pub__title a:hover { color: var(--accent); }

.pub__authors {
  margin: 0 0 .3rem;
  font-size: .92rem;
  color: var(--text-muted);
}
.pub__authors .me { color: var(--text); font-weight: 600; }

.pub__meta {
  margin: 0 0 .9rem;
  font-size: .86rem;
  color: var(--text-faint);
}

.pub__tldr {
  margin: 0 0 1rem;
  font-size: .93rem;
  line-height: 1.68;
  color: var(--text-muted);
}

.pub__links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub__links .chip { font-size: .8rem; padding: .34rem .7rem; }

/* --------------------------------------------------------------------------
   10. Blog list
   -------------------------------------------------------------------------- */

.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.post-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.post-card:hover .post-card__thumb img { transform: scale(1.05); }

.post-card__body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }

.post-card__title { margin: 0; font-size: 1.03rem; line-height: 1.4; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--accent); }

.post-card__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .73rem;
  letter-spacing: .02em;
  color: var(--text-faint);
}

.post-card__excerpt { margin: 0; font-size: .9rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   11. Article pages
   -------------------------------------------------------------------------- */

.page-head { padding-block: clamp(2rem, 5vw, 3.2rem) 1.5rem; }

.page-head__title { margin: 0 0 .5rem; }

.page-head__lede {
  margin: 0;
  max-width: 62ch;
  font-size: 1.03rem;
  color: var(--text-muted);
}

.page-head__meta {
  margin: .6rem 0 0;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-faint);
}

.page-body { padding-bottom: 4rem; }

.prose > h2 { margin-top: 2.4rem; font-size: 1.45rem; }
.prose > h3 { margin-top: 1.9rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin-bottom: .35rem; }

/* Scoped to direct children so publication/blog cards rendered inside a prose
   column keep their own figure styling. */
.prose > p > img,
.prose > img,
.prose > figure > img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-block: 1.5rem;
}

.prose > figure { margin: 1.8rem 0; }
.prose > figure > figcaption {
  margin-top: .55rem;
  font-size: .82rem;
  color: var(--text-faint);
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--text-faint);
  margin-bottom: 1.2rem;
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 13px; height: 13px; }

/* CV page */

.cv-frame {
  width: 100%;
  height: min(1150px, 135vh);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  margin-top: 1.5rem;
}

/* Empty state */

.empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-faint);
  font-size: .95rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding-block: 2rem;
  margin-top: auto;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .84rem;
  color: var(--text-faint);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   13. Scroll reveal & motion
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

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

/* --------------------------------------------------------------------------
   14. Utilities
   -------------------------------------------------------------------------- */

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

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-shell > main { flex: 1; }
