/* ==========================================================================
   Nikolina Dimakopoulou — Portfolio
   Design system: "Silicon Lab" dark · cyan + copper · Space Grotesk / Source Serif 4 / IBM Plex Mono
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg:          #0a0f16;
  --bg-2:        #0d141d;
  --surface:     #111a25;
  --surface-2:   #16202e;
  --ink:         #e8eef5;
  --muted:       #93a5b8;
  --faint:       #5d7184;
  --line:        rgba(148, 170, 195, 0.14);
  --line-strong: rgba(148, 170, 195, 0.30);
  --cyan:        #43b8e8;
  --cyan-bright: #6ccdf2;
  --cyan-dim:    rgba(67, 184, 232, 0.10);
  --copper:      #d98e32;
  --copper-dim:  rgba(217, 142, 50, 0.12);
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  --maxw: 1120px;
  --header-h: 64px;
  --shadow-1: 0 1px 0 rgba(148, 170, 195, 0.06), 0 16px 44px rgba(0, 0, 0, 0.45);
  --glow-cyan: 0 0 18px rgba(67, 184, 232, 0.35);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.97rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
h2, h3, h4 { letter-spacing: -0.015em; }

::selection { background: var(--cyan); color: #06121a; }

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

.mono { font-family: var(--mono); }

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

section[id] { scroll-margin-top: 84px; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--copper));
  z-index: 100;
  pointer-events: none;
}

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
}
.section-head .eyebrow::after {
  content: "";
  width: 64px;
  height: 1px;
  margin-left: 14px;
  background: linear-gradient(90deg, var(--cyan), var(--copper));
}
.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}
.section--alt { background: var(--bg-2); }
.section-head { position: relative; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}
.section-num {
  position: absolute;
  right: 0;
  top: -44px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(148, 170, 195, 0.22);
  pointer-events: none;
  user-select: none;
}
.sub-section { margin-top: 64px; }
.sub-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sub-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid var(--cyan);
  border-radius: 2px;
  transform: rotate(45deg);
  flex: none;
  box-shadow: var(--glow-cyan);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 22, 0.92);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}
.brand:hover { color: var(--cyan); text-decoration: none; }
.brand-mark {
  width: 24px;
  height: 24px;
  flex: none;
}
.brand-text {
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 11px;
  border-radius: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: color 0.18s ease, background 0.18s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.site-nav a.active { color: var(--cyan); }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--copper));
  border-radius: 2px;
}
.nav-num { color: var(--faint); font-size: 0.6rem; }
.site-nav a.active .nav-num { color: var(--cyan); }
.site-nav .nav-cta {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  margin-left: 8px;
}
.site-nav .nav-cta:hover { border-color: var(--cyan); color: var(--cyan); }
.site-nav .nav-cta.active::after { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle-bar {
  width: 16px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 11vh, 130px) 0 48px;
  border-bottom: 1px solid var(--line);
}
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(67, 184, 232, 0.10) 1px, transparent 1.5px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, black 15%, transparent 70%);
          mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, black 15%, transparent 70%);
  pointer-events: none;
}
.hero-wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-wash--cyan { width: 540px; height: 400px; top: -180px; right: -60px; background: rgba(67, 184, 232, 0.14); }
.hero-wash--copper { width: 440px; height: 340px; bottom: -160px; left: -120px; background: rgba(217, 142, 50, 0.10); }

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 8px currentColor;
}
.p1 { width: 7px; height: 7px; background: var(--cyan); color: var(--cyan); top: 18%; left: 12%; animation: drift 7s ease-in-out infinite alternate; }
.p2 { width: 5px; height: 5px; background: var(--copper); color: var(--copper); top: 64%; left: 6%; animation: drift 9s ease-in-out infinite alternate-reverse; }
.p3 { width: 6px; height: 6px; background: var(--cyan); color: var(--cyan); top: 30%; right: 40%; animation: drift 8s ease-in-out infinite alternate; }
.p4 { width: 4px; height: 4px; background: var(--copper); color: var(--copper); bottom: 20%; right: 12%; animation: drift 10s ease-in-out infinite alternate-reverse; }
@keyframes drift {
  from { transform: translateY(-14px); }
  to   { transform: translateY(16px); }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero-title {
  font-size: clamp(2.7rem, 6.8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.99;
  margin: 16px 0 22px;
  text-wrap: balance;
}
.hero-title-last {
  color: transparent;
  -webkit-text-stroke: 2px var(--copper);
}
.hero-role {
  max-width: 54ch;
  font-size: 1.07rem;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
}
.hero-role strong { color: var(--ink); font-weight: 600; font-style: normal; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  min-height: 46px;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--cyan); color: #06121a; }
.btn-primary:hover { background: var(--cyan-bright); box-shadow: 0 8px 26px rgba(67, 184, 232, 0.35); }
.btn-copper { background: var(--copper); color: #160c02; }
.btn-copper:hover { background: #e69a42; box-shadow: 0 8px 26px rgba(217, 142, 50, 0.35); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 18px rgba(67, 184, 232, 0.15); }
.btn-lg { padding: 15px 28px; font-size: 0.8rem; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.hero-facts li {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(17, 26, 37, 0.6);
  border-radius: 6px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--copper);
  transform: rotate(45deg);
  flex: none;
}

/* Hero circuit illustration */
.hero-visual { justify-self: end; width: min(100%, 540px); }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .hero-visual svg circle { filter: drop-shadow(0 0 6px rgba(67, 184, 232, 0.8)); }
}

/* Waveform strip */
.wave {
  position: relative;
  width: 100%;
  height: 42px;
  margin-top: 48px;
}
.wave path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: wave-draw 6s linear infinite;
}
@keyframes wave-draw {
  0%   { stroke-dashoffset: 1400; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1400; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 11px 0;
  white-space: nowrap;
}
.marquee span::after {
  content: " ✦ ";
  color: var(--copper);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Framed cards (schematic corner brackets) ---------- */
.framed { position: relative; }
.framed::before,
.framed::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  opacity: 0.9;
}
.framed::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  border-top-left-radius: 6px;
}
.framed::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--copper);
  border-right: 2px solid var(--copper);
  border-bottom-right-radius: 6px;
}

/* ---------- Profile ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 44px;
  align-items: start;
}
.lead {
  font-size: 1.18rem;
  line-height: 1.55;
  margin-bottom: 16px;
}
.body-copy { color: var(--muted); margin-bottom: 14px; max-width: 60ch; }
.body-copy strong { color: var(--ink); font-weight: 600; }

.profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-card:hover {
  border-color: rgba(67, 184, 232, 0.45);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1), var(--glow-cyan);
}
.fact-list { margin: 0; }
.fact-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.fact-row:last-child { border-bottom: none; padding-bottom: 0; }
.fact-row:first-child { padding-top: 0; }
.fact-row dt {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 2px;
}
.fact-row dd { margin: 0; font-size: 0.93rem; }

/* ---------- Skills ---------- */
.skills-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.cluster {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px 24px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.cluster:hover {
  border-color: rgba(67, 184, 232, 0.5);
  transform: translateY(-3px);
  box-shadow: var(--shadow-1), var(--glow-cyan);
}
.cluster-pins {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}
.cluster-pins span {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--copper);
  opacity: 0.75;
}
.cluster-tag {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-bottom: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.chips li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--cyan);
  opacity: 0.65;
  transform: rotate(45deg);
  flex: none;
}
.chips li:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 3px 14px rgba(67, 184, 232, 0.2);
}
.chips li:hover::before { opacity: 1; }

.soft-skills {
  margin-top: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 18px 24px;
  background: rgba(17, 26, 37, 0.4);
}
.soft-skills .chips { margin-top: 10px; }

/* Wafer rings behind skills */
.wafer-rings {
  position: absolute;
  right: -160px;
  top: 40px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%,
    transparent 0 44px,
    rgba(217, 142, 50, 0.12) 44px 45px);
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 66%);
          mask-image: radial-gradient(circle, black 30%, transparent 66%);
  pointer-events: none;
}

/* ---------- Timeline (experience) ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--copper));
  border-radius: 2px;
}
.timeline-item { position: relative; padding: 0 0 44px 0; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-dim), 0 0 14px rgba(67, 184, 232, 0.4);
}
.timeline-date {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 6px;
}
.timeline-item h3 { font-size: 1.24rem; font-weight: 600; }
.timeline-org { color: var(--muted); font-size: 0.93rem; margin: 2px 0 12px; }

.bullets { margin-top: 2px; }
.bullets li {
  position: relative;
  color: var(--muted);
  padding-left: 20px;
  margin-bottom: 8px;
  max-width: 66ch;
}
.bullets li::before {
  content: "→";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--cyan);
  line-height: 1.75;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.edu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-1);
  background-image: linear-gradient(90deg, var(--cyan), var(--copper));
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: top;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.edu-card:hover {
  border-color: rgba(67, 184, 232, 0.5);
  transform: translateY(-3px);
  box-shadow: var(--shadow-1), var(--glow-cyan);
}
.edu-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.tag {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(67, 184, 232, 0.35);
  background: var(--cyan-dim);
  border-radius: 999px;
  padding: 4px 10px;
}
.edu-dates { font-size: 0.72rem; color: var(--faint); white-space: nowrap; }
.edu-card h3 { font-size: 1.18rem; font-weight: 600; line-height: 1.25; }
.edu-org { color: var(--muted); font-size: 0.91rem; margin: 4px 0 14px; }
.edu-org a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.edu-org a:hover { color: var(--cyan); }
.thesis {
  background: var(--copper-dim);
  border: 1px solid rgba(217, 142, 50, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.thesis-label {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 4px;
}
.thesis p:last-child { color: var(--ink); font-size: 0.93rem; }

/* ---------- Projects ---------- */
.project-list { display: flex; flex-direction: column; gap: 18px; }
.project {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.project:hover {
  border-color: rgba(67, 184, 232, 0.5);
  transform: translateY(-3px);
  box-shadow: var(--shadow-1), var(--glow-cyan);
}
.project-index {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: transparent;
  -webkit-text-stroke: 1px var(--copper);
  padding-top: 3px;
}
.project-body h3 { font-size: 1.12rem; font-weight: 600; line-height: 1.3; margin-bottom: 10px; }

/* ---------- Certifications ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.cert-card:hover { border-color: rgba(217, 142, 50, 0.5); transform: translateY(-3px); box-shadow: var(--shadow-1), 0 0 18px rgba(217, 142, 50, 0.2); }
.cert-badge {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 8px;
}
.cert-card h4 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.cert-desc { color: var(--muted); font-size: 0.91rem; }

/* ---------- Events (conferences / volunteering) ---------- */
.event-list { display: flex; flex-direction: column; }
.event {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.93rem;
}
.event:last-child { border-bottom: none; }
.event strong { color: var(--ink); font-weight: 600; }
.event-date {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
  padding-top: 2px;
}

/* ---------- Languages ---------- */
.lang-list { display: flex; flex-direction: column; gap: 4px; }
.lang-row {
  display: grid;
  grid-template-columns: 100px 1fr 80px;
  align-items: center;
  gap: 16px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.lang-row:last-child { border-bottom: none; }
.lang-name { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink); }
.lang-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.lang-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--copper));
  box-shadow: 0 0 8px rgba(67, 184, 232, 0.3);
}
.lang-level { font-size: 0.72rem; color: var(--muted); text-align: right; }

/* ---------- CTA ---------- */
.cta-section { border-bottom: none; position: relative; }
.cta-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(44px, 7vw, 76px);
  text-align: center;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(67, 184, 232, 0.10) 1px, transparent 1.5px),
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(217, 142, 50, 0.08), transparent 60%);
  background-size: 30px 30px, 100% 100%;
  pointer-events: none;
}
.cta-panel .eyebrow { position: relative; }
.cta-panel h2 {
  position: relative;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 10px;
}
.cta-text {
  position: relative;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 28px;
}
.cta-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.footer-brand { font-weight: 600; font-size: 0.93rem; }
.footer-links { font-size: 0.86rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--cyan); }
.footer-sep { color: var(--faint); margin: 0 10px; }
.footer-copy { font-size: 0.7rem; color: var(--faint); }

/* ---------- Scroll reveal (JS-gated) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.in {
  opacity: 1;
  transform: none;
}
html.js .skills-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
html.js .cert-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
html.js .edu-grid .reveal:nth-child(2) { transition-delay: 0.08s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .profile-grid { grid-template-columns: 1fr; gap: 32px; }
  .edu-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .section-num { display: none; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(300px, 82vw);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    padding: 20px 16px;
    transform: translateX(105%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-1);
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav a { font-size: 0.76rem; padding: 13px 10px; justify-content: space-between; }
  .site-nav a.active::after { display: none; }
  .site-nav .nav-cta { margin-left: 0; margin-top: 6px; justify-content: center; }
  .event { grid-template-columns: 1fr; gap: 4px; }
  .event-date { padding-top: 0; }
  .wafer-rings { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; gap: 10px; padding: 22px; }
  .lang-row { grid-template-columns: 84px 1fr 60px; gap: 10px; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
  .hero-facts li { width: 100%; justify-content: flex-start; }
  .cta-actions { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
  .section-num { display: none; }
}

/* ---------- Touch devices: kill sticky hover ---------- */
@media (hover: none) {
  .btn:hover, .cluster:hover, .edu-card:hover, .project:hover,
  .cert-card:hover, .profile-card:hover, .chips li:hover {
    transform: none;
    box-shadow: var(--shadow-1);
  }
  .btn-primary:hover, .btn-copper:hover, .btn-ghost:hover {
    background: var(--cyan);
  }
  .btn-copper:hover { background: var(--copper); }
  .btn-ghost:hover { background: transparent; }
  .btn:active { transform: scale(0.97); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .wave path { animation: none; stroke-dashoffset: 0; }
  .marquee-track { animation: none; }
  .particle { animation: none; }
  .hero-visual svg circle { animation: none; }
  .btn:hover, .cluster:hover, .edu-card:hover, .project:hover, .cert-card:hover, .profile-card:hover { transform: none; }
  .site-header { transition: none; }
}
