/* ============================================================
   Portfolio Hub — public site
   Design system derived from DESIGN-framer.md (dark canvas)
   with micro-interactions from DESIGN-apple.md.
   ============================================================ */

:root {
  /* surfaces */
  --canvas: #090909;
  --surface-1: #141414;
  --surface-2: #1c1c1c;
  --hairline: #262626;
  --hairline-soft: #1a1a1a;
  --inverse: #ffffff;

  /* text */
  --ink: #ffffff;
  --ink-muted: #999999;

  /* single chromatic accent: links/focus/selection only */
  --accent: #0099ff;

  /* gradient spotlight family (cards, never sections) */
  --grad-magenta: #d44df0;
  --grad-violet: #6a4cf5;
  --grad-orange: #ff7a3d;
  --grad-coral: #ff5577;

  /* radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 15px;
  --r-xl: 20px;
  --r-xxl: 30px;
  --r-pill: 100px;

  /* spacing (5px base like Framer) */
  --s-xxs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 15px;
  --s-lg: 20px;
  --s-xl: 30px;
  --s-xxl: 40px;
  --s-section: 96px;

  --max-w: 1120px;
  --font: "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* elevation: light edge + soft drop (Framer level 2) */
  --elev-2: inset 0 0.5px 0 rgba(255, 255, 255, 0.10), 0 10px 30px rgba(0, 0, 0, 0.25);
  --focus-ring: 0 0 0 1px rgba(0, 153, 255, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.15px;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(0, 153, 255, 0.28); }

a { color: var(--accent); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-sm);
}

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-lg);
}

/* ---------- type scale (display sizes carry aggressive -5% tracking) ---------- */

.display-xxl {
  font-size: clamp(48px, 9vw, 110px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.05em;
}
.display-xl {
  font-size: clamp(40px, 6.5vw, 72px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.045em;
}
.display-lg {
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.display-md {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.subhead {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: -0.02em;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.mono { font-family: var(--mono); }
.muted { color: var(--ink-muted); }

/* ---------- buttons: pill grammar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.14px;
  border: 0;
  cursor: pointer;
  border-radius: var(--r-pill);
  padding: 10px 18px;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); } /* apple micro-interaction */
.btn-primary { background: var(--inverse); color: #000; }
.btn-secondary { background: var(--surface-1); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.btn-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  background: var(--surface-1);
  color: var(--ink);
  border: 0; cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.btn-icon:hover { background: var(--surface-2); }
.btn-icon:active { transform: scale(0.95); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 9, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline-soft);
  height: 56px;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-lg);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-lg);
}
.nav-wordmark {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-wordmark span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
  background: var(--surface-2);
}
.nav-cta { margin-left: 8px; }
.nav-admin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-admin:hover { color: var(--ink); border-color: var(--ink-muted); }
.nav-toggle { display: none; }

/* ---------- hero ---------- */

.hero {
  padding: calc(var(--s-section) + 20px) 0 var(--s-section);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-xxl);
  align-items: center;
}
.hero-avatar {
  width: 132px; height: 132px;
  border-radius: var(--r-xxl);
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: var(--elev-2);
}
.hero-avatar-placeholder {
  width: 132px; height: 132px;
  border-radius: var(--r-xxl);
  background: linear-gradient(135deg, var(--surface-2), var(--surface-1));
  display: grid; place-items: center;
  font-size: 44px; font-weight: 700;
  color: var(--ink-muted);
  box-shadow: var(--elev-2);
}
.hero-name { margin: var(--s-md) 0 0; }
.hero-typing {
  margin-top: var(--s-sm);
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--ink-muted);
  min-height: 1.6em;
  font-weight: 500;
}
.hero-typing .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: caret-blink 0.9s step-end infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
.hero-tagline { margin-top: var(--s-xs); }
.hero-actions {
  display: flex;
  gap: var(--s-sm);
  margin-top: var(--s-xl);
  flex-wrap: wrap;
}
.hero-socials {
  display: flex;
  gap: var(--s-sm);
  margin-top: var(--s-lg);
}
.hero-socials .btn-icon svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- sections ---------- */

.section { padding: var(--s-section) 0; border-top: 1px solid var(--hairline-soft); }
.section-head { margin-bottom: var(--s-xxl); max-width: 720px; }
.section-head .display-lg { margin-top: var(--s-sm); }
.section-head .subhead { margin-top: var(--s-sm); }

/* ---------- gradient spotlight card (scarce: 1–2 per page) ---------- */

.spotlight {
  border-radius: var(--r-xxl);
  padding: var(--s-xxl);
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.spotlight::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 140% at 15% 0%, rgba(255,255,255,0.22), transparent 55%);
  z-index: -1;
}
.spotlight-violet { background: linear-gradient(135deg, #6a4cf5, #4330b8); }
.spotlight-magenta { background: linear-gradient(135deg, #d44df0, #8f2bb0); }
.spotlight-orange { background: linear-gradient(135deg, #ff7a3d, #d04a10); }
.spotlight-coral { background: linear-gradient(135deg, #ff5577, #c22748); }
.spotlight h3 {
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.spotlight p { margin-top: var(--s-sm); opacity: 0.92; max-width: 560px; }
.spotlight .btn { margin-top: var(--s-lg); }

/* ---------- achievements timeline ---------- */

.timeline { position: relative; margin-left: 6px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--hairline);
}
.timeline-item {
  position: relative;
  padding: 0 0 var(--s-xl) var(--s-xxl);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 0; top: 6px;
  width: 15px; height: 15px;
  border-radius: 9999px;
  background: var(--canvas);
  border: 2px solid var(--ink-muted);
}
.timeline-item:first-child .timeline-dot { border-color: var(--accent); }
.timeline-date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.timeline-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.timeline-org { font-size: 14px; color: var(--ink-muted); margin-top: 2px; }
.timeline-desc { font-size: 14px; color: var(--ink-muted); margin-top: 6px; max-width: 640px; }
.timeline-link {
  display: inline-flex;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
}

/* ---------- skills ---------- */

.tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-1);
  border-radius: var(--r-pill);
  padding: 4px;
  margin-bottom: var(--s-xl);
  flex-wrap: wrap;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.tab.active { background: var(--surface-2); color: var(--ink); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-md);
}
.skill-card {
  background: var(--surface-1);
  border-radius: var(--r-xl);
  padding: var(--s-lg);
  position: relative;
  transition: background 0.2s ease, transform 0.2s ease;
}
.skill-card:hover { background: var(--surface-2); }
.skill-top { display: flex; align-items: center; gap: var(--s-sm); }
.skill-icon { font-size: 22px; width: 28px; text-align: center; }
.skill-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.skill-bar {
  margin-top: var(--s-md);
  height: 4px;
  background: var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}
.skill-bar i {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 4px;
  width: 0;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-note { font-size: 12px; color: var(--ink-muted); margin-top: var(--s-sm); }
/* tooltip */
.skill-card[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--r-md);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}
.skill-card[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- projects ---------- */

.filter-bar {
  display: flex;
  gap: var(--s-xs);
  flex-wrap: wrap;
  margin-bottom: var(--s-xl);
}
.filter-chip {
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-chip:hover { color: var(--ink); border-color: var(--ink-muted); }
.filter-chip.active {
  background: var(--inverse);
  color: #000;
  border-color: var(--inverse);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-lg);
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border-radius: var(--r-xl);
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.25s ease, background 0.25s ease;
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.06);
}
.project-card:hover { background: var(--surface-2); transform: translateY(-3px); }
.project-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  object-fit: cover;
  width: 100%;
}
.project-thumb-placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.85);
}
.project-body { padding: var(--s-lg); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.project-summary { font-size: 14px; color: var(--ink-muted); flex: 1; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  background: var(--hairline-soft);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}
.project-links { display: flex; gap: var(--s-sm); margin-top: 4px; }

/* featured gradient variant of a project card */
.project-card.spotlight { padding: 0; }
.project-card.spotlight::after { pointer-events: none; }
/* .project-card 선언이 .spotlight-* 보다 뒤에 있어 gradient를 덮어쓰므로 재지정 */
.project-card.spotlight-violet { background: linear-gradient(135deg, #6a4cf5, #4330b8); }
.project-card.spotlight-magenta { background: linear-gradient(135deg, #d44df0, #8f2bb0); }
.project-card.spotlight-orange { background: linear-gradient(135deg, #ff7a3d, #d04a10); }
.project-card.spotlight-coral { background: linear-gradient(135deg, #ff5577, #c22748); }
.project-card.spotlight-card { color: #fff; }
.project-card.spotlight .project-summary { color: rgba(255,255,255,0.85); }
.project-card.spotlight .tag { background: rgba(255,255,255,0.16); color: #fff; }
.project-card.spotlight .project-title { color: #fff; }

/* ---------- project detail ---------- */

.project-hero { padding: var(--s-section) 0 var(--s-xxl); }
.carousel {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface-1);
  margin: var(--s-xxl) 0;
}
.carousel-track { display: flex; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.carousel-slide { min-width: 100%; }
.carousel-slide img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.carousel-caption { padding: var(--s-md) var(--s-lg); font-size: 13px; color: var(--ink-muted); }
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}
.carousel-nav.prev { left: var(--s-md); }
.carousel-nav.next { right: var(--s-md); }
.carousel-dots {
  position: absolute;
  bottom: var(--s-md);
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 5;
}
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 9999px; border: 0;
  background: rgba(255,255,255,0.35); cursor: pointer;
}
.carousel-dots button.active { background: #fff; }

.prose { max-width: 760px; }
.prose h1, .prose h2, .prose h3 {
  letter-spacing: -0.03em;
  margin: var(--s-xxl) 0 var(--s-md);
}
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 18px; }
.prose p { color: #c9c9c9; margin: var(--s-md) 0; font-size: 15px; line-height: 1.7; }
.prose ul { color: #c9c9c9; margin: var(--s-md) 0 var(--s-md) var(--s-lg); line-height: 1.7; }
.prose li { margin: 4px 0; }
.prose blockquote {
  border-left: 3px solid var(--hairline);
  padding-left: var(--s-md);
  color: var(--ink-muted);
  margin: var(--s-lg) 0;
}
.prose code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface-2);
  border-radius: var(--r-xs);
  padding: 2px 6px;
}
.prose pre {
  background: var(--surface-1);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  overflow-x: auto;
  margin: var(--s-lg) 0;
}
.prose pre code { background: none; padding: 0; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-md);
  margin: var(--s-xxl) 0;
}
.meta-card {
  background: var(--surface-1);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
}
.meta-card .k { font-size: 12px; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.meta-card .v { font-size: 15px; font-weight: 600; margin-top: 6px; letter-spacing: -0.01em; }

/* ---------- guestbook ---------- */

.guestbook-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: var(--s-xxl);
  align-items: start;
}
.form-card {
  background: var(--surface-1);
  border-radius: var(--r-xl);
  padding: var(--s-xl);
  position: sticky;
  top: 80px;
}
.form-card h3 { font-size: 17px; letter-spacing: -0.02em; margin-bottom: var(--s-lg); }
.field { margin-bottom: var(--s-md); }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.input, .textarea {
  width: 100%;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:focus, .textarea:focus { border-color: transparent; box-shadow: var(--focus-ring); outline: none; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); margin: var(--s-md) 0; }
.checkbox-row input { accent-color: var(--accent); width: 15px; height: 15px; }
.form-msg { font-size: 13px; margin-top: var(--s-sm); min-height: 1.2em; }
.form-msg.ok { color: #22c55e; }
.form-msg.err { color: #ff5577; }
.form-hint { font-size: 12px; color: var(--ink-muted); margin-top: var(--s-md); }

/* captcha widget — centered in the form, mobile-friendly */
.captcha-box {
  display: flex;
  justify-content: center;
  margin: var(--s-md) auto var(--s-sm);
  max-width: 100%;
  overflow: hidden;
}
.captcha-box:empty { display: none; }
.captcha-box iframe { max-width: 100%; }

.comments-list { display: flex; flex-direction: column; gap: var(--s-md); }
.comment {
  background: var(--surface-1);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
}
.comment.reply { margin-left: var(--s-xxl); background: var(--surface-1); border-left: 2px solid var(--hairline); }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-nick { font-weight: 600; font-size: 14px; }
.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: 3px 8px;
}
.badge-owner { background: var(--inverse); color: #000; }
.badge-private { background: var(--surface-2); color: var(--ink-muted); }
.badge-blind { background: #3d1520; color: #ff8fa8; }
.comment-date { font-size: 12px; color: var(--ink-muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.comment-body { margin-top: 8px; font-size: 14px; line-height: 1.6; color: #d4d4d4; white-space: pre-wrap; word-break: break-word; }
.comment-body.masked { color: var(--ink-muted); font-style: italic; }
.comment-actions { display: flex; gap: var(--s-sm); margin-top: 10px; }
.comment-actions button {
  background: none; border: 0; color: var(--ink-muted);
  font-size: 12px; font-weight: 500; cursor: pointer; font-family: var(--font);
  padding: 2px 0;
}
.comment-actions button:hover { color: var(--ink); }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--s-lg);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface-1);
  border-radius: var(--r-xl);
  padding: var(--s-xxl);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--elev-2);
  animation: modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-close { float: right; }

/* ---------- CTA band ---------- */

.cta-band {
  border-radius: var(--r-xxl);
  background: var(--surface-1);
  padding: var(--s-xxl);
  text-align: center;
}
.cta-band .display-md { margin-bottom: var(--s-md); }
.cta-band p { color: var(--ink-muted); max-width: 480px; margin: 0 auto var(--s-lg); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--hairline-soft);
  padding: 64px 0 var(--s-xxl);
  margin-top: var(--s-section);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-xl);
}
.footer-wordmark { font-weight: 700; font-size: 15px; }
.footer-wordmark span { color: var(--accent); }
.footer-tag { font-size: 13px; color: var(--ink-muted); margin-top: 8px; max-width: 280px; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: var(--s-md);
}
.footer-col a {
  display: block;
  color: var(--ink-muted);
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--ink); }
.footer-legal {
  margin-top: var(--s-xxl);
  padding-top: var(--s-lg);
  border-top: 1px solid var(--hairline-soft);
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  gap: var(--s-md);
  flex-wrap: wrap;
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 404 ---------- */

.error-page { text-align: center; padding: calc(var(--s-section) * 1.6) 0; }
.error-code {
  font-size: clamp(80px, 18vw, 160px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--surface-2);
}

/* ---------- kudos ---------- */

.btn-kudos {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--ink);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 10px 18px; cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.btn-kudos:hover { border-color: var(--grad-coral); transform: translateY(-1px); }
.btn-kudos.done { border-color: var(--grad-coral); color: var(--grad-coral); }
.kudos-heart { color: var(--grad-coral); font-size: 15px; display: inline-block; }
.kudos-heart.pop { animation: kudos-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes kudos-pop {
  0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); }
}
.kudos-count { font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.btn-kudos.done .kudos-count { color: var(--grad-coral); }

/* ---------- status page ---------- */

.status-banner {
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--r-lg);
  padding: var(--s-md) var(--s-lg);
  font-weight: 600; font-size: 15px;
  margin-bottom: var(--s-xxl);
}
.status-banner.ok { background: rgba(34, 197, 94, 0.10); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.25); }
.status-banner.bad { background: rgba(255, 85, 119, 0.10); color: #ff8fa8; border: 1px solid rgba(255, 85, 119, 0.25); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.status-list { display: flex; flex-direction: column; gap: var(--s-md); }
.status-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
}
.status-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-md); }
.status-name { font-weight: 600; font-size: 15px; }
.status-right { display: flex; align-items: center; gap: 10px; }
.status-pill {
  font-size: 12px; font-weight: 600;
  border-radius: var(--r-pill); padding: 4px 12px;
}
.status-pill.up { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.status-pill.down { background: rgba(255, 85, 119, 0.12); color: #ff8fa8; }

.status-bars { display: flex; gap: 2px; margin-top: var(--s-md); align-items: flex-end; height: 34px; }
.ubar { flex: 1; height: 100%; border-radius: 2px; min-width: 2px; }
.ubar-up { background: #22c55e; }
.ubar-warn { background: #f5a623; }
.ubar-down { background: #ff5577; }
.ubar-none { background: var(--surface-2); }
.ubar:hover { opacity: 0.75; }
.status-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
}
.status-uptime { font-size: 12px; font-weight: 600; color: var(--ink); }

/* ---------- board ---------- */

.board-search { display: flex; gap: var(--s-sm); margin-bottom: var(--s-lg); }
.board-search .input { flex: 1; }

.board-list { display: flex; flex-direction: column; gap: var(--s-sm); }
.board-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-lg);
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: var(--s-md) var(--s-lg);
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.board-row:hover { border-color: var(--hairline); transform: translateY(-1px); color: var(--ink); }
.board-row-main { min-width: 0; flex: 1; }
.board-row-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.board-row-preview {
  font-size: 13px; color: var(--ink-muted); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-row-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 12px; color: var(--ink-muted); white-space: nowrap; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.board-pager { display: flex; gap: 6px; justify-content: center; margin-top: var(--s-lg); flex-wrap: wrap; }
.pager-btn {
  min-width: 34px; height: 34px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--ink-muted); font-family: var(--font); font-size: 13px; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pager-btn:hover { color: var(--ink); border-color: var(--ink-muted); }
.pager-btn.active { background: var(--inverse); color: #000; border-color: var(--inverse); font-weight: 700; }

/* board detail */
.board-post { background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--r-xl); padding: var(--s-xxl); }
.board-post-title { font-size: clamp(22px, 4vw, 30px); font-weight: 700; letter-spacing: -0.03em; margin: 14px 0 10px; }
.board-post-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: var(--s-lg); border-bottom: 1px solid var(--hairline-soft); }
.board-post-nick { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.board-post-body { margin-top: var(--s-lg); font-size: 15px; line-height: 1.7; color: #d4d4d4; white-space: pre-wrap; word-break: break-word; }
.board-post-actions { display: flex; gap: var(--s-sm); margin-top: var(--s-xl); justify-content: flex-end; }

/* ---------- responsive ---------- */

@media (max-width: 810px) {
  :root { --s-section: 64px; }
  .hero-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .guestbook-layout { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: stretch;
    padding: var(--s-md) var(--s-lg) var(--s-lg);
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { margin: 8px 0 0; }
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    background: none; border: 0; color: var(--ink);
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    cursor: pointer;
  }
  .comment.reply { margin-left: var(--s-lg); }
  .spotlight, .cta-band { padding: var(--s-xl); }
  .board-row-meta span:last-child { display: none; }
  .board-post { padding: var(--s-xl); }
}
