/* =========================================================
   Dhia Abedraba — Technical SEO & Automation
   ========================================================= */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/jost-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: "Jost"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-italic-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: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef1ed;
  --ink: #0e1a17;
  --text: #1b2724;
  --muted: #56625d;
  --line: #e0e5e0;
  --accent: #29a587;
  --accent-ink: #13735c;
  --accent-soft: rgba(41, 165, 135, .12);
  --on-accent: #ffffff;
  --band: #0e1a17;
  --band-text: #e8efec;
  --grid: rgba(14, 26, 23, .05);
  --shadow: 0 1px 2px rgba(14,26,23,.04), 0 12px 32px rgba(14,26,23,.07);
  --radius: 18px;
  --max: 1200px;
  --font: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a110f; --surface: #101a17; --surface-2: #16231f; --ink: #eef4f1; --text: #dbe5e1; --muted: #98a8a1;
    --line: #213029; --accent: #3cc29f; --accent-ink: #5fd3b3; --accent-soft: rgba(60, 194, 159, .14); --on-accent: #06120f;
    --band: #13211d; --band-text: #e8efec; --grid: rgba(255,255,255,.04);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a110f; --surface: #101a17; --surface-2: #16231f; --ink: #eef4f1; --text: #dbe5e1; --muted: #98a8a1;
  --line: #213029; --accent: #3cc29f; --accent-ink: #5fd3b3; --accent-soft: rgba(60, 194, 159, .14); --on-accent: #06120f;
  --band: #13211d; --band-text: #e8efec; --grid: rgba(255,255,255,.04);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35); color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p a, li a, dd a, .prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.12; font-weight: 600; letter-spacing: -.02em; }
h1 em, h2 em, h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-ink); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 10px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; position: relative; }
.section--tight { padding: 72px 0; }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 999px;
  font: inherit; font-weight: 500; font-size: 16px; line-height: 1.2; cursor: pointer; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--bg); transition: transform .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { padding: 9px 18px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--text);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); position: relative; flex-shrink: 0; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--accent); opacity: .35; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.chip { display: inline-block; font-size: 14px; line-height: 1.4; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; gap: 28px; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.brand__mark { width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; letter-spacing: 0; flex-shrink: 0; }
.brand__mark span { color: var(--accent); }
.brand small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .02em; line-height: 1; margin-top: 3px; }
.brand__text { line-height: 1.1; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; font-size: 15.5px; font-weight: 500; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.header__actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.lang-switch:hover { color: var(--ink); border-color: var(--ink); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--ink); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
}
.hero::after { content: ""; position: absolute; width: 640px; height: 640px; right: -120px; top: -200px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 68%); pointer-events: none; }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6.2vw, 76px); font-weight: 600; margin: 22px 0 22px; }
.hero h1 .name { display: block; font-size: .42em; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: 14px; }
.hero__lead { font-size: 19px; color: var(--muted); max-width: 600px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; color: var(--muted); font-size: 15px; }
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 17px; height: 17px; color: var(--accent-ink); }

.portrait { position: relative; justify-self: center; width: 100%; max-width: 420px; }
.portrait__frame { position: relative; aspect-ratio: 720 / 838; border-radius: 220px 220px 28px 28px; overflow: hidden; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait::before { content: ""; position: absolute; inset: -14px; border-radius: 234px 234px 40px 40px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); pointer-events: none; }
.float { position: absolute; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); }
.float strong { font-size: 30px; line-height: 1; color: var(--ink); font-weight: 600; letter-spacing: -.02em; }
.float span { font-size: 13px; line-height: 1.3; color: var(--muted); }
.float--a { left: -44px; bottom: 96px; }
.float--b { right: -36px; top: 64px; }
.float__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.float__icon svg { width: 18px; height: 18px; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { padding: 28px 28px 26px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat strong { display: block; font-size: clamp(32px, 3.6vw, 44px); line-height: 1; color: var(--ink); font-weight: 600; letter-spacing: -.03em; }
.stat strong sup { font-size: .5em; color: var(--accent-ink); top: -.7em; margin-left: 2px; }
.stat span { display: block; margin-top: 10px; font-size: 14.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Section heads ---------- */
.head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 52px; }
.head h2 { font-size: clamp(32px, 4.2vw, 50px); max-width: 720px; }
.head p { color: var(--muted); max-width: 440px; margin: 0; }
.head--center { flex-direction: column; align-items: center; text-align: center; }
.head--center p { max-width: 620px; }

/* ---------- Summary (GEO answer box) ---------- */
.summary { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 40px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.summary h2 { font-size: 26px; }
.summary p { font-size: 18.5px; margin: 0; color: var(--text); }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card h3 { font-size: 23px; margin: 18px 0 10px; }
.card p { color: var(--muted); font-size: 16px; }
.card__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.card__icon svg { width: 24px; height: 24px; }
.card__num { position: absolute; top: 28px; right: 30px; font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--muted); opacity: .5; }
.card__more { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); margin-top: 6px; }
.card__more svg { width: 16px; height: 16px; transition: transform .2s; }
.card--link:hover .card__more svg { transform: translateX(4px); }
.card--link .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card ul.ticks { margin-top: 16px; }
ul.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--text); font-size: 16px; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2329a587' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* ---------- Highlights ---------- */
.highlight { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 26px 0; border-top: 1px solid var(--line); }
.highlight:last-child { border-bottom: 1px solid var(--line); }
.highlight__k { font-family: var(--serif); font-style: italic; font-size: 44px; line-height: 1; color: var(--accent-ink); min-width: 140px; }
.highlight h3 { font-size: 20px; margin-bottom: 6px; }
.highlight p { color: var(--muted); margin: 0; font-size: 16px; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 14px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { white-space: nowrap; font-size: 17px; font-weight: 500; color: var(--muted); padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Audience CTA ---------- */
.band { background: var(--band); color: var(--band-text); border-radius: 28px; padding: 64px; position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(60,194,159,.28), transparent 70%); }
.band h2 { color: #fff; font-size: clamp(30px, 4vw, 46px); position: relative; }
.band h2 em { color: #5fd3b3; }
.band > p { color: #b8c7c1; max-width: 560px; margin: 16px 0 36px; position: relative; }
.band .grid-2 { position: relative; }
.aud { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 30px; }
.aud h3 { color: #fff; font-size: 22px; margin-bottom: 10px; }
.aud p { color: #b8c7c1; font-size: 16px; }
.aud .btn { margin-top: 8px; }
.aud .btn--ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.aud .btn--ghost:hover { border-color: #fff; }

/* ---------- Page hero ---------- */
.page-hero { padding: 56px 0 64px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 90% at 80% 0%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 70% 90% at 80% 0%, #000 20%, transparent 70%); }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(38px, 5.4vw, 64px); max-width: 900px; margin-bottom: 20px; }
.page-hero .lead { font-size: 19px; color: var(--muted); max-width: 720px; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; opacity: .5; }
.crumbs a, .footer li a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ---------- Layout helpers ---------- */
.split { display: grid; grid-template-columns: 1fr 1.35fr; gap: 64px; align-items: start; }
.sticky { position: sticky; top: 104px; }
.split--edu { grid-template-columns: 1fr 1.2fr; gap: 28px; }
.prose { font-size: 18px; }
.prose p { color: var(--text); }
.prose h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 20px; }
.prose h3 { font-size: 22px; margin: 34px 0 12px; }

/* ---------- Facts ---------- */
.facts { display: grid; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; margin: 0; }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 15px 22px; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; }
.facts dt { font-size: 14px; color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; font-weight: 500; color: var(--ink); font-size: 15.5px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 20px; }
.job { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.job__when { font-size: 14.5px; color: var(--muted); }
.job__when strong { display: block; color: var(--ink); font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.job__badge { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 11px; border-radius: 999px; }
.job h3 { font-size: 23px; }
.job__org { color: var(--muted); font-weight: 500; margin: 4px 0 16px; }
.job ul.ticks li { color: var(--text); font-size: 16px; }
.job details { margin-top: 4px; }
.job summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--accent-ink); list-style: none; padding: 4px 0; }
.job summary::-webkit-details-marker { display: none; }
.job summary svg { width: 16px; height: 16px; transition: transform .2s; }
.job details[open] summary svg { transform: rotate(45deg); }
.job details[open] summary { margin-bottom: 12px; }
.job h4 { font-size: 16px; margin: 18px 0 10px; }
.job .chips { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--line); }
.job .chip { font-size: 13px; padding: 3px 10px; }

/* ---------- Skills ---------- */
.skill-card h3 { font-size: 21px; margin: 0 0 4px; display: flex; align-items: center; gap: 12px; }
.skill-card h3 .card__icon { width: 40px; height: 40px; border-radius: 11px; }
.skill-card h3 .card__icon svg { width: 20px; height: 20px; }
.skill-card dl { margin: 18px 0 0; }
.skill-card dt { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.skill-card dt:first-child { margin-top: 0; }
.skill-card dd { margin: 0; }
.grid-3 > .skill-card:last-child:nth-child(3n+1) { grid-column: 1 / -1; }

.langs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lang-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.lang-item strong { display: block; font-size: 19px; color: var(--ink); font-weight: 600; }
.lang-item small { color: var(--muted); font-size: 14.5px; }
.meter { height: 6px; background: var(--surface-2); border-radius: 6px; margin-top: 14px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-ink)); border-radius: 6px; }

.certs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cert { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; font-weight: 500; color: var(--ink); }
.cert span { font-family: var(--serif); font-style: italic; color: var(--accent-ink); font-size: 22px; min-width: 50px; font-weight: 400; }

.edu { display: grid; gap: 14px; }
.edu .card { padding: 26px 28px; }
.edu h3 { margin: 6px 0 4px; font-size: 20px; }
.edu p { margin: 0; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--serif); font-style: italic; font-size: 34px; color: var(--accent-ink); line-height: 1; margin-bottom: 16px; }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }
.steps--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 24px; transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-weight: 600; font-size: 17.5px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-ink); transition: transform .25s; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details > div { padding: 0 0 22px; color: var(--muted); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.contact__list { display: grid; gap: 12px; }
.contact__item { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.contact__item .card__icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.contact__item .card__icon svg { width: 20px; height: 20px; }
.contact__item small { display: block; color: var(--muted); font-size: 13.5px; }
.contact__item strong { font-weight: 600; color: var(--ink); word-break: break-word; }
.contact__item a:hover { color: var(--accent-ink); }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 14.5px; font-weight: 500; margin-bottom: 7px; color: var(--ink); }
.form label b { color: var(--accent-ink); font-weight: 600; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muted); font-weight: 400; margin: 0; }
.form .check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; padding: 0; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 500; min-height: 1.2em; }
.form-status.ok { color: var(--accent-ink); }
.form-status.err { color: #d14343; }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; border-top: 1px solid var(--line); padding: 64px 0 32px; background: var(--surface); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer p { color: var(--muted); font-size: 15.5px; }
.footer h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.footer li { margin-bottom: 9px; font-size: 15.5px; }
.footer li a:hover { color: var(--accent-ink); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer__bottom a, .linklike { color: var(--muted); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.footer__bottom a:hover, .linklike:hover { color: var(--ink); }
.socials { display: flex; gap: 10px; margin-top: 18px; }

/* ---------- Consent ---------- */
.consent { position: fixed; z-index: 80; left: 16px; bottom: 16px; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); font-size: 14.5px; color: var(--muted); }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 14px; }
.consent strong { color: var(--ink); display: block; margin-bottom: 4px; font-size: 15.5px; }
.consent__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound .big { font-family: var(--serif); font-style: italic; font-size: clamp(110px, 18vw, 200px); line-height: 1; color: var(--accent-ink); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track, .dot::after { animation: none; }
  .marquee__track { flex-wrap: wrap; width: auto; }
  .marquee__track [aria-hidden="true"] { display: none; }
  .btn:hover, .card--link:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav a { padding: 8px 10px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 > .skill-card:last-child:nth-child(3n+1) { grid-column: auto; }
  .grid-3 > .skill-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .langs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 20px; box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: transform .25s, opacity .25s, visibility .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 13px 14px; font-size: 17px; border-radius: 12px; }
  .header__actions { margin-left: auto; }
  .header__actions .btn { display: none; }
  .hero__grid, .split, .split--edu, .contact, .summary { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 72px; }
  .hero__grid { gap: 72px; }
  .portrait { max-width: 340px; }
  .float--a { left: -16px; } .float--b { right: -16px; }
  .sticky { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .job { grid-template-columns: 1fr; gap: 14px; }
  .head { flex-direction: column; align-items: start; }
  .head--center { align-items: center; }
  .band { padding: 44px 28px; }
  .section { padding: 80px 0; }
  .summary { gap: 14px; padding: 30px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .brand small { display: none; }
  .header__inner { gap: 10px; }
  .header__actions { gap: 6px; }
  .brand { font-size: 16px; gap: 10px; }
  .brand__mark { width: 34px; height: 34px; font-size: 14px; border-radius: 10px; }
  .icon-btn { width: 38px; height: 38px; }
  .lang-switch { padding: 6px 9px; font-size: 13px; }
  .grid-3, .grid-2, .certs, .steps, .steps--3 { grid-template-columns: 1fr; }
  .grid-3 > .skill-card:last-child:nth-child(odd) { grid-column: auto; }
  .form { grid-template-columns: 1fr; padding: 24px; }
  .card { padding: 26px; }
  .job { padding: 24px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .highlight { grid-template-columns: 1fr; gap: 8px; }
  .highlight__k { min-width: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .float { padding: 10px 12px; }
  .float strong { font-size: 24px; }
  .lang-switch { padding: 7px 10px; }
  .consent { left: 8px; right: 8px; bottom: 8px; max-width: none; }
}
