/* ============================================================
   Mathieu Le Gouill · Portfolio
   Dark terminal / developer aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* surfaces */
  --bg:        #08080a;
  --bg-1:      #0d0d11;
  --bg-2:      #121218;
  --bg-3:      #16161d;
  --border:    rgba(255, 255, 255, 0.07);
  --border-2:  rgba(255, 255, 255, 0.12);

  /* text */
  --text:      #f4f4f6;
  --text-2:    #a4a4af;
  --text-3:    #6c6c78;

  /* accents */
  --cyan:      #22d3ee;
  --cyan-dim:  #0e7490;
  --violet:    #a78bfa;
  --violet-dim:#6d28d9;
  --grad:      linear-gradient(90deg, var(--cyan), var(--violet));
  --grad-135:  linear-gradient(135deg, var(--cyan), var(--violet));

  /* type */
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* grid + glow backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 35%, transparent 78%);
}
body::after {
  content: '';
  position: fixed;
  top: -28vh; left: 50%;
  width: 90vw; height: 70vh;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(34, 211, 238, 0.12), transparent 70%),
    radial-gradient(closest-side, rgba(167, 139, 250, 0.10), transparent 70%);
  background-position: 30% 40%, 72% 30%;
  background-repeat: no-repeat;
  background-size: 60% 100%, 60% 100%;
  filter: blur(8px);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

/* ---- shared layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { position: relative; z-index: 1; padding-block: clamp(70px, 11vw, 140px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}
.eyebrow .slashes { color: var(--violet); margin-right: 0.35em; }

.section-head { text-align: center; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 14px;
  line-height: 1.05;
}
.section-head p {
  color: var(--text-2);
  margin-top: 16px;
  font-size: 1.05rem;
}

.accent-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 13px 22px;
  border-radius: 11px;
  border: 1px solid var(--border-2);
  color: var(--text);
  background: var(--bg-2);
  transition: border-color .25s, background .25s, transform .2s, box-shadow .25s;
  cursor: pointer;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 8px 30px -12px rgba(34,211,238,0.5); }
.btn-primary {
  background: var(--grad-135);
  color: #06060a;
  border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover { box-shadow: 0 10px 36px -10px rgba(167,139,250,0.6); border-color: transparent; }

/* ---- nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}
.brand .muted { color: var(--text-3); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-2);
  padding: 8px 13px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-links a .hash { color: var(--cyan); opacity: .55; margin-right: 1px; }
.nav-links a:hover { color: var(--text); background: var(--bg-2); }
.nav-links a.active { color: var(--text); }
.nav-links a.active .hash { opacity: 1; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-2);
  background: var(--bg-1);
  transition: color .2s, border-color .2s, transform .2s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { color: var(--text); border-color: var(--cyan); transform: translateY(-2px); }
.menu-toggle { display: none; }

/* ---- hero ---- */
.hero { position: relative; z-index: 1; padding-top: 150px; padding-bottom: clamp(60px, 9vw, 110px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(34px, 5vw, 70px);
  align-items: center;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-2);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-1);
}
.status-chip .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 22px 0 0;
}
.hero h1 .lastname { display: block; }
.hero .role {
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-2);
  margin-top: 18px;
  letter-spacing: -0.01em;
}
.hero .role b { color: var(--cyan); font-weight: 500; }
.hero .lede {
  color: var(--text-2);
  font-size: 1.08rem;
  max-width: 44ch;
  margin-top: 22px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-3);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--violet); }

/* code window (reusable) */
.code-window {
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0c0c12, #0a0a0e);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.9), 0 0 0 1px rgba(34,211,238,0.04);
}
.code-window .titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.code-window .lights { display: flex; gap: 7px; }
.code-window .lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.code-window .lights i:nth-child(1){ background:#ff5f57; }
.code-window .lights i:nth-child(2){ background:#febc2e; }
.code-window .lights i:nth-child(3){ background:#28c840; }
.code-window .filename {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
  margin-left: 8px;
}
.code-window .filename .ext { color: var(--cyan); }
.code-window pre {
  margin: 0;
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.75;
  overflow-x: auto;
  tab-size: 2;
}
.code-window pre::-webkit-scrollbar { height: 7px; }
.code-window pre::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; }
/* token colors */
.tok-c { color: #5d6b78; font-style: italic; } /* comment */
.tok-k { color: #c084fc; }                      /* keyword */
.tok-t { color: #22d3ee; }                       /* type */
.tok-f { color: #67e8f9; }                       /* function */
.tok-s { color: #86efac; }                       /* string */
.tok-n { color: #fca5a5; }                       /* number */
.tok-o { color: #8a8a98; }                       /* operator/punct */
.tok-v { color: #e4e4e7; }                       /* var/ident */

/* ---- about ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 4vw, 56px);
  align-items: start;
}
.about-bio p { color: var(--text-2); font-size: 1.06rem; }
.about-bio p + p { margin-top: 18px; }
.about-bio strong { color: var(--text); font-weight: 600; }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
}
.stat {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 22px 20px;
  background: var(--bg-1);
  transition: border-color .25s, transform .25s;
}
.stat::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 0% 0%, rgba(34,211,238,0.07), transparent 55%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.stat > * { position: relative; }
.stat:hover { border-color: var(--border-2); transform: translateY(-3px); }
.stat:hover::before { opacity: 1; }
.stat .num {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-3);
  margin-top: 9px;
  letter-spacing: 0.02em;
}
.terminal {
  margin-top: 22px;
  border: 1px solid var(--border-2);
  border-radius: 13px;
  background: #0a0a0e;
  overflow: hidden;
}
.terminal .titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
}
.terminal .lights { display:flex; gap:7px; }
.terminal .lights i { width:11px;height:11px;border-radius:50%;display:block; }
.terminal .lights i:nth-child(1){background:#ff5f57;}
.terminal .lights i:nth-child(2){background:#febc2e;}
.terminal .lights i:nth-child(3){background:#28c840;}
.terminal .tlabel { font-family: var(--mono); font-size:.76rem; color: var(--text-3); margin-left:6px; }
.terminal pre {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.85;
  color: var(--text-2);
}
.terminal .pr { color: var(--cyan); }      /* prompt $ */
.terminal .out { color: var(--text); }      /* output > */
.terminal .cmd { color: var(--text); }
.terminal .gn { color: #86efac; }
.terminal .cursor {
  display: inline-block;
  width: 9px; height: 1.05em;
  background: var(--cyan);
  vertical-align: -2px;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 0%,50%{opacity:1;} 50.01%,100%{opacity:0;} }

/* ---- skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.skill-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
  padding: 26px 24px 28px;
  overflow: visible;
  transition: border-color .25s, transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s;
}
.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 0% 0%, rgba(34,211,238,0.07), transparent 55%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 0;
}
.skill-card > * { position: relative; z-index: 1; }
.skill-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  z-index: 10;
  box-shadow: 0 24px 54px -34px rgba(0,0,0,0.9);
}
.skill-card:hover::before { opacity: 1; }
.skill-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.skill-card .head .ic {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--border-2);
  background: rgba(34,211,238,0.06);
  color: var(--cyan);
}
.skill-card .head .ic svg { width: 20px; height: 20px; }
.skill-card .head h3 { font-size: 1.02rem; font-weight: 600; }

.skill-rows { display: flex; flex-direction: column; }

.skill-row {
  position: relative;
  display: block;
  padding: 10px 10px 11px;
  margin: 0 -10px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  cursor: default;
  transition: background .2s;
}
.skill-row.has-link { cursor: pointer; }
.skill-row:hover, .skill-row:focus-visible { background: rgba(255,255,255,0.035); outline: none; }
.skill-row:hover, .skill-row:focus-within { z-index: 6; }

.sk-main {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 9px;
}
.sk-logo {
  position: relative;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-3);
  overflow: hidden;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.sk-logo img {
  position: absolute;
  width: 18px; height: 18px;
  opacity: 0;
  transition: opacity .25s, transform .2s;
}
.sk-logo.svg-logo { color: var(--text-2); }
.sk-logo.svg-logo svg { width: 18px; height: 18px; }
.sk-logo .mono {
  font-family: var(--mono);
  font-size: 0.86rem; font-weight: 700;
  color: var(--text-2);
  transition: opacity .2s;
}
.sk-logo.imgok img { opacity: .82; }
.sk-logo.imgok .mono { opacity: 0; }
.skill-row:hover .sk-logo {
  border-color: var(--border-2);
  background: rgba(34,211,238,0.07);
  box-shadow: 0 0 18px -8px rgba(34,211,238,0.6);
}
.skill-row:hover .sk-logo.imgok img { opacity: 1; transform: scale(1.06); }
.skill-row:hover .sk-logo .mono { color: var(--text); }

.sk-name {
  flex: 1 1 auto;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.sk-level {
  flex: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 100px;
  border: 1px solid currentColor;
  opacity: 0.92;
}
.lvl-expert     .sk-level { color: var(--cyan); }
.lvl-proficient .sk-level { color: var(--violet); }
.lvl-familiar   .sk-level { color: var(--text-2); }
.lvl-learning   .sk-level { color: #f6c177; }

.skill-track {
  height: 6px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: var(--grad);
  box-shadow: 0 0 12px -2px rgba(34,211,238,0.5);
  transition: width 1.1s cubic-bezier(.22,1,.36,1);
}
.lvl-learning .skill-fill {
  background: linear-gradient(90deg, var(--violet), #f6c177);
  box-shadow: 0 0 12px -2px rgba(246,193,119,0.45);
}

/* ---- skill popover ---- */
.popover {
  position: absolute;
  top: calc(100% - 2px);
  left: 6px; right: 6px;
  z-index: 8;
  background: linear-gradient(180deg, #14141b, #0f0f14);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 14px 15px;
  box-shadow: 0 22px 50px -22px rgba(0,0,0,0.95);
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s cubic-bezier(.22,1,.36,1);
}
.popover::before {
  content: '';
  position: absolute;
  top: -5px; left: 22px;
  width: 9px; height: 9px;
  background: #14141b;
  border-left: 1px solid var(--border-2);
  border-top: 1px solid var(--border-2);
  transform: rotate(45deg);
}
.skill-row:hover .popover,
.skill-row:focus-within .popover {
  opacity: 1;
  transform: translateY(2px) scale(1);
}
.pop-desc { font-size: 0.85rem; color: var(--text-2); line-height: 1.45; }
.pop-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.pop-subs span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--cyan);
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.18);
  border-radius: 6px;
  padding: 3px 8px;
}
.pop-proj {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--violet);
  transition: gap .2s, color .2s;
}
.pop-proj svg { width: 13px; height: 13px; }
.skill-row.has-link:hover .pop-proj { gap: 9px; color: var(--cyan); }
.pop-ctx {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
}

@media (prefers-reduced-motion: reduce) {
  .skill-card { transition: border-color .2s, box-shadow .2s; }
}

/* ---- projects ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.proj {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color .3s, transform .3s, background .3s;
  overflow: hidden;
}
.proj::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 0% 0%, rgba(34,211,238,0.07), transparent 55%);
  opacity: 0;
  transition: opacity .3s;
}
.proj:hover { border-color: var(--border-2); transform: translateY(-4px); }
.proj:hover::before { opacity: 1; }
.proj > * { position: relative; }
.proj .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.proj .ic {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid; place-items: center;
  border: 1px solid var(--border-2);
  background: rgba(167,139,250,0.07);
  color: var(--cyan);
}
.proj .ic svg { width: 22px; height: 22px; }
.proj .ext { color: var(--text-3); transition: color .2s, transform .2s; }
.proj .ext svg { width: 18px; height: 18px; }
.proj:hover .ext { color: var(--cyan); transform: translate(2px,-2px); }
.proj h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
.proj .lang {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--violet);
  margin-top: 4px;
}
.proj p { color: var(--text-2); font-size: 0.95rem; margin-top: 12px; flex-grow: 1; }
.proj .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-2);
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--bg-3);
  border: 1px solid var(--border);
}

/* ---- experience ---- */
.exp-list {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
}
.exp-list::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet), transparent);
  opacity: .4;
}
.exp {
  position: relative;
  padding-left: 42px;
  padding-bottom: 44px;
}
.exp:last-child { padding-bottom: 0; }
.exp .node {
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.1);
}
.exp .when {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cyan);
}
.exp .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-top: 6px; }
.exp .head h3 { font-size: 1.22rem; font-weight: 600; }
.exp .head .at { color: var(--text-3); font-family: var(--mono); font-size: .85rem; }
.exp .org { color: var(--violet); font-weight: 600; }
.exp .desc { color: var(--text-2); margin-top: 12px; font-size: 0.98rem; max-width: 65ch; }
.exp .desc strong { color: var(--text); font-weight: 600; }
.exp .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }

/* ---- education ---- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}
.edu {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
  padding: 26px 24px;
  transition: border-color .25s, transform .25s;
}
.edu::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 0% 0%, rgba(34,211,238,0.07), transparent 55%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.edu > * { position: relative; }
.edu:hover { border-color: var(--border-2); transform: translateY(-3px); }
.edu:hover::before { opacity: 1; }
.edu .yr { font-family: var(--mono); font-size: 0.82rem; color: var(--cyan); }
.edu h3 { font-size: 1.06rem; font-weight: 600; margin-top: 10px; line-height: 1.3; }
.edu .school { color: var(--text-2); font-size: 0.92rem; margin-top: 8px; }
.edu .note { font-family: var(--mono); font-size: 0.74rem; color: var(--violet); margin-top: 10px; }

/* ---- contact ---- */
.contact { text-align: center; }
.contact-card {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--border-2);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  padding: clamp(36px, 6vw, 60px);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(60% 100% at 50% 0%, rgba(34,211,238,0.1), transparent 60%);
  pointer-events: none;
}
.contact-card > * { position: relative; }
.contact-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
.contact-card p { color: var(--text-2); margin-top: 14px; font-size: 1.05rem; max-width: 50ch; margin-inline: auto; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; margin-top: 30px; }
.lang-row {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.lang-pill {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-2);
  padding: 6px 13px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-1);
}
.lang-pill b { color: var(--text); font-weight: 600; }
.lang-pill .lvl { color: var(--cyan); }

/* ---- footer ---- */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.014));
  padding: 56px var(--gutter) 30px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}
.footer-brand .brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.footer-brand .brand .muted { color: var(--text-3); }
.footer-brand p {
  color: var(--text-2);
  margin-top: 14px;
  font-size: 0.92rem;
  max-width: 34ch;
  line-height: 1.55;
}
.footer-social { display: flex; gap: 11px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-2);
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  transition: color .2s, border-color .2s, transform .2s, background .2s, box-shadow .25s;
}
.social-btn svg { width: 17px; height: 17px; }
.social-btn:hover {
  color: var(--text);
  border-color: var(--cyan);
  background: var(--bg-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -16px rgba(34,211,238,0.55);
}
.footer-bottom {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
}
.footer-bottom .to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
  transition: color .2s, gap .2s;
}
.footer-bottom .to-top svg { width: 14px; height: 14px; transition: transform .2s; }
.footer-bottom .to-top:hover { color: var(--cyan); gap: 9px; }
.footer-bottom .to-top:hover svg { transform: translateY(-2px); }

/* ---- reveal animation ---- */
/* Base state is VISIBLE so content never depends on JS to appear.
   JS adds .reveal-on to <html> when it can run the entrance, which
   arms the hidden start state; .in then animates to visible. */
.reveal { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.reveal-on .reveal { opacity: 0; transform: translateY(26px); }
.reveal-on .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .skill-fill { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- responsive ---- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: var(--gutter); right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 20px 50px -20px rgba(0,0,0,0.8);
  }
  .projects-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.4rem); }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
}
