/* =========================================================
   Ilias Pantazis · Portfolio
   ========================================================= */

:root {
  --bg: #0b1220;
  --bg-2: #0e1628;
  --surface: #111a2e;
  --surface-2: #16213a;
  --border: rgba(138, 155, 184, 0.14);
  --border-strong: rgba(138, 155, 184, 0.28);
  --text: #e6ecf5;
  --text-muted: #8a9bb8;
  --text-dim: #5b6b86;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --private: #f59e0b;
  --public: #34d399;
  --gradient: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent-2); }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120;
  background: var(--gradient);
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .25s;
  white-space: nowrap;
}
.btn svg { font-size: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 10px 30px -10px rgba(59,130,246,.7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(34,211,238,.6); }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--accent-2); color: var(--accent-2); transform: translateY(-2px); }
.btn--small { padding: 10px 16px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.nav__logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--gradient); color: #fff; font-size: 15px; letter-spacing: .02em;
  box-shadow: 0 6px 20px -6px rgba(59,130,246,.8);
}
.nav__menu { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative; padding: 8px 14px; border-radius: 999px;
  color: var(--text-muted); font-weight: 500; font-size: 15px; transition: color .2s, background .2s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-2); transform: translateX(-50%);
}
.nav__link--cta { margin-left: 8px; border: 1px solid var(--border-strong); color: var(--text); }
.nav__link--cta:hover { border-color: var(--accent-2); color: var(--accent-2); }
.nav__link--cta.is-active::after { display: none; }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 12px; position: relative; }
.nav__toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 27px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 16px;
    background: rgba(11, 18, 32, 0.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .3s var(--ease), opacity .3s, visibility .3s;
  }
  .nav__menu.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 14px 16px; font-size: 17px; border-radius: 12px; }
  .nav__link.is-active { background: var(--accent-soft); }
  .nav__link.is-active::after { display: none; }
  .nav__link--cta { margin: 8px 0 0; text-align: center; }
  .nav.menu-open { background: rgba(11, 18, 32, 0.97); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  overflow: hidden; isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__glow {
  position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 75% 40%, rgba(59,130,246,.18), transparent 70%),
    radial-gradient(500px 350px at 15% 80%, rgba(34,211,238,.10), transparent 70%),
    linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero__inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: rgba(17, 26, 46, .6); color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--public); position: relative; }
.pulse-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--public);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { to { transform: scale(3); opacity: 0; } }
.hero__title { margin-top: 22px; font-size: clamp(40px, 6.4vw, 74px); font-weight: 700; }
.hero__typed { margin-top: 14px; font-family: var(--font-mono); font-size: clamp(18px, 2.4vw, 24px); color: var(--accent-2); min-height: 1.6em; }
.hero__typed .mono { color: var(--text-dim); }
.caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -0.15em;
  background: var(--accent-2); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero__lead { margin-top: 18px; max-width: 560px; color: var(--text-muted); font-size: clamp(16px, 1.6vw, 18px); }
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__chips { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero__chips li {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted);
  padding: 5px 11px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--border);
}

.hero__photo { position: relative; justify-self: center; width: min(400px, 100%); }
.photo-ring {
  position: relative; aspect-ratio: 4 / 5; border-radius: 28px; padding: 3px;
  background: conic-gradient(from var(--angle, 0deg), var(--accent), var(--accent-2), transparent 40%, var(--accent) 70%, var(--accent-2));
  animation: spin-ring 6s linear infinite;
  box-shadow: 0 30px 80px -30px rgba(59,130,246,.55);
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin-ring { to { --angle: 360deg; } }
.photo-ring img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%;
  border-radius: 25px; background: var(--surface);
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px; border: 2px solid var(--border-strong);
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--accent-2); animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 900px) {
  .hero { padding-top: calc(var(--nav-h) + 24px); }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero__photo { order: -1; width: min(280px, 72vw); }
  .hero__inner { gap: 36px; }
  .hero__lead { margin-inline: auto; }
  .hero__cta, .hero__chips { justify-content: center; }
  .scroll-cue { display: none; }
}
@media (max-width: 640px) {
  .hero__photo { width: min(200px, 54vw); }
  .photo-ring { border-radius: 24px; }
  .photo-ring img { border-radius: 21px; }
  .hero__title { margin-top: 16px; }
  .hero__cta { margin-top: 24px; }
  .hero__chips { margin-top: 24px; }
}
@media (max-width: 420px) {
  .hero__cta .btn { flex: 1 1 100%; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: 110px 0; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg) 85%); }
.section--alt::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.section__head { max-width: 720px; margin-bottom: 52px; }
.section__kicker {
  font-family: var(--font-mono); font-size: 13.5px; color: var(--accent-2);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px;
}
.section__title { font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; }
.section__sub { margin-top: 16px; color: var(--text-muted); font-size: 17px; }
@media (max-width: 640px) { .section { padding: 80px 0; } .section__head { margin-bottom: 36px; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.about__text p + p { margin-top: 18px; }
.about__text p { color: var(--text-muted); font-size: 17px; }
.about__text strong { color: var(--text); font-weight: 600; }
.about__facts { display: grid; gap: 12px; }
.fact {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .25s, transform .25s var(--ease);
}
.fact:hover { border-color: var(--border-strong); transform: translateX(4px); }
.fact__icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-2); font-size: 20px;
}
.fact__label { display: block; font-size: 12.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.fact__value { display: block; font-weight: 600; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 32px; } }

.stats { margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  position: relative; overflow: hidden; padding: 26px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.stat::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--gradient);
  transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease) .2s;
}
.stat.is-visible::before { transform: scaleX(1); }
.stat__num { display: block; font-family: var(--font-head); font-size: clamp(30px, 3.6vw, 40px); font-weight: 700; color: var(--text); }
.stat__label { display: block; margin-top: 4px; color: var(--text-muted); font-size: 14.5px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-muted); border: 1px solid var(--border-strong); background: rgba(255,255,255,.02);
  transition: color .2s, background .2s, border-color .2s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-active { color: #fff; background: var(--gradient); border-color: transparent; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 28px; border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s, opacity .35s;
  transform-style: preserve-3d; will-change: transform;
}
.card:hover { border-color: rgba(59,130,246,.45); box-shadow: 0 24px 60px -24px rgba(59,130,246,.45); }
.card__glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(59,130,246,.14), transparent 45%);
}
.card:hover .card__glow { opacity: 1; }
.card--featured { grid-column: 1 / -1; background: linear-gradient(135deg, #13203b, var(--surface) 60%); }
.card--featured .card__title { font-size: 34px; }
.card.is-hidden { display: none; }
.card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card__date { font-size: 13px; color: var(--text-dim); }
.card__title { font-size: 26px; font-weight: 700; }
.card__tagline { color: var(--accent-2); font-weight: 500; margin-top: -6px; }
.card__desc { color: var(--text-muted); }
.card__metrics { display: flex; flex-wrap: wrap; gap: 10px; }
.card__metrics li {
  font-size: 13.5px; color: var(--text-muted); padding: 7px 12px; border-radius: 10px;
  background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.2);
}
.card__metrics strong { color: var(--text); }
.card__actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  padding: 5px 11px; border-radius: 999px;
}
.badge svg { font-size: 13px; }
.badge--private { color: var(--private); background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); }
.badge--public { color: var(--public); background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); }
.badge--public svg { fill: currentColor; stroke: none; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags li {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  padding: 4px 10px; border-radius: 7px; background: rgba(255,255,255,.04); border: 1px solid var(--border);
}
.tags--lg li { font-size: 13px; padding: 7px 13px; transition: color .2s, border-color .2s, transform .2s var(--ease); }
.tags--lg li:hover { color: var(--accent-2); border-color: var(--accent-2); transform: translateY(-2px); }
.projects__empty { color: var(--text-muted); text-align: center; padding: 40px 0; }
@media (max-width: 860px) {
  .projects { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .card--featured .card__title { font-size: 28px; }
}
@media (max-width: 420px) { .card__actions .btn { flex: 1 1 100%; } }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 820px; padding-left: 36px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px;
  background: var(--border);
}
.timeline::after {
  content: ""; position: absolute; left: 9px; top: 6px; width: 2px; height: var(--progress, 0%);
  background: var(--gradient); box-shadow: 0 0 12px rgba(34,211,238,.6);
  transition: height .15s linear;
}
.timeline__item { position: relative; padding-bottom: 28px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -36px; top: 24px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-strong); z-index: 1;
  transition: border-color .4s, box-shadow .4s, background .4s;
}
.timeline__item.is-visible .timeline__dot { border-color: var(--accent-2); background: #0f2a3d; box-shadow: 0 0 0 5px rgba(34,211,238,.12); }
.timeline__card {
  padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .25s, transform .25s var(--ease);
}
.timeline__card:hover { border-color: var(--border-strong); transform: translateX(4px); }
.timeline__date { font-size: 13px; color: var(--accent-2); }
.timeline__card h3 { font-size: 20px; margin-top: 6px; }
.timeline__org { color: var(--text-dim); font-size: 14.5px; margin-top: 2px; }
.timeline__card p:last-child { color: var(--text-muted); margin-top: 10px; }

/* ---------- Achievements ---------- */
.achievements { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.cert {
  margin: 0; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  transition: border-color .3s, box-shadow .3s;
}
.cert:hover { border-color: rgba(59,130,246,.45); box-shadow: 0 24px 60px -24px rgba(59,130,246,.45); }
.cert__open { position: relative; display: block; width: 100%; overflow: hidden; cursor: zoom-in; }
.cert__open img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.cert__open:hover img { transform: scale(1.04); }
.cert__zoom {
  position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px; font-size: 20px;
  background: rgba(11,18,32,.8); border: 1px solid var(--border-strong); color: var(--text);
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease);
}
.cert__open:hover .cert__zoom, .cert__open:focus-visible .cert__zoom { opacity: 1; transform: none; }
.cert figcaption { padding: 22px 24px; }
.cert figcaption h3 { font-size: 21px; }
.cert figcaption p { color: var(--text-muted); margin-top: 6px; font-size: 15px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--accent-2); font-weight: 600; font-size: 15px; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

.certs { display: grid; gap: 12px; }
.certs__item {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .25s, transform .25s var(--ease);
}
.certs__item:hover { border-color: var(--border-strong); transform: translateX(4px); }
.certs__icon {
  display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-2); font-family: var(--font-head); font-weight: 700; font-size: 16px;
}
.certs__icon svg { font-size: 22px; }
.certs__item h3 { font-size: 16px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.certs__item p { color: var(--text-dim); font-size: 14px; }
@media (max-width: 900px) { .achievements { grid-template-columns: 1fr; } }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card {
  padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .25s, transform .3s var(--ease);
}
.skill-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.skill-card__head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.skill-card__head h3 { font-size: 17px; }
.skill-tag {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px;
  color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(34,211,238,.3);
}
.skill-tag--core { color: #fff; background: var(--gradient); border-color: transparent; }
.skill-split { margin: 0 0 16px; display: grid; gap: 8px; }
.skill-split div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border);
  font-size: 14px;
}
.skill-split dt { color: var(--text); }
.skill-split dd { margin: 0; color: var(--accent-2); font-weight: 600; text-align: right; }
.skill-card ul:not(.langs) li { position: relative; padding-left: 16px; color: var(--text-muted); font-size: 14.5px; }
.skill-card ul:not(.langs) li + li { margin-top: 6px; }
.skill-card ul:not(.langs) li::before {
  content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent);
}
.langs { margin-top: 14px; display: grid; gap: 12px; }
.langs li { display: grid; grid-template-columns: 1fr auto 64px; align-items: center; gap: 12px; font-size: 15px; }
.langs em { font-style: normal; color: var(--text-dim); font-size: 13.5px; text-align: right; }
.dots { display: flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.1); }
.dots i.on { background: var(--accent-2); }
@media (max-width: 960px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .skills { grid-template-columns: 1fr; } }

.techstack { margin-top: 48px; }
.techstack__title { font-size: 18px; margin-bottom: 16px; color: var(--text-muted); font-weight: 600; }

/* ---------- Contact ---------- */
.contact__box {
  position: relative; overflow: hidden; text-align: center;
  padding: 64px 32px; border-radius: 28px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(59,130,246,.18), transparent 70%), var(--surface);
  border: 1px solid var(--border-strong);
}
.contact__box .section__sub { max-width: 560px; margin-inline: auto; }
.contact__email {
  margin: 30px auto 26px; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 8px 8px 8px 20px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border-strong);
  max-width: 100%;
}
.contact__address { font-family: var(--font-mono); font-size: clamp(14px, 2.2vw, 17px); color: var(--text); overflow-wrap: anywhere; }
.contact__address:hover { color: var(--accent-2); }
@media (max-width: 520px) {
  .contact__box { padding: 48px 18px; }
  .contact__email { padding: 12px; border-radius: 18px; flex-direction: column; width: 100%; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 36px 0; background: #0a101d; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__copy { color: var(--text-dim); font-size: 14px; }
.social { display: flex; align-items: center; gap: 22px; }
.social a {
  display: grid; place-items: center; width: 34px; height: 34px; color: var(--text-dim);
  transition: color .25s, transform .25s var(--ease), filter .25s;
}
.social a svg { width: 24px; height: 24px; stroke: none; }
.social a svg rect, .social a svg circle[fill="none"] { stroke: currentColor; }
.social a:hover, .social a:focus-visible {
  color: #fff; transform: translateY(-3px);
  filter: drop-shadow(0 4px 10px rgba(59,130,246,.6));
}
.footer__top {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 18px;
  transition: color .25s, border-color .25s, transform .25s var(--ease);
}
.footer__top:hover { color: var(--accent-2); border-color: var(--accent-2); transform: translateY(-3px); }
@media (max-width: 640px) {
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__copy { order: 2; }
  .footer__top { order: 3; }
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal[hidden], .lightbox[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(5, 9, 18, .78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade-in .3s ease;
}
.modal__panel {
  position: relative; width: min(780px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8);
  animation: pop-in .4s var(--ease);
}
.modal__close {
  position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 2;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 18px;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  transition: background .2s, transform .2s;
}
.modal__close:hover { background: var(--accent); transform: rotate(90deg); }
.modal__body { padding: 40px 40px 36px; }
.modal__body h2 { font-size: clamp(30px, 4vw, 40px); margin-top: 6px; }
.modal__body h3 { font-size: 18px; margin: 28px 0 10px; color: var(--text); }
.modal__body p { color: var(--text-muted); }
.modal__body p + p { margin-top: 12px; }
.cs__kicker { font-family: var(--font-mono); font-size: 13px; color: var(--accent-2) !important; }
.cs__lead { font-size: 18px; margin-top: 8px; color: var(--text) !important; }
.cs__note { font-size: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border); margin-top: 18px !important; }
.cs__list li { position: relative; padding-left: 18px; color: var(--text-muted); }
.cs__list li + li { margin-top: 8px; }
.cs__list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--gradient); }
.cs__list strong, .pipeline strong { color: var(--text); }
.pipeline { counter-reset: step; display: grid; gap: 8px; }
.pipeline li {
  counter-increment: step; position: relative; padding: 10px 14px 10px 50px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border); color: var(--text-muted); font-size: 15px;
}
.pipeline li::before {
  content: counter(step); position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--gradient); color: #fff; font-family: var(--font-mono); font-size: 13px; font-weight: 600;
}
.cs__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cs__stats li { padding: 14px; border-radius: 12px; background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.2); }
.cs__stats strong { display: block; font-family: var(--font-head); font-size: 24px; color: var(--text); }
.cs__stats span { font-size: 13px; color: var(--text-muted); line-height: 1.4; display: block; margin-top: 2px; }
.modal__body .tags { margin-top: 20px; }
.cs__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) {
  .modal__body { padding: 28px 20px 26px; }
  .cs__stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Access request dialog ---------- */
.modal--access { z-index: 155; }
.modal__panel--sm { width: min(540px, 100%); }
.access__title { font-size: clamp(24px, 3.4vw, 30px) !important; padding-right: 40px; }
.modal--access .modal__body > p:not(.cs__kicker) { margin-top: 12px; }
.access__options { margin-top: 24px; display: grid; gap: 10px; }
.access__opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.access__opt:hover, .access__opt:focus-visible { border-color: var(--accent-2); background: var(--accent-soft); transform: translateX(4px); }
.access__icon {
  display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent-2); font-size: 19px;
}
.access__opt strong { display: block; color: var(--text); font-weight: 600; }
.access__opt small { display: block; color: var(--text-muted); font-size: 13.5px; line-height: 1.4; }
.access__hint {
  margin-top: 14px !important; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  color: var(--text) !important; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35);
  animation: fade-in .3s ease;
}
.access__hint[hidden] { display: none; }
.access__hint strong { color: var(--private); }
.access__address { margin-top: 20px !important; font-size: 14px; color: var(--text-dim) !important; overflow-wrap: anywhere; }
.access__address .mono { color: var(--text-muted); }

/* ---------- Videos ---------- */
.icon-play { fill: currentColor !important; stroke: none !important; }
.modal--video { z-index: 158; }
.video-panel {
  position: relative; width: min(960px, 100%); padding: 16px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8); animation: pop-in .4s var(--ease);
}
.video-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.video-panel__head h2 { font-size: clamp(16px, 2.2vw, 20px); padding-left: 4px; }
.video-panel .modal__close { position: static; float: none; margin: 0; flex-shrink: 0; }
.video-panel .link-arrow { margin: 12px 0 2px 4px; font-size: 14px; }
.video-frame, .video-inline {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000;
}
.video-frame iframe, .video-inline iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-inline { margin-top: 20px; }

.video-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin-top: 20px;
  border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border-strong);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: transform .6s var(--ease), opacity .3s; }
.video-thumb:hover img, .video-thumb:focus-visible img { transform: scale(1.04); opacity: .9; }
.video-thumb__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-size: 28px;
  box-shadow: 0 10px 30px -6px rgba(59,130,246,.8); transition: transform .3s var(--ease);
}
.video-thumb__play svg { margin-left: 4px; }
.video-thumb:hover .video-thumb__play { transform: translate(-50%, -50%) scale(1.08); }
.video-thumb__label {
  position: absolute; left: 14px; bottom: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(11,18,32,.85); border: 1px solid var(--border-strong); font-size: 13.5px; font-weight: 600; color: var(--text);
}

.link-play {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  color: var(--accent-2); font-weight: 600; font-size: 15px;
}
.link-play svg { font-size: 12px; transition: transform .25s var(--ease); }
.link-play:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-play:hover svg { transform: scale(1.2); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 9, 18, .92); animation: fade-in .3s ease; cursor: zoom-out;
}
.lightbox img { max-width: min(1200px, 100%); max-height: calc(100dvh - 32px); border-radius: 12px; animation: pop-in .4s var(--ease); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); }
.lightbox .modal__close { position: absolute; top: 16px; right: 16px; margin: 0; float: none; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(20px) scale(.97); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 170;
  padding: 12px 20px; border-radius: 12px; font-weight: 500; font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--accent-2); color: var(--text);
  box-shadow: var(--shadow);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .35s;
}
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Reveal animations ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--delay, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

body.no-scroll { overflow: hidden; }

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