/* ================================================================
   CoreX Design System — main.css
   ================================================================
   Sections:
   1.  Google Fonts
   2.  CSS Custom Properties (design tokens)
   3.  Modern CSS Reset
   4.  Base & Body
   5.  Typography scale
   6.  Layout utilities (container, grid)
   7.  Header
   8.  Logo
   9.  Navigation (desktop + hamburger mobile)
   10. Footer
   11. Buttons
   12. Cards
   13. Gradient helpers
   14. Accessibility / focus
   15. Reduced-motion override
   ================================================================ */


/* ── 1. Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Ubuntu+Mono:wght@400;700&display=swap');


/* ── 2. CSS Custom Properties ────────────────────────────────── */
:root {
  /* ── Brand palette ── */
  --color-dark:         #131529;
  --color-blue-dark:    #1A4897;
  --color-blue-light:   #35A7DF;
  --color-purple-dark:  #46276E;
  --color-purple-light: #9F3F90;
  --color-red:          #DC2217;
  --color-yellow:       #FDD958;
  --color-white:        #FFFFFF;

  /* ── Semantic surfaces ── */
  --bg-base:    #0f1120;
  --bg-primary: var(--color-dark);
  --bg-raised:  #1a1d38;
  --bg-card:    #1e2242;
  --bg-border:  rgba(255, 255, 255, 0.08);

  /* ── Text ── */
  --text-primary:   var(--color-white);
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted:     rgba(255, 255, 255, 0.45);

  /* ── Interactive ── */
  --link-color:    var(--color-blue-light);
  --link-hover:    var(--color-white);
  --btn-primary-bg: var(--color-yellow);
  --btn-primary-fg: var(--color-dark);

  /* ── Gradients ── */
  --gradient-logo:   linear-gradient(90deg, var(--color-blue-light), var(--color-purple-light));
  --gradient-brand:  linear-gradient(135deg, var(--color-blue-dark) 0%, var(--color-blue-light) 50%, var(--color-purple-light) 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(26,72,151,0.15) 0%, rgba(159,63,144,0.15) 100%);

  /* ── Typography ── */
  --font-sans: 'Ubuntu', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Ubuntu Mono', 'Courier New', monospace;

  /* Type scale — major third (×1.25) from 1rem base */
  --text-xs:   0.64rem;   /*  ~10px */
  --text-sm:   0.80rem;   /*  ~13px */
  --text-base: 1rem;      /*   16px */
  --text-md:   1.25rem;   /*   20px */
  --text-lg:   1.563rem;  /*  ~25px */
  --text-xl:   1.953rem;  /*  ~31px */
  --text-2xl:  2.441rem;  /*  ~39px */
  --text-3xl:  3.052rem;  /*  ~49px */
  --text-4xl:  3.815rem;  /*  ~61px */

  /* ── Spacing — 8px base grid ── */
  --sp-1:  0.25rem;  /*  4px */
  --sp-2:  0.5rem;   /*  8px */
  --sp-3:  0.75rem;  /* 12px */
  --sp-4:  1rem;     /* 16px */
  --sp-5:  1.25rem;  /* 20px */
  --sp-6:  1.5rem;   /* 24px */
  --sp-8:  2rem;     /* 32px */
  --sp-10: 2.5rem;   /* 40px */
  --sp-12: 3rem;     /* 48px */
  --sp-16: 4rem;     /* 64px */
  --sp-20: 5rem;     /* 80px */
  --sp-24: 6rem;     /* 96px */

  /* ── Layout ── */
  --container-max: 1200px;
  --content-max:   720px;
  --header-h:      68px;

  /* ── Border radius ── */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   20px;
  --r-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.25);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.55);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);

  /* ── Motion ── */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);
}


/* ── 3. Modern CSS Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

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

input, button, textarea, select { font: inherit; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }


/* ── 4. Base & Body ──────────────────────────────────────────── */
body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: grid;
  grid-template-rows: var(--header-h) 1fr auto;
}


/* ── 5. Typography scale ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl);  }
h3 { font-size: var(--text-lg);  }
h4 { font-size: var(--text-md);  }
h5 { font-size: var(--text-base); font-weight: 500; }
h6 { font-size: var(--text-sm);  font-weight: 500; }

@media (min-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl);  }
  h4 { font-size: var(--text-lg);  }
}

@media (min-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
}

p {
  color: var(--text-secondary);
  line-height: 1.78;
  max-width: 68ch;
}

p + p { margin-top: var(--sp-4); }

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--link-hover); }

strong, b {
  font-weight: 700;
  color: var(--text-primary);
}

em, i { font-style: italic; }

small {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

ul, ol {
  padding-left: var(--sp-6);
  color: var(--text-secondary);
}

li { line-height: 1.78; }
li + li { margin-top: var(--sp-1); }

blockquote {
  border-left: 3px solid var(--color-blue-light);
  padding: var(--sp-4) var(--sp-6);
  background: var(--bg-raised);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: var(--sp-8) 0;
  font-style: italic;
  color: var(--text-secondary);
}

blockquote p { max-width: none; }

hr {
  border: none;
  border-top: 1px solid var(--bg-border);
  margin: var(--sp-12) 0;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-card);
  color: var(--color-blue-light);
  padding: 0.15em 0.45em;
  border-radius: var(--r-sm);
  border: 1px solid var(--bg-border);
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  overflow-x: auto;
  margin: var(--sp-8) 0;
  tab-size: 2;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-8) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

th, td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--bg-border);
}

th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-raised);
}

tr:hover td { background: rgba(255,255,255,0.02); }


/* ── 6. Layout utilities ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

@media (min-width: 768px)  { .container { padding: 0 var(--sp-8);  } }
@media (min-width: 1280px) { .container { padding: 0 var(--sp-12); } }

.content-width {
  max-width: var(--content-max);
  margin: 0 auto;
}

.site-main {
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-24);
}

/* Two-column grid helper */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Three-column grid helper */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 640px)  { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }


/* ── 7. Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(19, 21, 41, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bg-border);
}

.site-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  position: relative;
}


/* ── 8. Logo ─────────────────────────────────────────────────── */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  user-select: none;
}

.logo-core { color: var(--color-white); }

.logo-x {
  background: var(--gradient-logo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── 9. Navigation ───────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--sp-1);
}

.nav-links a {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  color: var(--color-yellow);
}

/* ── Hamburger button ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  padding: var(--sp-2);
  flex-shrink: 0;
  transition: background var(--transition);
}

.nav-toggle:hover { background: rgba(255, 255, 255, 0.06); }

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform  250ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity    150ms ease,
    width      250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hamburger → ✕ animation */
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg);  }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; width: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile ── */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: calc(var(--header-h) - 1px);
    left: calc(-1 * var(--sp-6));
    right: calc(-1 * var(--sp-6));
    flex-direction: column;
    align-items: stretch;
    background: rgba(15, 17, 32, 0.98);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--bg-border);
    padding: var(--sp-3) var(--sp-4) var(--sp-5);
    gap: var(--sp-1);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity   200ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--text-base);
    border-radius: var(--r-md);
  }
}


/* ── 10. Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-raised);
  border-top: 1px solid var(--bg-border);
  padding: var(--sp-12) 0 var(--sp-8);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.footer-brand .logo { margin-bottom: var(--sp-3); }

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 28ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-start;
}

@media (min-width: 640px) {
  .footer-links { align-items: flex-end; }
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-links svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.footer-bottom {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}


/* ── 11. Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform     150ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow    150ms cubic-bezier(0.16, 1, 0.3, 1),
    background    150ms ease,
    border-color  150ms ease;
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-yellow);
  color: var(--color-dark);
}

.btn-primary:hover {
  color: var(--color-dark);
  box-shadow: 0 6px 24px rgba(253, 217, 88, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--bg-border);
}

.btn-secondary:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--color-blue-light);
  border-radius: 0;
  padding: 0;
  letter-spacing: 0;
  text-transform: none;
  font-size: var(--text-base);
  font-weight: 500;
  gap: var(--sp-1);
}

.btn-ghost:hover {
  color: var(--color-white);
  transform: none;
}

.btn-lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--text-base);
}


/* ── 12. Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-card);
  transition:
    border-color var(--transition),
    transform    var(--transition),
    box-shadow   var(--transition);
}

.card:hover {
  border-color: rgba(53, 167, 223, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}


/* ── 13. Gradient helpers ────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-logo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-bar {
  height: 3px;
  background: var(--gradient-brand);
  border-radius: var(--r-full);
}

.gradient-border {
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-brand);
  z-index: -1;
}


/* ── 14. Accessibility ───────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}


/* ── 15. Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:       0.01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:      0.01ms !important;
    scroll-behavior:          auto   !important;
  }
}


/* ================================================================
   Stage 4 — Page Templates
   ================================================================ */


/* ── 16. Page header (shared) ────────────────────────────────── */
.page-header {
  padding: var(--sp-16) 0 var(--sp-12);
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: var(--sp-12);
}

.page-header h1 { margin-bottom: var(--sp-3); }

.page-header-desc {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0;
  line-height: 1.6;
}


/* ── 17. Hero (home page) ────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(92dvh - var(--header-h));
  display: flex;
  align-items: center;
  /* Pull up against header — site-main has padding-top:sp-16 */
  margin-top: calc(-1 * var(--sp-16));
  padding: calc(var(--sp-24) + var(--sp-16)) 0 var(--sp-24);
}

/* Gradient glow — top-left bloom */
.hero::before {
  content: '';
  position: absolute;
  top: -15%;
  left: -5%;
  width: 65%;
  height: 130%;
  background: radial-gradient(
    ellipse at 30% 40%,
    rgba(26, 72, 151, 0.28) 0%,
    rgba(159, 63, 144, 0.14) 45%,
    transparent 70%
  );
  pointer-events: none;
}

/* Dot grid texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-body {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-headline {
  font-size: clamp(2rem, 5.5vw, var(--text-4xl));
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin-bottom: var(--sp-6);
  color: var(--text-primary);
}

.hero-sub {
  font-size: clamp(var(--text-base), 2vw, var(--text-md));
  color: var(--text-secondary);
  max-width: 54ch;
  margin: 0 0 var(--sp-8);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  align-items: center;
}


/* ── 18. Home — service highlights ──────────────────────────── */
.section-highlights {
  background: var(--bg-raised);
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
  padding: var(--sp-16) 0;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.highlight-title {
  font-size: var(--text-md);
  margin: var(--sp-4) 0 var(--sp-2);
}

.highlight-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: none;
  line-height: 1.65;
  margin: 0;
}

.highlights-cta {
  margin-top: var(--sp-10);
  text-align: center;
}


/* ── 19. Home — personality blurb ────────────────────────────── */
.section-blurb {
  padding: var(--sp-20) 0;
}

.blurb-inner {
  max-width: 640px;
}

.blurb-quote {
  font-size: clamp(var(--text-md), 2.5vw, var(--text-lg));
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  max-width: none;
  margin-bottom: var(--sp-8);
}

.blurb-quote::before { content: '\201C'; color: var(--color-yellow); }
.blurb-quote::after  { content: '\201D'; color: var(--color-yellow); }

.blurb-cta {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  flex-wrap: wrap;
}


/* ── 20. Service icons ───────────────────────────────────────── */
.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(53, 167, 223, 0.08);
  border: 1px solid rgba(53, 167, 223, 0.18);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue-light);
  flex-shrink: 0;
}

.service-icon svg {
  width: 22px;
  height: 22px;
}


/* ── 21. Services list page ──────────────────────────────────── */
.services-grid {
  padding-bottom: var(--sp-16);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.service-title {
  font-size: var(--text-lg);
  margin: var(--sp-4) 0 var(--sp-3);
}

.service-desc p {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: none;
}

.service-desc p + p { margin-top: var(--sp-3); }

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-10);
  margin-bottom: var(--sp-16);
}

.cta-banner h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--sp-2);
}

.cta-banner p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  max-width: none;
  margin: 0;
}

@media (max-width: 639px) {
  .cta-banner { flex-direction: column; align-items: flex-start; }
}


/* ── 22. About page ──────────────────────────────────────────── */
.about-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  padding: var(--sp-12) 0 var(--sp-10);
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: var(--sp-10);
}

@media (min-width: 640px) {
  .about-header {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--sp-10);
  }
}

.about-photo {
  width: 140px;
  height: 140px;
  border-radius: var(--r-full);
  overflow: hidden;
  border: 3px solid var(--bg-border);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .about-photo { width: 160px; height: 160px; }
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.about-intro h1 { margin-bottom: var(--sp-2); }

.about-tagline {
  font-size: var(--text-md);
  color: var(--color-blue-light);
  margin: 0;
  max-width: none;
  line-height: 1.4;
}

.about-content { padding-bottom: var(--sp-8); }

.about-content h2 {
  font-size: var(--text-lg);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--bg-border);
}


/* ── 23. CV page ─────────────────────────────────────────────── */
.cv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding: var(--sp-12) 0 var(--sp-8);
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: var(--sp-8);
}

.cv-content h2 {
  font-size: var(--text-lg);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--bg-border);
  color: var(--color-blue-light);
}

.cv-content h3 {
  font-size: var(--text-md);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-1);
}

.cv-content h3 + em {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: normal;
  margin-bottom: var(--sp-4);
}

.cv-content ul {
  margin-bottom: var(--sp-2);
}

.cv-content p { max-width: none; }

.cv-content strong { color: var(--text-secondary); }


/* ── 24. Blog ────────────────────────────────────────────────── */
/* Blog list */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-list-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
  padding: var(--sp-8) 0;
  border-bottom: 1px solid var(--bg-border);
  transition: border-color var(--transition);
}

.blog-list-item:first-child { border-top: 1px solid var(--bg-border); }

.blog-list-item:hover { border-bottom-color: rgba(53,167,223,0.3); }

.blog-item-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.blog-item-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.blog-item-tag {
  font-size: var(--text-xs);
  background: rgba(53,167,223,0.1);
  color: var(--color-blue-light);
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.blog-item-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
}

.blog-item-title a {
  color: var(--text-primary);
  transition: color var(--transition);
}

.blog-item-title a:hover { color: var(--color-blue-light); }

.blog-item-desc {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
  max-width: 68ch;
  margin: 0;
}

/* Blog single */
.article-header {
  padding-bottom: var(--sp-8);
  margin-bottom: var(--sp-10);
  border-bottom: 1px solid var(--bg-border);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.article-date {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.article-tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.article-tag {
  font-size: var(--text-xs);
  background: rgba(53,167,223,0.1);
  color: var(--color-blue-light);
  padding: 2px 10px;
  border-radius: var(--r-full);
  border: 1px solid rgba(53,167,223,0.2);
}

.article-title {
  font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-4);
}

.article-desc {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.6;
  margin: 0;
}

.article-body { padding-bottom: var(--sp-8); }

.article-body h2 {
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-4);
  padding-top: var(--sp-4);
}

.article-body h3 {
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.article-body p { max-width: none; }
.article-body ul, .article-body ol { margin: var(--sp-4) 0; }

.article-footer {
  padding-top: var(--sp-8);
  border-top: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.article-footer-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Reading progress estimate */
.read-time {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding-left: var(--sp-4);
  border-left: 1px solid var(--bg-border);
}


/* ── 25. Talks ───────────────────────────────────────────────── */
/* Talks list */
.talks-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.talk-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}

.talk-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.talk-card-title a {
  color: var(--text-primary);
  transition: color var(--transition);
}

.talk-card-title a:hover { color: var(--color-blue-light); }

.talk-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.talk-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.venue-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--bg-border);
  padding: 2px 10px;
  border-radius: var(--r-full);
}

.venue-chip.has-video {
  color: var(--color-blue-light);
  border-color: rgba(53,167,223,0.25);
  background: rgba(53,167,223,0.06);
}

.talk-card-desc {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
  max-width: 68ch;
  margin: 0;
}

/* Talks single */
.talk-header {
  padding-bottom: var(--sp-8);
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--bg-border);
}

.talk-title {
  font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
  letter-spacing: -0.03em;
  margin: var(--sp-4) 0 var(--sp-4);
}

.talk-desc {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 60ch;
  line-height: 1.65;
  margin: 0;
}

.talk-venues {
  margin-top: var(--sp-8);
}

.talk-venues h2 {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

.venue-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.venue-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.venue-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
}

.venue-city {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.venue-watch {
  margin-left: auto;
}

.talk-slides {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--bg-border);
}

.talk-body { margin-top: var(--sp-8); }

.talk-body p { max-width: none; }

/* Responsive YouTube embed */
.video-embed {
  margin: var(--sp-8) 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}


/* ── 26. Contact form ─────────────────────────────────────────── */
.contact-form {
  margin-top: var(--sp-10);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  max-width: 540px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field textarea {
  background: var(--bg-raised);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-blue-light);
  box-shadow: 0 0 0 3px rgba(53,167,223,0.15);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.65;
}

.form-status {
  font-size: var(--text-sm);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(53,167,223,0.1);
  border: 1px solid rgba(53,167,223,0.25);
  color: var(--color-blue-light);
}

.form-status.error {
  display: block;
  background: rgba(220,34,23,0.1);
  border: 1px solid rgba(220,34,23,0.25);
  color: var(--color-red);
}


/* ── 27. 404 page ─────────────────────────────────────────────── */
.error-404 {
  min-height: calc(80dvh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-code {
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--gradient-logo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: var(--sp-4);
}

.error-heading {
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-3);
}

.error-body {
  color: var(--text-muted);
  margin-bottom: var(--sp-8);
}
