:root {
  --bg:        #090810;
  --bg2:       #0d0b18;
  --sur:       #120f20;
  --sur2:      #1a1630;
  --bdr:       #1e1a30;
  --bdr2:      #2a2245;
  --bdr3:      #3a3260;
  --violet:    #b87aff;
  --violet-dim:#7a4fbf;
  --grey-pure: #8a8499;
  --grey-soft: #b0a8c0;
  --grey-muted:#5a5468;
  --text:      #d4ccf0;
  --dim:       #8a8499;
  --muted:     #5a5468;
  --bloom:     #d44ef5;
  --glacier:   #3dd4ec;
  --unix:      #44d870;
  --dawn:      #f5a04a;
  --crimson:   #e94560;
  --starlight: #6655d8;
  --glow:      rgba(184,122,255,0.12);
  --font: "JetBrains Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

/* ── SCANLINES ── */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 900;
  background: repeating-linear-gradient(0deg,
    transparent, transparent 2px,
    rgba(184,122,255,0.008) 2px, rgba(184,122,255,0.008) 4px);
}

/* ── CANVAS for particles ── */
#particle-canvas {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 5;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
#hero {
  position: relative;
  height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* Portrait background */
#portrait-wrap {
  position: absolute; inset: -40px;
  will-change: transform;
  transition: transform 0.08s linear;
}
#portrait-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: brightness(0.55) contrast(1.1);
  display: block;
}

/* Eye-glow — violet pulse over where the eyes sit in the photo */
.eye-glow {
  position: absolute;
  width: 220px; height: 120px;
  /* eyes sit roughly at 40% from left, 38% from top of the image */
  left: 37%; top: 34%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    rgba(184,122,255,0.18) 0%,
    rgba(184,122,255,0.06) 40%,
    transparent 70%);
  pointer-events: none;
  animation: eye-pulse 3.5s ease-in-out infinite;
}
@keyframes eye-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.12); }
}

/* Dark gradient — top clear, bottom full-black for text readability */
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(9,8,16,0.08)  0%,
      rgba(9,8,16,0.12)  30%,
      rgba(9,8,16,0.55)  60%,
      rgba(9,8,16,0.92)  82%,
      rgba(9,8,16,1)    100%),
    linear-gradient(to right,
      rgba(9,8,16,0.5) 0%,
      transparent      40%,
      transparent      60%,
      rgba(9,8,16,0.4) 100%);
}

/* Violet tint layer — very subtle brand presence */
.hero-tint {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 42% 38%,
    rgba(184,122,255,0.06) 0%, transparent 65%);
}

/* ── Hero content ── */
.hero-content {
  position: relative; z-index: 10;
  text-align: left;
  padding: 0 5vw;
  width: 100%; max-width: 900px;
  align-self: flex-end;
  padding-bottom: clamp(48px, 8vh, 80px);
}

.hero-label {
  font-size: 10px; letter-spacing: 0.3em;
  color: var(--violet); opacity: 0.7;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
  animation: rise 0.6s ease-out both;
}
.hero-label::before {
  content: ""; display: inline-block;
  width: 28px; height: 1px;
  background: var(--violet); opacity: 0.6;
}

.hero-name {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.95;
  color: var(--text);
  animation: rise 0.6s 0.1s ease-out both;
}
.hero-name .slash {
  color: var(--violet);
  display: inline-block;
  animation: slash-blink 1s step-end infinite;
}
@keyframes slash-blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-tagline {
  margin-top: 20px;
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 400;
  color: var(--grey-soft);
  line-height: 1.65;
  max-width: 520px;
  animation: rise 0.6s 0.2s ease-out both;
}

.hero-actions {
  margin-top: 32px;
  display: flex; gap: 16px; flex-wrap: wrap;
  animation: rise 0.6s 0.3s ease-out both;
}
.btn {
  font-family: var(--font);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 11px 22px;
  border-radius: 4px;
  cursor: pointer; text-decoration: none;
  border: 1px solid var(--bdr3);
  color: var(--grey-soft);
  background: rgba(255,255,255,0.03);
  transition: all 0.2s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover {
  border-color: var(--violet);
  color: var(--violet);
  background: rgba(184,122,255,0.06);
  box-shadow: 0 0 16px rgba(184,122,255,0.12);
}
.btn.primary {
  background: rgba(184,122,255,0.1);
  border-color: var(--violet-dim);
  color: var(--violet);
}
.btn.primary:hover {
  background: rgba(184,122,255,0.18);
  box-shadow: 0 0 24px rgba(184,122,255,0.2);
}

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 28px; right: 5vw; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: rise 0.6s 0.6s ease-out both;
}
.scroll-hint span {
  font-size: 9px; letter-spacing: 0.25em;
  color: var(--muted); text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--violet), transparent);
  animation: scroll-drop 2s ease-in-out infinite;
}
@keyframes scroll-drop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.3; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   SECTIONS
══════════════════════════════════════ */
section {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(60px, 10vh, 110px) 5vw;
}

.sec-label {
  font-size: 9px; letter-spacing: 0.28em;
  color: var(--muted); text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 36px;
}
.sec-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--bdr2), transparent);
}

/* Reveal animation */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── ABOUT ── */
.about-text {
  font-size: 15px; font-weight: 300;
  line-height: 1.85; color: var(--grey-soft);
}
.about-text p + p { margin-top: 20px; }
.about-text strong {
  color: var(--text); font-weight: 500;
}
.about-text .accent { color: var(--violet); font-weight: 500; }

/* ── STACK ── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.stack-card {
  background: var(--sur);
  border: 1px solid var(--bdr2);
  border-radius: 10px;
  padding: 22px 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.stack-card:hover {
  border-color: var(--bdr3);
  box-shadow: 0 0 0 1px var(--bdr3), 0 8px 24px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.stack-lang {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.stack-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0;
}
.stack-uses {
  list-style: none;
  font-size: 12px; font-weight: 300;
  color: var(--dim); line-height: 1.9;
}
.stack-uses li::before {
  content: "· "; color: var(--violet); opacity: 0.6;
}

/* ── PROJECTS ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.project-card {
  background: var(--sur);
  border: 1px solid var(--bdr2);
  border-left: 3px solid var(--bdr3);
  border-radius: 0 10px 10px 0;
  padding: 20px;
  transition: border-left-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  display: block; color: inherit;
}
.project-card:hover {
  border-left-color: var(--violet);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transform: translateX(3px);
}
.project-name {
  font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.project-icon { font-style: normal; }
.project-desc {
  font-size: 12px; font-weight: 300;
  color: var(--dim); line-height: 1.7;
}
.project-tag {
  margin-top: 12px;
  font-size: 9px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── PHILOSOPHY ── */
.phil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.phil-card {
  border: 1px solid var(--bdr2);
  border-radius: 10px; padding: 20px;
  background: linear-gradient(135deg, var(--sur), var(--bg2));
}
.phil-title {
  font-size: 12px; font-weight: 700;
  color: var(--violet); letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.phil-body {
  font-size: 12px; font-weight: 300;
  color: var(--dim); line-height: 1.75;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--bdr);
  padding: 32px 5vw;
  max-width: 860px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
footer .foot-left {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.08em;
}
footer .foot-left strong { color: var(--violet); font-weight: 500; }
footer .foot-links {
  display: flex; gap: 20px;
}
footer .foot-links a {
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
footer .foot-links a:hover { color: var(--violet); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (max-width: 600px) {
  .hero-name { letter-spacing: -0.02em; }
  .stack-grid, .project-grid, .phil-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: flex-start; }
}
