/* ===== Tokens ===== */
:root{
  --bg: #0a0a0c;
  --bg-soft: #111014;
  --fg: #f3f1f6;
  --muted: #8d8a96;
  --accent: #57008A;
  --accent-bright: #9b3fe0;
  --accent-soft: rgba(87, 0, 138, 0.18);
  --border: rgba(255,255,255,0.08);
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container: 1180px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--font-display);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  cursor:none;
}
a{color:inherit;text-decoration:none;}

/* ===== NERV accent (real logo + simple hex tile backdrop) ===== */
.nerv-hex-wrap{
  position:absolute;
  top:80px; /* clears the 28px-padded header so it never sits under the nav */
  right:3vw;
  width:220px;
  height:140px;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  z-index:5;
}
.nerv-hex-tile{
  position:absolute;
  inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='45' height='78'%3E%3Cpolygon points='22.5,0 45,13 45,39 22.5,52 0,39 0,13' fill='none' stroke='%23e0291f' stroke-opacity='0.7' stroke-width='1.5'/%3E%3Cpolygon points='0,39 22.5,52 22.5,78 0,91 -22.5,78 -22.5,52' fill='none' stroke='%23e0291f' stroke-opacity='0.7' stroke-width='1.5'/%3E%3Cpolygon points='45,39 67.5,52 67.5,78 45,91 22.5,78 22.5,52' fill='none' stroke='%23e0291f' stroke-opacity='0.7' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat:repeat;
  background-size:45px 78px;
  -webkit-mask-image:radial-gradient(ellipse at center, black 35%, transparent 72%);
  mask-image:radial-gradient(ellipse at center, black 35%, transparent 72%);
  opacity:.6;
}
.nerv-mark{
  position:relative;
  width:84px;
  height:auto;
  z-index:1;
  opacity:.9;
}
@media (max-width: 700px){
  .nerv-hex-wrap{width:150px; height:100px; top:72px; right:2vw;}
  .nerv-mark{width:56px;}
}

/* ===== Scanlines (NERV monitor overlay) ===== */
.scanlines{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:2;
  background:repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode:overlay;
  opacity:.55;
  animation:scanFlicker 7s infinite;
}
@keyframes scanFlicker{
  0%, 100%{opacity:.55;}
  92%{opacity:.55;}
  93%{opacity:.15;}
  94%{opacity:.5;}
  95%{opacity:.2;}
  96%{opacity:.55;}
}
img{max-width:100%;display:block;}
section{position:relative;}
::selection{background:var(--accent);color:#fff;}

@media (max-width: 900px){
  body{cursor:auto;}
}

/* ===== Custom cursor ===== */
.cursor-dot, .cursor-ring{
  position:fixed;
  top:0; left:0;
  pointer-events:none;
  border-radius:50%;
  z-index:9999;
  transform:translate(-50%,-50%);
}
.cursor-dot{
  width:6px; height:6px;
  background:var(--accent-bright);
}
.cursor-ring{
  width:34px; height:34px;
  border:1px dashed rgba(155,63,224,0.55);
  border-radius:50%;
  transition:width .25s, height .25s, border-color .25s, background .25s, border-radius .25s;
  animation:cursorSpin 7s linear infinite;
}
.cursor-ring.is-active{
  width:60px; height:60px;
  background:var(--accent-soft);
  border-color:var(--accent-bright);
  border-style:solid;
  border-radius:0;
  clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%);
}
@keyframes cursorSpin{
  to{ transform:translate(-50%,-50%) rotate(360deg); }
}
@media (max-width: 900px){
  .cursor-dot, .cursor-ring{display:none;}
}

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

/* ===== Header ===== */
.site-header{
  position:fixed;
  top:0; left:0; right:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:28px 6vw;
  z-index:1000;
  backdrop-filter:blur(6px);
  mix-blend-mode:difference;
}
.logo{
  font-weight:700;
  font-size:20px;
  letter-spacing:0.04em;
  display:inline-flex;
  align-items:center;
  gap:9px;
}
.logo::before{
  content:'';
  width:9px; height:9px;
  background:var(--accent-bright);
  clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%);
  flex-shrink:0;
}
.logo .dot{color:var(--accent-bright);}
.logo-block{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.main-nav{
  display:flex;
  gap:36px;
}
.nerv-status{
  display:flex;
  align-items:center;
  gap:7px;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#ff6b3d;
  padding-left:1px;
}
.status-dot{
  width:6px; height:6px;
  border-radius:50%;
  background:#ff3b30;
  box-shadow:0 0 6px #ff3b30;
  animation:statusPulse 1.6s ease-in-out infinite;
}
@keyframes statusPulse{
  0%,100%{opacity:1;}
  50%{opacity:.25;}
}
@media (max-width: 900px){
  .nerv-status{display:none;}
}
.main-nav a{
  position:relative;
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  font-weight:500;
  padding:4px 0;
}
.main-nav a::after{
  content:'';
  position:absolute;
  left:0; bottom:0;
  width:0%; height:1px;
  background:currentColor;
  transition:width .3s ease;
}
.main-nav a:hover::after{width:100%;}
.header-cta{
  font-size:13px;
  border:1px solid currentColor;
  padding:8px 18px;
  border-radius:999px;
  text-transform:uppercase;
  letter-spacing:0.06em;
}
@media (max-width: 900px){
  .main-nav{display:none;}
  .site-header{padding:20px 6vw;}
}

/* ===== Hero ===== */
.hero{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:120px 6vw 60px;
}
.hero-content{position:relative; z-index:2; max-width:780px;}
.hero-eyebrow{
  font-family:var(--font-mono);
  font-size:13px;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--accent-bright);
  margin-bottom:24px;
  overflow:hidden;
}
.hero-eyebrow span{display:inline-flex; align-items:center; gap:10px;}
.hex-glyph{
  display:inline-block;
  width:8px; height:8px;
  flex-shrink:0;
  background:var(--accent-bright);
  clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%);
}
.hero-title{
  margin:0;
  font-size:clamp(56px, 11vw, 130px);
  font-weight:700;
  line-height:0.95;
  letter-spacing:-0.02em;
}
.hero-title .line{display:block; overflow:hidden;}
.hero-title .word{display:inline-block;}
.hero-sub{
  margin:32px auto 0;
  max-width:520px;
  color:var(--muted);
  font-size:18px;
  line-height:1.6;
  overflow:hidden;
}
.hero-sub span{display:inline-block;}
.hero-actions{
  display:flex;
  gap:18px;
  justify-content:center;
  margin-top:44px;
}
.btn{
  padding:14px 30px;
  border-radius:999px;
  font-size:14px;
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:0.06em;
  transition:transform .35s cubic-bezier(.2,.9,.3,1), background .3s, color .3s, border-color .3s;
  display:inline-block;
}
.btn-primary{
  background:var(--accent);
  color:#fff;
  border:1px solid var(--accent);
}
.btn-primary:hover{
  background:var(--accent-bright);
  border-color:var(--accent-bright);
  transform:translateY(-3px);
}
.btn-ghost{
  border:1px solid var(--border);
  color:var(--fg);
}
.btn-ghost:hover{
  border-color:var(--accent-bright);
  color:var(--accent-bright);
  transform:translateY(-3px);
}
.scroll-cue{
  position:absolute;
  bottom:36px; left:50%;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.scroll-cue span{
  width:1px; height:40px;
  background:linear-gradient(to bottom, transparent, var(--accent-bright));
  position:relative;
  overflow:hidden;
}
.scroll-cue span::after{
  content:'';
  position:absolute;
  top:-100%; left:0;
  width:100%; height:100%;
  background:var(--fg);
  animation:scrollDrip 2s ease-in-out infinite;
}
@keyframes scrollDrip{
  0%{top:-100%;} 60%{top:100%;} 100%{top:100%;}
}
.scroll-cue p{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:0.15em;
  text-transform:uppercase;
  color:var(--muted);
  margin:0;
}

/* ===== Marquee ===== */
.marquee{
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  overflow:hidden;
  padding:22px 0;
  background:var(--bg-soft);
}
.marquee-track{
  display:flex;
  white-space:nowrap;
  font-family:var(--font-mono);
  font-size:15px;
  letter-spacing:0.08em;
  color:var(--muted);
  animation:marqueeScroll 28s linear infinite;
  width:max-content;
}
.marquee-track span{padding:0 18px;}
.marquee-track span:nth-child(odd){color:var(--accent-bright);}
@keyframes marqueeScroll{
  from{transform:translateX(0);}
  to{transform:translateX(-50%);}
}

/* ===== Section label ===== */
.section-label{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:50px;
}
.section-label span{
  font-family:var(--font-mono);
  color:var(--accent-bright);
  font-size:12px;
  width:32px;
  height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%);
  background:var(--accent-soft);
}
.section-label p{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:0.18em;
  color:var(--muted);
  margin:0;
}
.section-label::after{
  content:'';
  flex:1;
  height:1px;
  background:var(--border);
}

/* ===== Generic section spacing ===== */
.about, .skills, .projects, .experience{
  max-width:var(--container);
  margin:0 auto;
  padding:140px 6vw 0;
}
.contact{padding:160px 6vw 120px;}

/* ===== About ===== */
.about-grid{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:60px;
}
.about-text{
  font-size:clamp(22px, 2.6vw, 32px);
  line-height:1.5;
  font-weight:500;
}
.about-facts{
  display:flex;
  flex-direction:column;
  gap:28px;
}
.fact h3{
  font-family:var(--font-mono);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:var(--accent-bright);
  margin:0 0 10px;
}
.fact p{
  margin:0;
  line-height:1.6;
  color:var(--fg);
}
.fact .muted{color:var(--muted); font-size:14px;}
@media (max-width: 800px){
  .about-grid{grid-template-columns:1fr;}
}

/* ===== Skills ===== */
.skills-groups{
  display:flex;
  flex-direction:column;
  gap:36px;
}
.skill-group-label{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:14px;
}
.skills-cloud{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}
.skill-tag{
  font-family:var(--font-mono);
  border:1px solid var(--border);
  padding:10px 18px;
  border-radius:999px;
  color:var(--fg);
  font-size:14px;
  display:inline-flex;
  align-items:center;
  gap:9px;
  transition:border-color .3s, color .3s, background .3s, transform .3s;
}
.skill-tag::before{
  content:'';
  width:7px; height:7px;
  flex-shrink:0;
  background:var(--accent-bright);
  clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%);
  transition:background .3s;
}
.skill-tag:hover::before{
  background:#ff6b3d;
}
.skill-tag:hover{
  border-color:var(--accent-bright);
  color:#fff;
  background:var(--accent-soft);
  transform:translateY(-3px);
}

/* ===== Projects ===== */
.project-row{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:30px;
  padding:46px 0;
  border-bottom:1px solid var(--border);
  transition:padding-left .4s ease;
}
.project-row:hover{padding-left:14px;}
.project-row:first-of-type{border-top:1px solid var(--border);}
.project-index{
  font-family:var(--font-mono);
  font-size:40px;
  color:var(--accent-soft);
  -webkit-text-stroke:1px var(--accent-bright);
  color:transparent;
}
.project-info h3{
  font-size:clamp(28px, 4vw, 42px);
  margin:0 0 8px;
  display:flex;
  align-items:center;
  gap:14px;
}
.project-info h3::before{
  content:'';
  width:14px; height:14px;
  flex-shrink:0;
  background:
    linear-gradient(var(--bg), var(--bg)) content-box,
    linear-gradient(var(--accent-bright), var(--accent-bright));
  padding:2px;
  clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%);
}
.project-meta{
  font-family:var(--font-mono);
  font-size:13px;
  color:var(--accent-bright);
  margin:0 0 16px;
}
.project-desc{
  color:var(--muted);
  line-height:1.7;
  max-width:680px;
  margin:0 0 18px;
}
.project-tags{
  display:flex;
  gap:10px;
  list-style:none;
  padding:0;
  margin:0;
  flex-wrap:wrap;
}
.project-tags li{
  font-family:var(--font-mono);
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--border);
  padding:5px 12px;
  border-radius:999px;
}
@media (max-width: 700px){
  .project-row{grid-template-columns:1fr;}
  .project-index{font-size:24px;}
}

/* ===== Experience timeline ===== */
.timeline{
  display:flex;
  flex-direction:column;
  gap:0;
}
.timeline-item{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:30px;
  padding:36px 0;
  border-bottom:1px solid var(--border);
  position:relative;
}
.timeline-item::before{
  content:'';
  position:absolute;
  left:0; top:44px;
  width:8px; height:8px;
  border-radius:50%;
  background:var(--accent-bright);
  display:none;
}
.timeline-date{
  font-family:var(--font-mono);
  font-size:13px;
  color:var(--muted);
}
.timeline-body h3{margin:0 0 6px; font-size:22px;}
.timeline-org{
  color:var(--accent-bright);
  font-size:14px;
  margin:0 0 12px;
}
.timeline-bullets{
  color:var(--muted);
  line-height:1.7;
  margin:0;
  padding-left:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.timeline-bullets li{
  position:relative;
  padding-left:22px;
}
.timeline-bullets li::before{
  content:'';
  position:absolute;
  left:0;
  top:8px;
  width:7px; height:7px;
  background:var(--accent-bright);
  clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%);
}
.timeline-body p:last-child{
  color:var(--muted);
  line-height:1.7;
  margin:0;
  max-width:640px;
}
@media (max-width: 700px){
  .timeline-item{grid-template-columns:1fr;}
}

/* ===== Contact ===== */
.contact{
  max-width:var(--container);
  margin:0 auto;
  text-align:center;
}
.section-label-inline{
  font-family:var(--font-mono);
  color:var(--accent-bright);
  letter-spacing:0.1em;
  font-size:13px;
  text-transform:uppercase;
}
.contact-title{
  font-size:clamp(40px, 8vw, 90px);
  line-height:1.02;
  margin:18px 0 40px;
  font-weight:700;
}
.contact-email{
  display:inline-block;
  font-size:clamp(20px, 3vw, 30px);
  border-bottom:2px solid var(--accent);
  padding-bottom:6px;
  transition:color .3s, border-color .3s;
}
.contact-email:hover{color:var(--accent-bright); border-color:var(--accent-bright);}
.contact-links{
  display:flex;
  justify-content:center;
  gap:32px;
  margin-top:30px;
  color:var(--muted);
  font-family:var(--font-mono);
  font-size:14px;
}
.contact-links a:hover{color:var(--accent-bright);}

/* ===== Footer ===== */
.site-footer{
  text-align:center;
  padding:30px 6vw 50px;
  color:var(--muted);
  font-size:13px;
  font-family:var(--font-mono);
}

/* ===== Reveal animation hooks (animated via JS, hidden state set here) ===== */
.reveal-up, .reveal-line{
  opacity:0;
}
