/* =============================================================
   C6Web — Design System
   Adapted from C6 Guardrails style system
   ============================================================= */

:root {
  --gaf-green: #76B400;
  --gaf-green-light: #9FD13D;
  --gaf-green-dark: #5A8E00;
  --gaf-green-glow: rgba(118,180,0,0.18);

  /* Dark (default) */
  --bg-canvas: #0D1117;
  --bg-surface: #161B22;
  --bg-sunken: #0A0E14;
  --bg-hover: rgba(255,255,255,.06);
  --bg-card: #1C232D;

  --fg-primary: #E8EBE0;
  --fg-secondary: #A6B2AC;
  --fg-tertiary: #8A9490;
  --fg-link: var(--gaf-green);

  --border-subtle: #21262D;
  --border-strong: #3A4148;
  --border-accent: var(--gaf-green);

  --accent: var(--gaf-green);
  --accent-hover: var(--gaf-green-light);
  --accent-press: var(--gaf-green-dark);
  --accent-rgb: 118, 180, 0;

  --danger: #E84F36;
  --danger-bg: rgba(232,79,54,.12);
  --warning: #D9A32E;
  --warning-bg: rgba(217,163,46,.12);
  --info: #5B8DEF;
  --info-bg: rgba(91,141,239,.12);

  --font-display: ui-serif, "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, "PingFang TC", "PingFang SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Cascadia Mono", "Roboto Mono", Consolas, monospace;

  --shadow-card: 0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  --shadow-glow: 0 0 0 1px rgba(118,180,0,.25), 0 4px 24px rgba(118,180,0,.12);
  --dur: 160ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --nav-h: 60px;
}

[data-theme="light"] {
  --bg-canvas: #FFFFFF;
  --bg-surface: #F5F5F5;
  --bg-sunken: #EBEBEB;
  --bg-hover: rgba(13,17,23,.05);
  --bg-card: #FFFFFF;

  --fg-primary: #0D1117;
  --fg-secondary: #505050;
  --fg-tertiary: #737373;
  --fg-link: #5A8E00;

  --border-subtle: #E2E5E8;
  --border-strong: #BCC1C6;
  --border-accent: #5A8E00;

  --accent: #5A8E00;
  --accent-hover: #76B400;
  --accent-press: #3D5C00;
  --accent-rgb: 90, 142, 0;

  --danger: #C03A2B;
  --danger-bg: rgba(192,58,43,.10);
  --warning: #B8860B;
  --warning-bg: rgba(184,134,11,.10);
  --info: #1E4A8A;
  --info-bg: rgba(30,74,138,.10);

  --shadow-card: 0 1px 3px rgba(13,17,23,.06), 0 4px 16px rgba(13,17,23,.04);
  --shadow-glow: 0 0 0 1px rgba(90,142,0,.20), 0 4px 24px rgba(90,142,0,.08);
}

[data-theme="dark"] {
  color: var(--fg-primary);
  --bg-canvas:  #0D1117;
  --bg-surface: #161B22;
  --bg-sunken:  #0A0E14;
  --bg-hover:   rgba(255,255,255,.06);
  --bg-card:    #1C232D;
  --fg-primary:   #E8EBE0;
  --fg-secondary: #A6B2AC;
  --fg-tertiary:  #8A9490;
  --fg-link: var(--gaf-green);
  --border-subtle: #21262D;
  --border-strong: #3A4148;
  --border-accent: var(--gaf-green);
  --accent:       var(--gaf-green);
  --accent-hover: var(--gaf-green-light);
  --accent-press: var(--gaf-green-dark);
  --accent-rgb:   118, 180, 0;
  --shadow-card: 0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  --shadow-glow: 0 0 0 1px rgba(118,180,0,.25), 0 4px 24px rgba(118,180,0,.12);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--fg-primary);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body, body * {
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
a { color: var(--fg-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(240,243,232,.12); border-radius: 999px; border: 2px solid var(--bg-canvas); }
::-webkit-scrollbar-thumb:hover { background: rgba(240,243,232,.22); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #BCC1C6; border-color: #E2E5E8; }

/* ── Heading scale ── */
h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 700; line-height: 1.15; margin: 0 0 16px; }
h2 { font-size: clamp(22px, 3.5vw, 36px); font-weight: 700; line-height: 1.2; margin: 0 0 14px; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0 0 8px; }
p { margin: 0 0 12px; }

/* ── Focus ── */
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent) !important;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ── Utility ── */
.display { font-family: var(--font-ui); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.mono { font-family: var(--font-mono); }
.label { font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; font-weight: 600; color: var(--fg-tertiary); }

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--gaf-green) 0%, var(--gaf-green-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  display: inline-block;
}

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border-subtle); margin: 0; }

/* ── Badge / pill ── */
.badge-accent {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(var(--accent-rgb),.12);
  color: var(--accent-press);
  border: 1px solid rgba(var(--accent-rgb),.25);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
[data-theme="light"] .badge-accent { color: var(--accent-press); }

.tag-pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  white-space: nowrap;
}

.cert-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  background: rgba(var(--accent-rgb),.10);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb),.20);
  white-space: nowrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 6px;
  font-size: 14px; font-weight: 600;
  transition: all var(--dur) var(--ease);
  white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn-outline { background: transparent; color: var(--fg-primary); border: 1px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--fg-primary); background: var(--bg-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--fg-secondary); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--fg-primary); background: var(--bg-hover); text-decoration: none; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* ── Card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
}
.card-glow {
  border-color: rgba(var(--accent-rgb),.30);
  box-shadow: var(--shadow-glow);
}
.card-sm  { padding: 16px 20px; }
.card-md  { padding: 24px 28px; }
.card-lg  { padding: 40px 48px; }

/* ── Section / Container ── */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.container { max-width: 1440px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 48px); }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px); }
.container-md { max-width: 1100px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 32px); }

/* ── Feature grid ── */
.feature-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* ── Step number ── */
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(var(--accent-rgb),.12);
  border: 1px solid rgba(var(--accent-rgb),.30);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* ── Nav ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(13,17,23,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
[data-theme="light"] .site-nav { background: rgba(255,255,255,.92); }
.nav-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 48px);
  height: 100%; display: flex; align-items: center; gap: 16px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
  color: var(--fg-primary);
}
.nav-logo-text {
  display: flex; flex-direction: column; line-height: 1.15;
}
.nav-logo-title {
  font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
  color: var(--fg-primary); white-space: nowrap;
}
.nav-logo-subtitle {
  font-size: 9px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-tertiary);
  line-height: 1; margin-top: 1px; white-space: nowrap;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo-mark {
  width: 50px; height: 50px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--fg-secondary);
  padding: 6px 12px; border-radius: 6px;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  text-decoration: none; border: none; background: transparent; cursor: pointer;
}
.nav-link:hover { color: var(--fg-primary); background: var(--bg-hover); text-decoration: none; }
.nav-link.active { color: var(--fg-primary); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle); color: var(--fg-secondary);
  transition: all var(--dur) var(--ease); cursor: pointer; background: transparent;
  touch-action: manipulation;
}
.theme-btn:hover { border-color: var(--border-strong); color: var(--fg-primary); background: var(--bg-hover); }

/* Burger */
.burger-btn {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  width: 36px; height: 36px; gap: 5px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--border-subtle);
  background: transparent; color: var(--fg-secondary);
  touch-action: manipulation;
}
.burger-btn span {
  display: block; width: 16px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: all var(--dur) var(--ease);
}
@media (max-width: 767px) {
  .nav-links { display: none; }
  .burger-btn { display: flex; }
  .nav-actions { margin-left: auto; }
  .nav-logo-text { display: none; }
  /* Remove backdrop-filter on mobile — iOS Safari drops touch events on
     interactive elements inside position:sticky + backdrop-filter elements */
  .site-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(13,17,23,.97);
  }
  [data-theme="light"] .site-nav {
    background: rgba(255,255,255,.97);
  }
}

/* Mobile menu */
#mobile-menu {
  display: none; flex-direction: column; gap: 2px;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px 20px; z-index: 99;
}
#mobile-menu.open { display: flex; }
#mobile-menu .nav-link { font-size: 15px; padding: 10px 12px; width: 100%; }

/* ── Footer ── */
footer {
  background: var(--bg-canvas);
  border-top: 3px solid var(--gaf-green);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) minmax(160px, 1.1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  padding: 32px 0 24px;
}
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col-title {
  font-size: 16px; font-weight: 700; color: var(--fg-primary);
  letter-spacing: -0.01em; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle);
}
.footer-link {
  font-size: 14px; color: var(--fg-link); display: block; margin-bottom: 10px;
  transition: opacity var(--dur) var(--ease); text-decoration: none;
}
.footer-link:hover { opacity: 0.7; text-decoration: none; }
.footer-legal {
  border-top: 1px solid var(--border-subtle);
}
.footer-legal-inner {
  padding: 12px 0 14px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 10px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
}
.footer-brand-mark {
  width: 24px; height: 24px;
  background: transparent;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.footer-copy { font-size: 12px; color: var(--fg-tertiary); margin: 0; }
.footer-copy a { color: var(--fg-tertiary); text-decoration: none; }
.footer-copy a:hover { opacity: 0.7; text-decoration: none; }
.footer-social { display: flex; align-items: center; gap: 10px; }
.footer-social-link {
  color: var(--fg-tertiary); display: flex; text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.footer-social-link:hover { color: var(--fg-primary); text-decoration: none; }

/* ── Hero — two-column, always dark (matches GAF style) ── */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(28px, 5vw, 48px) 0 clamp(40px, 8vw, 64px);
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

/* Radial glow orb — top right, matching GAF */
.hero-glow-orb {
  position: absolute;
  top: -20%; right: -10%;
  width: min(600px, 80vw); height: min(600px, 80vw);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(118,180,0,.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Two-column flex layout */
.hero-cols {
  display: flex;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
  flex-wrap: wrap;
}
.hero-left  { flex: 1 1 360px; }
.hero-right { flex: 1 1 380px; max-width: 600px; }

/* Browser-frame card */
.hero-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}
.hero-frame-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 9px 14px;
  display: flex; align-items: center; gap: 8px;
}
.hero-frame-url {
  flex: 1; background: var(--bg-sunken); border-radius: 4px;
  padding: 3px 10px; font-size: 11px; color: var(--fg-tertiary);
  font-family: var(--font-mono);
}
.hero-frame-body { padding: 20px; }

/* Values mini-grid inside frame */
.hero-values-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.hero-val-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hero-val-item:hover {
  border-color: rgba(var(--accent-rgb), .30);
  background: rgba(var(--accent-rgb), .04);
}
.hero-val-num {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.08em; flex-shrink: 0;
}
.hero-val-name {
  font-size: 12px; font-weight: 500; color: var(--fg-secondary); line-height: 1.35;
}

/* Stats band below hero */
.hero-stats-band {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
}
.hero-stats-inner {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0;
}
.hero-stat-item {
  flex: 1 1 140px; text-align: center; padding: 8px 24px;
}
.hero-stat-val {
  font-size: clamp(22px, 3.5vw, 30px); font-weight: 700;
  letter-spacing: -0.02em; color: var(--fg-primary); line-height: 1.1;
}
.hero-stat-val span { color: var(--accent); }
.hero-stat-lbl {
  font-size: 12px; color: var(--fg-tertiary); margin-top: 5px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.hero-stat-sep {
  width: 1px; height: 40px; background: var(--border-subtle); flex-shrink: 0;
}
@media (max-width: 600px) {
  .hero-stat-sep { display: none; }
  .hero-stat-item { flex: 1 1 50%; border-bottom: 1px solid var(--border-subtle); padding: 16px; }
  .hero-stat-item:last-child, .hero-stat-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}

/* ── Values ── */
.values-card { height: 100%; display: flex; flex-direction: column; }
.values-num {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.values-title { font-size: 16px; font-weight: 700; color: var(--fg-primary); margin: 0 0 8px; }
.values-desc { font-size: 14px; color: var(--fg-secondary); margin: 0 0 16px; line-height: 1.6; }
.values-list { list-style: none; padding: 0; margin: 0; margin-top: auto; }
.values-list li {
  font-size: 13px; color: var(--fg-tertiary); padding: 4px 0 4px 20px;
  position: relative; line-height: 1.5;
}
.values-list li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--accent); font-weight: 700; font-size: 11px; top: 5px;
}

/* ── Project card ── */
.project-card {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.project-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.35); }
[data-theme="light"] .project-card:hover { box-shadow: 0 8px 28px rgba(13,17,23,.12); }

.project-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}
.project-badge-green {
  background: rgba(var(--accent-rgb),.12);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb),.22);
}
.project-badge-muted {
  background: rgba(255,255,255,.04);
  color: var(--fg-tertiary);
  border: 1px solid var(--border-subtle);
}
[data-theme="light"] .project-badge-muted {
  background: var(--bg-sunken);
  color: var(--fg-tertiary);
}

.project-featured { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .project-featured { grid-template-columns: 1fr 460px; } }

.project-tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.project-capabilities { display: grid; gap: 8px; }
@media (min-width: 480px) { .project-capabilities { grid-template-columns: 1fr 1fr; } }

.capability-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--fg-secondary);
}
.capability-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: 6px;
}

.projects-grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }

.coming-soon-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px; min-height: 180px;
  border-style: dashed; opacity: .6;
}
.coming-soon-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(var(--accent-rgb),.08);
  border: 1px solid rgba(var(--accent-rgb),.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 12px; color: var(--accent);
}

/* ── Section headings ── */
.section-eyebrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.section-line {
  height: 1px; width: 32px; background: var(--accent);
}
