/* ==========================================================================
   구예빈의 포트폴리오 — shared styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

@font-face {
  font-family: 'Griun Gowoon';
  src: url('assets/fonts/GriunXHangeul-Gowoon.woff2') format('woff2'),
       url('assets/fonts/GriunXHangeul-Gowoon.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff7eb;
  --bg-soft: #f9f0e0;
  --panel: #ffffff;
  --panel-2: #f9f0e0;
  --border: #e3ddc8;
  --border-soft: #eee7d6;
  --text: #33362a;
  --text-dim: #6b6f58;
  --text-faint: #9a9d85;
  --panel-text: #33362a;
  --panel-text-dim: #6b6f58;
  --panel-text-faint: #9a9d85;
  --accent: #a2ab73;
  --accent-2: #cc3a63;
  --accent-3: #e58ba3;
  --success: #3fa66b;
  --warn: #e8944a;
  --grad: linear-gradient(120deg, var(--accent-2) 0%, var(--accent-3) 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: 'Griun Gowoon', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.55);
  --shadow-sm: 0 8px 24px -12px rgba(0,0,0,0.5);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(162,171,115,0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(204,58,99,0.10), transparent 60%),
    radial-gradient(500px 400px at 60% 100%, rgba(229,139,163,0.06), transparent 60%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.mono { font-family: var(--font-mono); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

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

/* ---------------- Navbar ---------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,247,235,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nav-logo .dot { color: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dim);
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(51,54,42,0.06); }
.nav-item.has-dropdown .caret { transition: transform .25s ease; opacity: .6; width: 10px; height: 10px; }
.nav-item.has-dropdown:hover .caret,
.nav-item.has-dropdown.is-open .caret { transform: rotate(180deg); opacity: 1; }

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 50;
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.dropdown-link:hover { background: var(--panel-2); }
.dropdown-badge {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  flex: none;
  background: rgba(162,171,115,0.16);
  color: var(--accent);
  border: 1px solid var(--border);
}
.dropdown-text .t { font-size: 14px; font-weight: 700; color: var(--panel-text); }
.dropdown-text .d { font-size: 12.5px; color: var(--panel-text-faint); margin-top: 2px; }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); background: rgba(162,171,115,0.08); }

.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid var(--border);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.btn-primary {
  background: var(--accent-2);
  color: var(--bg);
  border: none;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(162,171,115,0.06); transform: translateY(-2px); }

/* ---------------- Hero ---------------- */
.hero {
  padding: 168px 0 96px;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
}
.hero-text { text-align: left; }
.hero-solo { justify-content: center; }
.hero-solo .hero-text {
  text-align: center;
  max-width: 640px;
}
.hero-solo .hero-actions,
.hero-solo .hero-meta {
  justify-content: center;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.hero .lede {
  max-width: 480px;
  margin: 18px 0 0;
  font-size: 17.5px;
  color: var(--text-dim);
}
.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero-meta {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 14px; height: 14px; opacity: .8; }

/* ---------------- Sections ---------------- */
.section { padding: 88px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-head .sub { color: var(--text-dim); font-size: 15px; margin-top: 8px; max-width: 560px; }

/* ---------------- Project ring carousel ---------------- */
/* Every card fits inside the same box: wide recordings hit the width, phone recordings hit the height */
.ring { --box-w: min(500px, 70vw); --box-h: min(380px, 62vw); }
.ring-stage {
  position: relative;
  height: calc(var(--box-h) + 72px);
  perspective: 1600px;
  overflow-x: clip;
  overflow-y: visible;
  touch-action: pan-y;
  cursor: grab;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}
.ring-stage.is-dragging { cursor: grabbing; }
.ring-stage:focus-visible .ring-card.is-active { outline: 3px solid var(--accent-2); outline-offset: 4px; }

.ring-card {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Each card takes the shape of its video's actual screen (set per card via --ar and crop vars) */
  width: min(var(--box-w), var(--box-h) * var(--ar, 1.7778));
  aspect-ratio: var(--ar, 1.7778);
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #23251c;
  border: 1px solid rgba(51,54,42,0.12);
  box-shadow: 0 26px 50px -22px rgba(204,58,99,0.38), 0 10px 24px -14px rgba(51,54,42,0.3);
  will-change: transform, opacity;
}
.ring-card video {
  position: absolute;
  left: var(--vx, 0%);
  top: var(--vy, 0%);
  width: var(--vw, 100%);
  height: var(--vh, 100%);
  max-width: none;
  object-fit: fill;
  display: block;
  pointer-events: none;
}
.ring-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff7eb;
  opacity: var(--dim, 0);
  pointer-events: none;
}
.ring-card figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff7eb;
  background: rgba(35,37,28,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ring-card:not(.is-active) { cursor: pointer; }

.ring-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
}
.ring-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.ring-btn svg { width: 16px; height: 16px; }
.ring-btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.ring-dots { display: flex; gap: 8px; }
.ring-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: width .3s ease, background .3s ease;
}
.ring-dot[aria-selected="true"] { width: 26px; background: var(--accent-2); }

.ring-info {
  max-width: 680px;
  margin-top: 34px;
  text-align: center;
}
.ring-panel { display: none; }
.ring-panel.is-active { display: block; animation: ring-panel-in .45s ease both; }
@keyframes ring-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.rp-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.rp-title {
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.rp-desc { color: var(--text-dim); font-size: 15.5px; margin-bottom: 18px; }
.ring-info .pc-tags { justify-content: center; }
.rp-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.rp-foot .btn svg { width: 15px; height: 15px; }

/* Before JS runs (or without it): show every card and panel in a simple column */
.ring:not(.is-ready) .ring-stage { height: auto; perspective: none; display: grid; gap: 20px; justify-items: center; cursor: auto; }
.ring:not(.is-ready) .ring-card { position: relative; top: 0; left: 0; margin: 0; }
.ring:not(.is-ready) .ring-controls { display: none; }
.ring:not(.is-ready) .ring-panel { display: block; margin-bottom: 32px; }

@media (prefers-reduced-motion: reduce) {
  .ring-panel.is-active { animation: none; }
}
@media (max-width: 620px) {
  .ring-card figcaption { left: 8px; bottom: 8px; padding: 3px 9px; font-size: 11px; }
}

.pc-period { font-family: var(--font-mono); font-size: 12px; color: var(--panel-text-faint); }
.status-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--success);
  background: rgba(63,166,107,0.12);
}
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.pc-role { font-size: 13px; color: var(--panel-text-faint); }

.wavy-hl {
  background-image: linear-gradient(to top, rgba(204,58,99,0.22) 42%, transparent 42%);
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* tags */
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--panel-text-dim);
  background: var(--panel-2);
}

/* ---------------- Skills ---------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.skill-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.skill-card .k { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; display: block; }
.skill-card .v { font-size: 14.5px; color: var(--panel-text); line-height: 1.7; }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 44px 0;
  margin-top: 40px;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-dim); font-size: 13.5px; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.copyright { color: var(--text-faint); font-size: 12.5px; font-family: var(--font-mono); }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Project detail page
   ========================================================================== */
.p-hero {
  padding: 148px 0 60px;
  border-bottom: 1px solid var(--border-soft);
}
.p-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-faint);
  margin-bottom: 28px;
  transition: color .2s ease;
}
.p-back:hover { color: var(--accent); }
.p-back svg { width: 14px; height: 14px; }

.p-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.p-title { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; }
.p-tagline { color: var(--text-dim); font-size: 16.5px; margin-top: 14px; max-width: 620px; }
.p-links { display: flex; gap: 10px; flex-wrap: wrap; }

.p-meta-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.p-meta-cell {
  background: var(--bg-soft);
  padding: 18px 20px;
}
.p-meta-cell .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; display: block; }
.p-meta-cell .v { font-size: 15px; font-weight: 700; color: var(--text); }

.p-tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.p-section { padding: 64px 0; border-bottom: 1px solid var(--border-soft); }
.p-section:last-of-type { border-bottom: none; }
.p-section-head { margin-bottom: 30px; }
.p-section-head .num { font-family: var(--font-mono); color: var(--accent); font-size: 13px; }
.p-section-head h2 { font-size: 26px; font-weight: 800; margin-top: 8px; letter-spacing: -0.01em; }

.prose { color: var(--text-dim); font-size: 15.5px; max-width: 760px; }
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--text); font-weight: 700; }

.value-box {
  margin-top: 22px;
  padding: 18px 22px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px;
  color: var(--panel-text);
}
.value-box b { color: var(--accent); }

.video-frame {
  margin-top: 4px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow-lg);
}
.video-frame video { width: 100%; display: block; max-height: 560px; }

.arch-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.arch-table tr { border-bottom: 1px solid var(--border-soft); }
.arch-table tr:last-child { border-bottom: none; }
.arch-table td { padding: 16px 0; vertical-align: top; }
.arch-table td:first-child {
  width: 150px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 700;
  padding-right: 20px;
}
.arch-table td:last-child { font-size: 14.5px; color: var(--text-dim); line-height: 1.75; }

.role-list { display: flex; flex-direction: column; gap: 22px; }
.role-item { display: flex; gap: 16px; }
.role-num {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  margin-top: 2px;
}
.role-item h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.role-item p { font-size: 14.5px; color: var(--text-dim); }

.trouble-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 16px;
}
.trouble-card h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; color: var(--panel-text); }
.trouble-card h4::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.trouble-row { display: flex; gap: 14px; font-size: 14px; margin-bottom: 10px; }
.trouble-row:last-child { margin-bottom: 0; }
.trouble-row .tag-label {
  flex: none;
  width: 76px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--panel-text-faint);
  padding-top: 2px;
}
.trouble-row .tag-label.problem { color: #8a2f2f; }
.trouble-row .tag-label.cause { color: #8a5a20; }
.trouble-row .tag-label.fix { color: #4f6b3a; }
.trouble-row p { color: var(--panel-text-dim); line-height: 1.7; }

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 4px;
}
.outcome-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
}
.outcome-card .v { font-size: 26px; font-weight: 800; font-family: var(--font-mono); color: var(--accent); }
.outcome-card .l { font-size: 13px; color: var(--panel-text-dim); margin-top: 8px; }

.timeline-mini { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.tl-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.tl-row:last-child { border-bottom: none; }
.tl-row .period { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); padding-top: 2px; }
.tl-row .content { font-size: 14.5px; color: var(--text-dim); }

.p-nav {
  padding: 48px 0 100px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.p-nav-link {
  flex: 1;
  min-width: 220px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color .2s ease, transform .2s ease;
}
.p-nav-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.p-nav-link .dir { font-family: var(--font-mono); font-size: 11.5px; color: var(--panel-text-faint); display: block; margin-bottom: 8px; }
.p-nav-link .name { font-size: 16px; font-weight: 700; color: var(--panel-text); }
.p-nav-link.next { text-align: right; }

/* ==========================================================================
   About page
   ========================================================================== */
.about-hero { padding: 148px 28px 20px; }
.about-hero h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
.about-hero .lede { color: var(--text-dim); font-size: 16px; margin-top: 14px; max-width: 620px; }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cert-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.cert-card .kind {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.cert-card h3 { font-size: 16.5px; font-weight: 700; margin: 12px 0 8px; line-height: 1.4; color: var(--panel-text); }
.cert-card .org { font-size: 13px; color: var(--panel-text-faint); }
.cert-card .year {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--panel-text-dim);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.cert-card.award .kind { color: #8a5a20; }

.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border);
}
.tl-group { position: relative; margin-bottom: 44px; }
.tl-group:last-child { margin-bottom: 0; }
.tl-group::before {
  content: '';
  position: absolute;
  left: -32px; top: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.tl-group h3 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.tl-group .range { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); margin-bottom: 18px; display: block; }
.tl-entries { display: flex; flex-direction: column; gap: 14px; }
.tl-entry {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tl-entry::after {
  content: '';
  position: absolute;
  top: -36px; right: -36px;
  width: 110px; height: 110px;
  background: var(--grad);
  filter: blur(38px);
  opacity: 0.16;
  border-radius: 50%;
  pointer-events: none;
}
.tl-entry::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 45%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 2;
  transition: left .65s cubic-bezier(.25,.7,.35,1);
}
.tl-entry:hover::before { left: 130%; }
.tl-entry:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tl-entry.junior { border-left-color: var(--accent-2); }
.tl-entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.tl-entry .when {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(162,171,115,0.12);
  color: var(--accent);
  border: 1px solid rgba(162,171,115,0.3);
}
.tl-entry.junior .when {
  background: rgba(204,58,99,0.16);
  color: #4f6b3a;
  border-color: rgba(204,58,99,0.35);
}
.tl-entry .role { font-size: 12.5px; color: var(--panel-text-faint); font-weight: 600; }
.tl-entry .desc { font-size: 14.5px; color: var(--panel-text-dim); line-height: 1.7; position: relative; z-index: 1; }

.small-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.small-activity {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.small-activity h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--panel-text); }
.small-activity .range { font-family: var(--font-mono); font-size: 12px; color: var(--panel-text-faint); }
.small-activity p { font-size: 13.5px; color: var(--panel-text-dim); margin-top: 10px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .nav-menu, .nav-cta .icon-btn.gh-desktop { display: none; }
  .nav-toggle { display: flex; }
  .skills-grid, .cert-grid, .small-activity-grid, .p-meta-grid, .outcome-grid { grid-template-columns: 1fr 1fr; }
  .p-meta-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { flex-direction: column; text-align: center; gap: 28px; }
  .hero-text { text-align: center; }
  .hero-actions, .hero-meta { justify-content: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
}
@media (max-width: 620px) {
  .skills-grid, .cert-grid, .small-activity-grid, .p-meta-grid, .outcome-grid { grid-template-columns: 1fr; }
  .hero { padding: 140px 0 70px; }
  .p-hero { padding: 128px 0 44px; }
  .arch-table td:first-child { width: 110px; }
}

.mobile-menu {
  position: fixed;
  inset: 68px 0 0 0;
  background: rgba(255,247,235,0.98);
  backdrop-filter: blur(10px);
  z-index: 90;
  padding: 24px 28px;
  display: none;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 16px 4px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--border-soft); }
.mobile-menu .mm-sub { padding-left: 16px; }
.mobile-menu .mm-sub a { font-size: 15px; font-weight: 600; color: var(--text-dim); padding: 12px 4px; }

/* ---------------- Diary stickers ---------------- */
.sticker {
  position: absolute;
  margin: 0;
  pointer-events: auto;
  filter: drop-shadow(0 10px 14px rgba(51,54,42,0.18)) drop-shadow(0 2px 3px rgba(51,54,42,0.12));
  transition: transform .35s cubic-bezier(.3,1.5,.5,1);
}
.sticker img { display: block; width: 100%; height: auto; }
.tape {
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 1;
  width: 92px;
  height: 26px;
  margin-left: -46px;
  background: rgba(162,171,115,0.55);
  transform: rotate(-4deg);
  /* zig-zag torn ends like washi tape */
  -webkit-mask: conic-gradient(from -45deg at left, #0000 25%, #000 0) left / 51% 8px repeat-y,
                conic-gradient(from 135deg at right, #0000 25%, #000 0) right / 51% 8px repeat-y;
          mask: conic-gradient(from -45deg at left, #0000 25%, #000 0) left / 51% 8px repeat-y,
                conic-gradient(from 135deg at right, #0000 25%, #000 0) right / 51% 8px repeat-y;
}
.tape.tape-pink { background: rgba(229,139,163,0.55); transform: rotate(5deg); }


.about-hero { position: relative; }
.sticker-about { width: 190px; right: 40px; top: 118px; transform: rotate(5deg); }
.sticker-about:hover { transform: rotate(1deg) scale(1.04); }
.about-hero .lede { max-width: min(620px, calc(100% - 240px)); }

@media (max-width: 860px) {
  .sticker-about { width: 108px; right: 24px; top: 96px; }
  .about-hero .lede { max-width: 100%; }
  .about-hero h1, .about-hero .eyebrow { padding-right: 120px; }
  .about-hero h1 { word-break: keep-all; }
}
@media (prefers-reduced-motion: reduce) {
  .sticker { transition: none; }
}

/* Award photos as taped polaroids */
.polaroid-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 36px 48px;
  margin-top: 48px;
}
.polaroid {
  position: relative;
  width: min(340px, 100%);
  margin: 0;
  padding: 12px 12px 0;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 18px 34px -18px rgba(51,54,42,0.35), 0 3px 8px -4px rgba(51,54,42,0.18);
  transition: transform .35s cubic-bezier(.3,1.5,.5,1);
}
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 2px; }
.polaroid figcaption {
  padding: 12px 4px 14px;
  text-align: center;
  font-size: 15px;
  color: var(--text-dim);
}
.polaroid .tape { top: -12px; }
.polaroid-l { transform: rotate(-3deg); }
.polaroid-r { transform: rotate(2.5deg); margin-top: 18px; }
.polaroid-l:hover { transform: rotate(-1deg) scale(1.03); }
.polaroid-r:hover { transform: rotate(1deg) scale(1.03); }
@media (max-width: 620px) {
  .polaroid-r { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .polaroid { transition: none; }
}

/* Stickers hugging the hero title: one beside "구예빈의", one beside "포트폴리오" */
.hero-title .ht { position: relative; display: inline-block; }
.hero-title .sticker { top: 50%; z-index: -1; }
.sticker-left  { width: 92px; right: calc(100% + 18px); transform: translateY(-58%) rotate(-8deg); }
.sticker-right { width: 66px; left: calc(100% + 16px); transform: translateY(-50%) rotate(7deg); }
.sticker-left:hover  { transform: translateY(-58%) rotate(-4deg) scale(1.06); }
.sticker-right:hover { transform: translateY(-50%) rotate(3deg) scale(1.06); }
.hero-title .sticker .tape { width: 46px; height: 16px; margin-left: -23px; top: -7px; }

@media (max-width: 620px) {
  /* Two lines on phones so each sticker gets room beside its line */
  .hero-title .ht { display: block; width: fit-content; margin: 0 auto; }
  .sticker-left  { width: 64px; right: calc(100% + 12px); transform: translateY(-36%) rotate(-8deg); }
  .sticker-left:hover { transform: translateY(-36%) rotate(-4deg) scale(1.06); }
  .sticker-right { width: 46px; left: calc(100% + 12px); }
  .hero-title .sticker .tape { width: 34px; height: 12px; margin-left: -17px; top: -5px; }
}
