/* ============================================================
   Tokens
   Mood: a developer debugging alone at 2am - one red status
   light on dark glass. Confident, a little dangerous. Not the
   Matrix-green cliché.
   Strategy: full palette - red (primary) + amber (accent) on a
   true near-black/white surface. Dark is the default voice;
   light is a genuine second mode, not an afterthought.
   ============================================================ */

:root {
  /* dark (default) */
  --bg: oklch(0.09 0 0);
  --surface: oklch(0.16 0.012 25);
  --surface-2: oklch(0.21 0.014 25);
  --ink: oklch(0.93 0.01 25);
  --muted: oklch(0.64 0.02 25);
  --border: oklch(0.28 0.014 25);
  --border-interactive: oklch(0.5 0.02 25);
  --primary: oklch(0.64 0.19 25);
  --primary-button: oklch(0.55 0.19 25);
  --primary-ink: oklch(0.99 0 0);
  --accent: oklch(0.78 0.14 85);
  --accent-ink: oklch(0.99 0 0);
  --focus-ring: oklch(0.78 0.14 85);

  --font-display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --max-width: 46rem;
  --radius: 6px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: oklch(1 0 0);
    --surface: oklch(0.97 0.008 25);
    --surface-2: oklch(0.94 0.01 25);
    --ink: oklch(0.19 0.012 25);
    --muted: oklch(0.44 0.02 25);
    --border: oklch(0.87 0.012 25);
    --border-interactive: oklch(0.65 0.02 25);
    --primary: oklch(0.5 0.19 25);
    --primary-button: oklch(0.5 0.19 25);
    --primary-ink: oklch(0.99 0 0);
    --accent: oklch(0.46 0.13 85);
    --accent-ink: oklch(0.99 0 0);
    --focus-ring: oklch(0.5 0.19 25);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: oklch(1 0 0);
  --surface: oklch(0.97 0.008 25);
  --surface-2: oklch(0.94 0.01 25);
  --ink: oklch(0.19 0.012 25);
  --muted: oklch(0.44 0.02 25);
  --border: oklch(0.87 0.012 25);
  --border-interactive: oklch(0.65 0.02 25);
  --primary: oklch(0.5 0.19 25);
  --primary-button: oklch(0.5 0.19 25);
  --primary-ink: oklch(0.99 0 0);
  --accent: oklch(0.46 0.13 85);
  --accent-ink: oklch(0.99 0 0);
  --focus-ring: oklch(0.5 0.19 25);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: oklch(0.09 0 0);
  --surface: oklch(0.16 0.012 25);
  --surface-2: oklch(0.21 0.014 25);
  --ink: oklch(0.93 0.01 25);
  --muted: oklch(0.64 0.02 25);
  --border: oklch(0.28 0.014 25);
  --border-interactive: oklch(0.5 0.02 25);
  --primary: oklch(0.64 0.19 25);
  --primary-button: oklch(0.55 0.19 25);
  --primary-ink: oklch(0.99 0 0);
  --accent: oklch(0.78 0.14 85);
  --accent-ink: oklch(0.99 0 0);
  --focus-ring: oklch(0.78 0.14 85);
  color-scheme: dark;
}

/* ============================================================
   Reset & base
   ============================================================ */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  transition: background-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

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

::selection { background: var(--primary); color: var(--primary-ink); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s var(--ease-out-expo);
}

.skip-link:focus { top: 1rem; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-weight: 800;
}

p { text-wrap: pretty; }

h1 { font-size: clamp(2.25rem, 4.5vw + 1rem, 3.75rem); }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.75rem, 2.25rem); margin-top: 0; }
h3 { font-size: clamp(1.15rem, 1.2vw + 0.75rem, 1.4rem); }

p, li { max-width: 68ch; }

a { color: var(--primary); }

/* ============================================================
   Layout shell
   ============================================================ */

.site-header, main, .site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.site-header__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.85rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav a:not(.lang-switch)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out-expo);
}

.site-nav a:not(.lang-switch):hover::after,
.site-nav a:not(.lang-switch)[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav a:hover, .site-header__name:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); }

.site-nav a.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--border-interactive);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border-interactive);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out-expo), transform 0.2s var(--ease-out-expo);
}

.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle:active { transform: scale(0.92); }

.theme-toggle__icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.theme-toggle__icon--moon { display: none; }
:root[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle__icon--moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle__icon--sun { display: none; }
  :root:not([data-theme]) .theme-toggle__icon--moon { display: block; }
}

section { margin: 3.5rem 0; }

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4rem;
}

.site-footer__links a {
  color: var(--muted);
  margin-left: 1.25rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.site-footer__links a:hover { color: var(--primary); }

.icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  animation: hero-in 0.6s var(--ease-out-expo) both;
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.hero__identity h1 { margin: 0; }

@media (max-width: 30rem) {
  .hero__identity {
    flex-direction: column;
    align-items: flex-start;
  }
}

.hero__photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.hero__tagline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2vw + 1.1rem, 2.1rem);
  letter-spacing: -0.02em;
  color: var(--primary);
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.hero__talents {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: -0.01em;
}

.training-stats {
  font-family: var(--font-mono);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.training-topics {
  margin: 0.5rem 0 1.5rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.training-topics li {
  padding-left: 1.25rem;
  position: relative;
}

.training-topics li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   Buttons / CTAs
   ============================================================ */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.cta::after {
  content: "→";
  transition: transform 0.2s var(--ease-out-expo);
}

.cta:hover::after { transform: translateX(3px); }

.cta--button {
  background: var(--primary-button);
  color: var(--primary-ink);
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
}

.cta--button:hover { background: color-mix(in oklch, var(--primary-button) 85%, black); }
.cta--button::after { content: "→"; }

/* ============================================================
   Teaser cards (home)
   ============================================================ */

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem 2.5rem;
}

.teaser {
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}

.teaser__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

/* ============================================================
   Testimonials
   ============================================================ */

.testimonial {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 2px solid var(--border);
}

.testimonial:first-of-type { margin-top: 0; }

.testimonial p {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1vw + 0.85rem, 1.25rem);
  font-weight: 500;
  line-height: 1.4;
}

.testimonial__name {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.2vw + 0.9rem, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
  border-left: none;
  padding: 0;
  color: var(--ink);
}

.pull-quote__mark { color: var(--accent); }

/* ============================================================
   Blog list
   ============================================================ */

.blog-list__item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.blog-list__item:last-child { border-bottom: none; }

.blog-list__item h2 { margin-bottom: 0.35rem; }
.blog-list__item h2 a { text-decoration: none; color: var(--ink); }
.blog-list__item h2 a:hover { color: var(--primary); }

.blog-list__date {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.85rem;
}

.blog-empty { color: var(--muted); }

/* ============================================================
   Article / prose (blog posts)
   ============================================================ */

article { max-width: 68ch; }

article a { color: var(--primary); text-decoration: underline; text-decoration-color: color-mix(in oklch, var(--primary) 45%, transparent); text-underline-offset: 2px; }
article a:hover { text-decoration-color: var(--primary); }

article img {
  border-radius: var(--radius);
  margin: 1.75rem 0;
  border: 1px solid var(--border);
}

article blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--muted);
  font-style: italic;
}

article code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

article pre {
  background: var(--surface);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
}

article pre code { background: none; padding: 0; }

article hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ============================================================
   Contact page
   ============================================================ */

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.contact-links a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border: 1px solid var(--border-interactive);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo);
}

.contact-links a:hover { border-color: var(--primary); color: var(--primary); }
