/* ---------- Tokens ---------- */
:root{
  --bg: #090d13;
  --bg-elevated: #0f151e;
  --bg-card: #121926;
  --border: #212b3a;
  --border-soft: #1a2230;
  --text-primary: #e9edf3;
  --text-secondary: #93a0b3;
  --text-muted: #576174;
  --cyan: #52e0c4;
  --cyan-dim: rgba(82, 224, 196, 0.12);
  --amber: #f5a623;
  --amber-dim: rgba(245, 166, 35, 0.12);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max: 1080px;
}

[data-theme="light"]{
  --bg: #f4f6f9;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #dbe1e9;
  --border-soft: #e7ebf1;
  --text-primary: #12161d;
  --text-secondary: #4a5568;
  --text-muted: #8792a2;
  --cyan: #0e9c82;
  --cyan-dim: rgba(14, 156, 130, 0.1);
  --amber: #b8790f;
  --amber-dim: rgba(184, 121, 15, 0.1);
}

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

html{ scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; font-size: 112.5%; }

body{
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: default;
  transition: background 0.35s ease, color 0.35s ease;
}
[data-theme="dark"] body{
  background:
    radial-gradient(1100px 620px at 88% -6%, rgba(82,224,196,0.10), transparent 55%),
    radial-gradient(950px 560px at 4% 22%, rgba(245,166,35,0.065), transparent 55%),
    radial-gradient(1200px 700px at 50% 105%, rgba(82,224,196,0.07), transparent 60%),
    var(--bg);
}
[data-theme="light"] body{
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(14,156,130,0.10), transparent 58%),
    radial-gradient(900px 520px at 100% 6%, rgba(184,121,15,0.07), transparent 55%),
    radial-gradient(800px 500px at 50% 100%, rgba(14,156,130,0.06), transparent 55%),
    var(--bg);
}

.bg-grid{
  position: fixed; inset: -2px; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(82,224,196,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82,224,196,0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(1200px 800px at 50% 0%, black, transparent 75%);
  mask-image: radial-gradient(1200px 800px at 50% 0%, black, transparent 75%);
}
[data-theme="light"] .bg-grid{
  background-image:
    linear-gradient(rgba(14,156,130,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,156,130,0.07) 1px, transparent 1px);
}

.bg-glow{ position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-glow::before, .bg-glow::after{
  content: ''; position: absolute; width: 640px; height: 640px; border-radius: 50%;
  filter: blur(120px); opacity: 0.55;
}
.bg-glow::before{
  top: -220px; right: -160px; background: radial-gradient(circle, rgba(82,224,196,0.20), transparent 70%);
  animation: driftA 26s ease-in-out infinite;
}
.bg-glow::after{
  bottom: -260px; left: -180px; background: radial-gradient(circle, rgba(245,166,35,0.13), transparent 70%);
  animation: driftB 32s ease-in-out infinite;
}
[data-theme="light"] .bg-glow::before{ background: radial-gradient(circle, rgba(14,156,130,0.16), transparent 70%); }
[data-theme="light"] .bg-glow::after{ background: radial-gradient(circle, rgba(184,121,15,0.10), transparent 70%); }
@keyframes driftA{
  0%, 100%{ transform: translate(0, 0); }
  50%{ transform: translate(-60px, 50px); }
}
@keyframes driftB{
  0%, 100%{ transform: translate(0, 0); }
  50%{ transform: translate(50px, -40px); }
}
@media (prefers-reduced-motion: reduce){
  .bg-glow::before, .bg-glow::after{ animation: none; }
}

::selection{ background: var(--cyan-dim); color: var(--cyan); }

a{ color: inherit; text-decoration: none; }

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

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* faint scanline atmosphere */
.scanline{
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.012) 0px,
    rgba(255,255,255,0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}
[data-theme="light"] .scanline{
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.012) 0px,
    rgba(0,0,0,0.012) 1px,
    transparent 1px,
    transparent 3px
  );
}

#bgCanvas{
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%;
}

.dot{
  display:inline-block; width:7px; height:7px; border-radius:50%;
  background: var(--text-muted);
}
.dot--live{
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(82,224,196,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(82,224,196,0.45); }
  70%{ box-shadow: 0 0 0 7px rgba(82,224,196,0); }
  100%{ box-shadow: 0 0 0 0 rgba(82,224,196,0); }
}

/* ---------- Scroll progress ---------- */
.progress{
  position: fixed; top:0; left:0; height: 2px; width: 0%; z-index: 60;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  box-shadow: 0 0 8px rgba(82,224,196,0.5);
  transition: width 0.1s linear;
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring{
  position: fixed; top:0; left:0; pointer-events: none; z-index: 70;
  border-radius: 50%; transform: translate(-50%, -50%);
}
.cursor-dot{ width: 6px; height: 6px; background: var(--cyan); }
.cursor-ring{
  width: 34px; height: 34px; border: 1px solid rgba(82,224,196,0.5);
  transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s;
}
.cursor-ring.is-hover{
  width: 54px; height: 54px; background: rgba(82,224,196,0.08); border-color: var(--cyan);
}
@media (hover: none), (pointer: coarse){
  .cursor-dot, .cursor-ring{ display:none; }
}

/* ---------- Toast ---------- */
.toast{
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid rgba(82,224,196,0.35); color: var(--cyan);
  font-family: var(--font-mono); font-size: 0.82rem; padding: 10px 18px; border-radius: 6px;
  z-index: 80; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.toast.is-visible{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Reveal on scroll ---------- */
.reveal{
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ---------- Nav ---------- */
.nav{
  position: fixed; top:0; left:0; right:0; z-index: 50;
  display:flex; align-items:center; justify-content:space-between;
  padding: 18px 32px;
  background: rgba(9,13,19,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  transition: border-color 0.3s, background 0.35s ease;
}
[data-theme="light"] .nav{ background: rgba(244,246,249,0.78); }
.nav__mark{
  font-family: var(--font-mono); font-weight:600; font-size:0.95rem;
  letter-spacing: 0.02em; display:flex; align-items:center; gap:8px;
}
.nav__pulse{
  width:8px; height:8px; border-radius:50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.nav__links{ display:flex; align-items:center; gap: 26px; font-size: 0.92rem; color: var(--text-secondary); }
.nav__links a{ transition: color 0.2s; position: relative; }
.nav__links a:hover{ color: var(--text-primary); }
.nav__links a.is-active{ color: var(--cyan); }
.nav__cta{
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--cyan) !important;
  border: 1px solid rgba(82,224,196,0.35); padding: 7px 14px; border-radius: 4px;
}
.nav__cta:hover{ background: var(--cyan-dim); color: var(--cyan) !important; }
.nav__toggle{ display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding: 6px; }
.nav__toggle span{ width:22px; height:2px; background: var(--text-primary); display:block; }

/* nav dropdown ("About" + Experience/Education/Projects/Skills) */
.nav__dropdown{ position: relative; }
.nav__dropbtn{
  display:flex; align-items:center; gap: 6px;
  background: none; border: none; padding: 0; margin: 0;
  font-family: var(--font-body); font-size: 0.92rem; color: var(--text-secondary);
  cursor: pointer; transition: color 0.2s;
}
.nav__dropbtn:hover, .nav__dropbtn.is-active{ color: var(--cyan); }
.nav__caret{ font-size: 0.7em; transition: transform 0.2s ease; }
.nav__dropdown.is-open .nav__caret{ transform: rotate(180deg); }
.nav__dropmenu{
  position: absolute; top: calc(100% + 16px); left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 8px;
  padding: 8px; display:flex; flex-direction:column; gap: 2px; min-width: 168px;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 20px 45px -18px rgba(0,0,0,0.5); z-index: 60;
}
.nav__dropmenu a{
  padding: 8px 12px; border-radius: 5px; font-size: 0.88rem; color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.nav__dropmenu a:hover, .nav__dropmenu a.is-active{ background: var(--cyan-dim); color: var(--cyan); }
.nav__dropdown.is-open .nav__dropmenu{ opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
@media (hover: hover) and (pointer: fine){
  .nav__dropdown:hover .nav__dropmenu{ opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
  .nav__dropdown:hover .nav__caret{ transform: rotate(180deg); }
}

/* theme toggle */
.theme-toggle{
  display:flex; align-items:center; justify-content:center;
  width: 34px; height: 34px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer; transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.theme-toggle:hover{ border-color: rgba(82,224,196,0.4); color: var(--cyan); transform: rotate(-12deg); }
.theme-toggle__icon{ width: 16px; height: 16px; }
.theme-toggle__icon--sun{ display:none; }
[data-theme="light"] .theme-toggle__icon--sun{ display:block; }
[data-theme="light"] .theme-toggle__icon--moon{ display:none; }

/* ---------- Hero ---------- */
.hero{
  min-height: 100svh;
  display:grid; grid-template-columns: 1fr; align-items:center; gap: 52px;
  padding: 140px 32px 60px;
  max-width: var(--max); margin: 0 auto;
  position: relative; z-index: 1;
}
@media (min-width: 981px){
  .hero{ grid-template-columns: 1.12fr 0.88fr; }
}
.hero__ring{
  position: absolute; top: 50%; right: -80px; transform: translateY(-50%);
  width: 460px; height: 460px; z-index: -1; opacity: 0.55;
}
.hero__ring svg{ width:100%; height:100%; }
.ring{ fill:none; stroke: var(--border); stroke-width: 1; }
.ring--1{ animation: spin 60s linear infinite; }
.ring--2{ stroke: rgba(82,224,196,0.25); animation: spin 40s linear infinite reverse; }
.ring--3{ stroke: rgba(245,166,35,0.3); animation: spin 80s linear infinite; }
@keyframes spin{ to{ transform: rotate(360deg); } }

.eyebrow{
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--cyan); text-transform: uppercase;
  display:flex; align-items:center; gap:9px; margin-bottom: 26px;
}
.hero__name{
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.98; letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero__role{
  font-family: var(--font-mono); font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--text-secondary); margin-bottom: 22px; min-height: 1.4em;
}
.type-cursor{ color: var(--cyan); animation: blink 1s step-end infinite; }
.hero__lede{
  max-width: 560px; color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 38px;
}
.hero__cta{ display:flex; gap:16px; flex-wrap: wrap; margin-bottom: 52px; }

.btn{
  font-family: var(--font-mono); font-size: 0.88rem;
  padding: 13px 24px; border-radius: 4px; transition: background 0.2s, color 0.2s, border-color 0.2s;
  display:inline-block; will-change: transform;
}
.btn--primary{ background: var(--cyan); color: #06110d; font-weight: 600; }
.btn--primary:hover{ background: #6df0d5; }
.btn--ghost{ border: 1px solid var(--border); color: var(--text-primary); }
.btn--ghost:hover{ border-color: var(--cyan); color: var(--cyan); }

/* quick contact strip */
.hero__quickcontact{
  display:flex; flex-wrap:wrap; gap: 10px; margin-bottom: 28px;
}
.qc__item{
  display:flex; align-items:center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-secondary);
  background: rgba(255,255,255,0.02); border: 1px solid var(--border-soft);
  padding: 8px 14px; border-radius: 20px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.qc__item:hover{ border-color: rgba(82,224,196,0.4); color: var(--cyan); transform: translateY(-1px); }
.qc__ico{ color: var(--cyan); }
.qc__item--link{ color: var(--cyan); }

/* stats */
.stats{
  display:grid; grid-template-columns: repeat(4, auto); gap: 40px;
  padding-top: 32px; border-top: 1px solid var(--border-soft);
  max-width: 620px;
}
.stat{ display:flex; flex-direction:column; gap: 4px; position: relative; }
.stat__num{ font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--cyan); }
.stat__label{ font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.03em; }

.stat--link{ cursor: pointer; transition: transform 0.15s; }
.stat--link:hover{ transform: translateY(-2px); }
.stat--link:hover .stat__num{ color: #6df0d5; }
.stat--link:hover .stat__arrow{ opacity: 1; transform: translate(1px,-1px); }
.stat__arrow{ display:inline-block; opacity: 0.5; transition: opacity 0.2s, transform 0.2s; }

.stat--pop{ cursor: pointer; }
.stat--pop:hover .stat__num, .stat--pop:focus-visible .stat__num{ color: #6df0d5; }
.stat-pop{
  position: absolute; bottom: calc(100% + 14px); left: -18px; z-index: 40;
  width: 230px; background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 16px 18px; box-shadow: 0 20px 50px -18px rgba(0,0,0,0.7);
  opacity: 0; pointer-events: none; transform: translateY(8px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.stat-pop::after{
  content:''; position: absolute; top: 100%; left: 26px;
  width: 10px; height: 10px; background: var(--bg-card);
  border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
  transform: translateY(-50%) rotate(45deg);
}
.stat--pop.is-open .stat-pop{ opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
@media (hover: hover) and (pointer: fine){
  .stat--pop:hover .stat-pop, .stat--pop:focus-within .stat-pop{
    opacity: 1; pointer-events: auto; transform: translateY(0) scale(1);
  }
}
.stat-pop__title{
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--cyan);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px;
}
.stat-pop__list{ list-style: none; display:grid; gap: 10px; }
.stat-pop__list li{
  position: relative; padding-left: 16px; font-size: 0.82rem; color: var(--text-secondary);
  text-align: left; line-height: 1.4;
}
.stat-pop__list li::before{ content:'✓'; position:absolute; left:0; top:0; color: var(--cyan); font-size: 0.72rem; }

.lang-pop__row + .lang-pop__row{ margin-top: 12px; }
.lang-pop__top{
  display:flex; justify-content:space-between; align-items:baseline;
  font-size: 0.82rem; margin-bottom: 6px; text-align: left;
}
.lang-pop__top span:first-child{ color: var(--text-primary); font-weight: 600; }
.lang-pop__top span:last-child{ font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); }
.lang-pop__bar{
  height: 7px; border-radius: 4px;
  background-image: radial-gradient(circle, var(--border) 1.4px, transparent 1.6px);
  background-size: 7px 7px; background-repeat: repeat-x; background-position: center;
}
.lang-pop__bar span{
  display:block; height:100%; width: var(--lvl); border-radius: 4px;
  background-image: radial-gradient(circle, var(--cyan) 1.4px, transparent 1.6px);
  background-size: 7px 7px; background-repeat: repeat-x; background-position: center;
  filter: drop-shadow(0 0 4px rgba(82,224,196,0.5));
  transition: width 0.6s ease;
}

/* ---------- Hero console (radar + terminal) ---------- */
.hero__console{ display:flex; flex-direction:column; gap: 18px; }
.console__panel{
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elevated); overflow: hidden;
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.02) inset, 0 18px 40px -24px rgba(0,0,0,0.55);
}
[data-theme="light"] .console__panel{
  border-color: #c9d3de;
  box-shadow: 0 18px 40px -26px rgba(20,40,60,0.22);
}
.console__panel--radar{
  padding: 18px 20px 12px; position: relative;
}
.console__radar{ width:100%; aspect-ratio: 1.15 / 1; display:flex; align-items:center; justify-content:center; }
.console__radar svg{ width:100%; height:100%; overflow: visible; }
.radar__ring{ fill:none; stroke: var(--border-soft); stroke-width: 1; }
.radar__axis{ stroke: var(--border-soft); stroke-width: 1; }
.radar__label-bg{ fill: var(--bg-elevated); }
.radar__label{
  font-family: var(--font-mono); font-size: 9px; fill: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.02em;
  transition: fill 0.15s ease, font-weight 0.15s ease;
}
.radar__label.is-active{ fill: var(--cyan); font-weight: 700; }
.radar__area{
  fill: rgba(82,224,196,0.14); stroke: var(--cyan); stroke-width: 1.6;
  filter: drop-shadow(0 0 6px rgba(82,224,196,0.35));
  stroke-dasharray: 700; stroke-dashoffset: 700;
  transition: d 0.3s ease;
}
.console__panel--radar.is-visible .radar__area{ animation: radarDraw 1.4s ease-out forwards; }
@keyframes radarDraw{ to{ stroke-dashoffset: 0; } }
.radar__node{
  fill: var(--bg-elevated); stroke: var(--cyan); stroke-width: 1.6; cursor: pointer;
  transition: r 0.15s ease, fill 0.15s ease;
}
.radar__node:hover, .radar__node.is-active{ fill: var(--cyan); r: 5.5; }
.console__radar-meta{
  display:flex; justify-content:space-between;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  letter-spacing: 0.04em; padding-top: 8px; border-top: 1px solid var(--border-soft); margin-top: 4px;
}
#radarValue{ color: var(--cyan); }

.console__panel--term{ display: none; }
@media (min-width: 981px) and (hover: hover) and (pointer: fine){
  .console__panel--term{ display: flex; flex-direction: column; box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6); }
}

.hero__scroll{
  position: absolute; bottom: -10px; left: 32px;
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted);
  letter-spacing: 0.15em; display:flex; align-items:center; gap: 10px;
}
.hero__scroll span{
  width:1px; height: 26px; background: var(--text-muted); position: relative; overflow: hidden;
}
.hero__scroll span::after{
  content:''; position:absolute; top:-100%; left:0; width:100%; height:100%;
  background: var(--cyan); animation: scrolldown 1.8s ease-in-out infinite;
}
@keyframes scrolldown{
  0%{ top:-100%; } 50%{ top: 0; } 100%{ top: 100%; }
}

/* ---------- Section shell ---------- */
.section{
  max-width: var(--max); margin: 0 auto;
  padding: 110px 32px;
  border-top: 1px solid var(--border-soft);
  position: relative; z-index: 1;
}
.section__head{ margin-bottom: 48px; }
.section__tag{
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan);
  letter-spacing: 0.08em; margin-bottom: 10px;
}
.section__title{
  font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 600; letter-spacing: -0.01em;
}

/* ---------- About ---------- */
.about__grid{
  display:grid; grid-template-columns: 1.3fr 1fr; gap: 60px;
}
.about__text{ color: var(--text-secondary); font-size: 1.02rem; max-width: 60ch; }
.about__facts{
  display:grid; gap: 16px; align-content:start;
  border-left: 1px solid var(--border-soft); padding-left: 28px;
}
.about__facts dt{
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px;
}
.about__facts dd{ font-size: 0.96rem; color: var(--text-primary); }
.tag-list{ display:flex; flex-wrap:wrap; gap: 6px; margin-top: 4px; }
.tag-list span{
  font-size: 0.72rem; color: var(--text-secondary);
  border: 1px solid var(--border); padding: 4px 9px; border-radius: 14px;
  transition: border-color 0.2s, color 0.2s;
}
.tag-list span:hover{ border-color: var(--cyan); color: var(--cyan); }

/* ---------- Experience log ---------- */
.log{ position: relative; }
.log::before{
  content:''; position:absolute; top: 8px; bottom: 8px; left: 195px;
  width: 1px; background: linear-gradient(to bottom, rgba(82,224,196,0.4), var(--border-soft) 90%);
}
.log__entry{
  display:grid; grid-template-columns: 200px 1fr; gap: 32px;
  padding: 28px 0; border-bottom: 1px solid var(--border-soft);
  transition: padding-left 0.3s, border-color 0.3s;
}
.log__entry:hover{ padding-left: 10px; border-color: rgba(82,224,196,0.2); }
.log__entry:first-child{ padding-top: 0; }
.log__entry--active{ position: relative; }
.log__entry--active::after{
  content:''; position:absolute; left:-16px; top:0; bottom:0; width: 2px;
  background: var(--cyan); opacity: 0.5;
}
.log__time{ display:flex; flex-direction:column; gap:10px; position: relative; }
.log__dot{
  position:absolute; left: 191px; top: 2px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text-muted); z-index: 1;
}
.log__dot--live{
  border-color: var(--cyan); background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(82,224,196,0.6); animation: pulse 2s infinite;
}
.log__stamp{ font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-primary); }
.log__badge{
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.05em;
  width: fit-content; padding: 3px 9px; border-radius: 3px; white-space: nowrap;
  border: 1px solid var(--border); color: var(--text-secondary);
}
.log__badge--active{ color: var(--cyan); border-color: rgba(82,224,196,0.35); background: var(--cyan-dim); }
.log__body h3{ font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 4px; }
.log__org{ font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-primary); margin-bottom: 10px; }
.log__highlight{
  font-size: 0.88rem; color: var(--amber); margin-bottom: 14px;
  padding-left: 14px; border-left: 2px solid var(--amber-dim);
}
.log__body ul{ list-style:none; display:grid; gap:8px; }
.log__body li{
  position: relative; padding-left: 18px; color: var(--text-secondary); font-size: 0.96rem;
}
.log__body li::before{
  content: '›'; position:absolute; left:0; color: var(--cyan);
}
.log__cursor{
  padding-top: 24px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted);
  display:flex; align-items:center; gap: 12px; position: relative;
}
.log__cursor .log__dot{ position: static; }
.cursor-blink{ color: var(--cyan); animation: blink 1.1s step-end infinite; }
@keyframes blink{ 50%{ opacity: 0; } }

/* ---------- Filters ---------- */
.filters{ display:flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filter{
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary);
  background: transparent; border: 1px solid var(--border); padding: 8px 16px;
  border-radius: 20px; cursor: pointer; transition: all 0.2s;
}
.filter:hover{ border-color: rgba(82,224,196,0.4); color: var(--text-primary); }
.filter.is-active{ background: var(--cyan); border-color: var(--cyan); color: #06110d; font-weight: 600; }

/* ---------- Projects ---------- */
.projects{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 20px; perspective: 1000px; }
.card{
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 26px; transition: border-color 0.2s, opacity 0.3s, transform 0.08s ease-out;
  transform-style: preserve-3d; will-change: transform;
}
.card:hover{ border-color: rgba(82,224,196,0.3); }
.card.is-hidden{ display: none; }
.card__head{ display:flex; justify-content:space-between; align-items:flex-start; gap: 12px; margin-bottom: 12px; }
.card__head h3{ font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; }
.card__status{
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.05em;
  padding: 3px 8px; border-radius: 3px; white-space: nowrap; flex-shrink:0;
}
.card__status--shipped{ color: var(--cyan); background: var(--cyan-dim); }
.card__status--progress{ color: var(--amber); background: var(--amber-dim); animation: statuspulse 2s ease-in-out infinite; }
@keyframes statuspulse{ 0%,100%{ opacity:1; } 50%{ opacity: 0.55; } }
.card__status--prototype{ color: var(--text-secondary); background: rgba(255,255,255,0.05); }
.card__desc{ color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 16px; }
.card__stack{
  list-style:none; display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 10px;
}
.card__stack li{
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  border: 1px solid var(--border); padding: 3px 8px; border-radius: 3px;
}
.card__note{ font-size: 0.82rem; color: var(--amber); }

/* ---------- Skills modules ---------- */
.modules{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.module__label{
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); margin-bottom: 12px;
}
.module__chips{ display:flex; flex-wrap:wrap; gap: 9px; }
.module__chips span{
  font-size: 0.85rem; color: var(--text-secondary);
  border: 1px solid var(--border); padding: 6px 12px; border-radius: 20px;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.module__chips span:hover{ border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ---------- Terminal ---------- */
.term{
  background: #060a0f; border: 1px solid var(--border-soft); border-radius: 10px;
  overflow: hidden; box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}
.term__bar{
  display:flex; align-items:center; gap: 8px; padding: 12px 16px;
  background: var(--bg-elevated); border-bottom: 1px solid var(--border-soft);
}
.term__dot{ width:10px; height:10px; border-radius:50%; }
.term__dot--r{ background:#ec6a5e; } .term__dot--y{ background:#f4bf4f; } .term__dot--g{ background:#61c554; }
.term__title{ margin-left: 10px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.term__body{
  padding: 20px 22px; font-family: var(--font-mono); font-size: 0.88rem;
  color: var(--text-secondary); min-height: 180px; max-height: 340px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.term__body p{ line-height: 1.7; }
.term__hl{ color: var(--cyan); }
.term__cmd{ color: var(--text-primary); }
.term__cmd::before{ content: '$ '; color: var(--cyan); }
.term__inputrow{
  display:flex; align-items:center; gap: 10px; padding: 14px 22px;
  border-top: 1px solid var(--border-soft);
}
.term__prompt{ color: var(--cyan); font-family: var(--font-mono); }
.term__input{
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-primary); font-family: var(--font-mono); font-size: 0.9rem;
}
.term__input::placeholder{ color: var(--text-muted); }

/* ---------- Education ---------- */
.edu{ display:grid; grid-template-columns: 1.3fr 1fr; gap: 60px; }
.edu__main h3{ font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 6px; }
.edu__org{ font-family: var(--font-mono); font-size: 0.88rem; color: var(--text-primary); margin-bottom: 16px; }
.edu__detail{ color: var(--text-secondary); max-width: 55ch; }
.edu__certs{ border-left: 1px solid var(--border-soft); padding-left: 28px; }
.edu__certs ul{ list-style:none; display:grid; gap: 12px; }
.edu__certs li{
  position:relative; padding-left: 18px; font-size: 0.92rem; color: var(--text-secondary);
}
.edu__certs li::before{ content:'✓'; position:absolute; left:0; color: var(--cyan); font-size: 0.8rem; }

/* ---------- Contact ---------- */
.contact__lede{ color: var(--text-secondary); max-width: 60ch; margin-bottom: 40px; font-size: 1.02rem; }
.contact__grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.contact__item{
  display:flex; flex-direction:column; gap: 6px; text-align: left;
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 8px;
  padding: 20px 22px; transition: border-color 0.2s, transform 0.2s;
  font-family: inherit; cursor: pointer; width: 100%;
}
.contact__item:hover{ border-color: rgba(82,224,196,0.35); transform: translateY(-2px); }
.contact__k{ font-family: var(--font-mono); font-size: 0.76rem; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.06em; }
.contact__v{ font-size: 1rem; color: var(--text-primary); }

/* ---------- Footer ---------- */
.footer{
  max-width: var(--max); margin: 0 auto;
  padding: 32px; display:flex; justify-content:space-between; align-items:center;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
  border-top: 1px solid var(--border-soft); position: relative; z-index: 1;
}
.footer__signal{ display:flex; align-items:center; gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .about__grid, .edu{ grid-template-columns: 1fr; gap: 32px; }
  .about__facts, .edu__certs{ border-left:none; padding-left:0; border-top: 1px solid var(--border-soft); padding-top: 24px; }
  .projects{ grid-template-columns: 1fr; }
  .modules{ grid-template-columns: 1fr; }
  .contact__grid{ grid-template-columns: 1fr; }
  .log__entry{ grid-template-columns: 1fr; gap: 10px; }
  .log::before, .log__dot, .log__entry--active::after{ display:none; }
  .stats{ grid-template-columns: repeat(2, auto); gap: 24px 40px; }
  .hero__ring{ display:none; }
  .stat-pop{ left: 50%; transform: translate(-50%, 8px) scale(0.98); }
  .stat--pop.is-open .stat-pop{ transform: translate(-50%, 0) scale(1); }
  .stat-pop::after{ left: 50%; margin-left: -5px; }
}

@media (max-width: 680px){
  .nav{ padding: 16px 20px; }
  .nav__toggle{ display:flex; }
  .nav__links{
    position: fixed; top: 60px; left:0; right:0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-elevated); border-bottom: 1px solid var(--border-soft);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav__links.is-open{ max-height: 420px; }
  .nav__links a{ padding: 16px 24px; width: 100%; border-bottom: 1px solid var(--border-soft); }
  .nav__links a.nav__cta{ width: calc(100% - 48px); margin: 12px 24px; text-align: center; }
  .nav__dropdown{ width: 100%; }
  .nav__dropbtn{
    width: 100%; padding: 16px 24px; border-bottom: 1px solid var(--border-soft);
    justify-content: space-between; font-size: 0.95rem;
  }
  .nav__dropmenu{
    position: static; transform: none; opacity: 1; pointer-events: auto;
    box-shadow: none; border: none; border-radius: 0; background: rgba(127,137,150,0.08);
    padding: 0; min-width: 0; width: 100%; display: none; gap: 0;
  }
  .nav__dropdown.is-open .nav__dropmenu{ display: flex; transform: none; }
  .nav__dropmenu a{ padding: 12px 24px 12px 36px; border-radius: 0; }
  .theme-toggle{ margin: 16px 24px; }
  .hero{ padding: 120px 20px 50px; }
  .section{ padding: 70px 20px; }
}
