/* ---------------------------------------------------------------
   Jiří Bartoš — jbartos.eu
   Pure CSS, no framework, no build step.
--------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0a0708;
  --bg-soft: #0e0a0b;
  --surface: #151013;
  --surface-2: #1b1417;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f7f2f2;
  --text-soft: #ded3d4;
  --muted: #ab9da0;
  --muted-2: #8b7b7e;
  --accent: #e05252;
  --accent-strong: #b3261e;
  --accent-strong-hover: #c93a30;
  --accent-soft: rgba(224, 82, 82, 0.12);
  --accent-ink: #140708;
  --on-accent: #fff7f5;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --container: 1180px;
  --radius: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 700px at 86% -8%, rgba(179, 38, 30, 0.18), transparent 62%),
    radial-gradient(900px 600px at -12% 18%, rgba(120, 20, 30, 0.11), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-color: #3d2a2d var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
strong { font-weight: 600; }

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

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 400;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(224, 82, 82, 0.55);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(8, 9, 12, 0.78);
  border-bottom-color: var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-name strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-name span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav > a:not(.nav-cta) {
  position: relative;
  padding: 6px 0;
  color: #c0b2b5;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}
.nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}
.nav > a:not(.nav-cta):hover,
.nav > a.is-active { color: var(--text); }
.nav > a.is-active::after { transform: scaleX(1); }
.nav-cta { display: none; }
.nav-foot { display: none; }

.header-cta { flex: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  z-index: 110;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nav-toggle:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.03); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease);
}
.nav-toggle.is-active span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle.is-active span:last-child { transform: translateY(-4px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 5, 7, 0.66);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

/* ---------------------------------------------------------------
   Buttons
--------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: 0 10px 30px -14px rgba(179, 38, 30, 0.75);
}
.btn-primary:hover {
  background: var(--accent-strong-hover);
  box-shadow: 0 16px 36px -14px rgba(201, 58, 48, 0.7);
}
.btn-primary:hover svg { transform: translateX(2px); }
.btn-primary svg { transition: transform 0.25s var(--ease); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.25);
}
.btn-sm { padding: 11px 18px; font-size: 0.85rem; }

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

.hero {
  padding-top: calc(76px + clamp(56px, 8vw, 108px));
  padding-bottom: clamp(64px, 8vw, 104px);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(224, 82, 82, 0.55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 82, 82, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(224, 82, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 82, 82, 0); }
}

.hero h1 {
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.6vw, 4.9rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}
.hero h1 .accent {
  color: var(--accent);
  background: linear-gradient(100deg, #ffa094 0%, #e05252 45%, #c43a32 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  max-width: 56ch;
  margin-top: 26px;
  color: #b6a9ac;
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: clamp(20px, 3vw, 38px);
  margin-right: clamp(20px, 3vw, 38px);
  border-right: 1px solid var(--border);
}
.hero-stats li:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat-label {
  color: var(--muted-2);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Hero visual */

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
}

.visual-glow {
  position: absolute;
  z-index: 0;
  width: min(540px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 82, 82, 0.15), rgba(224, 82, 82, 0.02) 55%, transparent 70%);
  filter: blur(6px);
}
.visual-hud {
  position: absolute;
  z-index: 1;
  width: min(560px, 100%);
  aspect-ratio: 1;
  pointer-events: none;
}
.visual-hud svg {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.hud-rotate-slow,
.hud-rotate-reverse,
.hud-rotate-fast,
.hud-sweep {
  transform-box: view-box;
  transform-origin: 50% 50%;
}
.hud-rotate-slow { animation: hudSpin 90s linear infinite; }
.hud-rotate-reverse { animation: hudSpinReverse 58s linear infinite; }
.hud-rotate-fast { animation: hudSpin 26s linear infinite; }
.hud-sweep { animation: hudSpin 11s linear infinite; }
.hud-red-glow { filter: drop-shadow(0 0 7px rgba(224, 82, 82, 0.4)); }
.hud-pulse { animation: hudPulse 4.5s ease-in-out infinite; }
@keyframes hudSpin { to { transform: rotate(360deg); } }
@keyframes hudSpinReverse { to { transform: rotate(-360deg); } }
@keyframes hudPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}

.portrait-card {
  position: relative;
  z-index: 2;
  width: min(340px, 76%);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  overflow: hidden;
  background: #171113;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.95), 0 0 0 6px rgba(224, 82, 82, 0.04);
  transform: rotate(-1.5deg);
}
.portrait-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 436 / 557;
  object-fit: cover;
  object-position: center top;
}
.portrait-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(to top, rgba(7, 8, 11, 0.92), rgba(7, 8, 11, 0));
  pointer-events: none;
}
.portrait-card figcaption {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
}
.portrait-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(224, 82, 82, 0.9);
}
.portrait-card figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.portrait-card figcaption small {
  display: block;
  margin-top: 1px;
  color: #bcafb2;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(17, 20, 27, 0.82);
  box-shadow: 0 20px 44px -22px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: floaty 7s ease-in-out infinite;
}
.float-card svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.float-card strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.float-card small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 0.64rem;
  line-height: 1.25;
}
.float-a { top: 7%; left: -4%; animation-delay: -1s; }
.float-b { top: 38%; right: -7%; animation-delay: -3.4s; }
.float-c { bottom: 8%; left: -7%; animation-delay: -5.2s; }
.float-d { top: 3%; right: -4%; animation-delay: -2.2s; }
.float-e { top: 46%; left: -9%; animation-delay: -4.6s; }
.float-f { bottom: 5%; right: -6%; animation-delay: -6.1s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------------------------------------------------------------
   Tech marquee
--------------------------------------------------------------- */

.tech-strip {
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.014);
  overflow: hidden;
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
}
.marquee-group span {
  color: #a39396;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-group i {
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}
/* ---------------------------------------------------------------
   Sections
--------------------------------------------------------------- */

.section {
  position: relative;
  padding: clamp(76px, 9vw, 124px) 0;
}
.section-alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.004));
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.65fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.section-kicker .num { color: var(--accent); font-variant-numeric: tabular-nums; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}
.section-intro {
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
}
.section-head--solo {
  grid-template-columns: 1fr;
  gap: 0;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.about-copy { max-width: 62ch; }
.about-lead {
  margin-bottom: 18px;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.8vw, 1.42rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.42;
}
.about-copy p:not(.about-lead) {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.78;
}
.about-copy p:last-child { margin-bottom: 0; }

.principles { display: grid; gap: 12px; }
.principle {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}
.principle-num {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding-top: 3px;
}
.principle h3 {
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.principle p { color: var(--muted); font-size: 0.86rem; line-height: 1.65; }

/* Services */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.service-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  overflow: hidden;
}
.service-card > * { position: relative; z-index: 1; }
.service-num {
  position: absolute;
  top: 26px;
  right: 26px;
  color: rgba(255, 255, 255, 0.22);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.service-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border: 1px solid rgba(224, 82, 82, 0.2);
  border-radius: 12px;
  background: rgba(224, 82, 82, 0.09);
  color: var(--accent);
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 {
  margin-bottom: 9px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.service-card p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.68;
}
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.service-tags span {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: #c7b9bb;
  font-size: 0.67rem;
  letter-spacing: 0.01em;
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.skill-card {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006));
}
.skill-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
}
.skill-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid rgba(224, 82, 82, 0.16);
  border-radius: 11px;
  background: rgba(224, 82, 82, 0.07);
  color: var(--accent);
}
.skill-icon svg { width: 20px; height: 20px; }
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.skill-card > p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}
.skill-tags li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #cdc0c2;
  font-size: 0.76rem;
}
.skill-tags li::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.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;
}

/* Projects */

.projects-slider { position: relative; }

.projects-viewport {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005));
  touch-action: pan-y;
  cursor: grab;
}
.projects-viewport.is-dragging {
  cursor: grabbing;
}
.projects-viewport.is-dragging * {
  user-select: none;
}
.project-media img {
  -webkit-user-drag: none;
  user-select: none;
}

.projects-track {
  display: flex;
  width: 100%;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.project-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.72fr);
  flex: 0 0 100%;
  min-width: 0;
  background: var(--bg-soft);
}

.project-media {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: #100b0c;
  aspect-ratio: 16 / 10;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 3.2vw, 44px);
  min-width: 0;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.project-index {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}
.project-tag {
  padding: 4px 9px;
  border: 1px solid rgba(224, 82, 82, 0.2);
  border-radius: 999px;
  background: rgba(224, 82, 82, 0.08);
  color: #ffb3ad;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.project-copy h3 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.project-copy > p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.project-tags li {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: #c2b5b6;
  font-size: 0.69rem;
}
.project-note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted-2);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 18px;
}

.slider-dots { display: flex; align-items: center; gap: 4px; }
.slider-dot {
  display: flex;
  align-items: center;
  width: 30px;
  height: 24px;
  padding: 0;
  border-radius: 5px;
  transition: width 0.3s var(--ease);
}
.slider-dot::after {
  content: "";
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.slider-dot:hover::after { background: rgba(255, 255, 255, 0.38); }
.slider-dot.is-active { width: 46px; }
.slider-dot.is-active::after {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(224, 82, 82, 0.45);
}

.slider-meta { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.slider-counter {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}
.slider-counter .sep { margin: 0 4px; color: var(--muted-2); }

.slider-arrows { display: flex; gap: 8px; }
.slider-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text);
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, transform 0.2s var(--ease);
}
.slider-btn svg { width: 18px; height: 18px; }
.slider-btn:hover {
  border-color: rgba(224, 82, 82, 0.45);
  background: rgba(224, 82, 82, 0.1);
  color: var(--accent);
}
.slider-btn:active { transform: scale(0.95); }

/* Experience */

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.timeline { display: grid; gap: 0; }
.timeline-item {
  position: relative;
  padding: 0 0 40px 38px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: -2px;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-strong), var(--border));
}
.timeline-item::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg-soft);
  box-shadow: 0 0 0 4px rgba(224, 82, 82, 0.06);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }
.timeline-year {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.now {
  padding: 2px 7px;
  border: 1px solid rgba(224, 82, 82, 0.22);
  border-radius: 999px;
  background: rgba(224, 82, 82, 0.08);
  color: #ffb3ad;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}
.timeline-body h3 {
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.timeline-role {
  margin-bottom: 14px;
  color: var(--muted-2);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.timeline-body ul { display: grid; gap: 7px; }
.timeline-body li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.65;
}
.timeline-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 5px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.tenure-card {
  position: sticky;
  top: 130px;
  display: flex;
  justify-content: center;
}
.tenure-year {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: rgba(255, 255, 255, 0.09);
  font-family: var(--font-display);
  font-size: clamp(6rem, 9.5vw, 10rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 0.9;
  white-space: nowrap;
  text-shadow: 0 0 60px rgba(224, 82, 82, 0.06);
}

/* Contact */

.contact-section { padding-top: clamp(60px, 7vw, 100px); }

.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.72fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(30px, 5vw, 64px);
  border: 1px solid rgba(224, 82, 82, 0.2);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(224, 82, 82, 0.07), rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.008));
  overflow: hidden;
}
.contact-panel::before {
  content: "";
  position: absolute;
  top: -300px;
  right: -160px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179, 38, 30, 0.24), transparent 65%);
  pointer-events: none;
}
.contact-panel > * { position: relative; z-index: 1; }
.contact-copy .section-title { max-width: 17ch; }
.contact-lead {
  max-width: 48ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.contact-card {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(8, 9, 12, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.contact-row + .contact-row,
.contact-row + .contact-actions { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.contact-row { transition: color 0.2s ease; }
a.contact-row:hover strong { color: var(--accent); }
.contact-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent);
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-row small {
  display: block;
  margin-bottom: 1px;
  color: var(--muted-2);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact-row strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  padding-top: 20px;
}
.contact-actions .btn { flex: 1 1 auto; padding-inline: 16px; font-size: 0.84rem; }
.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 0.78rem;
  transition: color 0.2s ease;
}
.cv-link svg { width: 15px; height: 15px; }
.cv-link:hover { color: var(--accent); }

/* Footer */

.site-footer {
  padding: 36px 0 42px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 36px;
}
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 0.82rem; }
.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.footer-brand small { display: block; color: var(--muted-2); font-size: 0.68rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--muted); font-size: 0.8rem; transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--text); }
.footer-meta { color: var(--muted-2); font-size: 0.74rem; }

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 250;
  padding: 11px 18px;
  border: 1px solid rgba(224, 82, 82, 0.3);
  border-radius: 999px;
  background: rgba(17, 20, 27, 0.96);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------
   Reveal animations
--------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.services-grid .reveal:nth-child(2),
.skills-grid .reveal:nth-child(2),
.principles .reveal:nth-child(2) { transition-delay: 0.07s; }
.services-grid .reveal:nth-child(3),
.skills-grid .reveal:nth-child(3),
.principles .reveal:nth-child(3) { transition-delay: 0.14s; }
.services-grid .reveal:nth-child(4),
.skills-grid .reveal:nth-child(4) { transition-delay: 0.07s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.14s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.21s; }

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

@media (max-width: 1100px) {
  .float-a { left: -2%; }
  .float-b { right: -3%; }
  .float-c { left: -3%; }
  .float-d { right: -2%; }
  .float-e { left: -4%; }
  .float-f { right: -3%; }
  .hero-visual { min-height: 520px; }
}

@media (max-width: 960px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 95;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: min(86vw, 380px);
    height: 100dvh;
    padding: 104px 30px 32px;
    border-left: 1px solid var(--border);
    background: #100b0c;
    overflow-y: auto;
  }
  .nav.is-open {
    display: flex;
    animation: navSlide 0.38s var(--ease) both;
  }
  @keyframes navSlide {
    from { transform: translateX(100%); opacity: 0.5; }
    to { transform: none; opacity: 1; }
  }
  .nav > a:not(.nav-cta) {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: -0.025em;
  }
  .nav > a:not(.nav-cta)::after { display: none; }
  .nav > a:not(.nav-cta):hover { color: var(--accent); }
  .nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 26px;
    padding: 14px 20px;
    border-radius: 12px;
    background: var(--accent-strong);
    color: var(--on-accent);
    font-size: 0.92rem;
    font-weight: 600;
  }
  .nav-foot {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    margin-top: auto;
    padding-top: 32px;
    color: var(--muted);
    font-size: 0.86rem;
  }
  .nav-foot a:hover { color: var(--accent); }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .brand { opacity: 0; visibility: hidden; }
  .brand { transition: opacity 0.2s ease, visibility 0.2s ease; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-copy { max-width: 680px; }
  .hero h1 { max-width: 17ch; }
  .hero-visual { min-height: 0; padding: 10px 0; }
  .visual-glow, .visual-hud { width: min(460px, 94vw); height: auto; }
  .visual-glow { aspect-ratio: 1; }
  .portrait-card { width: min(310px, 68vw); }
  .float-a { top: 2%; left: 0; }
  .float-b { top: 38%; right: 0; }
  .float-c { bottom: 3%; left: 0; }
  .float-d { top: -1%; right: 0; }
  .float-e { top: 48%; left: 0; }
  .float-f { bottom: 3%; right: 0; }

  .section-head {
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
  }
  .section-intro { max-width: 58ch; }

  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-slide { grid-template-columns: 1fr; }
  .project-media {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .project-copy { padding: clamp(24px, 4vw, 32px); }
  .experience-grid { grid-template-columns: 1fr; }
  .tenure-card { position: static; }

  .contact-panel { grid-template-columns: 1fr; }
  .contact-copy .section-title { max-width: 20ch; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 36px, var(--container)); }
  .hero { padding-top: calc(76px + 44px); }
  .hero-stats { gap: 16px 0; }
  .hero-stats li { flex: 1 1 30%; }
  .stat-label { max-width: 12ch; }
  .services-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .tenure-card { display: none; }
  .contact-card { padding: 20px; }
  .project-copy > p { font-size: 0.86rem; }
  .project-note { margin-top: 24px; padding-top: 14px; }
  .projects-controls { gap: 12px; }
  .slider-meta { gap: 12px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .footer-nav { gap: 14px 20px; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 32px, var(--container)); }
  .brand-name span { display: none; }
  .hero h1 { font-size: clamp(2.35rem, 12vw, 3rem); }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-stats { flex-direction: column; gap: 14px; }
  .hero-stats li {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 12px;
    margin: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .hero-stats li:last-child { padding-bottom: 0; border-bottom: 0; }
  .stat-label { max-width: none; text-align: right; }
  .portrait-card { width: min(238px, 68vw); }
  .visual-hud { width: min(370px, 94vw); }
  .tenure-year { font-size: clamp(4.5rem, 16vw, 6rem); }
  .slider-dot { width: 24px; }
  .slider-dot.is-active { width: 36px; }
  .float-card { padding: 8px 10px; }
  .float-card svg { width: 16px; height: 16px; }
  .float-card strong { font-size: 0.66rem; }
  .float-card small { font-size: 0.58rem; }
  .float-a { top: 0; left: 0; }
  .float-d { top: 0; right: 0; }
  .float-e { top: 32%; left: 0; }
  .float-b { top: 32%; right: 0; }
  .float-c { top: 64%; bottom: auto; left: 0; }
  .float-f { top: 64%; bottom: auto; right: 0; }
  .service-card, .skill-card { padding: 22px; }
  .contact-panel { padding: 24px 18px; border-radius: 22px; }
  .contact-actions { flex-direction: column; }
  .contact-actions .btn { width: 100%; }
  .contact-row strong { font-size: 0.88rem; }
  .toast { width: max-content; max-width: calc(100% - 32px); text-align: center; }
}

@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;
  }
  .js .reveal { opacity: 1; transform: none; }
  .portrait-card { transform: none; }
}

/* ---------------------------------------------------------------
   404
--------------------------------------------------------------- */

.error-page {
  min-height: 100svh;
  display: flex;
  align-items: stretch;
}
.error-shell {
  display: flex;
  flex-direction: column;
  width: min(100% - 48px, var(--container));
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 40px) 0;
}
.error-main {
  margin: auto 0;
  padding: 48px 0;
  max-width: 680px;
}
.error-code {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.8;
}
.error-main h1 {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.error-main > p:not(.error-code) {
  max-width: 46ch;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}
.error-foot {
  color: var(--muted-2);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}
