@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&family=Noto+Sans+KR:wght@300;400;500&display=swap');

/* ============================================================
   CSS VARIABLES & THEME
   ============================================================ */
:root {
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --color-bg: #fafaf8;
  --color-bg-secondary: #f3f3f0;
  --color-text: #1c1c1a;
  --color-text-muted: #6b6b68;
  --color-border: #e2e2de;
  --color-accent: #111111;
  --color-accent-hover: #000000;
  --color-link: #111111;
  --color-link-hover: #000000;

  --terminal-bg: #fafaf8;
  --terminal-text: #1c1c1a;
  --terminal-muted: #6b6b68;
  --terminal-dim: #aaa9a5;
  --terminal-accent: #111111;
  --terminal-accent-soft: #444444;
  --terminal-control-border: rgba(28,28,26,0.22);

  --navbar-terminal-bg: #fafaf8;
  --navbar-terminal-text: #1c1c1a;
  --navbar-terminal-muted: #6b6b68;
  --navbar-terminal-border: rgba(28,28,26,0.1);
  --navbar-terminal-control-border: rgba(28,28,26,0.22);
  --navbar-terminal-highlight: rgba(28,28,26,0.05);
  --navbar-terminal-highlight-border: rgba(28,28,26,0.1);
  --navbar-terminal-focus: rgba(17,17,17,0.12);
  --navbar-indicator-bg: rgba(250,250,248,0.85);
  --navbar-indicator-rim: rgba(255,255,255,0.9);
  --navbar-indicator-highlight: rgba(255,255,255,0.96);
  --navbar-indicator-highlight-bottom: rgba(255,255,255,0.55);
  --navbar-indicator-shadow: rgba(0,0,0,0.07);
  --navbar-indicator-inner-shadow: rgba(0,0,0,0.05);

  --navbar-height: 56px;
  --section-padding-y: 4.5rem;
  --max-width: 900px;
  --page-gutter: 1.5rem;
  --page-edge-top: clamp(3rem, 5.5vw, 4.5rem);
  --page-edge-bottom: clamp(4.5rem, 8vw, 7rem);
  --page-content-gap: clamp(2.8rem, 4.5vw, 3.8rem);
  --page-section-gap: clamp(3.25rem, 6vw, 5rem);
  --page-title-size: 2.275rem;
  --page-copy-size: .91rem;
  --page-support-size: .86rem;
}

/* Theme-aware image switching */
.theme-img-dark { display: none; }
html[data-theme=dark] .theme-img-light { display: none; }
html[data-theme=dark] .theme-img-dark { display: block; }

/* Invert to white in dark mode */
html[data-theme=dark] .theme-invert-dark { filter: brightness(0) invert(1); }
/* RGB invert in dark mode */
html[data-theme=dark] .theme-invert-dark-rgb { filter: invert(1); }

html[data-theme=dark] {
  --color-bg: #0d0d0b;
  --color-bg-secondary: #161614;
  --color-text: #e8e8e3;
  --color-text-muted: #888884;
  --color-border: #252522;
  --color-accent: #d4d4cf;
  --color-accent-hover: #ffffff;
  --color-link: #d4d4cf;
  --color-link-hover: #ffffff;

  --terminal-bg: #0d0d0b;
  --terminal-text: #e8e8e3;
  --terminal-muted: #888884;
  --terminal-dim: #555552;
  --terminal-accent: #d4d4cf;
  --terminal-accent-soft: #aaa9a5;
  --terminal-control-border: rgba(255,255,255,0.18);

  --navbar-terminal-bg: #0d0d0b;
  --navbar-terminal-text: #e8e8e3;
  --navbar-terminal-muted: #888884;
  --navbar-terminal-border: rgba(255,255,255,0.1);
  --navbar-terminal-control-border: rgba(255,255,255,0.18);
  --navbar-terminal-highlight: rgba(255,255,255,0.07);
  --navbar-terminal-highlight-border: rgba(255,255,255,0.12);
  --navbar-terminal-focus: rgba(212,212,207,0.2);
  --navbar-indicator-bg: rgba(26,26,24,0.85);
  --navbar-indicator-rim: rgba(255,255,255,0.15);
  --navbar-indicator-highlight: rgba(255,255,255,0.35);
  --navbar-indicator-highlight-bottom: rgba(255,255,255,0.08);
  --navbar-indicator-shadow: rgba(0,0,0,0.4);
  --navbar-indicator-inner-shadow: rgba(0,0,0,0.3);
}

/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  scrollbar-gutter: stable;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--page-copy-size);
  padding-top: var(--navbar-height);
  line-height: 1.65;
  transition: background-color .2s, color .2s;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; padding: 0; }
ul, ol, menu { list-style: none; margin: 0; padding: 0; }
a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); }
img { display: block; max-width: 100%; height: auto; }
button { font-family: var(--font-sans); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  padding-inline: var(--page-gutter);
  margin-inline: auto;
}

.section {
  padding-block: var(--section-padding-y);
}


@media (min-width: 768px) {
  main > .section:first-child { padding-top: 3rem; }
  main > .section.page-shell-section { padding-top: var(--page-edge-top); }
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.site-command {
  color: var(--terminal-dim);
  font-family: var(--font-mono);
  margin: 0 0 .52rem;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .03em;
  line-height: 1.3;
}

.sec-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  color: #4a4a47;
  margin: 0 0 .6rem;
  line-height: 1.3;
  letter-spacing: .01em;
}
html[data-theme=dark] .sec-label {
  color: #9a9a96;
}

.site-display-title {
  font-family: var(--font-display);
  color: var(--color-text);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
  line-height: 1.05;
}

.site-accent-text {
  color: var(--color-text-muted);
  font-size: var(--page-support-size);
  font-weight: 400;
  line-height: 1.5;
}

.site-page-header {
  padding-bottom: var(--page-content-gap);
  position: relative;
}

.site-page-title-row {
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  display: flex;
}

.site-page-header-action {
  position: absolute;
  top: 1.586rem;
  right: 0;
}

.site-page-header.has-action .site-page-description,
.site-page-header.has-action .site-page-title-row {
  padding-right: 5.25rem;
}

.site-page-description {
  max-width: 82ch;
  margin: .85rem 0 0;
}

.section-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .9rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: .3rem;
}

.section-title {
  font-family: var(--font-display);
  color: var(--color-text);
  margin-bottom: .32rem;
  font-size: clamp(1.15rem, 4vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  height: var(--navbar-height);
  z-index: 100;
  background-color: var(--navbar-terminal-bg);
  border-bottom: 1px solid var(--navbar-terminal-border);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.navbar-inner {
  isolation: isolate;
  max-width: 1180px;
  min-height: var(--navbar-height);
  font-family: var(--font-sans);
  justify-content: flex-start;
  align-items: center;
  gap: .75rem;
  margin-inline: auto;
  padding-block: .4rem;
  padding-inline: 1.5rem;
  display: flex;
  position: relative;
  overflow: hidden;
}

.navbar-active-indicator {
  z-index: 0;
  background-color: var(--navbar-indicator-bg);
  box-shadow:
    inset 0 1px 1px var(--navbar-indicator-highlight),
    inset 0 -1px 1.5px var(--navbar-indicator-highlight-bottom),
    inset 0 0 0 .5px var(--navbar-indicator-rim),
    inset 0 4px 8px -2px var(--navbar-indicator-inner-shadow),
    inset 0 -2px 4px -1px var(--navbar-indicator-inner-shadow),
    3px 3px 8px var(--navbar-indicator-shadow),
    1px 1px 3px var(--navbar-indicator-shadow);
  pointer-events: none;
  backdrop-filter: blur(10px) saturate(180%) brightness(1.04);
  border-radius: 999px;
  transition:
    transform .5s cubic-bezier(.34, 1.4, .64, 1),
    width .5s cubic-bezier(.34, 1.4, .64, 1),
    height .5s cubic-bezier(.34, 1.4, .64, 1),
    opacity .3s;
  position: absolute;
  top: 0;
  left: 0;
}

.navbar-brand {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
}

.navbar-links {
  flex-wrap: nowrap;
  flex: 0 auto;
  justify-content: flex-start;
  align-items: center;
  gap: .5rem;
  margin-left: .25rem;
  display: flex;
}

.nav-link {
  z-index: 1;
  color: var(--navbar-terminal-muted);
  border: 1px solid transparent;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-height: 30px;
  padding: .25rem .65rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: color .15s, background-color .15s, border-color .15s;
  display: inline-flex;
  position: relative;
}

.nav-link.active, .nav-link:hover { color: var(--navbar-terminal-text); }
.nav-link:hover:not(.active) { background-color: var(--navbar-terminal-highlight); }
.nav-link.active { background-color: transparent; border-color: transparent; font-weight: 700; }
.nav-link:focus { outline: none; }
.nav-link:focus-visible {
  border-color: var(--navbar-terminal-highlight-border);
  background-color: var(--navbar-terminal-highlight);
  color: var(--navbar-terminal-text);
  box-shadow: 0 0 0 2px var(--navbar-terminal-focus);
}

.nav-label-mobile { display: none; }

.nav-link.navbar-brand {
  padding: .15rem .75rem;
  font-size: 1.05rem;
}

.navbar-brand-prefix {
  color: var(--terminal-accent);
  font-weight: 400;
  line-height: 1;
}

.navbar-controls {
  z-index: 1;
  flex-shrink: 0;
  gap: .5rem;
  margin-left: auto;
  align-items: center;
  display: flex;
}

.theme-btn {
  border: 1px solid var(--navbar-terminal-control-border);
  cursor: pointer;
  width: 36px;
  height: 36px;
  color: var(--navbar-terminal-muted);
  background: transparent;
  border-radius: 999px;
  justify-content: center;
  font-size: 1rem;
  transition: background-color .15s, border-color .15s, color .15s;
  align-items: center;
  display: flex;
}

.theme-btn:hover {
  background-color: var(--navbar-terminal-highlight);
  border-color: var(--navbar-terminal-highlight-border);
  color: var(--navbar-terminal-text);
}

.locale-btn {
  border: 1px solid var(--navbar-terminal-control-border);
  height: 36px;
  cursor: pointer;
  background: transparent;
  border-radius: 999px;
  align-items: center;
  gap: .25rem;
  padding-inline: .8rem;
  font-size: .82rem;
  font-weight: 400;
  transition: background-color .15s, border-color .15s, color .15s;
  display: inline-flex;
  color: var(--navbar-terminal-text);
}

.locale-btn:hover {
  background-color: var(--navbar-terminal-highlight);
  border-color: var(--navbar-terminal-highlight-border);
}

.locale-btn .active { color: var(--color-text); font-weight: 500; }
.locale-btn:focus, .theme-btn:focus { outline: none; }
.theme-icon { font-size: 1.05rem; line-height: 1; display: block; }

/* ============================================================
   HOME PAGE
   ============================================================ */
.home-page {
  min-height: calc(100dvh - var(--navbar-height));
  display: flex;
  flex-direction: column;
}

.home-page, .profile-home { background: var(--color-bg); }

.profile-home {
  flex: 1;
  width: 100%;
}

.profile-home-container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--page-edge-top) var(--page-gutter) var(--page-edge-bottom);
}

.profile-home-header, .profile-home-name { max-width: 920px; }

.profile-home-role {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .55rem;
  margin: .9rem 0;
}

.profile-home-role a { color: var(--color-link); text-decoration: none; }
.profile-home-role a:hover { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: .16em; }
.profile-home-role-separator { color: var(--color-text-muted); opacity: .7; }

/* Contact buttons */
.home-contact-strip {
  position: relative;
  width: min(100%, 720px);
  height: 40px;
  overflow: hidden;
}

.home-contact-strip-inner {
  position: absolute;
  inset: 0 auto auto 0;
  display: inline-flex;
  align-items: center;
  gap: 11.2px;
  width: max-content;
}

.home-contact-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7.68px 14.4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font-size: 13.76px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}

.home-contact-button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
}

.home-contact-button:focus { outline: none; }
.home-contact-button:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.home-contact-button svg {
  width: 1.08em;
  height: 1.08em;
  flex: 0 0 1.08em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.home-contact-button .home-contact-fill-icon { fill: currentColor; stroke: none; }

/* Profile grid */
.profile-home-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 3fr) 1px minmax(0, 7fr);
  column-gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
  margin-top: var(--page-content-gap);
}

.profile-home-grid::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  width: 1px;
  background: var(--color-border);
}

.profile-home-copy {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}

.profile-home-about {
  max-width: 72ch;
  color: var(--color-text);
  font-size: var(--page-copy-size);
  line-height: 1.5;
}

.profile-home-about p:not(.site-command) { margin: 0; }
.profile-home-about p:not(.site-command) + p { margin-top: .65rem; }
.profile-home-about a { color: var(--color-link); font-weight: 400; text-decoration: none; white-space: nowrap; }
.profile-home-about a:hover { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: .16em; }

.profile-home-interests { margin-top: 2.35rem; }
.profile-home-interests .site-command { margin-bottom: .7rem; }

.profile-home-interests ul {
  display: grid;
  gap: .52rem;
  margin: 0;
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--color-text);
  font-size: var(--page-copy-size);
  line-height: 1.5;
}

.profile-home-figure {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  margin: 0;
  align-self: start;
}

.profile-home-figure .site-command { margin-bottom: .7rem; }

.profile-home-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--color-bg-secondary);
  border-radius: 4px;
}

.profile-home-image {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.profile-home-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--color-bg-secondary);
  color: var(--color-text-muted);
  font-size: 4rem;
  position: absolute;
  top: 0; left: 0;
}

/* News section */
.profile-home-news { margin-top: var(--page-section-gap); }
.profile-home-news > .site-command { margin-bottom: .45rem; }

.home-news-list { border-top: 1px dashed var(--color-border); }

.home-news-item {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  column-gap: .8rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px dashed var(--color-border);
}

.home-news-item time {
  color: var(--terminal-dim);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .02em;
  white-space: nowrap;
}

.home-news-emoji {
  width: 1.25rem;
  font-size: .95rem;
  line-height: 1.5;
  text-align: center;
}

.home-news-item p {
  margin: 0;
  color: var(--color-text);
  font-size: var(--page-copy-size);
  line-height: 1.5;
}

.home-news-item p a { color: var(--color-link); font-weight: 400; text-decoration: none; }
.home-news-item p a:hover { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: .16em; }

/* News toggle */
.home-news-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.home-news-toggle {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 32px;
  padding: .38rem .7rem;
  border: 1px solid var(--terminal-control-border);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: .76rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.home-news-toggle:hover {
  border-color: var(--color-text);
  background: rgba(28,28,26,0.05);
  color: var(--color-text);
  transform: translateY(-1px);
}

.home-news-toggle:focus { outline: none; }

.home-news-toggle-icon {
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted);
  transition: background-color .15s ease, border-color .15s ease;
}

.home-news-toggle-icon svg {
  width: .72rem;
  height: .72rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s ease;
}

.home-news-toggle.expanded .home-news-toggle-icon svg {
  transform: rotate(180deg);
}

.home-page > .footer { margin-top: auto; }

/* ── Home navigation cards ───────────────── */
.home-nav-section {
  border-top: 1px solid var(--color-border);
  padding: 3rem 0;
  background: var(--color-bg-secondary);
}

.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.home-nav-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.25rem 1.4rem 1.4rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}

.home-nav-card:hover {
  border-color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  color: var(--color-text);
}

.home-nav-card-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .85rem;
  color: var(--color-text-muted);
  line-height: 1;
}

.home-nav-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: var(--color-text);
}

.home-nav-card-desc {
  font-size: .78rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin-top: .15rem;
}

@media (max-width: 640px) {
  .home-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Home scroll sections (C-style single-scroll layout) ── */
.home-scroll-section {
  border-top: 1px solid var(--color-border);
  padding: 2.8rem 0;
}

.home-scroll-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.home-see-all {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color .15s;
}
.home-see-all:hover { color: var(--color-text); }

/* ── Home Hub layout (A-style: sidebar + panels) ── */
.home-hub-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem var(--page-gutter) 0;
  align-items: start;
}

/* Sidebar */
.home-hub-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding-right: 3.5rem;
}

.home-hub-sidebar .home-hub-fig-label + .home-hub-photo-wrap {
  margin-top: -.9rem;
}

.home-hub-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 5/6;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg-secondary);
}
.home-hub-photo-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.home-hub-photo-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 2.5rem;
  background: var(--color-bg-secondary);
}

.home-hub-identity { display: flex; flex-direction: column; gap: .3rem; }
.home-hub-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.home-hub-role {
  font-size: .85rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

.home-hub-fig-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .92rem;
  color: var(--color-text);
  opacity: .85;
  margin: 0 0 .3rem;
}

.home-hub-link-pills {
  display: flex;
  gap: .35rem;
  flex-wrap: nowrap;
}
.home-hub-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: color .15s, border-color .15s;
}
.home-hub-pill svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; }
.home-hub-pill:hover { color: var(--color-text); border-color: var(--color-text-muted); }

.home-hub-bio {
  font-size: .88rem;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
}

.home-hub-bio a {
  color: #2563eb;
  text-decoration: none;
}

html[data-theme=dark] .home-hub-bio a {
  color: #60a5fa;
}

.home-hub-interests { display: flex; flex-direction: column; gap: .4rem; }
.home-hub-interests-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .95rem;
  color: var(--color-text);
  opacity: .85;
}
.home-hub-interests ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: .2rem;
}
.home-hub-interests li {
  font-size: .85rem;
  color: var(--color-text-muted);
  padding-left: .9rem;
  position: relative;
}
.home-hub-interests li::before {
  content: '•';
  position: absolute; left: 0;
  color: var(--color-text-muted);
  font-size: .9rem;
}

/* Panels */
.home-hub-panels {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--color-border);
  padding-left: 3.5rem;
}

.home-hub-panel {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}
.home-hub-panel:first-child { padding-top: 0; }
.home-hub-panel:last-child { border-bottom: none; }

.home-hub-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.home-hub-panel-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-text);
  opacity: .85;
}

/* Publication in panel */
.home-hub-paper { display: flex; flex-direction: column; gap: .4rem; }
.home-hub-paper-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.home-hub-paper-meta {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-size: .85rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}
.home-hub-paper-authors { margin: 0; }
.home-hub-paper-venue { margin: 0; font-size: .8rem; }

/* Project in panel */
.home-hub-project { display: flex; flex-direction: column; gap: .3rem; }
.home-hub-project.clickable {
  cursor: pointer;
  outline: none;
  border-radius: 8px;
  margin: -.5rem;
  padding: .5rem;
  transition: background .16s ease;
}
.home-hub-project.clickable:hover,
.home-hub-project.clickable:focus-visible { background: var(--color-bg-secondary); }
.home-hub-project.clickable:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.home-hub-project-period {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--color-text-muted);
}
.home-hub-project-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -.01em;
}
.home-hub-project-venue {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin: 0;
}
.home-hub-project-desc {
  font-size: .88rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 768px) {
  .home-hub-layout {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }
  .home-hub-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.2rem;
    padding-right: 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
  }
  .home-hub-photo-wrap { width: 88px; flex-shrink: 0; }
  .home-hub-identity { flex: 1; min-width: 140px; }
  .home-hub-link-pills, .home-hub-bio, .home-hub-interests { width: 100%; }
  .home-hub-panels { border-left: none; padding-left: 0; }
}

/* Research statement */
.home-research-statement {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 0 1.5rem;
}

/* Publication list on home */
.home-paper-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}

.home-paper-item {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.home-paper-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  letter-spacing: -.01em;
  margin: 0;
}

.home-paper-meta {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.home-paper-authors {
  font-size: .8rem;
  color: var(--color-text-muted);
}
.home-paper-authors strong { text-decoration: underline; text-underline-offset: .15em; }

.home-paper-venue {
  font-size: .8rem;
  color: var(--color-text-muted);
}

.home-paper-links {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: .15rem;
}

.home-paper-link {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-border);
  padding: .15rem .5rem;
  border-radius: 3px;
  transition: border-color .15s, background .15s;
}
.home-paper-link:hover {
  border-color: var(--color-text);
  background: var(--color-bg-secondary);
}

/* Project grid on home — remove its own border-top */
.home-projects-preview {
  border-top: none;
}

/* Hidden extra news items */
.home-news-extra { display: none; }
.home-news-extra.visible { display: contents; }

/* ============================================================
   ROUTE TRANSITION (SPA sliding animation) — matches original
   ============================================================ */
.route-transition-overlay {
  --route-end-step: 0;
  --route-start-step: 0;
  --route-transition-duration: .76s;
  inset: var(--navbar-height, 3.5rem) 0 0;
  z-index: 80;
  background: var(--color-bg);
  color: var(--color-text);
  pointer-events: all;
  position: fixed;
  overflow: hidden;
}

.route-transition-track {
  height: 100%;
  transform: translate3d(calc(var(--route-start-step) * -100%), 0, 0);
  will-change: transform;
  display: flex;
}

.route-transition-overlay[data-phase=running] .route-transition-track {
  transform: translate3d(calc(var(--route-end-step) * -100%), 0, 0);
  transition: transform var(--route-transition-duration) cubic-bezier(.76, 0, .24, 1);
}

.route-transition-panel {
  flex: 0 0 100%;
  overflow: hidden;
  position: relative;
  background: var(--color-bg);
}

.route-transition-page {
  width: 100%;
  min-height: 100%;
  background: var(--color-bg);
  overflow: hidden;
  position: absolute;
  left: 0;
  right: 0;
}

/* ── Cover overlay (file:// fallback) ─────────────────────── */
#nav-cover {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--color-bg);
  pointer-events: none;
  transition: transform .42s cubic-bezier(.76, 0, .24, 1);
}
#nav-cover.from-right  { transform: translateX(100%); }
#nav-cover.from-left   { transform: translateX(-100%); }
#nav-cover.covering    { transform: translateX(0); }
#nav-cover.exit-left   { transform: translateX(-100%); }
#nav-cover.exit-right  { transform: translateX(100%); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: .87rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: .8rem;
  color: var(--color-text-muted);
}
.footer p { margin: 0; }

/* ============================================================
   CV / PORTFOLIO PAGE
   ============================================================ */
.cv-pdf-link {
  width: 4.5rem;
  height: 4.5rem;
  color: var(--color-accent);
  border-radius: 6px;
  place-items: center;
  padding: .2rem;
  text-decoration: none;
  transition: color .15s, background-color .15s, transform .15s;
  display: grid;
}

.cv-pdf-link:hover {
  color: var(--color-accent-hover);
  background: rgba(22,163,74,0.07);
  transform: translateY(-1px);
}

.cv-pdf-icon { width: 4.25rem; height: 4.25rem; display: block; }

.cv-pdf-link:focus-visible {
  color: var(--color-accent);
  outline: 2px solid rgba(22,163,74,0.45);
  outline-offset: 3px;
}

/* ============================================================
   TIMELINE (CV page)
   ============================================================ */
.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-areas: "image header" "bullets bullets";
  column-gap: 1.25rem;
  row-gap: 1rem;
  padding-block: 1.5rem;
}

.portfolio-page .timeline-item { row-gap: .65rem; padding-block: 0; }
.portfolio-page .timeline-item + .timeline-item { margin-top: 2.2rem; }

@media (min-width: 768px) {
  .timeline-item {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: center;
    padding-block: 2.5rem;
  }
  .portfolio-page .timeline-item {
    gap: 2rem;
    align-items: flex-start;
    padding-block: 0;
  }
}

.timeline-image-wrap {
  position: relative;
  grid-area: image;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .timeline-image-wrap { width: 120px; height: 120px; }
  .portfolio-page .timeline-image-wrap { width: 100px; height: 100px; }
}

.timeline-image-wrap img { width: 100%; height: 100%; object-fit: contain; }

.timeline-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  padding: 0.5rem;
}

.timeline-main {
  grid-area: header;
  display: block;
  min-width: 0;
}

@media (min-width: 768px) { .timeline-main { flex: 1; } }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .5rem;
}

@media (min-width: 768px) {
  .timeline-header { margin-bottom: .75rem; }
  .portfolio-page .timeline-header { margin-bottom: .4rem; }
}

.timeline-org {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-text);
}

.timeline-org a { color: var(--color-link); text-decoration: none; transition: color .15s ease; }
.timeline-org a:hover { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: .16em; }

.timeline-location-inline { color: var(--color-text-muted); font-size: .95rem; font-weight: 400; }
.timeline-org-sub { font-size: .85rem; color: var(--color-text-muted); margin: .15rem 0 0; font-weight: 400; }

.timeline-subitems { display: grid; gap: .7rem; margin-top: .35rem; }

.timeline-subitems-stacked {
  position: relative;
  padding-left: 1.45rem;
  --timeline-dot-left: -1.45rem;
  --timeline-dot-size: 0.45rem;
  --timeline-dot-top: 0.26rem;
  --timeline-dot-center-y: 0.62rem;
  --timeline-line-left: calc(-1.09rem - 1px);
  --timeline-line-bottom: -1.42rem;
  --timeline-line-width: 2px;
}

.timeline-subitems-single {
  position: relative;
  padding-left: 1.45rem;
  --timeline-dot-left: -1.45rem;
  --timeline-dot-size: 0.45rem;
  --timeline-dot-top: 0.26rem;
}

.timeline-subitem { position: relative; }

.timeline-subitems-single .timeline-subitem::before,
.timeline-subitems-stacked .timeline-subitem::before {
  content: "";
  position: absolute;
  top: var(--timeline-dot-top);
  left: var(--timeline-dot-left);
  width: var(--timeline-dot-size);
  height: var(--timeline-dot-size);
  border-radius: 50%;
  background: var(--color-text-muted);
}

.timeline-subitems-stacked .timeline-subitem:not(:last-child)::after {
  content: "";
  position: absolute;
  top: var(--timeline-dot-center-y);
  bottom: var(--timeline-line-bottom);
  left: var(--timeline-line-left);
  width: var(--timeline-line-width);
  background: var(--color-text-muted);
}

.timeline-subitem-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.timeline-role {
  font-weight: 400;
  color: var(--color-text);
  margin: 0;
  font-size: clamp(.75rem, 3.8vw, 1rem);
  line-height: 1.4;
  overflow-wrap: break-word;
}

.timeline-period-mobile { display: block; font-size: .85rem; font-weight: 400; color: var(--color-text-muted); margin-top: .1rem; }
.timeline-period-desktop { display: none; }
.timeline-title-mobile { display: none; }

@media (min-width: 768px) {
  .timeline-period-mobile { display: none; }
  .timeline-period-desktop {
    display: block;
    font-size: .85rem;
    font-weight: 400;
    color: var(--color-text-muted);
    height: fit-content;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .timeline-title-full { display: none; }
  .timeline-title-mobile { display: inline; }
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 0;
  margin: .22rem 0 0;
}

.portfolio-page .timeline-bullets { gap: .32rem; }

.timeline-bullets li {
  font-size: var(--page-copy-size);
  color: var(--color-text-muted);
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullets li a { text-decoration: underline; text-underline-offset: .16em; }
.timeline-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: inherit;
  font-weight: 400;
}

/* Awards */
.awards-list { margin-top: .55rem; }
.portfolio-page .award-title { color: var(--color-text); font-weight: 400; }
.portfolio-page .award-title a { color: inherit; text-decoration: underline; text-underline-offset: .15em; }

.portfolio-page .award-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
}

.portfolio-page .award-period {
  color: var(--color-text-muted);
  font-size: .85rem;
  font-weight: 400;
  white-space: nowrap;
}

.portfolio-page .award-description {
  margin-top: .08rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.portfolio-page .section-title { margin-bottom: 2rem; }

@media (max-width: 767px) {
  .portfolio-page .section-title { font-size: 1.6rem; }
  .portfolio-page .award-heading { display: block; }
  .portfolio-page .award-period { margin-top: .08rem; font-size: .74rem; line-height: 1.28; white-space: normal; }
}

/* ============================================================
   TEACHING / PUBLICATIONS
   ============================================================ */
.teaching-block { margin-top: 2.5rem; }
.portfolio-page .teaching-block { margin-top: 1.35rem; }
.teaching-role-title + .teaching-block { margin-top: 0; }

.teaching-role-title {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: .5rem;
  display: inline-block;
}

.portfolio-page .teaching-role-title { margin: 0 0 .85rem; padding-bottom: .35rem; }

.teaching-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
}

.portfolio-page .teaching-list { gap: .8rem; }

.teaching-item {
  display: flex;
  align-items: baseline;
}

.teaching-main {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.teaching-title {
  font-weight: 400;
  color: var(--color-text);
  font-size: var(--page-copy-size);
}

.clickable-title { cursor: default; }

.teaching-period {
  color: var(--color-text-muted);
  font-size: .85rem;
  font-weight: 400;
  white-space: nowrap;
  margin-left: auto;
  padding-left: 1rem;
}

.teaching-org {
  color: var(--color-text-muted);
  font-size: .85rem;
  font-weight: 400;
  flex: 0 0 100%;
}

/* CV record (publications/patents) */
.cv-record-item { list-style: none; }

.cv-record-meta {
  flex: 0 0 100%;
  margin-top: .25rem;
}

.cv-record-links { margin-top: .35rem; }

.pub-authors, .pub-venue {
  font-size: .875rem;
  color: var(--color-text-muted);
  margin: 0;
}

.pub-venue {
  margin: .15rem 0 0;
  font-style: italic;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}

.pub-link {
  font-size: .8rem;
  font-weight: 400;
  padding: .25rem .65rem;
  border-radius: 5px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all .12s ease;
}

.pub-link:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ============================================================
   PROJECT PAGE
   ============================================================ */
.project-page, .blog-page, .else-page {
  min-height: calc(100dvh - var(--navbar-height));
  display: flex;
  flex-direction: column;
}

.project-page #projects { flex: 1; }

.project-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.4rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  min-height: 0;
  cursor: pointer;
  outline: none;
  transition: background .16s ease;
  text-decoration: none;
}

.project-card.clickable:hover {
  background: var(--color-bg-secondary);
  transform: none;
  box-shadow: none;
}

.project-card-chevron { display: none; }

.project-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.project-image-wrap {
  position: relative;
  flex-shrink: 0;
  width: 180px;
  aspect-ratio: 16/10;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg);
}

.project-image-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .24s ease;
}

.project-card.clickable:hover .project-image-wrap img { transform: scale(1.03); }

.project-image-placeholder {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
  background: var(--color-bg-secondary);
}

.project-content {
  flex: 1;
  padding: .15rem 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.project-period {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 400;
}

.project-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -.01em;
}

.project-venue {
  margin: .1rem 0 .3rem;
  font-size: .78rem;
  color: var(--color-text-muted);
}
.project-desc {
  margin: 0;
  font-size: .85rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portfolio-page > .section:last-of-type,
.project-page > .page-shell-section {
  padding-bottom: var(--page-edge-bottom);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .profile-home-grid { column-gap: 1.75rem; }
}

@media (max-width: 767px) {
  :root {
    --navbar-height: 42px;
    --page-gutter: 1.35rem;
    --page-edge-top: 2.65rem;
    --page-edge-bottom: 4.5rem;
    --page-content-gap: 2.8rem;
    --page-section-gap: 3.25rem;
    --page-title-size: 2.5rem;
    --page-copy-size: 1.165rem;
    --page-support-size: 1rem;
  }

  html { font-size: 78%; }
  .navbar { font-size: 1.1rem; }
  .nav-link { font-size: .95rem; }
  body { padding-top: 0; }

  .navbar {
    height: auto;
    position: sticky;
  }

  .navbar-inner {
    min-height: unset;
    flex-wrap: nowrap;
    align-items: center;
    gap: clamp(.46rem, 2vw, .78rem);
    padding-block: .58rem;
    padding-inline: clamp(.55rem, 2.2vw, .95rem);
    overflow: visible;
  }

  .nav-label-full { display: none; }
  .nav-label-mobile { display: inline; }

  .profile-home-role { gap: .08rem .4rem; margin: .85rem 0 1.15rem; }
  .home-contact-strip { width: 100%; }

  .profile-home-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .profile-home-grid::before { display: none; }
  .profile-home-figure { grid-column: 1; grid-row: 1; width: 100%; justify-self: stretch; }
  .profile-home-image-wrap { width: min(50.4vw, 189px); margin-inline: auto; }
  .profile-home-copy { grid-column: 1; grid-row: 2; }
  .profile-home-about { font-size: var(--page-copy-size); line-height: 1.5; }
  .profile-home-interests { margin-top: 2rem; }
  .profile-home-interests ul { font-size: var(--page-copy-size); }

  .home-news-item {
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: .28rem .65rem;
    padding: 1rem 0;
  }
  .home-news-item time { grid-column: 1/-1; font-size: .95rem; }
  .home-news-emoji { grid-column: 1; grid-row: 2; }
  .home-news-item p { grid-column: 2; grid-row: 2; font-size: var(--page-copy-size); }

  .site-command { font-size: 1rem; }
  .site-page-header { padding-bottom: var(--page-content-gap); }
  .site-page-title-row { gap: 1rem; }

  main > .section.page-shell-section { padding-top: var(--page-edge-top) !important; }
}

@media (max-width: 640px) {
  .project-card { gap: 1rem; padding: 1.1rem 0; }
  .project-image-wrap { width: 110px; }
  .project-title { font-size: .97rem; }
  .project-desc { font-size: .82rem; -webkit-line-clamp: 2; }
}

@media (max-width: 390px) {
  :root { --page-gutter: 1.15rem; }
  .profile-home-image-wrap { width: min(47.6vw, 168px); }
}

/* ============================================================
   PROJECT CARD MODAL  — matches jeonghoonpark.com style
   ============================================================ */
.project-card.clickable { cursor: pointer; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  animation: fadeIn .2s ease-out;
}

.modal-content {
  background-color: var(--color-bg);
  width: 100%;
  max-width: 1000px;
  height: 89.5%;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  animation: slideUp .3s cubic-bezier(.16, 1, .3, 1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: var(--color-text);
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.modal-close:hover { background-color: var(--color-surface); transform: rotate(90deg); }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.modal-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem 3rem 3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  display: flex;
  flex-direction: column;
}
.modal-scroll-area::-webkit-scrollbar { width: 6px; }
.modal-scroll-area::-webkit-scrollbar-thumb { background-color: var(--color-border); border-radius: 10px; }

.modal-header {
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

.modal-period {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: .3rem;
  display: block;
  letter-spacing: .01em;
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .35rem;
  color: var(--color-text);
}

.modal-team {
  font-size: .875rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}
.modal-team strong { text-decoration: underline; text-underline-offset: .15em; }

/* Hidden image strip (replaced by embed inside scroll area) */
.modal-image-strip { display: none; }

/* Link buttons row */
.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1.1rem 0 1.3rem;
  flex-shrink: 0;
}
.modal-links:empty { display: none; }

.modal-link-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .48rem 1rem;
  border-radius: 8px;
  font-size: .845rem;
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s ease, transform .12s ease, background .15s, color .15s;
  line-height: 1;
  white-space: nowrap;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.modal-link-btn:hover { opacity: .75; transform: translateY(-1px); }
.modal-link-btn.primary {
  background: var(--color-text);
  color: var(--color-bg);
  border: 1px solid transparent;
}
.modal-link-btn:not(.primary) {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.modal-link-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Embed area (PDF iframe or image placeholder) */
.modal-embed {
  flex: 1;
  min-height: 300px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.modal-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.modal-embed-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: .04em;
  font-family: var(--font-mono);
}

.modal-desc {
  font-size: .95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: 1.25rem;
  flex-shrink: 0;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 120px;
  color: var(--color-text-muted);
  opacity: .35;
  transition: all .25s ease;
}
.modal-nav:hover { opacity: 1; color: var(--color-accent); }
.modal-nav.b-prev { left: .5rem; }
.modal-nav.b-next { right: .5rem; }
.modal-nav svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-content { height: 93%; border-radius: 24px 24px 0 0; }
  .modal-scroll-area { padding: 2rem 1.5rem 2.5rem; }
  .modal-close { top: 1rem; right: 1rem; }
  .modal-nav { width: 44px; height: 80px; opacity: .2; }
  .modal-embed { min-height: 220px; }
}
