/* ==========================================================================
   Caleb (殷程嘉) Portfolio — Balanced Craft Design System
   Sweet spot between minimal & expressive:
   Warm studio canvas + subtle dot grid + dark product stages + crisp SVG icons
   ========================================================================== */

:root {
  --bg: #f6f4ef;
  --bg-grid: rgba(24, 34, 29, 0.055);
  --surface: #ffffff;
  --surface-soft: #f0ede5;
  --surface-tint: #e6f2ec;
  --surface-amber: #fdf0e6;

  --stage-bg: #121715;
  --stage-panel: #1a211e;
  --stage-border: rgba(255, 255, 255, 0.1);
  --stage-ink: #f3f5f4;
  --stage-muted: #9aa7a0;

  --ink: #151917;
  --ink-secondary: #46504b;
  --ink-muted: #6f7873;

  --accent: #185843;
  --accent-bright: #257a5d;
  --accent-glow: rgba(24, 88, 67, 0.14);
  --amber: #c75b2c;
  --amber-ink: #923d18;

  --border: rgba(21, 25, 23, 0.09);
  --border-strong: rgba(21, 25, 23, 0.18);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 19, 0.05);
  --shadow-card: 0 2px 6px rgba(15, 23, 19, 0.04), 0 14px 32px rgba(15, 23, 19, 0.055);
  --shadow-hover: 0 4px 12px rgba(15, 23, 19, 0.07), 0 20px 44px rgba(15, 23, 19, 0.09);
  --shadow-stage: 0 18px 42px rgba(10, 16, 13, 0.22);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 980px;
  --gutter: 18px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(24, 88, 67, 0.09) 0%, transparent 42%),
    radial-gradient(circle at 90% 6%, rgba(199, 91, 44, 0.08) 0%, transparent 38%),
    radial-gradient(var(--bg-grid) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
  background-attachment: scroll;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

a:hover {
  color: var(--accent-bright);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

/* ---------- Floating Pill Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 0;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 50px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(15, 23, 19, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #185843 0%, #0f3a2c 100%);
  color: #f7f5f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-sub {
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.nav-links a {
  color: var(--ink-secondary);
  padding: 5px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--surface-tint);
  color: var(--accent);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 5px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-link:hover {
  background: var(--surface-soft);
  color: var(--accent);
}

/* ---------- Hero (Bento + Studio Stage) ---------- */
.hero {
  padding: 26px 0 28px;
}

.hero-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.hero-main-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 254, 250, 0.92) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-main-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(24, 88, 67, 0.11) 0%, transparent 70%);
  pointer-events: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface-tint);
  border: 1px solid rgba(24, 88, 67, 0.18);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1f8a65;
  box-shadow: 0 0 0 3px rgba(31, 138, 101, 0.22);
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(32px, 8.5vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}

.hero-title-en {
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 0.62em;
  margin-left: 8px;
  letter-spacing: -0.01em;
}

.hero-tagline {
  margin: 0 0 12px;
  font-size: clamp(18.5px, 4.8vw, 23px);
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
}

.hero-desc {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-secondary);
  max-width: 40em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #1d664e 0%, #164e3b 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(24, 88, 67, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #217257 0%, #185843 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-soft);
  color: var(--ink);
  border-color: var(--ink-muted);
}

.btn-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-dark:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13.5px;
  border-radius: 10px;
}

/* Hero Side Dark Spotlight Card */
.hero-stage-card {
  background: radial-gradient(circle at 85% 15%, rgba(37, 122, 93, 0.28) 0%, transparent 55%),
    linear-gradient(160deg, #161d1a 0%, #0f1311 100%);
  color: var(--stage-ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-stage);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.stage-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ccbb3;
}

.stage-window {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b0e0d;
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-dots {
  display: inline-flex;
  gap: 5px;
}

.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.window-dots span:nth-child(1) { background: #ef6b5b; }
.window-dots span:nth-child(2) { background: #f2be4f; }
.window-dots span:nth-child(3) { background: #62c554; }

.window-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--stage-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.stage-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stage-metric {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  color: inherit;
  display: block;
}

a.stage-metric:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(140, 203, 179, 0.4);
  color: inherit;
}

.stage-metric strong {
  display: block;
  font-size: 14.5px;
  color: #ffffff;
  line-height: 1.25;
}

.stage-metric span {
  display: block;
  font-size: 11.5px;
  color: var(--stage-muted);
  margin-top: 2px;
}

/* ---------- Sections ---------- */
.section {
  padding: 24px 0 36px;
}

.section-header {
  margin-bottom: 18px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}

.section-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 5.5vw, 29px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-secondary);
}

/* ---------- Project Showcase Cards ---------- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

/* Visual top stage inside each project card */
.project-stage {
  background: radial-gradient(circle at 90% 10%, rgba(37, 122, 93, 0.24) 0%, transparent 50%),
    linear-gradient(155deg, #161d1a 0%, #101412 100%);
  padding: 18px 18px 16px;
  color: var(--stage-ink);
  border-bottom: 1px solid var(--border);
}

.project-stage-amber {
  background: radial-gradient(circle at 88% 12%, rgba(199, 91, 44, 0.26) 0%, transparent 52%),
    linear-gradient(155deg, #1b1715 0%, #12100f 100%);
}

.project-stage-teal {
  background: radial-gradient(circle at 12% 15%, rgba(45, 134, 122, 0.26) 0%, transparent 52%),
    linear-gradient(155deg, #131b1c 0%, #0e1314 100%);
}

.stage-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.case-index {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.08em;
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1.4;
}

.badge-green {
  background: var(--surface-tint);
  color: var(--accent);
}

.badge-clay {
  background: var(--surface-amber);
  color: var(--amber-ink);
}

.badge-neutral {
  background: var(--surface-soft);
  color: var(--ink-secondary);
}

.badge-stage {
  background: rgba(255, 255, 255, 0.1);
  color: #edf3f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.badge-stage-amber {
  background: rgba(235, 126, 75, 0.18);
  color: #ffd5c2;
  border: 1px solid rgba(235, 126, 75, 0.32);
}

.badge-stage-green {
  background: rgba(48, 173, 127, 0.18);
  color: #b7f0d9;
  border: 1px solid rgba(48, 173, 127, 0.32);
}

.project-body {
  padding: 20px;
}

.project-title {
  margin: 0 0 8px;
  font-size: clamp(20px, 5vw, 24px);
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.project-lead {
  margin: 0 0 16px;
  font-size: 14.5px;
  color: var(--ink-secondary);
  line-height: 1.68;
}

/* Mockup UI Canvas inside Dark Stage (Recruiting) */
.ui-mock-canvas {
  background: #171a19;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.ui-mock-body {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mock-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #e6ece9;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mock-chip-active {
  background: rgba(37, 122, 93, 0.32);
  border-color: rgba(84, 211, 165, 0.45);
  color: #ccf5e4;
}

.mock-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mock-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 12.5px;
  color: #d6deda;
}

.mock-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.mock-card-head strong {
  color: #ffffff;
  font-size: 13px;
}

.mock-tag-ok {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(48, 173, 127, 0.22);
  color: #a4f0d0;
}

.mock-tag-warn {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(235, 134, 75, 0.24);
  color: #ffd3ba;
}

.stage-caption {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: var(--stage-muted);
}

/* 4-beat compact summary */
.four-beats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.beat {
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--ink-secondary);
}

.beat-label {
  display: inline-block;
  font-weight: 700;
  color: var(--ink);
  margin-right: 6px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.card-footnote {
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* ---------- About / Journey Bento ---------- */
.about-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.info-panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-tint);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.icon-badge-amber {
  background: var(--surface-amber);
  color: var(--amber);
}

.info-panel h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.info-panel p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.info-panel p:last-child {
  margin-bottom: 0;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.clean-list li {
  margin-bottom: 6px;
}

.clean-list li:last-child {
  margin-bottom: 0;
}

/* Compact Experience Timeline */
.exp-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

/* AI Content Creation Showcase Cards */
.content-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 22px 0 12px;
}

.content-section-head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.content-cover-wrap {
  position: relative;
  background: #141816;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.content-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  cursor: zoom-in;
}

.content-platform-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 20, 18, 0.82);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.content-card-body {
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.content-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.content-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.content-stat {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-tint);
  color: var(--accent);
}

.content-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.xhs-proof-card {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.xhs-proof-card img {
  width: 100%;
  cursor: zoom-in;
}

.xhs-proof-cap {
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--ink-muted);
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}

/* Synthetic Excel Preview inside Dark Stage or Light Card */
.excel-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-radius: 0 0 11px 11px;
}

.excel-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 12px;
  color: #1c221f;
}

.excel-table th {
  background: #e7f1ec;
  color: #144434;
  font-weight: 700;
  padding: 8px 10px;
  border: 1px solid #d2e0d9;
  font-size: 11.5px;
  white-space: nowrap;
}

.excel-table td {
  padding: 8px 10px;
  border: 1px solid #e4e7e5;
  vertical-align: top;
  line-height: 1.5;
}

.excel-table tr:nth-child(even) td {
  background: #fafbf9;
}

.excel-score {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #185843;
}

.blueprint-shot-wrap {
  background: #0d1110;
  border-radius: 0 0 11px 11px;
  overflow: hidden;
}

.blueprint-shot-wrap img {
  width: 100%;
  display: block;
  cursor: zoom-in;
}

.blueprint-shot-note {
  padding: 10px 14px;
  font-size: 12.5px;
  color: #c5d0ca;
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.exp-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}

.exp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 5px;
}

.exp-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.exp-role {
  font-weight: 600;
  color: var(--accent);
  margin-left: 6px;
  font-size: 13px;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.exp-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

/* Public Links */
.link-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.link-card:hover {
  border-color: var(--accent);
  background: var(--surface-tint);
  transform: translateY(-1px);
  color: var(--ink);
}

.link-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-card-title {
  font-weight: 700;
  font-size: 14.5px;
  display: block;
}

.link-card-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

/* ---------- Case Study Pages ---------- */
.case-hero {
  padding: 20px 0 24px;
}

.case-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
}

.case-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(24px, 6.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.case-hero-lead {
  margin: 0 0 18px;
  font-size: 15.5px;
  color: var(--ink-secondary);
  line-height: 1.7;
  max-width: 44em;
}

.meta-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.meta-fact {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
}

.meta-fact-label {
  display: block;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.meta-fact-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.case-body {
  padding: 10px 0 40px;
}

.case-block {
  margin-bottom: 30px;
}

.case-block h2 {
  margin: 0 0 12px;
  font-size: 19.5px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 7px;
}

.case-block p {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--ink-secondary);
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 14px;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-sm);
}

.callout-clay {
  background: var(--surface-amber);
  border-color: rgba(199, 91, 44, 0.25);
  border-left-color: var(--amber);
  color: #5c2812;
}

.callout strong { color: var(--ink); }
.callout-clay strong { color: #5c2812; }

/* Interactive Dark Blueprint Stage (Case 01 Desktop App 4 Screens) */
.blueprint-stage {
  background: radial-gradient(circle at 88% 12%, rgba(199, 91, 44, 0.22) 0%, transparent 48%),
    linear-gradient(160deg, #161b19 0%, #0f1311 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-xl);
  padding: 18px;
  color: var(--stage-ink);
  box-shadow: var(--shadow-stage);
  margin: 16px 0;
}

.blueprint-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.blueprint-tab {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #c7d1cc;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 7px;
}

.blueprint-tab[aria-selected="true"] {
  background: rgba(37, 122, 93, 0.36);
  border-color: rgba(84, 211, 165, 0.5);
  color: #ffffff;
}

.blueprint-panel[hidden] {
  display: none;
}

/* 6-step Workflow Grid */
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
}

.workflow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.workflow-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--surface-tint);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.workflow-step h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--ink);
}

.workflow-step p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.sheet-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.sheet-tab {
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-tint);
  color: var(--accent);
  border: 1px solid rgba(24, 88, 67, 0.2);
}

.role-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0;
}

.role-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.role-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

/* Interactive Fictional Demo */
.demo-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin: 16px 0;
}

.demo-banner {
  background: var(--surface-amber);
  color: var(--amber-ink);
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 700;
  border-bottom: 1px solid rgba(199, 91, 44, 0.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}

.demo-inner {
  padding: 18px 16px;
}

.jd-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.jd-box h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
}

.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn[aria-selected="true"] {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(24, 88, 67, 0.2);
}

.candidate-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface);
}

.candidate-panel[hidden] { display: none; }

.candidate-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.candidate-name {
  font-size: 16px;
  font-weight: 700;
}

.eval-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.eval-card {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
}

.eval-match {
  background: var(--surface-tint);
  border: 1px solid rgba(24, 88, 67, 0.2);
}

.eval-verify {
  background: var(--surface-amber);
  border: 1px solid rgba(199, 91, 44, 0.22);
}

.eval-card h4 {
  margin: 0 0 6px;
  font-size: 13.5px;
}

.eval-card ul {
  margin: 0;
  padding-left: 18px;
}

/* Media Gallery & Dark Studio Frames */
.media-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 16px 0;
}

.media-figure {
  margin: 0;
  background: var(--stage-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.media-figure img {
  width: 100%;
  cursor: zoom-in;
}

.media-figure figcaption {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.video-shell {
  background: var(--stage-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 16px 0;
  box-shadow: var(--shadow-stage);
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d100f;
}

.video-caption {
  padding: 12px 16px;
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 5px;
  color: var(--ink);
}

.timeline-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-soft);
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
}

tr:last-child td { border-bottom: none; }

/* Case Pager & Footer */
.case-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 36px;
  border-top: 1px solid var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 16, 14, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 96vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #edf2ef;
  font-size: 13.5px;
  margin-top: 12px;
  text-align: center;
  max-width: 680px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}

/* ---------- Responsive (>= 760px) ---------- */
@media (min-width: 760px) {
  :root {
    --gutter: 28px;
  }

  .hero {
    padding: 36px 0 34px;
  }

  .hero-bento {
    grid-template-columns: 1.25fr 1fr;
    gap: 18px;
    align-items: stretch;
  }

  .hero-main-card {
    padding: 34px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }

  .project-list {
    gap: 18px;
  }

  .project-card {
    display: grid;
    grid-template-columns: 1.18fr 1fr;
    align-items: stretch;
  }

  .project-stage {
    padding: 16px 18px;
    border-bottom: none;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }

  .project-stage .stage-window img {
    max-height: 220px;
    object-fit: cover;
    object-position: top center;
  }

  .project-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }

  .project-body .card-actions {
    margin-top: auto;
  }

  .mock-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .four-beats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    padding: 18px 20px;
  }

  .about-bento,
  .exp-list,
  .role-split,
  .eval-grid,
  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .link-grid,
  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meta-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .blueprint-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
