:root {
  --bg: #f8f7f1;
  --surface: #fffef9;
  --surface-low: #f1f0e9;
  --surface-high: #e8e8df;
  --ink: #17201d;
  --muted: #5e6863;
  --primary: #28685d;
  --primary-hover: #1f574e;
  --primary-soft: #c8ebe1;
  --on-primary: #ffffff;
  --secondary: #6d5e2a;
  --secondary-soft: #eee2b2;
  --outline: #c7cbc4;
  --line: rgba(45, 65, 58, 0.14);
  --shadow: 0 22px 60px rgba(35, 52, 47, 0.1);
  --hero-a: #c4eee4;
  --hero-b: #f3ead2;
  --focus: rgba(40, 104, 93, 0.34);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --max-width: 1240px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  scroll-behavior: smooth;
}

:root[data-theme="light"] {
  --bg: #f6faf8;
  --surface: #ffffff;
  --surface-low: #edf4f1;
  --surface-high: #e0ebe6;
  --hero-a: #c6f4e8;
  --hero-b: #eaf4ff;
}

:root[data-theme="dark"] {
  --bg: #101815;
  --surface: #18231f;
  --surface-low: #202d28;
  --surface-high: #2b3934;
  --ink: #e5eee9;
  --muted: #acbab4;
  --primary: #84d6c2;
  --primary-hover: #9fe3d3;
  --primary-soft: #254f46;
  --on-primary: #10372f;
  --secondary: #ddc66f;
  --secondary-soft: #504820;
  --outline: #54635d;
  --line: rgba(220, 235, 228, 0.12);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  --hero-a: #173f38;
  --hero-b: #38331d;
  --focus: rgba(132, 214, 194, 0.4);
}

* { box-sizing: border-box; }
body { min-width: 320px; overflow-x: hidden; margin: 0; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.6; }
button, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.06; letter-spacing: -0.035em; }
h1 { max-width: 800px; margin-bottom: 24px; font-size: clamp(3.2rem, 7vw, 6.7rem); font-weight: 670; }
h2 { margin-bottom: 0; font-size: clamp(2.25rem, 4.4vw, 4.4rem); font-weight: 640; }
h3 { font-size: 1.35rem; }
.section-shell { width: min(calc(100% - 48px), var(--max-width)); margin-inline: auto; }
.section-space { padding-block: 112px; }
.eyebrow { margin-bottom: 16px; color: var(--primary); font-size: 0.74rem; font-weight: 780; letter-spacing: 0.15em; text-transform: uppercase; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 16px; padding: 10px 16px; border-radius: 10px; color: var(--on-primary); background: var(--primary); }
.skip-link:focus { top: 12px; }

.app-bar { position: sticky; z-index: 40; top: 0; display: flex; min-height: 76px; align-items: center; gap: 28px; padding: 10px max(24px, calc((100vw - var(--max-width)) / 2)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 91%, transparent); backdrop-filter: blur(18px); }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; color: var(--on-primary); background: var(--primary); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; }
.brand span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.brand strong { font-size: 0.86rem; }
.brand small { color: var(--muted); font-size: 0.68rem; }
nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
nav a { position: relative; color: var(--muted); font-size: 0.78rem; font-weight: 650; text-decoration: none; }
nav a::after { position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; border-radius: 2px; background: var(--primary); content: ""; opacity: 0; transform: scaleX(0.4); transition: 160ms ease; }
nav a:hover, nav a.active { color: var(--ink); }
nav a.active::after { opacity: 1; transform: scaleX(1); }
.app-actions { display: flex; align-items: center; gap: 10px; }
.theme-switch { display: flex; padding: 3px; border-radius: 999px; background: var(--surface-low); }
.theme-switch button { padding: 6px 9px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 0.62rem; font-weight: 700; cursor: pointer; }
.theme-switch button.active { color: var(--on-primary); background: var(--primary); }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 10px; padding: 10px 19px; border: 1px solid transparent; border-radius: 999px; font-size: 0.79rem; font-weight: 720; text-decoration: none; cursor: pointer; transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease; }
.button:hover { transform: translateY(-2px); }
.button-filled { color: var(--on-primary); background: var(--primary); box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 25%, transparent); }
.button-filled:hover { background: var(--primary-hover); }
.button-tonal { color: var(--ink); background: var(--primary-soft); }
.button-outlined { border-color: var(--outline); color: var(--ink); background: transparent; }
.button-outlined:hover { background: var(--surface-low); }

.hero { display: grid; min-height: 720px; grid-template-columns: 1.08fr 0.92fr; align-items: center; gap: 54px; padding-block: 76px; }
.hero-copy { min-width: 0; }
.hero-copy h1 span { color: var(--primary); }
.hero-copy .eyebrow { display: flex; align-items: center; gap: 9px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4aa978; box-shadow: 0 0 0 5px rgba(74, 169, 120, 0.13); }
.hero-intro { max-width: 680px; margin-bottom: 31px; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 32px 0 0; padding: 0; color: var(--muted); font-size: 0.76rem; list-style: none; }
.hero-proof li::before { margin-right: 8px; color: var(--primary); content: "•"; }

.system-map { position: relative; min-height: 520px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: radial-gradient(circle at center, var(--hero-a), transparent 48%), linear-gradient(145deg, var(--surface), var(--hero-b)); box-shadow: var(--shadow); isolation: isolate; }
.system-map::before { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 42px 42px; content: ""; opacity: 0.38; mask-image: radial-gradient(circle, black, transparent 72%); }
.map-glow { position: absolute; inset: 25% 28%; border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); border-radius: 50%; box-shadow: 0 0 0 55px color-mix(in srgb, var(--primary) 5%, transparent), 0 0 0 110px color-mix(in srgb, var(--primary) 4%, transparent); }
.map-center { position: absolute; z-index: 4; top: 50%; left: 50%; display: grid; width: 116px; height: 116px; place-content: center; border: 8px solid color-mix(in srgb, var(--surface) 65%, transparent); border-radius: 34px; color: var(--on-primary); background: var(--primary); text-align: center; transform: translate(-50%, -50%); box-shadow: 0 20px 50px rgba(25, 82, 71, 0.25); }
.map-center span { font-size: 2rem; font-weight: 750; line-height: 1; }
.map-center small { margin-top: 7px; font-size: 0.52rem; font-weight: 750; letter-spacing: 0.15em; }
.map-node { position: absolute; z-index: 3; min-width: 142px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 11px 28px rgba(30, 50, 43, 0.1); backdrop-filter: blur(8px); }
.map-node strong, .map-node small { display: block; }
.map-node strong { font-size: 0.79rem; }
.map-node small { color: var(--muted); font-size: 0.65rem; }
.node-icon { display: grid; width: 29px; height: 29px; place-items: center; margin-bottom: 8px; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.node-cloud { top: 12%; left: 7%; }
.node-platform { top: 12%; right: 6%; }
.node-product { bottom: 11%; left: 6%; }
.node-ops { right: 6%; bottom: 11%; }
.map-lines { position: absolute; inset: 4% 0 0; width: 100%; height: 92%; }
.map-lines path { fill: none; stroke: color-mix(in srgb, var(--primary) 45%, transparent); stroke-width: 1.5; stroke-dasharray: 5 6; }

.signal-strip { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 12px 35px rgba(35, 52, 47, 0.06); }
.signal-strip div { padding: 26px 28px; border-right: 1px solid var(--line); }
.signal-strip div:last-child { border-right: 0; }
.signal-strip strong, .signal-strip span { display: block; }
.signal-strip strong { margin-bottom: 4px; color: var(--primary); font-size: 1.25rem; }
.signal-strip span { color: var(--muted); font-size: 0.72rem; }

.intro { display: grid; grid-template-columns: 1fr 0.9fr; gap: 80px; }
.intro-copy { padding-top: 36px; color: var(--muted); font-size: 1.05rem; }
.intro-copy p + p { margin-top: 22px; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(280px, 410px); align-items: end; gap: 60px; margin-bottom: 42px; }
.section-heading > p { margin-bottom: 4px; color: var(--muted); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.filter-chip { padding: 9px 15px; border: 1px solid var(--outline); border-radius: 999px; color: var(--muted); background: transparent; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.filter-chip:hover { color: var(--ink); background: var(--surface-low); }
.filter-chip.active { border-color: var(--primary); color: var(--on-primary); background: var(--primary); }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project-card { display: flex; min-height: 350px; flex-direction: column; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 12px 38px rgba(31, 48, 42, 0.055); transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card[hidden] { display: none; }
.project-featured { background: linear-gradient(145deg, var(--hero-a), var(--surface) 66%); }
.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: auto; }
.project-number { color: var(--primary); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; }
.project-tag, .timeline-signal { padding: 5px 9px; border-radius: 999px; color: var(--secondary); background: var(--secondary-soft); font-size: 0.62rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.project-card h3 { margin: 48px 0 12px; font-size: clamp(1.55rem, 2.8vw, 2.25rem); }
.project-card > p { max-width: 630px; margin-bottom: 22px; color: var(--muted); }
.tech-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 24px; padding: 0; list-style: none; }
.tech-list li, .dialog-tech span { padding: 5px 9px; border-radius: 8px; background: var(--surface-low); color: var(--muted); font-size: 0.66rem; font-weight: 650; }
.project-link { align-self: flex-start; margin-top: auto; padding: 7px 0; border: 0; color: var(--primary); background: transparent; font-size: 0.76rem; font-weight: 760; cursor: pointer; }
.project-link span { display: inline-block; margin-left: 5px; transition: transform 150ms ease; }
.project-link:hover span { transform: translate(3px, -3px); }
.filter-empty { padding: 40px; border-radius: var(--radius-md); background: var(--surface); color: var(--muted); text-align: center; }

.experience-section { background: var(--surface-low); }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 45px minmax(220px, 0.7fr) 1.3fr; gap: 22px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.timeline-marker { position: relative; }
.timeline-marker::after { position: absolute; top: 15px; bottom: -52px; left: 8px; width: 1px; background: var(--line); content: ""; }
.timeline-item:last-child .timeline-marker::after { display: none; }
.timeline-marker span { position: relative; z-index: 1; display: block; width: 17px; height: 17px; border: 4px solid var(--surface-low); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.timeline-role > span { color: var(--primary); font-size: 0.66rem; font-weight: 760; letter-spacing: 0.1em; text-transform: uppercase; }
.timeline-role h3 { margin: 8px 0 5px; font-size: 1.18rem; }
.timeline-role p, .timeline-detail p { color: var(--muted); }
.timeline-role p { margin: 0; font-size: 0.76rem; }
.timeline-detail p { margin-bottom: 16px; }

.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.principle { min-height: 280px; padding: 26px; border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 9px 30px rgba(31, 48, 42, 0.05); }
.principle > span { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 50px; border-radius: 13px; color: var(--primary); background: var(--primary-soft); font-size: 0.72rem; font-weight: 800; }
.principle h3 { margin-bottom: 12px; }
.principle p { color: var(--muted); font-size: 0.86rem; }
.stack-section { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 74px; padding: 70px; border-radius: var(--radius-lg); color: var(--on-primary); background: #215b51; }
:root[data-theme="dark"] .stack-section { color: var(--ink); background: #173d36; }
.stack-section .eyebrow { color: #a6e1d2; }
.stack-section h2 { font-size: clamp(2rem, 3.4vw, 3.3rem); }
.stack-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.stack-groups div { padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.22); }
.stack-groups strong { font-size: 0.76rem; letter-spacing: 0.07em; text-transform: uppercase; }
.stack-groups p { margin: 8px 0 0; color: rgba(255,255,255,0.75); font-size: 0.82rem; }
:root[data-theme="dark"] .stack-groups p { color: var(--muted); }

.contact-section { margin-top: 112px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.contact-inner { padding-block: 88px; }
.contact-inner h2 { max-width: 800px; margin-bottom: 24px; }
.contact-inner > div:first-child > p { max-width: 750px; color: var(--muted); }
.privacy-note { margin-top: 22px; padding-left: 16px; border-left: 3px solid var(--primary); font-size: 0.84rem; }
footer { display: flex; justify-content: space-between; padding-block: 26px; color: var(--muted); font-size: 0.7rem; }
footer p { margin: 0; }

dialog { width: min(calc(100% - 32px), 850px); max-height: min(88vh, 820px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 30px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,0.28); }
dialog::backdrop { background: rgba(8, 18, 14, 0.58); backdrop-filter: blur(7px); }
.dialog-shell { position: relative; padding: 48px; }
.dialog-shell h2 { padding-right: 35px; font-size: clamp(2.2rem, 5vw, 4rem); }
.dialog-summary { max-width: 690px; margin: 24px 0 34px; color: var(--muted); font-size: 1.02rem; }
.dialog-close { position: absolute; top: 22px; right: 22px; }
.icon-button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; color: var(--ink); background: var(--surface-low); font-size: 1.5rem; cursor: pointer; }
.dialog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.dialog-grid section { padding: 22px; border-radius: 18px; background: var(--surface-low); }
.dialog-grid h3 { margin-bottom: 10px; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.dialog-grid p { margin: 0; color: var(--muted); font-size: 0.83rem; }
.dialog-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.snapshot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 32px 0; }
.snapshot-grid div { min-height: 115px; padding: 18px; border-radius: 17px; background: var(--surface-low); }
.snapshot-grid span, .snapshot-grid strong { display: block; }
.snapshot-grid span { margin-bottom: 8px; color: var(--primary); font-size: 0.63rem; font-weight: 780; letter-spacing: 0.08em; text-transform: uppercase; }
.snapshot-grid strong { font-size: 0.9rem; }
.snapshot-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.noscript { margin: 0; padding: 12px; color: var(--ink); background: var(--secondary-soft); text-align: center; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 520ms ease, transform 520ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
body.dialog-open { overflow: hidden; }

@media (max-width: 1050px) {
  nav { display: none; }
  .app-actions { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 62px; }
  .system-map { min-height: 480px; }
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-section { grid-template-columns: 1fr; }
}

@media (max-width: 740px) {
  .section-shell { width: min(calc(100% - 28px), var(--max-width)); }
  .section-space { padding-block: 78px; }
  .app-bar { min-height: 68px; padding-inline: 14px; }
  .brand small, .theme-switch, .snapshot-trigger { display: none; }
  .hero { min-height: auto; gap: 35px; padding-block: 54px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; flex: 0 0 auto; }
  h1 { overflow-wrap: break-word; font-size: clamp(2.8rem, 13vw, 5rem); }
  .system-map { min-height: 420px; }
  .map-node { min-width: 120px; padding: 12px; }
  .node-cloud, .node-product { left: 3%; }
  .node-platform, .node-ops { right: 3%; }
  .signal-strip { grid-template-columns: repeat(2, 1fr); }
  .signal-strip div:nth-child(2) { border-right: 0; }
  .signal-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .intro, .section-heading { grid-template-columns: 1fr; gap: 30px; }
  .intro-copy { padding-top: 0; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 330px; padding: 26px; }
  .timeline-item { grid-template-columns: 28px 1fr; gap: 12px; }
  .timeline-detail { grid-column: 2; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle { min-height: 230px; }
  .principle > span { margin-bottom: 32px; }
  .stack-section { width: 100%; padding: 54px 28px; border-radius: 0; }
  .stack-groups { grid-template-columns: 1fr; }
  .contact-section { margin-top: 70px; }
  .contact-inner { padding-block: 70px; }
  footer { flex-direction: column; gap: 5px; }
  .dialog-shell { padding: 34px 22px; }
  .dialog-grid, .snapshot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .system-map { min-height: 380px; }
  .map-center { width: 96px; height: 96px; border-radius: 28px; }
  .map-node { min-width: 108px; }
  .map-node strong { font-size: 0.68rem; }
  .map-node small { font-size: 0.58rem; }
  .signal-strip div { padding: 20px; }
  h1 { font-size: clamp(2.7rem, 11.5vw, 4rem); }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
