/* ==========================================================================
   STYLES — Michael Solomon Portfolio
   --------------------------------------------------------------------------
   COLOURS:  edit the variables in ":root" (light) and the dark blocks below.
   FONTS:    edit --font-sans and --font-serif (and the Google Fonts link in
             each HTML file's <head>).
   ========================================================================== */

/* ---------------------------------------------------------------- TOKENS */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --bg: #fbfaf8;
  --bg-alt: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --text: #17181a;
  --text-2: #3d4046;
  --muted: #5f636b;
  --border: #e6e2db;
  --border-strong: #d4cfc6;
  --accent: #0e6b62;
  --accent-hover: #0a564f;
  --accent-soft: #e2efec;
  --accent2: #2f6fb3;
  --accent3: #7c5cd6;
  --accent-ink: #ffffff;
  --success: #1f7a4d;
  --danger: #b42318;
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, .04), 0 1px 3px rgba(20, 20, 20, .04);
  --shadow-md: 0 8px 24px -10px rgba(20, 30, 30, .16);
  --img-filter: none;

  --radius: 14px;
  --radius-sm: 9px;
  --container: 1120px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1012; --bg-alt: #121518; --surface: #16191c; --surface-2: #1c2024;
    --text: #ecebe8; --text-2: #c9c8c4; --muted: #9a9ea6;
    --border: #262a2f; --border-strong: #343940;
    --accent: #5fb8ac; --accent2: #7ba7e0; --accent3: #a48af0; --accent-hover: #7cc9be; --accent-soft: #15302d; --accent-ink: #0b1514;
    --success: #4fbf86; --danger: #f2877d;
    --shadow-sm: none; --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --img-filter: brightness(.86) saturate(.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1012; --bg-alt: #121518; --surface: #16191c; --surface-2: #1c2024;
  --text: #ecebe8; --text-2: #c9c8c4; --muted: #9a9ea6;
  --border: #262a2f; --border-strong: #343940;
  --accent: #5fb8ac; --accent2: #7ba7e0; --accent3: #a48af0; --accent-hover: #7cc9be; --accent-soft: #15302d; --accent-ink: #0b1514;
  --success: #4fbf86; --danger: #f2877d;
  --shadow-sm: none; --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --img-filter: brightness(.86) saturate(.9);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16.5px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--text); }

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

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }
.noscript { text-align: center; padding: 16px; }

/* ---------------------------------------------------------------- BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s, transform .2s var(--ease);
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { min-height: 38px; padding: 7px 16px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-2);
  transition: background-color .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; fill: currentColor; }
#theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { display: none !important; }
:root[data-theme="dark"] .i-sun { display: none !important; }
:root[data-theme="dark"] .i-moon { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none !important; }
  :root:not([data-theme="light"]) .i-moon { display: block !important; }
}

/* ---------------------------------------------------------------- HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav-wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; flex-shrink: 0; }
.brand-mark {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.nav { margin-left: auto; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  display: block; padding: 7px 12px; border-radius: 999px; font-size: .9rem; color: var(--muted); font-weight: 500;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-actions .btn { margin-left: 8px; }
.nav-mobile-extra { display: none; }
.menu-btn { display: none; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.7px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease), top .25s var(--ease); }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-open .menu-btn span:first-child { top: 19px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 19px; transform: rotate(-45deg); }

@media (max-width: 1040px) { .hide-sm { display: none !important; } }
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px clamp(16px, 4vw, 32px) 24px;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { padding: 13px 4px; font-size: 1.05rem; border-radius: 0; border-bottom: 1px solid var(--border); color: var(--text); }
  .nav-links a.active { background: none; color: var(--accent); }
  .nav-mobile-extra { display: block; margin-top: 20px; }
  .nav-mobile-extra .social-row { display: flex; gap: 20px; justify-content: center; margin-top: 16px; color: var(--muted); font-size: .95rem; }
  .nav-actions { margin-left: auto; }
  .nav { margin-left: 0; }
}
@media (max-width: 380px) { .brand-name { display: none; } }

/* ---------------------------------------------------------------- HERO */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { container-type: inline-size; min-width: 0; }

/* drifting background blobs */
.blob { position: absolute; z-index: 0; border-radius: 50%; filter: blur(70px); opacity: .3; pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.b1 { width: 340px; height: 340px; background: var(--accent); top: -80px; right: 6%; }
.b2 { width: 280px; height: 280px; background: var(--accent2); bottom: -60px; left: -40px; animation-delay: -6s; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.15); } }

/* status pill with pulsing dot */
.status-pill {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: .82rem; font-weight: 600; color: var(--text-2);
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 #22c55e88; animation: pulse 1.8s infinite; flex-shrink: 0; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px #22c55e00; } 100% { box-shadow: 0 0 0 0 #22c55e00; } }

/* name: letters rise in one by one */
.hero-name { font-size: clamp(2.2rem, 6vw, 4.4rem); font-size: clamp(2.1rem, 11cqw, 4.6rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; white-space: nowrap; }
.hero-name .w { display: inline-block; white-space: nowrap; }
.hero-name .ch { display: inline-block; opacity: 0; transform: translateY(.7em) rotate(6deg); animation: rise .6s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero-aka { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.hero-title { margin: 14px 0 0; color: var(--accent); font-weight: 600; font-size: clamp(1rem, 1.6vw, 1.1rem); max-width: 36em; }

/* typewriter line */
.typed-line { margin: 20px 0 0; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; min-height: 2.6em; }
.typed { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.typed-fade { display: inline-block; transition: opacity .45s ease !important; transition-duration: .45s !important; }
.typed-fade.is-out { opacity: 0; }
.cursor { color: var(--accent2); font-weight: 400; margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-intro { margin: 10px 0 0; color: var(--muted); max-width: 38rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 22px; font-size: .9rem; color: var(--muted); }
.hero-links a { border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; overflow-wrap: anywhere; }
.hero-links a:hover { color: var(--text); border-color: var(--border-strong); }

/* stats card under the photo */
.hero-visual { justify-self: center; width: min(360px, 100%); display: flex; flex-direction: column; align-items: center; gap: 34px; }
.hero-stats {
  width: 100%; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  position: relative; z-index: 2;
}
.hero-stats div { padding: 14px 10px; text-align: center; }
.hero-stats div + div { border-left: 1px solid var(--border); }
.hero-stats dt { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.hero-stats dd { margin: 3px 0 0; font-size: .76rem; color: var(--muted); line-height: 1.3; }

/* circular photo with spinning gradient ring + floating tags */
.avatar-wrap { position: relative; width: min(320px, 70vw); aspect-ratio: 1; margin: 0; }
.avatar-ring {
  position: absolute; inset: 0; border-radius: 50%; padding: 7px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent2), var(--accent3), var(--accent));
  animation: spin 8s linear infinite;
}
.avatar-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg); }
@keyframes spin { to { transform: rotate(360deg); } }
.photo {
  position: absolute; inset: 14px; z-index: 1; width: calc(100% - 28px); height: calc(100% - 28px);
  border-radius: 50%; object-fit: cover; object-position: 50% 14%; filter: var(--img-filter);
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-6px); } }
.tag-float {
  position: absolute; z-index: 2; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  border-radius: 999px; padding: 6px 13px; font-size: .78rem; font-weight: 700;
  animation: float 4s ease-in-out infinite;
}
.tag-float:empty { display: none; }
.t1 { top: 4%; right: -6%; color: var(--accent); }
.t2 { bottom: 16%; left: -12%; color: var(--accent2); animation-delay: -1.5s; }
.t3 { bottom: -3%; right: 4%; color: var(--text-2); animation-delay: -3s; }

/* cursor glow (desktop only) */
#glow {
  position: fixed; left: 0; top: 0; z-index: 0; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%);
  transform: translate(-50%, -50%); opacity: 0; transition: opacity .4s;
}
#glow.on { opacity: 1; }
main, .site-footer { position: relative; }
.section, .marquee, .site-footer { z-index: 1; }

/* scrolling marquee strip */
.marquee { position: relative; overflow: hidden; padding: 15px 0; background: var(--surface); border-block: 1px solid var(--border); }
.track { display: flex; gap: 0; width: max-content; animation: scroll 32s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track span { white-space: nowrap; font-weight: 600; color: var(--muted); padding-right: 40px; }
.track span::before { content: "✦"; color: var(--accent); margin-right: 40px; }
@keyframes scroll { to { transform: translateX(-50%); } }

.highlights {
  margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border); border-left: 1px solid var(--border);
}
.highlights li {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-size: .92rem; font-weight: 500; color: var(--text-2);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.highlights svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; justify-self: start; align-items: flex-start; gap: 26px; width: 100%; max-width: 380px; }
  .avatar-wrap { width: 220px; margin-left: 12px; }
  .t1 { top: 8%; right: auto; left: 84%; }
  .t2 { bottom: auto; top: 44%; left: 100%; }
  .t3 { bottom: 6%; right: auto; left: 82%; }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .blob { opacity: .22; }
}
@media (max-width: 560px) {
  .highlights { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 auto; }
  .avatar-wrap { width: 180px; }
  .status-pill { font-size: .74rem; white-space: nowrap; padding: 6px 12px; gap: 7px; }
  .tag-float { font-size: .72rem; padding: 5px 11px; }
}

/* ---------------------------------------------------------------- SECTIONS */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-label { margin: 0 0 12px; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.section-head h2, .contact-copy h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.03em; }
.section-sub { margin: 14px 0 0; color: var(--muted); font-size: 1.02rem; max-width: 40em; }
.sub-title { font-size: 1.1rem; margin-bottom: 18px; }
.center-row { display: flex; justify-content: center; margin-top: 36px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: .8rem; font-weight: 500; line-height: 1.5; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
}
.chip-soft { background: var(--surface-2); border-color: transparent; }
.chip .tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

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

/* ---------------------------------------------------------------- ABOUT */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.about-copy .lead { font-size: 1.15rem; color: var(--text); line-height: 1.6; }
.about-copy p { color: var(--text-2); }
.pillars { display: grid; gap: 14px; }
.pillars li { padding: 22px 22px 20px; }
.pillars .num { font-size: .75rem; font-weight: 600; color: var(--accent); letter-spacing: .08em; }
.pillars h3 { font-size: 1.05rem; margin: 6px 0 6px; }
.pillars p { margin: 0; color: var(--muted); font-size: .94rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- SKILLS */
.competency-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.competency { padding: 24px; grid-column: span 2; }
.competency:nth-child(1) { grid-column: span 3; }
.competency:nth-child(2) { grid-column: span 3; }
.competency-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.competency-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.competency-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.competency h3 { font-size: 1.02rem; }
.competency .count { margin-left: auto; font-size: .78rem; color: var(--muted); }
@media (max-width: 980px) { .competency, .competency:nth-child(1), .competency:nth-child(2) { grid-column: span 3; } }
@media (max-width: 640px) { .competency-grid { grid-template-columns: 1fr; } .competency, .competency:nth-child(1), .competency:nth-child(2) { grid-column: auto; } }

.matrix-wrap { margin-top: 48px; }
.matrix { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.matrix-col { padding: 22px 22px 24px; }
.matrix-col + .matrix-col { border-left: 1px solid var(--border); }
.matrix-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); margin-bottom: 14px; }
.matrix-col li { padding: 7px 0; border-top: 1px dashed var(--border); font-size: .93rem; color: var(--text-2); display: flex; gap: 10px; align-items: baseline; }
.matrix-col li:first-child { border-top: 0; }
.matrix-col li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; transform: translateY(-2px); }
@media (max-width: 860px) {
  .matrix { grid-template-columns: repeat(2, 1fr); }
  .matrix-col:nth-child(3) { border-left: 0; }
  .matrix-col:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 520px) {
  .matrix { grid-template-columns: 1fr; }
  .matrix-col + .matrix-col { border-left: 0; border-top: 1px solid var(--border); }
}

/* ---------------------------------------------------------------- EXPERIENCE */
.journey { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 44px; counter-reset: j; }
.journey li { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 500; color: var(--text-2); }
.journey li span { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.journey li:last-child span { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.journey li + li::before { content: "→"; color: var(--muted); }

.timeline { position: relative; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1px; background: var(--border-strong); }
.tl-item { position: relative; padding-left: 40px; }
.tl-dot { position: absolute; left: 0; top: 28px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-item:first-child .tl-dot { background: var(--accent); }
.tl-card { padding: 26px 28px; }
.tl-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.tl-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; align-items: baseline; }
.tl-role { font-size: 1.12rem; }
.tl-company { margin: 4px 0 0; color: var(--accent); font-weight: 500; font-size: .95rem; }
.tl-date { font-size: .84rem; color: var(--muted); white-space: nowrap; }
.tl-summary { margin: 14px 0 0; color: var(--text-2); }
.tl-list-title { margin: 16px 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.tl-list { display: grid; gap: 6px; margin-top: 14px; }
.tl-list-title + .tl-list { margin-top: 0; }
.tl-list li { position: relative; padding-left: 18px; color: var(--text-2); font-size: .95rem; }
.tl-list li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 1.5px; background: var(--accent); }
.tl-card .chips { margin-top: 18px; }
.tl-toggle { margin-top: 10px; background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; font-size: .88rem; cursor: pointer; }
.tl-list li.is-extra { display: none; }
.tl-card.expanded .tl-list li.is-extra { display: list-item; list-style: none; }
@media (max-width: 560px) { .tl-card { padding: 20px; } .tl-item { padding-left: 30px; } }

/* ---------------------------------------------------------------- PROJECTS */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card { display: flex; flex-direction: column; overflow: hidden; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.project-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); transition: transform .5s var(--ease); }
.project-card:hover .project-thumb img { transform: scale(1.035); }
.project-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.project-cat { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.project-num { margin-left: auto; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.project-card h3 { font-size: 1.1rem; line-height: 1.3; }
.project-card h3 a::after { content: ""; position: absolute; inset: 0; }
.project-card { position: relative; }
.project-desc { margin: 10px 0 16px; color: var(--muted); font-size: .93rem; }
.project-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.project-card .chips { margin-bottom: 20px; }
.project-link { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--text); }
.project-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .25s var(--ease); }
.project-card:hover .project-link { color: var(--accent); }
.project-card:hover .project-link svg { transform: translateX(3px); }
.project-context { font-size: .78rem; color: var(--muted); }
@media (max-width: 980px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .project-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- ARTEFACTS */
.artefact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.artefact { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.artefact:hover { border-color: var(--border-strong); }
.artefact-top { display: flex; align-items: center; gap: 12px; }
.artefact-icon { width: 40px; height: 46px; border-radius: 7px; border: 1.5px solid var(--border-strong); position: relative; display: grid; place-items: end center; padding-bottom: 6px; font-size: .58rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; flex-shrink: 0; }
.artefact-icon::before { content: ""; position: absolute; top: -1.5px; right: -1.5px; width: 12px; height: 12px; background: var(--bg); border-left: 1.5px solid var(--border-strong); border-bottom: 1.5px solid var(--border-strong); border-bottom-left-radius: 4px; }
.section-alt .artefact-icon::before { background: var(--bg-alt); }
.artefact .artefact-icon::before { background: var(--surface); }
.artefact h3 { font-size: 1rem; }
.artefact .n { font-size: .74rem; color: var(--muted); font-weight: 500; }
.artefact p { margin: 0; color: var(--muted); font-size: .9rem; flex: 1; }
.artefact .btn { align-self: flex-start; margin-top: 6px; }
.soon { display: inline-flex; align-self: flex-start; margin-top: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 7px 14px; border: 1px dashed var(--border-strong); border-radius: 999px; }
@media (max-width: 900px) { .artefact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .artefact-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- APPROACH */
.approach { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.approach li { padding: 28px 22px 30px; position: relative; }
.approach li + li { border-left: 1px solid var(--border); }
.approach .q { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
.approach h3 { font-size: 1.15rem; margin: 18px 0 6px; }
.approach p { margin: 0; color: var(--muted); font-size: .93rem; }
.approach li:not(:last-child)::after {
  content: ""; position: absolute; right: -6px; top: 40px; width: 11px; height: 11px; z-index: 1;
  background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); transform: rotate(45deg);
}
@media (max-width: 900px) {
  .approach { grid-template-columns: 1fr; }
  .approach li { display: grid; grid-template-columns: 34px 1fr; column-gap: 18px; padding: 22px; }
  .approach li + li { border-left: 0; border-top: 1px solid var(--border); }
  .approach h3 { margin: 4px 0 4px; grid-column: 2; }
  .approach p { grid-column: 2; }
  .approach .q { grid-row: span 2; }
  .approach li:not(:last-child)::after { right: auto; left: 36px; top: auto; bottom: -6px; transform: rotate(135deg); }
}

/* ---------------------------------------------------------------- INSIGHTS */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .86rem; font-weight: 500; color: var(--muted); cursor: pointer; transition: all .2s; min-height: 38px; }
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.insight { position: relative; padding: 24px; display: flex; flex-direction: column; }
.insight:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.insight .meta { display: flex; justify-content: space-between; gap: 10px; font-size: .76rem; color: var(--muted); margin-bottom: 14px; }
.insight .meta span:last-child { white-space: nowrap; }
.insight .cat { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.insight h3 { font-size: 1.08rem; line-height: 1.32; }
.insight h3 a::after { content: ""; position: absolute; inset: 0; }
.insight p { margin: 10px 0 18px; color: var(--muted); font-size: .92rem; flex: 1; }
.insight .read { font-size: .86rem; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.insight:hover .read { color: var(--accent); }
.insight[hidden] { display: none; }
@media (max-width: 980px) { .insight-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .insight-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- LEARNING */
.learning-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.edu { padding: 24px; margin-bottom: 16px; display: flex; gap: 18px; align-items: flex-start; }
.edu-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.edu-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.edu .label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.edu h3 { font-size: 1.08rem; }
.edu p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; }
.learning-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.learn-group { padding: 22px; }
.learn-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 12px; }
.learn-group li { padding: 8px 0; border-top: 1px solid var(--border); font-size: .93rem; color: var(--text-2); display: flex; justify-content: space-between; gap: 10px; }
.learn-group li:first-of-type { border-top: 0; padding-top: 0; }
.learn-group .note { font-size: .74rem; color: var(--accent); font-weight: 600; white-space: nowrap; }
.roadmap { position: sticky; top: calc(var(--header-h) + 20px); padding: 26px; background: var(--text); color: var(--bg); border-radius: var(--radius); }
.roadmap .section-label { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.roadmap h3 { font-size: 1.4rem; margin-bottom: 16px; }
.roadmap li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); font-size: .95rem; }
.roadmap li span { font-size: .78rem; opacity: .6; font-variant-numeric: tabular-nums; padding-top: 2px; }
@media (max-width: 900px) { .learning-grid { grid-template-columns: 1fr; } .roadmap { position: static; } }
@media (max-width: 600px) { .learning-groups { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-list { margin-top: 30px; display: grid; gap: 4px; }
.contact-list a, .contact-list div { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.contact-list a:hover { color: var(--accent); }
.contact-list svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list .v { overflow-wrap: anywhere; }
.contact-list small { display: block; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

.contact-form { padding: clamp(22px, 4vw, 34px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field-error { margin: 6px 0 0; font-size: .82rem; color: var(--danger); min-height: 0; }
.field-error:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.btn-submit { width: 100%; margin-top: 4px; position: relative; }
.btn-submit .spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-submit.loading .spinner { display: inline-block; }
.btn-submit.loading { pointer-events: none; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { margin: 14px 0 0; font-size: .92rem; padding: 0; border-radius: var(--radius-sm); }
.form-status:empty { display: none; }
.form-status.success { color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); padding: 12px 14px; }
.form-status.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); padding: 12px 14px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- FOOTER */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 28px; }
.footer-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: flex-start; }
.footer-name { font-weight: 600; margin: 0; }
.footer-meta { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .9rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.copyright { margin: 28px 0 0; font-size: .82rem; color: var(--muted); }

/* ---------------------------------------------------------------- SUBPAGES (case study + article) */
.page-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); margin-bottom: 28px; font-weight: 500; }
.back-link:hover { color: var(--text); }
.page-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); letter-spacing: -0.03em; max-width: 22em; }
.page-hero .lead { margin: 18px 0 0; font-size: 1.12rem; color: var(--text-2); max-width: 40em; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cs-cover { aspect-ratio: 16 / 7; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.cs-cover img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); }
.cs-layout { display: grid; grid-template-columns: 1fr 300px; gap: clamp(32px, 5vw, 64px); align-items: start; padding: clamp(36px, 5vw, 56px) 0 clamp(64px, 8vw, 96px); }
.cs-facts { position: sticky; top: calc(var(--header-h) + 20px); padding: 22px; }
.cs-facts dl { margin: 0; display: grid; gap: 16px; }
.cs-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.cs-facts dd { margin: 0; font-size: .95rem; color: var(--text-2); }
.cs-facts .btn { margin-top: 18px; width: 100%; }
.cs-flow { counter-reset: step; display: grid; gap: 0; }
.cs-step { position: relative; padding: 0 0 34px 54px; }
.cs-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.cs-step::after { content: ""; position: absolute; left: 17.5px; top: 44px; bottom: 8px; width: 1px; background: var(--border-strong); }
.cs-step:last-child::after { display: none; }
.cs-step h2 { font-size: 1.25rem; padding-top: 5px; margin-bottom: 10px; }
.cs-step p, .cs-step li { color: var(--text-2); }
.cs-step ul { display: grid; gap: 8px; }
.cs-step li { position: relative; padding-left: 18px; }
.cs-step li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 6px; height: 1.5px; background: var(--accent); }
.notice { padding: 22px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-2); }
.notice h2 { font-size: 1.1rem; margin-bottom: 8px; }
.notice p { margin: 0; color: var(--muted); }
.cs-skill-block { margin-bottom: 36px; }
.cs-skill-block h2 { font-size: 1.25rem; margin-bottom: 14px; }
.cs-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: clamp(64px, 8vw, 96px); }
.cs-nav a { padding: 20px 22px; }
.cs-nav a:hover { border-color: var(--border-strong); }
.cs-nav small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.cs-nav strong { font-weight: 600; font-size: .98rem; }
.cs-nav .next { text-align: right; }
@media (max-width: 900px) { .cs-layout { grid-template-columns: 1fr; } .cs-facts { position: static; order: -1; } }
@media (max-width: 560px) { .cs-nav { grid-template-columns: 1fr; } .cs-nav .next { text-align: left; } }

.article { max-width: 700px; margin-inline: auto; padding-bottom: clamp(64px, 8vw, 96px); }
.article-body { font-size: 1.07rem; line-height: 1.78; color: var(--text-2); }
.article-body p { margin: 0 0 1.25em; }
.article-body h2 { font-size: 1.35rem; color: var(--text); margin: 2em 0 .6em; }
.article-body ul { margin: 0 0 1.4em; display: grid; gap: 8px; }
.article-body li { position: relative; padding-left: 22px; }
.article-body li::before { content: ""; position: absolute; left: 4px; top: .78em; width: 7px; height: 1.5px; background: var(--accent); }
.article-body blockquote { margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); font-family: var(--font-serif); font-style: italic; font-size: 1.6rem; line-height: 1.3; color: var(--text); }
.article-footer { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.article .page-hero h1 { max-width: none; }
.article-related { margin-top: 56px; }
.article-related h2 { font-size: 1.1rem; margin-bottom: 16px; }
.article-related .insight-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .article-related .insight-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- MOTION */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal, .no-observer .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-name .ch { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .marquee::-webkit-scrollbar { display: none; }
  .track { animation: none; padding-inline: 20px; }
  #glow { display: none; }
}

@media print {
  .site-header, .contact-form, .filter-bar, #insights-more, .hero-cta { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   PREMIUM CASE STUDY PAGES
   ========================================================================== */
.cs-hero { padding: clamp(32px, 5vw, 64px) 0 0; }
.cs-hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -0.03em; max-width: 24em; line-height: 1.12; }
.print-by { display: none; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ci-btn { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cs-banner { position: relative; margin-top: 32px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.cs-banner img { width: 100%; aspect-ratio: 16 / 6; object-fit: cover; filter: var(--img-filter); }
.ov-grid { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); border-top: 1px solid var(--border); }
.ov { padding: 16px 16px 18px; display: grid; gap: 4px; align-content: start; }
.ov + .ov { border-left: 1px solid var(--border); }
.ov span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ov b { font-size: .98rem; line-height: 1.3; }
.ci-s { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ov .ci-s { color: var(--accent); width: 18px; height: 18px; }
@media (max-width: 900px) { .ov-grid { grid-template-columns: repeat(3, 1fr); } .ov:nth-child(4) { border-left: 0; } .ov:nth-child(n+4) { border-top: 1px solid var(--border); } .cs-banner img { aspect-ratio: 16 / 7; } }
@media (max-width: 520px) { .ov-grid { grid-template-columns: repeat(2, 1fr); } .ov { border-left: 0 !important; border-top: 1px solid var(--border); } .ov:nth-child(-n+2) { border-top: 0; } .ov:nth-child(even) { border-left: 1px solid var(--border) !important; } }

.cs-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(48px, 6vw, 80px); align-items: start; }
.cs-toc { position: sticky; top: calc(var(--header-h) + 20px); }
.cs-toc p { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); margin: 0 0 10px; }
.cs-toc ol { border-left: 1px solid var(--border); margin-bottom: 18px; }
.cs-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: .86rem; color: var(--muted); line-height: 1.35; }
.cs-toc a:hover { color: var(--text); }
.cs-toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.cs-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0; }
@media (max-width: 980px) { .cs-wrap { grid-template-columns: minmax(0, 1fr); } .cs-toc { display: none; } }

.cs-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.cs-sec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.cs-num { font-size: .74rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.cs-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.ci { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cs-sec h2 { font-size: clamp(1.15rem, 2vw, 1.35rem); letter-spacing: -0.02em; }
.cs-sub { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.cs-h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 26px 0 12px; }
.cs-h3 .ci-s { color: var(--accent); }
.cs-text { color: var(--text-2); margin: 0 0 16px; }
.cs-note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.cs-callout { border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; }
.cs-callout p { margin: 0; font-size: 1.04rem; line-height: 1.65; color: var(--text); }
.red { color: var(--danger); } .teal { color: var(--accent); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--bg); }
.stat b { display: block; font-size: 1.8rem; line-height: 1; letter-spacing: -0.02em; }
.stat span { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.stat-red b { color: var(--danger); }

.obj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.obj-grid li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font-size: .94rem; color: var(--text-2); }
.obj-n { flex-shrink: 0; font-size: .74rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cs-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.cs-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 11px 14px; background: var(--surface-2); }
.cs-table td { padding: 11px 14px; border-top: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.cs-table td b { color: var(--text); font-weight: 600; }
.cs-table .mono { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; white-space: nowrap; }
.lv, .qpill, .mo { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.lv-H { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.lv-M { background: color-mix(in srgb, #c98a1b 16%, transparent); color: #a86f0e; }
.lv-L { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
:root[data-theme="dark"] .lv-M { color: #e6b45a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lv-M { color: #e6b45a; } }
.q-mc { background: var(--text); color: var(--bg); }
.q-ks { background: color-mix(in srgb, var(--accent2) 16%, transparent); color: var(--accent2); }
.q-ki { background: var(--accent-soft); color: var(--accent); }
.q-mo { background: var(--surface-2); color: var(--muted); }
.mo-must { background: var(--text); color: var(--bg); }
.mo-should { background: var(--accent-soft); color: var(--accent); }
.mo-could { background: var(--surface-2); color: var(--muted); }

.smap { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto 22px; gap: 6px; }
.smap-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; text-align: center; }
.smap-x { grid-column: 2; text-align: center; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.smap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-left: 1.5px solid var(--border-strong); border-bottom: 1.5px solid var(--border-strong); padding: 0 0 8px 8px; }
.sq { border-radius: var(--radius-sm); padding: 14px 16px; min-height: 120px; }
.sq strong { display: block; font-size: .9rem; margin-bottom: 8px; }
.sq ul { display: grid; gap: 4px; font-size: .86rem; }
.sq li { padding-left: 14px; position: relative; }
.sq li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.sq li.muted::before { display: none; }
.sq.q-mc { background: color-mix(in srgb, var(--text) 92%, transparent); }
.sq.q-ks, .sq.q-ki, .sq.q-mo { border: 1px solid var(--border); }

.sys-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sys { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .84rem; font-weight: 600; background: var(--bg); }
.sys .ci-s { color: var(--accent2); }

.diagram { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 16px; background: var(--bg); }
.diagram-l { margin: 0 0 12px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.flow { display: flex; flex-wrap: wrap; gap: 26px 30px; }
.fstep { position: relative; width: calc(25% - 23px); min-width: 140px; flex-grow: 1; max-width: 220px; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 10px; padding: 12px 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.fstep:not(:last-child)::after { content: "→"; position: absolute; right: -24px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.fn { font-size: .7rem; font-weight: 700; color: var(--muted); }
.ft { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.fpain { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; color: var(--danger); }
.fpain .ci-s { width: 13px; height: 13px; }
.fstep.is-pain { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.fstep.is-new { border-color: var(--accent); background: var(--accent-soft); }
.fnew { font-size: .68rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 640px) {
  .flow { flex-direction: column; gap: 22px; }
  .fstep { width: 100%; max-width: none; }
  .fstep:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -21px; transform: translateX(-50%); }
}

.cs-bullets { display: grid; gap: 10px; }
.cs-bullets li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.cs-bullets .ci-s { margin-top: 3px; }
.b-red .ci-s { color: var(--danger); }
.b-teal .ci-s { color: var(--accent); }
.cs-recs li { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }

.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.tech { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.tech b { display: flex; gap: 8px; align-items: center; font-size: .94rem; }
.tech b .ci-s { color: var(--accent); }
.tech p { margin: 6px 0 0; font-size: .87rem; color: var(--muted); line-height: 1.5; }

.bat { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; position: relative; }
.bat li { position: relative; padding: 0 10px 0 0; }
.bat li::before { content: ""; position: absolute; top: 15px; left: 32px; right: 0; height: 2px; background: var(--border-strong); }
.bat li:last-child::before { display: none; }
.bat-n { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .84rem; margin-bottom: 10px; }
.bat b { display: block; font-size: .9rem; line-height: 1.3; }
.bat li > div > span { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }
@media (max-width: 720px) {
  .bat { grid-template-columns: 1fr; gap: 14px; }
  .bat li { display: flex; gap: 14px; }
  .bat li::before { top: 32px; bottom: -14px; left: 15px; right: auto; width: 2px; height: auto; }
  .bat-n { margin: 0; flex-shrink: 0; }
}

.find-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.find { padding: 16px; border-radius: var(--radius-sm); background: color-mix(in srgb, #c98a1b 9%, var(--surface)); border: 1px solid color-mix(in srgb, #c98a1b 28%, transparent); }
.find-n { font-size: .74rem; font-weight: 800; color: #a86f0e; }
:root[data-theme="dark"] .find-n { color: #e6b45a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .find-n { color: #e6b45a; } }
.find p { margin: 6px 0 0; font-weight: 500; color: var(--text); line-height: 1.45; }

.out-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.out { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.out .ci { color: var(--success); }
.out b { font-size: .94rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); border-top: 3px solid var(--accent); }
.kpi-down { border-top-color: var(--accent2); }
.kpi-top { display: flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.kpi-up .kpi-top .ci-s { color: var(--success); }
.kpi-down .kpi-top .ci-s { color: var(--accent2); }
.kpi-v { margin-top: 10px; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kpi-b { margin-top: 6px; font-size: .78rem; color: var(--danger); font-weight: 600; }
.kpi-h { margin-top: 8px; font-size: .78rem; color: var(--muted); }

.sdlc { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sdlc > li { min-width: 0; }
.sdlc-h { display: flex; align-items: center; gap: 6px; padding: 10px 8px 10px 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .8rem; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); line-height: 1.2; min-height: 48px; }
.sdlc > li:nth-child(odd) .sdlc-h { background: color-mix(in srgb, var(--accent) 82%, var(--text)); }
.sdlc-h span { font-size: .7rem; opacity: .75; }
.sdlc ul { margin-top: 10px; display: grid; gap: 4px; font-size: .78rem; color: var(--muted); padding-right: 6px; }
@media (max-width: 900px) {
  .sdlc { grid-template-columns: 1fr; gap: 10px; }
  .sdlc > li { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; }
  .sdlc ul { margin: 0; }
}
@media (max-width: 480px) { .sdlc > li { grid-template-columns: 1fr; } }

.del-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.del { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); transition: border-color .2s; }
.del:hover { border-color: var(--accent); }
.del .ci { color: var(--accent); }
.del b { display: block; font-size: .92rem; }
.del small { color: var(--muted); font-size: .76rem; }

.skill-groups { display: grid; gap: 14px; }
.sg { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: start; }
.sg-l { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding-top: 6px; }
@media (max-width: 560px) { .sg { grid-template-columns: 1fr; gap: 6px; } }

/* ---------------- PRINT / PDF export of a case study ---------------- */
@media print {
  @page { size: A4; margin: 14mm 13mm; }
  body[data-page="case-study"] { font-size: 10pt; }
  body[data-page="case-study"] .site-footer, body[data-page="case-study"] .cs-toc, body[data-page="case-study"] .back-link,
  body[data-page="case-study"] .cs-actions, body[data-page="case-study"] .cs-nav, body[data-page="case-study"] .skip-link, #glow { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-by { display: block; margin: 8px 0 0; color: #5f636b; font-size: 10pt; }
  .cs-hero { padding-top: 0; }
  .cs-hero h1 { font-size: 22pt; }
  .cs-banner img { aspect-ratio: 16 / 5; }
  .cs-wrap { display: block; padding-top: 18px; padding-bottom: 0; }
  .cs-main { display: block; }
  .cs-sec { margin-bottom: 12px; break-inside: auto; page-break-inside: auto; border-color: #dcdcdc; }
  .cs-sec-h, .cs-h3, .diagram-l { break-after: avoid; page-break-after: avoid; }
  .cs-sec-h, .fstep, .stat, .kpi, .tech, .find, .out, .del, .obj-grid li, .sq, tr, .sdlc > li, .bat li { break-inside: avoid; page-break-inside: avoid; }
  .tbl-wrap { overflow: visible; }
  .cs-table { min-width: 0; }
  .flow { gap: 18px 24px; }
  .fstep { width: calc(25% - 18px); }
  .sdlc { grid-template-columns: repeat(7, 1fr); }
  .sdlc > li { display: block; }
  .bat { grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
  .cs-sec .cs-sub { color: #555; }
  a[href]::after { content: none !important; }
}
