/* ============================================================
   Fabian Ackeret — personal brand
   Minimal editorial layout · dark & light themes
   ============================================================ */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

/* ---------- Theme tokens ---------- */
:root {
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0b0f;
  --bg-elev: #131318;
  --bg-elev-2: #1a1a21;
  --ink: #f2f2f5;
  --muted: #9b9ba6;
  --line: rgba(242, 242, 245, 0.12);
  --accent: #8ab4ff;
  --accent-strong: #5b8cff;
  --accent-ink: #0b0b0f;
  --glow: rgba(91, 140, 255, 0.16);
  --scrim: rgba(11, 11, 15, 0);
  --scrim-solid: rgba(11, 11, 15, 0.55);
  --header-bg: rgba(11, 11, 15, 0.72);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f3ef;
  --bg-elev: #fbfaf7;
  --bg-elev-2: #ffffff;
  --ink: #15151a;
  --muted: #5d5d68;
  --line: rgba(21, 21, 26, 0.13);
  --accent: #2451e6;
  --accent-strong: #2451e6;
  --accent-ink: #ffffff;
  --glow: rgba(36, 81, 230, 0.1);
  --scrim: rgba(244, 243, 239, 0);
  --scrim-solid: rgba(244, 243, 239, 0.5);
  --header-bg: rgba(244, 243, 239, 0.78);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  transition: background-color 0.5s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

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

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 150;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.35s var(--ease-out), background-color 0.3s ease,
              color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.btn svg { transition: transform 0.35s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--ink); color: var(--bg);
  box-shadow: 0 0 0 0 var(--glow);
}
.btn--primary:hover {
  background: var(--accent-strong); color: var(--accent-ink);
  box-shadow: 0 10px 40px var(--glow);
}

.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 1rem;
}

.nav__brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-display); font-weight: 600;
}
.nav__portrait {
  appearance: none; -webkit-appearance: none; display: block;
  box-sizing: border-box; width: 36px; height: 36px; min-width: 36px;
  margin: 0; padding: 0; border: 0; border-radius: 10px;
  overflow: hidden; background: transparent; cursor: zoom-in; flex: 0 0 36px;
  box-shadow: none;
  transition: transform 0.25s var(--ease-out);
}
.nav__portrait:hover { transform: scale(1.04); }
.nav__portrait:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nav__portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nav__brand .nav__name,
.nav__brand .nav__name:link,
.nav__brand .nav__name:visited,
.nav__brand .nav__name:hover,
.nav__brand .nav__name:active {
  font-size: 0.95rem; letter-spacing: 0.01em; text-decoration: none;
}

.portrait-dialog {
  width: min(88vw, 760px); max-height: 88vh; padding: 0; border: 1px solid var(--line);
  border-radius: 22px; overflow: visible; background: var(--bg); color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}
.portrait-dialog[open] { display: block; }
.portrait-dialog::backdrop { background: rgba(4, 5, 8, 0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.portrait-dialog img { display: block; width: 100%; height: auto; max-height: 88vh; object-fit: contain; border-radius: 21px; }
.portrait-dialog__close {
  position: absolute; top: -14px; right: -14px; z-index: 1; display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0 0 3px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--bg); color: var(--ink); font: 300 1.65rem/1 var(--font-body); cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}
.portrait-dialog__close:hover { transform: rotate(8deg) scale(1.05); }
.portrait-dialog__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.nav__links { display: flex; gap: 2.2rem; }
.nav__link {
  position: relative; text-decoration: none; font-size: 0.92rem; font-weight: 500;
  color: var(--muted); transition: color 0.25s ease; padding-block: 0.3rem;
}
.nav__link [data-nav-index] {
  font-size: 0.6rem; vertical-align: super; margin-right: 0.3rem; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--ink); transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__actions { display: flex; align-items: center; gap: 0.8rem; }

/* Theme toggle — sun/moon morph */
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--ink); cursor: pointer;
  transition: border-color 0.3s ease, transform 0.4s var(--ease-out), background-color 0.3s ease;
}
.theme-toggle:hover { border-color: var(--ink); transform: rotate(25deg); }
.theme-toggle__icon { overflow: visible; }
.theme-toggle__sun { fill: currentColor; transition: transform 0.45s var(--ease-out); transform-origin: center; }
.theme-toggle__rays { stroke: currentColor; stroke-width: 1.6; transition: opacity 0.3s ease, transform 0.45s var(--ease-out); transform-origin: center; }
.theme-toggle__moon { fill: currentColor; transition: opacity 0.3s ease, transform 0.45s var(--ease-out); transform-origin: center; }

:root[data-theme='dark'] .theme-toggle__sun { transform: scale(0); }
:root[data-theme='dark'] .theme-toggle__rays { opacity: 0; transform: scale(0.4); }
:root[data-theme='dark'] .theme-toggle__moon { opacity: 1; transform: scale(1); }
:root[data-theme='light'] .theme-toggle__sun { transform: scale(1); }
:root[data-theme='light'] .theme-toggle__rays { opacity: 1; transform: scale(1); }
:root[data-theme='light'] .theme-toggle__moon { opacity: 0; transform: scale(0.4) rotate(-40deg); }

/* Burger */
.nav__burger {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer; align-items: center;
}
.nav__burger span {
  display: block; width: 16px; height: 1.6px; background: var(--ink);
  transition: transform 0.35s var(--ease-out);
}
.nav__burger.is-open span:first-child { transform: translateY(3.8px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translateY(-3.8px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 3rem;
  padding: var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__nav { display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-menu__link {
  font-family: var(--font-display); font-size: clamp(2.4rem, 10vw, 4rem); font-weight: 600;
  text-decoration: none; padding-block: 0.4rem; border-bottom: 1px solid var(--line);
}
.mobile-menu__link span { font-size: 0.9rem; color: var(--accent); margin-right: 1rem; vertical-align: super; }
.mobile-menu__foot { color: var(--muted); font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-block: clamp(6rem, 12vh, 9rem) clamp(3rem, 8vh, 5rem);
  overflow: clip;
}

.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}

.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--scrim) 30%, var(--scrim-solid) 100%);
  transition: background 0.5s ease;
}

.hero__content { position: relative; z-index: 2; }

.hero__eyebrow {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: clamp(0.72rem, 1.6vw, 0.85rem); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  margin-bottom: clamp(1rem, 3vh, 2rem);
}
.hero__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px var(--accent); flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

.hero__title {
  font-size: clamp(3.4rem, 14.5vw, 11rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 0.95;
  text-transform: uppercase;
}
.hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero__line-inner { display: inline-block; will-change: transform; }
.hero__line--accent .hero__line-inner {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
.hero__line-inner .char { display: inline-block; will-change: transform; }

.hero__row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2.5rem; margin-top: clamp(2rem, 5vh, 3.5rem); flex-wrap: wrap;
}
.hero__sub { max-width: 34rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.hero__sub-link {
  color: var(--ink); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--accent); transition: color 0.25s ease;
}
.hero__sub-link:hover { color: var(--accent); }
.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(3rem, 8vh, 5rem); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
}
.hero__scroll-line {
  width: 1px; height: 56px; background: var(--line); position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ''; position: absolute; inset: 0; background: var(--accent);
  animation: scroll-line 2s var(--ease-out) infinite;
}
@keyframes scroll-line {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
.hero__scroll-label {
  writing-mode: vertical-rl; font-size: 0.68rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line); padding-block: 1.1rem;
  overflow: hidden; white-space: nowrap;
  background: var(--bg-elev);
  transition: background-color 0.5s ease;
}
.marquee__skew { will-change: transform; }
.marquee__track {
  display: inline-flex; align-items: center; gap: 2.6rem; width: max-content;
  animation: marquee 30s linear infinite;
  font-family: var(--font-display); font-size: 1rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.marquee__track i { color: var(--accent); font-style: normal; font-size: 0.8rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(5rem, 14vh, 9rem); }

.section__head {
  display: flex; align-items: baseline; gap: 1.4rem;
  margin-bottom: clamp(2.5rem, 7vh, 4.5rem);
  border-bottom: 1px solid var(--line); padding-bottom: 1.2rem;
}
.section__index {
  font-family: var(--font-display); font-size: 0.85rem; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.section__title {
  font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.02em; font-weight: 600;
}

/* ---------- About ---------- */
.about__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5rem); align-items: start;
}

.about__lead {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.25; font-weight: 500;
  letter-spacing: -0.01em; margin-bottom: 1.6rem;
}
.about__lead em { font-style: normal; color: var(--accent); }
.about__body { color: var(--muted); margin-bottom: 2.2rem; max-width: 36rem; }
.about__body a, .card__text a {
  color: var(--ink); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px;
  transition: color 0.25s ease;
}
.about__body a:hover, .card__text a:hover { color: var(--accent); }
.word { will-change: opacity; }

.about__link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--ink); padding-bottom: 0.25rem;
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.3s var(--ease-out);
}
.about__link:hover { color: var(--accent); border-color: var(--accent); gap: 0.8rem; }

.about__courses { margin-top: 3rem; }
.about__courses-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.9rem;
}
.course {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.95rem 0.2rem; border-top: 1px solid var(--line);
  text-decoration: none; font-family: var(--font-display); font-weight: 500;
  font-size: 0.98rem; color: var(--ink);
  transition: color 0.25s ease, padding-left 0.3s var(--ease-out);
}
.course:last-child { border-bottom: 1px solid var(--line); }
.course:hover { color: var(--accent); padding-left: 0.6rem; }
.course svg { margin-left: auto; flex-shrink: 0; color: var(--muted); transition: color 0.25s ease; }
.course:hover svg { color: var(--accent); }
.course__badge {
  flex-shrink: 0; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 0.22rem 0.6rem;
}
.course__title { line-height: 1.3; }

.about__cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem;
}

.card {
  position: relative; padding: 1.7rem 1.6rem 1.9rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev);
  transition: transform 0.45s var(--ease-out), border-color 0.3s ease,
              background-color 0.5s ease, box-shadow 0.45s var(--ease-out);
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 65%);
  transition: opacity 0.4s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 18px 50px -18px var(--glow); }
.card:hover::before { opacity: 1; }

.card__num {
  font-family: var(--font-display); font-size: 0.75rem; color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px;
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  margin-bottom: 1.4rem;
}
.card__title { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card__text { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---------- Blog ---------- */
.blog__filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.6rem; }

.chip {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 500;
  padding: 0.5rem 1.1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip__count { font-size: 0.7rem; opacity: 0.65; margin-left: 0.35rem; }

.blog__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem;
}

.post {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 1.1rem;
  padding: 1.7rem 1.6rem; min-height: 240px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev); text-decoration: none;
  transition: transform 0.45s var(--ease-out), border-color 0.3s ease,
              background-color 0.5s ease, box-shadow 0.45s var(--ease-out);
}
.post::before {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 65%);
  transition: opacity 0.4s ease;
}
.post:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 18px 50px -18px var(--glow); }
.post:hover::before { opacity: 1; }

.post__meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.post__category {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}
.post__date { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.post__title { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.post__excerpt { color: var(--muted); font-size: 0.92rem; line-height: 1.55; flex-grow: 1; }
.post__foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 1rem;
}
.post__read {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-display); font-weight: 500; color: var(--ink);
  transition: color 0.25s ease, gap 0.3s var(--ease-out);
}
.post:hover .post__read { color: var(--accent); gap: 0.7rem; }

.blog__empty { color: var(--muted); padding-block: 2rem; }

/* ---------- Contact ---------- */
.contact__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5rem); align-items: start;
}

.contact__lead {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.8vw, 1.8rem); line-height: 1.3; font-weight: 500;
  margin-bottom: 1.8rem;
}
.contact__linkedin {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1rem, 2.4vw, 1.15rem); color: var(--accent); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 0.2rem; margin-bottom: 2.4rem;
  transition: gap 0.3s var(--ease-out), opacity 0.25s ease;
}
.contact__linkedin:hover { opacity: 0.75; gap: 0.8rem; }

.contact__meta { display: flex; flex-direction: column; gap: 0.7rem; }
.contact__meta li {
  display: flex; gap: 1rem; font-size: 0.9rem;
  border-top: 1px solid var(--line); padding-top: 0.7rem;
}
.contact__meta span {
  width: 92px; flex-shrink: 0; color: var(--muted);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 0.15em;
}

.contact__form {
  display: flex; flex-direction: column; gap: 1.2rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev);
  transition: background-color 0.5s ease;
}

.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field__label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.field__input {
  font: inherit; color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field__input::placeholder { color: var(--muted); opacity: 0.7; }
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.field__input--area { resize: vertical; min-height: 120px; }
.field__input.is-invalid { border-color: #e5484d; }

.contact__submit { align-self: flex-start; }
.contact__status { font-size: 0.88rem; color: var(--muted); min-height: 1.4em; }
.contact__status.is-success { color: #3dba6f; }
.contact__status.is-error { color: #e5484d; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); overflow: hidden; }

.footer__giant {
  font-family: var(--font-display); font-weight: 600; text-align: center;
  font-size: clamp(3rem, 12.5vw, 11rem); letter-spacing: -0.02em; line-height: 1;
  padding-block: clamp(2rem, 6vh, 4rem) 0;
  color: transparent; -webkit-text-stroke: 1px var(--line);
  user-select: none; white-space: nowrap;
  transition: -webkit-text-stroke-color 0.4s ease;
}
.footer__giant .char { display: inline-block; will-change: transform; }
.footer:hover .footer__giant { -webkit-text-stroke-color: var(--accent); }

.footer__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap; padding-block: 1.6rem;
  font-size: 0.85rem; color: var(--muted);
}
.footer__social { display: flex; gap: 1.6rem; }
.footer__social a, .footer__top {
  color: var(--muted); text-decoration: none; transition: color 0.25s ease;
}
.footer__social a:hover, .footer__top:hover { color: var(--ink); }

/* ---------- Article page ---------- */
.article-page { padding-top: clamp(6rem, 14vh, 9rem); }

.article { max-width: 760px; padding-bottom: clamp(4rem, 10vh, 7rem); }

.article__back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem;
  color: var(--muted); text-decoration: none; margin-bottom: 2.5rem;
  transition: color 0.25s ease, gap 0.3s var(--ease-out);
}
.article__back:hover { color: var(--accent); gap: 0.8rem; }

.article__head { margin-bottom: clamp(2rem, 5vh, 3rem); border-bottom: 1px solid var(--line); padding-bottom: 2rem; }

.article__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 1.2rem;
  font-variant-numeric: tabular-nums;
}
.article__category {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}

.article__title {
  font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -0.02em; line-height: 1.1;
}

.article__body { font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.article__body p { margin-bottom: 1.4rem; color: var(--muted); }
.article__body h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2.8rem 0 1rem; letter-spacing: -0.01em;
}
.article__body h3 { font-size: 1.15rem; margin: 2.2rem 0 0.8rem; }
.article__body a {
  color: var(--ink); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px;
  transition: color 0.25s ease;
}
.article__body a:hover { color: var(--accent); }
.article__body strong { color: var(--ink); }
.article__body ul, .article__body ol { margin: 0 0 1.4rem; padding-left: 1.3rem; color: var(--muted); }
.article__body ul { list-style: disc; }
.article__body ol { list-style: decimal; }
.article__body li { margin-bottom: 0.5rem; }
.article__body li::marker { color: var(--accent); }
.article__body blockquote {
  margin: 2rem 0; padding: 0.4rem 0 0.4rem 1.4rem;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display); font-size: 1.2rem; line-height: 1.5; color: var(--ink);
}
.article__body blockquote p { color: var(--ink); margin-bottom: 0; }
.article__body code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em; background: var(--bg-elev-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.4em;
}
.article__body pre {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.2rem 1.4rem; overflow-x: auto; margin: 0 0 1.4rem;
}
.article__body pre code { background: none; border: none; padding: 0; font-size: 0.85rem; line-height: 1.6; }
.article__body table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: 0.92rem; }
.article__body th, .article__body td {
  text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line);
}
.article__body th { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.article__body td { color: var(--muted); }
.article__body img { max-width: 100%; height: auto; border-radius: 12px; margin: 0 0 1.4rem; }
.article__body hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.article__foot { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 2rem; }

/* ---------- Custom cursor ---------- */
.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 300; }
  .cursor__dot {
    position: absolute; top: 0; left: 0; border-radius: 50%;
    width: 7px; height: 7px; background: var(--accent); opacity: 0.55;
  }
  .cursor__dot::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: inherit;
    transition: transform 0.35s var(--ease-out), opacity 0.35s ease;
  }
  .cursor.is-hover .cursor__dot::after { transform: scale(3.2); opacity: 0.35; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__name { display: none; }
  .blog__grid { grid-template-columns: 1fr; }
  .about__cards { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .hero__row { margin-top: 1.8rem; }
}

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