/* ============================================================
   Dievtrik Lab — design system
   Elegant noir. Palette derived from the brand mark.
   ============================================================ */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Ubuntu Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/ubuntu-sans-latin.woff2") format("woff2");
  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: "Ubuntu Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/ubuntu-sans-latin-ext.woff2") format("woff2");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Ubuntu Sans";
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/ubuntu-sans-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
  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: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0b0e;
  --bg-2: #17171b;
  --surface: #101014;
  --surface-2: #16161b;
  --line: #2a2a30;
  --line-2: #3a3a42;
  --text: #f2f2f0;
  --muted: #a9a9b2;
  --muted-2: #7d7d88;
  --accent: #c8102e;
  --accent-2: #e4193a;
  --accent-soft: rgba(200, 16, 46, 0.12);

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Ubuntu Sans", "Ubuntu", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 16px;
  --radius-sm: 10px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 74px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 680px at 78% -8%, rgba(200, 16, 46, 0.08), transparent 60%),
    radial-gradient(900px 600px at 0% 8%, rgba(255, 255, 255, 0.035), transparent 55%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.035;
  mix-blend-mode: overlay;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button { font: inherit; color: inherit; }

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

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

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid var(--bg); }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--accent);
  margin-right: 0.6rem;
  vertical-align: middle;
  transform: translateY(-1px);
}

.section-head { max-width: 56ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .label,
.contact-aside .label,
.label {
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0.55rem 0 0.9rem;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ornamental rule */
.rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
.rule::before,
.rule::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}
.rule::before { width: 42px; }
.rule::after { flex: 1; }
.rule span {
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.7);
}

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  will-change: transform;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(200, 16, 46, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--primary:hover {
  box-shadow: 0 16px 40px -14px rgba(200, 16, 46, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent-soft);
}

.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(11, 11, 14, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { height: 30px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav a.nav-link {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.2s var(--ease);
}
.nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.28rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav a.nav-link:hover { color: var(--text); }
.nav a.nav-link:hover::after,
.nav a.nav-link.is-active::after { transform: scaleX(1); }

.nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang-toggle:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); }
.lang-toggle svg { width: 15px; height: 15px; opacity: 0.8; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  position: relative;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3.5rem, 9vw, 7rem));
  padding-bottom: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.hero-copy { max-width: 40rem; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.7rem, 1.6rem + 5.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 1.1rem 0 1.3rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-2);
}
.hero .subtitle {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.28rem);
  color: var(--muted);
  max-width: 34rem;
}
.hero-role {
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 1rem;
}
.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.availability .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5ec27f;
  animation: pulse-ring 2.6s var(--ease) infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(94, 194, 127, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(94, 194, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 194, 127, 0); }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.2rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.85rem;
}
.hero-meta b { color: var(--text); font-weight: 600; }

.hero-emblem {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 460px;
  margin-inline: auto;
  width: 100%;
}
.hero-emblem .rings {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  animation: spin 60s linear infinite;
}
.hero-emblem .rings::before,
.hero-emblem .rings::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.hero-emblem .rings::before { inset: 12%; border-color: rgba(200, 16, 46, 0.25); }
.hero-emblem .rings::after { inset: 26%; }
.hero-emblem .ring-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px 2px rgba(200, 16, 46, 0.8);
}
.hero-emblem .glow {
  position: absolute;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.28), transparent 68%);
  filter: blur(20px);
  animation: breathe 7s ease-in-out infinite;
}
.hero-emblem .mark {
  position: relative;
  width: clamp(180px, 22vw, 300px);
  height: auto;
  border-radius: 24%;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.hero-emblem .mark .dot { animation: pulse 3.6s ease-in-out infinite; transform-origin: center; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: 0.55; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 3rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.scroll-cue i {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--accent), transparent);
  display: inline-block;
  animation: drop 2.4s var(--ease) infinite;
}
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Cards / services ---------- */
.grid {
  display: grid;
  gap: 1.1rem;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  padding: 1.9rem 1.7rem;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px 200px at 100% 0%, rgba(200, 16, 46, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
}
.card:hover::before { opacity: 1; }

.card .icon {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent-2);
  margin-bottom: 1.2rem;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.card:hover .icon { border-color: var(--accent); color: #fff; }
.card .icon svg { width: 24px; height: 24px; }
.card h3 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.005em;
  margin-bottom: 0.5rem;
}
.card p { position: relative; color: var(--muted); font-size: 0.96rem; }

/* ---------- Products ---------- */
.products-grid { grid-template-columns: repeat(2, 1fr); }
.product {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.9rem;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.product:hover { transform: translateY(-4px); border-color: var(--accent); }
.product-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.product h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.product .tech {
  display: inline-block;
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted-2);
}
.product .badge {
  flex: none;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(200, 16, 46, 0.4);
  background: var(--accent-soft);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.product p { color: var(--muted); font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.4rem; }
.tag {
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
}
.product .go {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.product .go svg { width: 1em; height: 1em; transition: transform 0.25s var(--ease); }
.product:hover .go { color: var(--accent-2); }
.product:hover .go svg { transform: translate(3px, -3px); }

/* ---------- Process ---------- */
.process { position: relative; }
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
  counter-reset: step;
}
.step { position: relative; padding-top: 3.2rem; }
.step .num {
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-2);
  z-index: 1;
}
.step::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 46px;
  right: -1.3rem;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}
.step:last-child::after { display: none; }
.step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}
.step p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Work groups / labels ---------- */
.group-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
  margin: 3rem 0 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.section-head + .group-label { margin-top: 0; }

/* ---------- Experience / CV ---------- */
.cv-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.cv-hint { font-size: 0.82rem; color: var(--muted-2); max-width: 44ch; }
.cv-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
}
.timeline { display: grid; gap: 1.7rem; }
.job {
  position: relative;
  padding-left: 1.6rem;
  border-left: 1px solid var(--line);
}
.job::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
}
.job-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.job h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -0.005em;
}
.job-co { color: var(--muted); font-family: var(--font-body); font-size: 1rem; font-weight: 500; }
.job-period { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--accent-2); white-space: nowrap; font-weight: 600; }
.job-place { color: var(--muted-2); font-size: 0.82rem; margin: 0.15rem 0 0.8rem; }
.job-bullets { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.job-bullets li { position: relative; padding-left: 1.1rem; color: var(--muted); font-size: 0.95rem; }
.job-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
}
.edu-list { display: grid; gap: 1.2rem; }
.edu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.edu h4 { font-size: 1.02rem; font-weight: 700; }
.edu-period { font-size: 0.76rem; color: var(--muted-2); white-space: nowrap; }
.edu-degree { color: var(--muted); font-size: 0.92rem; }
.edu-place { color: var(--muted-2); font-size: 0.8rem; }
.certs { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.certs li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.certs li span { color: var(--muted); }
.certs li em { color: var(--muted-2); font-style: normal; font-size: 0.82rem; white-space: nowrap; }
.cv-contact { display: none; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.7rem 2.5rem;
}
.skill-group h3 {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
  margin-bottom: 0.85rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-size: 0.85rem;
  color: var(--text);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.chip:hover { border-color: var(--accent); color: #fff; background: var(--accent-soft); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-aside h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1.08;
  margin: 0.55rem 0 1rem;
}
.contact-aside p { color: var(--muted); max-width: 32ch; }
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 600;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.contact-email:hover { border-color: var(--accent); background: var(--accent-soft); }
.contact-email svg { width: 18px; height: 18px; color: var(--accent-2); }
.contact-note { margin-top: 0.9rem; font-size: 0.85rem; color: var(--muted-2); }

.form {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.field { margin-bottom: 1.05rem; }
.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.field label .opt { color: var(--muted-2); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: var(--accent-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}
.form-foot .privacy { font-size: 0.78rem; color: var(--muted-2); }
.form-foot .privacy a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 0.9rem; font-size: 0.9rem; min-height: 1.2em; }
.form-status.ok { color: #7ee0a1; }
.form-status.err { color: var(--accent-2); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand img { height: 34px; width: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); max-width: 30ch; font-size: 0.95rem; }
.footer-col h4 {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1rem;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a {
  color: var(--muted);
  font-size: 0.93rem;
  transition: color 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-col a:hover { color: var(--text); }
.footer-col a svg { width: 16px; height: 16px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.82rem;
}
.footer-bottom .dot { color: var(--accent); }

/* ---------- Reveal animation (progressive: visible when JS is absent) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

/* ---------- Subpages (404 / privacy) ---------- */
.page-header {
  padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 5rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.6rem + 3.5vw, 4rem);
  line-height: 1.02;
  margin-top: 0.8rem;
}
.page-header .lead { color: var(--muted); max-width: 52ch; margin-top: 1rem; font-size: 1.1rem; }
.prose { max-width: 68ch; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; margin: 2rem 0 0.6rem; }
.prose p { color: var(--muted); }
.prose .updated { font-size: 0.82rem; color: var(--muted-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-emblem { order: -1; max-width: 300px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.2rem; }
  .step:nth-child(2)::after { display: none; }
  .cv-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gutter) 1.4rem;
    background: rgba(11, 11, 14, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }
  body.nav-open .nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a.nav-link { padding: 0.95rem 0.5rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav a.nav-link::after { display: none; }
  .nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1.1rem;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 30px -12px rgba(200, 16, 46, 0.85);
  }
  .nav-cta svg { width: 1em; height: 1em; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid--3 { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .step::after { display: none !important; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-emblem { max-width: 230px; }
}

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

/* ---------- Print / Save-as-PDF CV ---------- */
@page { margin: 14mm; }

@media print {
  html, body { background: #fff !important; color: #111 !important; }
  body::after { display: none !important; }
  a { color: #111 !important; text-decoration: none !important; }

  .site-header, .site-footer, .skip-link, .no-print, .scroll-cue,
  .hero-emblem, .hero-actions, .availability,
  #services, #work, #process, #contact { display: none !important; }

  .hero { padding: 0 0 0.5rem !important; }
  .hero-copy { max-width: none; }
  .hero h1 { font-size: 30pt; margin: 0 0 0.15rem !important; }
  .hero-role { margin: 0 0 0.3rem !important; color: #a00 !important; font-size: 9pt; }
  .hero .subtitle { color: #333 !important; font-size: 10.5pt; max-width: none; }

  .section { padding: 0.5rem 0 !important; }
  .rule, .section-head p:not(.label), .section-head h2 { display: none !important; }
  .section-head { margin-bottom: 0.5rem; }
  .section-head .label { color: #a00 !important; }

  .cv-contact {
    display: block !important;
    margin: 0.3rem 0 0.9rem;
    color: #333;
    font-size: 10pt;
  }
  .cv-grid { grid-template-columns: 1.4fr 1fr !important; gap: 1.4rem !important; }
  .group-label { margin: 1rem 0 0.5rem !important; color: #111 !important; border-color: #ccc !important; }
  .group-label--jobs { display: none !important; }

  .job, .job-bullets li, .edu-degree, .edu-place, .certs li span, .chip { color: #222 !important; }
  .job { border-left-color: #ddd !important; }
  .job::before, .job-bullets li::before { background: #a00 !important; box-shadow: none !important; }
  .job-period { color: #a00 !important; }
  .certs li { border-color: #ddd !important; }
  .chip { border-color: #ccc !important; background: #fff !important; }

  .reveal { opacity: 1 !important; transform: none !important; }
  #experience, #skills, .job, .edu, .skill-group { break-inside: avoid; }
}
