/* ============================================================
   Jim Sordet - Portfolio
   Palette anchored on the CV brand red + Community Network red.
   Dark by default, light via [data-theme="light"].
   ============================================================ */

:root {
  /* Brand accent - golden #F4C136. `--red` token kept as the theme-aware
     "accent text/shape" colour; `--gold*` are the fixed vibrant fills that
     carry dark ink text on top for contrast. */
  --red: #f4c136;
  --red-bright: #ffd45e;
  --red-deep: #c8961a;
  --gold: #f4c136;
  --gold-bright: #ffd45e;
  --gold-ink: #241c02;

  --bg: #0c0c0f;
  --bg-2: #111116;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f2ef;
  --text-soft: #b7b6b3;
  --text-mute: #86858a;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --glass: rgba(20, 20, 26, 0.55);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --maxw: 1180px;
  --radius: 18px;
  --radius-lg: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  /* darker gold so accent text stays legible on the light background */
  --red: #9a6c05;
  --red-deep: #7d5700;
  --bg: #f6f5f2;
  --bg-2: #efede8;
  --surface: rgba(20, 18, 22, 0.035);
  --surface-2: rgba(20, 18, 22, 0.05);
  --border: rgba(20, 18, 22, 0.12);
  --border-strong: rgba(20, 18, 22, 0.20);
  --text: #16151a;
  --text-soft: #44434a;
  --text-mute: #6c6b72;
  --shadow: 0 24px 60px -28px rgba(40, 30, 30, 0.35);
  --glass: rgba(255, 255, 255, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .5s var(--ease), color .5s var(--ease);
}

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

/* Justified body copy across the page */
.hero__tagline, .hero__summary, .section__sub, .about__lead, .about__text p,
.tl-bullets li, .earlier li, .ai-featured p, .edu-card .note,
.proj__desc, .proj__hl li, .civic__item .org {
  text-align: justify; text-justify: inter-word; hyphens: auto;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 999;
  background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: 10px;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Background FX ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora__blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  will-change: transform;
}
.aurora__blob--1 { width: 46vw; height: 46vw; background: var(--red); top: -10vw; left: -8vw; opacity: .375; animation: float1 22s ease-in-out infinite; }
.aurora__blob--2 { width: 38vw; height: 38vw; background: #5b1d8a; bottom: -12vw; right: -6vw; opacity: .35; animation: float2 28s ease-in-out infinite; }
.aurora__blob--3 { width: 30vw; height: 30vw; background: #1f6feb; top: 40%; left: 55%; opacity: .25; animation: float1 26s ease-in-out infinite reverse; }
[data-theme="light"] .aurora__blob { opacity: .28; }
[data-theme="light"] .aurora__blob--2 { opacity: .2; }
[data-theme="light"] .aurora__blob--3 { opacity: .16; }

@keyframes float1 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(6vw,4vw) scale(1.12);} }
@keyframes float2 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(-5vw,-3vw) scale(1.08);} }

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

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); box-shadow: 0 0 12px var(--gold); }

@media (prefers-reduced-motion: reduce) { .aurora__blob { animation: none; } }

/* ---------- Layout helpers ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 9vw, 130px) clamp(20px, 5vw, 40px); }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.section__index { font-family: var(--font-display); color: var(--red); font-weight: 600; letter-spacing: .2em; font-size: .8rem; }
.section__title { font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 3.1rem); line-height: 1.05; font-weight: 600; letter-spacing: -.02em; margin-top: 8px; }
.section__sub { color: var(--text-soft); max-width: 60ch; margin-top: 14px; font-size: 1.05rem; }
.subhead { font-family: var(--font-display); font-size: 1.3rem; margin: 48px 0 20px; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  --pad: 14px 22px;
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  padding: var(--pad); border-radius: 100px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
  font-family: var(--font-body);
}
.btn--sm { --pad: 9px 16px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn--solid { background: var(--gold); color: var(--gold-ink); box-shadow: 0 10px 30px -10px var(--gold); }
.btn--solid:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 16px 36px -10px var(--gold); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-2px); border-color: var(--red); }
.btn:active { transform: translateY(0) scale(.98); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; transition: background .35s, border-color .35s, padding .35s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: var(--glass); backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--border); }
.nav__inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 14px clamp(16px, 5vw, 40px); }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; }
.brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright)); color: var(--gold-ink); font-weight: 700; font-size: .95rem;
  box-shadow: 0 6px 18px -6px var(--gold); letter-spacing: .02em;
}
.brand__name { font-size: 1.02rem; letter-spacing: -.01em; }
.nav__links { display: flex; gap: 2px; margin-left: auto; }
.nav__links a {
  padding: 8px 11px; border-radius: 100px; font-size: .88rem; color: var(--text-soft); font-weight: 500;
  white-space: nowrap; transition: color .2s, background .2s;
}
.nav__links a:hover, .nav__links a.active { color: var(--text); background: var(--surface); }
.nav__actions { display: flex; align-items: center; gap: 8px; }

.lang-toggle { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 6px 10px; cursor: pointer; font-family: var(--font-display); font-size: .8rem; font-weight: 600; color: var(--text-mute); }
.lang-toggle__opt { transition: color .2s; padding: 1px 2px; }
.lang-toggle__opt.active { color: var(--red); }
.lang-toggle__sep { opacity: .4; }
.lang-toggle:hover { border-color: var(--border-strong); }

.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s; }
.theme-toggle:hover { border-color: var(--red); transform: rotate(-12deg); }
.theme-toggle .i-moon { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-moon { display: block; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; align-items: center; justify-content: center; }
.hamburger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(60px, 11vw, 130px) clamp(20px, 5vw, 40px) clamp(50px, 8vw, 90px); min-height: 88vh; display: flex; flex-direction: column; justify-content: center; }
.hero__kicker { font-family: var(--font-display); color: var(--red); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; }
.hero__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 12vw, 7.5rem); line-height: .95; letter-spacing: -.04em; margin: 14px 0 10px; background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 55%, transparent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__rolewrap { font-family: var(--font-display); font-size: clamp(1.1rem, 3.2vw, 1.7rem); color: var(--text-soft); display: flex; align-items: center; gap: 6px; min-height: 1.6em; }
.hero__role-static { color: var(--red); }
.rotator { color: var(--text); font-weight: 600; }
.caret { color: var(--red); animation: blink 1s steps(1) infinite; font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }
.hero__tagline { font-size: clamp(1.05rem, 2.4vw, 1.4rem); max-width: 36ch; margin-top: 22px; color: var(--text); font-weight: 450; }
.hero__summary { color: var(--text-soft); max-width: 60ch; margin-top: 14px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn--icon svg { opacity: .9; }

.hero__stats { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 48px; max-width: 640px; }
.hero__stats li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(6px); }
.hero__stats .v { font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 700; color: var(--red); display: block; line-height: 1; }
.hero__stats .l { font-size: .78rem; color: var(--text-mute); margin-top: 6px; display: block; }

.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 26px; font-size: .9rem; color: var(--text-soft); }
.dot-loc::before { content: "📍 "; }
.badge-avail { display: inline-flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); padding: 5px 12px; border-radius: 100px; font-weight: 600; font-size: .82rem; border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--red); position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--red); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0%{ transform: scale(.6); opacity: 1;} 100%{ transform: scale(1.8); opacity: 0;} }

.hero__scrollcue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 16px; display: grid; place-items: start center; padding-top: 7px; }
.hero__scrollcue span { width: 4px; height: 8px; border-radius: 4px; background: var(--red); animation: scrolldot 1.6s var(--ease) infinite; }
@keyframes scrolldot { 0%{ transform: translateY(0); opacity:1;} 70%{ transform: translateY(12px); opacity:0;} 100%{opacity:0;} }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.about__lead { font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 500; line-height: 1.35; margin-bottom: 20px; }
.about__text p { color: var(--text-soft); margin-bottom: 16px; }
.about__portrait { margin: 0; max-width: 210px; padding: 5px; border-radius: calc(var(--radius-lg) + 5px); background: linear-gradient(150deg, var(--gold), color-mix(in srgb, var(--gold) 15%, transparent) 55%, transparent); box-shadow: var(--shadow); transition: transform .4s var(--ease); }
.about__portrait:hover { transform: translateY(-4px); }
.about__portrait img { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; }
.about__facts { grid-column: 1 / -1; margin-top: clamp(18px, 2.6vw, 32px); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; backdrop-filter: blur(8px); }
.fact { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 13px 15px; border-radius: 12px; transition: background .2s; }
.fact:hover { background: var(--surface-2); }
.fact .k { color: var(--text-mute); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.fact .v { font-weight: 500; text-align: left; font-size: .94rem; }

/* ---------- Experience ---------- */
#experience { margin-top: clamp(20px, 3.6vw, 42px); } /* +~15% breathing room after About */

/* ---------- Timeline ---------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 8px; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline__line { position: absolute; left: 12px; top: 6px; width: 2px; background: linear-gradient(var(--gold), var(--gold-bright)); border-radius: 2px; height: 0; transition: height .1s linear; box-shadow: 0 0 12px var(--gold); }
.tl-item { position: relative; padding: 18px 0 18px 44px; }
.tl-item__dot { position: absolute; left: 4px; top: 26px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--border-strong); transition: border-color .3s, box-shadow .3s, transform .3s; }
.tl-item.in .tl-item__dot { border-color: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 18%, transparent); transform: scale(1.05); }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 28px); transition: border-color .3s, transform .3s, background .3s; }
.tl-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.tl-period { font-family: var(--font-display); color: var(--red); font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.tl-role { font-size: clamp(1.15rem, 2.4vw, 1.45rem); font-weight: 600; font-family: var(--font-display); margin-top: 4px; }
.tl-company { color: var(--text); font-weight: 500; margin-top: 3px; }
.tl-place { color: var(--text-mute); font-size: .88rem; }
.tl-bullets { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.tl-bullets li { position: relative; padding-left: 22px; color: var(--text-soft); font-size: .94rem; }
.tl-bullets li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--red); transform: rotate(45deg); }
.tl-stack { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.chip { font-size: .76rem; padding: 5px 11px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft); font-weight: 500; }
.tl-card:hover .chip { border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.earlier { margin-top: 26px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.earlier h3 { font-family: var(--font-display); font-size: .9rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.earlier ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.earlier li { color: var(--text-soft); font-size: .92rem; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; transition: transform .3s, border-color .3s; }
.skill-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.skill-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.skill-card h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--red); transform: rotate(45deg); }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-list span { font-size: .85rem; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft); }

.marquee { margin-top: 40px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 14px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--font-display); font-weight: 600; color: var(--text-mute); font-size: 1.05rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 14px; }
.marquee__track span::after { content: "◆"; color: var(--red); font-size: .6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- AI & Education ---------- */
.ai-featured { position: relative; background: linear-gradient(135deg, color-mix(in srgb, var(--red) 16%, var(--bg-2)), var(--bg-2)); border: 1px solid color-mix(in srgb, var(--red) 30%, var(--border)); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); overflow: hidden; }
.ai-featured::after { content: ""; position: absolute; top: -40%; right: -10%; width: 360px; height: 360px; background: radial-gradient(circle, color-mix(in srgb, var(--red) 40%, transparent), transparent 70%); pointer-events: none; }
.ai-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--gold-ink); font-size: .78rem; font-weight: 600; padding: 6px 13px; border-radius: 100px; }
.ai-badge .pulse { background: var(--gold-ink); }
.ai-badge .pulse::after { border-color: var(--gold-ink); }
.ai-featured h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 3.2vw, 2rem); margin: 16px 0 4px; font-weight: 600; }
.ai-featured .org { color: var(--red); font-weight: 600; }
.ai-featured p { color: var(--text-soft); max-width: 70ch; margin-top: 14px; }
.ai-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.ai-topics span { background: var(--surface-2); border: 1px solid var(--border-strong); padding: 8px 14px; border-radius: 100px; font-size: .85rem; font-weight: 500; }

.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.edu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: transform .3s, border-color .3s; }
.edu-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.edu-card .period { font-family: var(--font-display); color: var(--red); font-size: .8rem; font-weight: 600; }
.edu-card h4 { font-size: 1.05rem; margin: 6px 0 2px; }
.edu-card .org { color: var(--text); font-size: .9rem; font-weight: 500; }
.edu-card .note { color: var(--text-mute); font-size: .85rem; margin-top: 10px; }

.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cert { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.cert .name { font-weight: 600; font-family: var(--font-display); }
.cert .org { color: var(--text-mute); font-size: .82rem; margin: 2px 0 10px; }
.cert .status { display: inline-block; font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 100px; }
.cert .status.done { background: color-mix(in srgb, #16a34a 16%, transparent); color: #4ade80; }
.cert .status.wip { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
[data-theme="light"] .cert .status.done { color: #15803d; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.proj { grid-column: span 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; transition: transform .35s var(--ease), border-color .35s; position: relative; overflow: hidden; }
.proj:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.proj__tag { font-size: .75rem; color: var(--red); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-family: var(--font-display); }
.proj__name { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; margin: 8px 0 3px; }
.proj__period { color: var(--text-mute); font-size: .85rem; }
.proj__desc { color: var(--text-soft); margin: 14px 0; font-size: .95rem; }
.proj__hl { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.proj__hl li { position: relative; padding-left: 22px; font-size: .9rem; color: var(--text-soft); }
.proj__hl li::before { content: "→"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.proj__links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.proj__links a { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text); padding: 8px 14px; border-radius: 100px; border: 1px solid var(--border-strong); transition: border-color .2s, background .2s; }
.proj__links a:hover { border-color: var(--red); background: var(--surface-2); }

/* Project demos */
.demo { margin: 6px 0 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); }
.demo__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.demo__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.demo__bar i:nth-child(1){ background:#ff5f57;} .demo__bar i:nth-child(2){ background:#febc2e;} .demo__bar i:nth-child(3){ background:#28c840;}
.demo__url { margin-left: 8px; font-size: .72rem; color: var(--text-mute); font-family: var(--font-display); }
.demo__body { padding: 16px; }

/* CN demo */
.cn-logo { display: flex; align-items: center; gap: 14px; }
.cn-mark { display: flex; align-items: center; gap: 2px; }
.cn-c { width: 42px; height: 42px; border-radius: 9px; background: #c1121f; position: relative; clip-path: polygon(30% 0,100% 0,100% 30%,72% 30%,72% 70%,100% 70%,100% 100%,30% 100%,0 70%,0 30%); }
.cn-n { width: 40px; height: 42px; background: var(--text); clip-path: polygon(0 100%,0 0,28% 0,72% 60%,72% 0,100% 0,100% 100%,72% 100%,28% 40%,28% 100%); opacity: .85; }
.cn-logo span { font-family: var(--font-display); font-weight: 700; letter-spacing: .18em; font-size: .85rem; color: var(--text-soft); text-transform: uppercase; }
.cn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.cn-stats div { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 6px; }
.cn-stats b { display: block; font-family: var(--font-display); color: var(--red); font-size: 1.2rem; }
.cn-stats small { color: var(--text-mute); font-size: .72rem; }

/* eCMS demo */
.ecms { display: grid; grid-template-columns: 64px 1fr; gap: 12px; min-height: 150px; }
.ecms__side { background: var(--surface); border-radius: 12px; padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; }
.ecms__side i { height: 9px; border-radius: 4px; background: var(--border-strong); }
.ecms__side i:first-child { background: var(--red); }
.ecms__main { display: flex; flex-direction: column; gap: 10px; }
.ecms__row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.ecms__cell { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.ecms__cell b { font-family: var(--font-display); color: var(--red); font-size: 1rem; }
.ecms__cell small { color: var(--text-mute); font-size: .68rem; display:block; }
.ecms__list { background: var(--surface); border-radius: 10px; padding: 8px; display:flex; flex-direction:column; gap:6px; }
.ecms__line { display:flex; align-items:center; gap:8px; font-size:.74rem; color: var(--text-soft); }
.ecms__line::before { content:""; width: 7px; height:7px; border-radius:50%; background: var(--red); }

/* Wine demo */
.wine { display: flex; flex-direction: column; gap: 10px; }
.wine__head { display:flex; justify-content: space-between; align-items:center; }
.wine__head b { font-family: var(--font-display); }
.wine__filters { display:flex; gap:6px; flex-wrap: wrap; }
.wine__filters button { font-size:.72rem; padding:5px 10px; border-radius:100px; border:1px solid var(--border); background: var(--surface); color: var(--text-soft); cursor:pointer; transition: all .2s; }
.wine__filters button.on { background: var(--red); color:#fff; border-color: var(--red); }
.wine__list { display:flex; flex-direction:column; gap:8px; }
.bottle { display:grid; grid-template-columns: 8px 1fr auto; gap:12px; align-items:center; background: var(--surface); border:1px solid var(--border); border-radius:10px; padding:10px 12px; transition: opacity .25s, transform .25s; }
.bottle__bar { width:6px; height:34px; border-radius:4px; }
.bottle__name { font-weight:600; font-size:.9rem; }
.bottle__meta { color: var(--text-mute); font-size:.74rem; }
.bottle__qty { font-family: var(--font-display); font-weight:700; color: var(--text); font-size:.95rem; }
.bottle__peak { font-size:.68rem; color: var(--text-mute); }
.bottle.hide { display:none; }

/* ---------- Civic ---------- */
.civic { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.civic__col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 30px); }
.civic__col h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.civic__col h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--red); transform: rotate(45deg); }
.civic__item { padding: 14px 0; border-top: 1px solid var(--border); }
.civic__item:first-of-type { border-top: none; padding-top: 0; }
.civic__item .role { font-weight: 600; font-size: .98rem; }
.civic__item .org { color: var(--text-soft); font-size: .88rem; }
.civic__item .period { color: var(--red); font-size: .78rem; font-family: var(--font-display); font-weight: 600; margin-top: 2px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; }
.contact__form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 18px; }
.field { position: relative; }
.field input, .field textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 18px 14px 8px; color: var(--text); font-family: var(--font-body); font-size: .98rem; transition: border-color .2s; resize: vertical; }
.field textarea { padding-top: 22px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field label { position: absolute; left: 14px; top: 13px; color: var(--text-mute); font-size: .95rem; pointer-events: none; transition: all .18s var(--ease); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 5px; font-size: .7rem; color: var(--red); }
.field.error input, .field.error textarea { border-color: var(--red-bright); }
.contact__privacy { color: var(--text-mute); font-size: .82rem; display: flex; align-items: center; gap: 7px; }
.contact__privacy::before { content: "🔒"; }
.contact__status { font-size: .9rem; min-height: 1.2em; color: var(--red); font-weight: 500; }
.contact__side { display: flex; flex-direction: column; gap: 12px; }
.contact__link { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; font-weight: 600; transition: transform .25s, border-color .25s, background .25s; }
.contact__link:hover { transform: translateX(4px); border-color: var(--red); background: var(--surface-2); }
.contact__link svg { color: var(--red); flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 36px clamp(20px, 5vw, 40px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand div { display: flex; flex-direction: column; }
.footer__brand strong { font-family: var(--font-display); }
.footer__brand span { color: var(--text-mute); font-size: .8rem; }
.footer__made { color: var(--text-mute); font-size: .85rem; text-align: center; }
.footer__top { color: var(--text-soft); font-weight: 600; font-size: .9rem; transition: color .2s; }
.footer__top:hover { color: var(--red); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay:.08s;} .reveal[data-d="2"]{ transition-delay:.16s;} .reveal[data-d="3"]{ transition-delay:.24s;} .reveal[data-d="4"]{ transition-delay:.32s;}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .nav__links { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0; background: var(--glass); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); padding: 8px 16px 20px; transform: translateY(-130%); transition: transform .4s var(--ease); margin-left: 0; }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: 14px 12px; font-size: 1rem; border-radius: 12px; }
  .hamburger { display: flex; }
  #cvDownload { display: none; }
  .about, .contact { grid-template-columns: 1fr; }
  .about__portrait { max-width: 200px; justify-self: center; }
  .about__facts { width: 100%; }
  .skills-grid, .edu-grid { grid-template-columns: 1fr; }
  .projects, .civic { grid-template-columns: 1fr; }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .nav__inner { gap: 8px; }
  .brand__name { display: none; }
  .lang-toggle { padding: 6px 8px; }
  .hero { min-height: auto; padding-top: 80px; }
  .hero__stats { gap: 10px; }
  .certs { grid-template-columns: 1fr; }
  .cn-stats { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { flex-direction: column; text-align: center; }
  .btn { width: 100%; }
  .hero__cta { gap: 10px; }
}
