/* ==========================================================================
   Stanislav Filev — Portfolio v3
   Swiss editorial / brutalist system
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --ink-2: #141414;
  --bone: #f3f1ea;
  --bone-2: #e9e5d8;
  --muted-on-dark: #9a9890;
  --muted-on-light: #5f5e56;
  --accent: #e8392b;
  --accent-ink: #ffffff;
  --line-on-dark: rgba(243, 241, 234, 0.14);
  --line-on-dark-soft: rgba(243, 241, 234, 0.07);
  --line-on-light: rgba(10, 10, 10, 0.12);
  --line-on-light-soft: rgba(10, 10, 10, 0.06);

  /* Semantic surface tokens — what a "dark chrome" element (header, hero,
     projects, contact, nav, footer) actually resolves to. Dark by default;
     the light-theme toggle below redefines these, not --ink/--bone
     themselves, so the already-light About/Skills sections are untouched. */
  --surface-bg: var(--ink);
  --surface-bg-2: var(--ink-2);
  --surface-ink: var(--bone);
  --surface-muted: var(--muted-on-dark);
  --surface-line: var(--line-on-dark);
  --surface-line-soft: var(--line-on-dark-soft);
  --surface-scrim: rgba(10, 10, 10, 0.86);

  --font-display: "Bebas Neue", "Archivo Black", Impact, sans-serif;
  --font-sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --container: 1320px;
  --gutter: 32px;
  --header-h: 84px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Light theme ------------------------------------------------------
   Default for new visitors; dark is the opt-in alternative via the header
   toggle (cookie-persisted). This flips only the "dark chrome" surfaces —
   the About/Skills sections are already light and stay exactly as they are. */

[data-theme="light"] {
  --surface-bg: var(--bone);
  --surface-bg-2: var(--bone-2);
  --surface-ink: var(--ink);
  --surface-muted: var(--muted-on-light);
  --surface-line: var(--line-on-light);
  --surface-line-soft: var(--line-on-light-soft);
  --surface-scrim: rgba(243, 241, 234, 0.86);
}

/* ---- Reset ---------------------------------------------------------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
p { margin: 0; }

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

/* ---- Grid guides + grain (fixed, page-wide) --------------------------- */

.grid-guides {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.grid-guides span { border-left: 1px solid var(--surface-line-soft); height: 100%; }
.grid-guides span:last-child { border-right: 1px solid var(--surface-line-soft); }
section.is-light ~ .grid-guides,
body.nav-open .grid-guides { display: none; }

.grain {
  position: fixed;
  inset: -200px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Layout helpers --------------------------------------------------- */

.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); position: relative; z-index: 3; }

section { scroll-margin-top: var(--header-h); position: relative; z-index: 3; }
.is-dark { background: var(--surface-bg); color: var(--surface-ink); }
.is-light { background: var(--bone); color: var(--ink); }

.index-mark {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.index-mark::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.5; }
.is-dark .index-mark { color: var(--surface-muted); }
.is-light .index-mark { color: var(--muted-on-light); }

/* ---- Reveal-on-scroll --------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- Header ------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  color: var(--surface-ink);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: var(--surface-scrim);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--surface-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.logo {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.logo strong { font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 18px; }

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--surface-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--surface-ink);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: rotate(-8deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.menu-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 2px;
}
.menu-trigger .bars { display: flex; flex-direction: column; gap: 4px; width: 22px; }
.menu-trigger .bars span { height: 1.5px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
body.nav-open .menu-trigger .bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.nav-open .menu-trigger .bars span:nth-child(2) { opacity: 0; }
body.nav-open .menu-trigger .bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
body.nav-open .menu-trigger .menu-label::before { content: "CLOSE"; }
body.nav-open .menu-trigger .menu-label { font-size: 0; }
body.nav-open .menu-trigger .menu-label::before { font-size: 0.82rem; }

/* ---- Full-screen nav overlay --------------------------------------------- */

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--surface-bg);
  color: var(--surface-ink);
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
body.nav-open .nav-overlay { visibility: visible; opacity: 1; }

.nav-overlay-list { display: flex; flex-direction: column; gap: 6px; }
.nav-overlay-list li {
  overflow: hidden;
}
.nav-overlay-list a {
  display: flex;
  align-items: baseline;
  gap: 24px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 5vw, 6rem);
  letter-spacing: 0.01em;
  line-height: 1.05;
  padding: 6px 0;
  transform: translateY(100%);
  transition: transform 0.6s var(--ease), color 0.25s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
body.nav-open .nav-overlay-list a { transform: translateY(0); }
.nav-overlay-list a:hover { color: var(--accent); }
.nav-overlay-list .n { font-family: var(--font-mono); font-size: 0.9rem; color: var(--surface-muted); }

/* ---- Lightbox (click a project thumbnail for a larger view) ----------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--gutter);
  background: rgba(10, 10, 10, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  width: auto;
  height: auto;
  border: 1px solid var(--surface-line);
  transform: scale(0.96);
  transition: transform 0.35s var(--ease);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox-caption {
  position: absolute;
  left: var(--gutter);
  bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--surface-muted);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: var(--gutter);
  width: 44px;
  height: 44px;
  border: 1px solid var(--surface-line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bone);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.lightbox-close svg { width: 16px; height: 16px; }
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }

/* ---- Hero ----------------------------------------------------------------- */

.hero {
  padding: calc(var(--header-h) + 64px) 0 96px;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
}
.hero-corner-mark {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: var(--gutter);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--surface-muted);
  letter-spacing: 0.1em;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--surface-muted);
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3rem, 2rem + 9vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0.002em;
  margin: 0 0 32px;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
  max-width: 48ch;
  font-size: clamp(1rem, 0.92rem + 0.3vw, 1.15rem);
  color: var(--surface-muted);
  margin-bottom: 44px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 36px; align-items: center; }

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 4px;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.22);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.text-link:hover::after { transform: scaleX(1); }
.text-link.is-accent { color: var(--accent); }
.text-link svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--surface-muted);
}
.scroll-cue span {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-cue .line { width: 1px; height: 46px; background: var(--surface-line); position: relative; overflow: hidden; }
.scroll-cue .line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--surface-ink);
  transform: translateY(-100%);
  animation: scrollline 2.2s ease-in-out infinite;
}
@keyframes scrollline {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ---- Section heads ------------------------------------------------------ */

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 1.8rem + 2.5vw, 3.8rem);
  line-height: 0.95;
  margin: 0;
}
.section-head p { max-width: 40ch; }
.is-dark .section-head p { color: var(--surface-muted); }
.is-light .section-head p { color: var(--muted-on-light); }

/* ---- About ---------------------------------------------------------------- */

.about { padding: 140px 0; }
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px; }
.about-lead {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  line-height: 1.4;
  letter-spacing: -0.005em;
}
.about-lead strong { font-weight: 700; }

.spec-list { border-top: 1px solid var(--line-on-light); }
.spec-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-on-light);
}
.spec-row dt {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-on-light);
  padding-top: 3px;
}
.spec-row dd { margin: 0; font-size: 1rem; font-weight: 500; }

/* ---- Projects -------------------------------------------------------------- */

.projects { padding: 140px 0; }
.project-list { border-top: 1px solid var(--surface-line); }
.project-row {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr 260px 44px;
  align-items: start;
  gap: 28px;
  padding: 36px 0;
  border-bottom: 1px solid var(--surface-line);
  transition: padding-left 0.4s var(--ease), color 0.3s var(--ease);
}
.project-index { padding-top: 0.5em; }
.project-thumb, .project-link { align-self: center; }
.project-row:hover { padding-left: 16px; color: var(--accent); }
.project-row:hover .project-index { color: var(--accent); opacity: 1; }
.project-row:hover .summary { color: var(--surface-ink); }

.project-index {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--surface-muted);
  opacity: 0.8;
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.project-main h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.6rem);
  margin: 0 0 10px;
  letter-spacing: 0.005em;
}
.project-main .summary {
  max-width: 62ch;
  color: var(--surface-muted);
  font-size: 0.98rem;
  margin-bottom: 14px;
  transition: color 0.3s var(--ease);
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--surface-muted);
}
.project-tags span::before { content: "/ "; opacity: 0.6; }

.project-note {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  border: 1px solid rgba(232, 57, 43, 0.4);
  padding: 10px 12px;
  max-width: 62ch;
}

.project-link {
  width: 44px; height: 44px;
  border: 1px solid var(--surface-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.project-link svg { width: 16px; height: 16px; }
.project-row:hover .project-link { border-color: var(--accent); transform: rotate(45deg); }

.project-thumb {
  position: relative;
  width: 260px;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--surface-line);
  background: var(--surface-bg-2);
}
.project-thumb:has(img) { cursor: pointer; }
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(45%) brightness(0.82);
  transform: scale(1);
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}
.project-row:hover .project-thumb img { filter: grayscale(0%) brightness(1); transform: scale(1.03); }

.expand-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.72);
  border: 1px solid var(--surface-line);
  color: var(--bone);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.expand-hint svg { width: 13px; height: 13px; }
.project-row:hover .expand-hint { opacity: 1; transform: translateY(0); }

.thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--surface-muted);
  background-image: repeating-linear-gradient(45deg, var(--surface-line) 0, var(--surface-line) 1px, transparent 1px, transparent 11px);
  transition: color 0.3s var(--ease);
}
.project-row:hover .thumb-empty { color: var(--surface-ink); }

/* ---- Skills ------------------------------------------------------------------ */

.skills { padding: 140px 0; }
.skill-catalog {
  column-count: 2;
  column-gap: 64px;
  border-top: 1px solid var(--line-on-light);
}
.skill-row {
  break-inside: avoid;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-on-light);
}
.skill-row .n { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted-on-light); flex-shrink: 0; width: 24px; }
.skill-row .name { font-weight: 600; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.01em; }
.skill-row .cat { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted-on-light); text-transform: uppercase; letter-spacing: 0.04em; text-align: right; }
.skill-row .detail {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-on-light);
  margin-top: 4px;
  line-height: 1.6;
}

/* ---- Contact --------------------------------------------------------------- */

.contact { padding: 150px 0 110px; }
.contact-cta {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3rem, 2rem + 9vw, 8rem);
  line-height: 0.92;
  display: inline-block;
  margin-bottom: 56px;
  transition: color 0.3s var(--ease);
}
.contact-cta:hover { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }

.contact-links { display: flex; flex-direction: column; gap: 4px; }
.contact-link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--surface-line);
}
.contact-link-row a {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.25s var(--ease);
}
.contact-link-row a:hover { color: var(--accent); }
.copy-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--surface-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--surface-ink);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn .icon-check-glyph { display: none; }
.copy-btn.is-copied .icon-copy-glyph { display: none; }
.copy-btn.is-copied .icon-check-glyph { display: block; }
.copy-btn.is-copied { border-color: var(--accent); color: var(--accent); }
.copy-feedback {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.copy-feedback.is-visible { opacity: 1; }

.field { margin-bottom: 30px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--surface-muted);
  margin-bottom: 10px;
}
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--surface-line);
  color: var(--surface-ink);
  padding: 10px 0;
  font-size: 1.05rem;
  transition: border-color 0.25s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }

.form-note { font-family: var(--font-mono); font-size: 0.74rem; color: var(--surface-muted); margin-top: 18px; max-width: 48ch; }
.form-status { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); min-height: 1.4em; margin-top: 10px; }

.submit-link { margin-top: 6px; }

/* ---- Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--surface-bg);
  color: var(--surface-muted);
  padding: 28px 0;
  border-top: 1px solid var(--surface-line);
}
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer p { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; }
.footer-social { display: flex; gap: 20px; }
.footer-social a { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.25s var(--ease); }
.footer-social a:hover { color: var(--accent); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Responsive ---------------------------------------------------------------- */

@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .skill-catalog { column-count: 1; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 48px); }
  .project-row { grid-template-columns: 48px 1fr; }
  .project-thumb { grid-column: 1 / -1; width: 100%; max-width: 420px; margin-top: 16px; }
  .project-link { display: none; }
  .grid-guides { display: none; }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .about, .projects, .skills { padding: 96px 0; }
  .contact { padding: 110px 0 80px; }
  .project-row { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .project-row:hover { padding-left: 0; }
  .project-index { order: -1; }
  .project-thumb { max-width: 100%; margin-top: 10px; }
  .spec-row { grid-template-columns: 1fr; gap: 6px; }
  .nav-overlay-list a { gap: 14px; }
}
