/* ==========================================================================
   TOKENS
   ========================================================================== */
:root{
  --bg:            #0A0D12;
  --bg-soft:       #0D1117;
  --surface:       #131822;
  --surface-2:     #1A212C;
  --border:        #232B38;
  --border-soft:   #1A212C;

  --text:          #E9EEF3;
  --text-muted:    #92A0B2;
  --text-dim:      #5A6678;

  --accent:        #22E0A8;
  --accent-dim:    #17B589;
  --accent-soft:   rgba(34,224,168,0.12);

  --critical:      #FF5C6C;
  --high:          #FF9A42;
  --medium:        #FFC94B;
  --low:           #4CC9F0;

  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-w: 1180px;
  --radius: 10px;
  --radius-lg: 16px;

  --ease: cubic-bezier(.16,.84,.44,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

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

h1,h2,h3{ font-family: var(--font-mono); margin:0; letter-spacing: -0.01em; }
p{ margin:0; }
a{ color: inherit; text-decoration: none; }
ul{ margin:0; padding:0; list-style:none; }
img{ max-width:100%; display:block; }

::selection{ background: var(--accent-soft); color: var(--accent); }

/* Focus visibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   BACKDROP
   ========================================================================== */
.grid-backdrop{
  position: fixed; inset:0; z-index:0; pointer-events:none;
  background-image:
    linear-gradient(rgba(34,224,168,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,224,168,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 70%);
}

/* ==========================================================================
   LAYOUT HELPERS
   ========================================================================== */
.section{ position:relative; z-index:1; padding: 120px 24px; border-top: 1px solid var(--border-soft); }
.section-inner{ max-width: var(--max-w); margin: 0 auto; }
.section-eyebrow{
  font-family: var(--font-mono); font-size: 13px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 18px;
  display:flex; align-items:center; gap:10px;
}
.section-eyebrow .idx{
  font-size:11px; color: var(--bg); background: var(--accent);
  padding: 2px 7px; border-radius: 4px; font-weight:700;
}
.section-title{
  font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 48px;
  max-width: 820px; line-height:1.25;
}
.section-title .accent{ color: var(--accent); }
.section-sub{ color: var(--text-muted); max-width: 640px; margin: -28px 0 48px; font-size: 16px; }

.reveal{ opacity:0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible{ opacity:1; transform: translateY(0); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn{
  font-family: var(--font-mono); font-size: 14px; font-weight:600;
  padding: 13px 24px; border-radius: 8px; display:inline-flex; align-items:center; gap:8px;
  border: 1px solid transparent; cursor:pointer; transition: all .25s var(--ease);
  white-space: nowrap;
}
.btn-primary{ background: var(--accent); color:#04140F; }
.btn-primary:hover{ background: var(--accent-dim); transform: translateY(-2px); box-shadow: 0 8px 24px -8px var(--accent-soft); }
.btn-outline{ border-color: var(--border); color: var(--text); }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-ghost{ color: var(--text-muted); border: 1px solid var(--border); font-size:13px; padding: 9px 16px; }
.btn-ghost:hover{ color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav{
  position: fixed; top:0; left:0; right:0; z-index:100;
  background: rgba(10,13,18,0.75); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner{
  max-width: var(--max-w); margin:0 auto; padding: 16px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
}
.logo{ font-family: var(--font-mono); font-weight:700; font-size:16px; letter-spacing: -0.02em; }
.logo-bracket{ color: var(--accent); }
.logo-dot{ color: var(--accent); }
.nav-links{ display:flex; gap:28px; margin-left:auto; }
.nav-links a{
  font-family: var(--font-mono); font-size: 13px; color: var(--text-muted);
  display:flex; align-items:center; gap:6px; transition: color .2s;
}
.nav-links a:hover{ color: var(--accent); }
.nav-links .idx{ color: var(--text-dim); font-size:11px; }
.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:none; padding:6px; cursor:pointer; }
.nav-toggle span{ width:22px; height:2px; background: var(--text); border-radius:2px; transition: all .25s; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position:relative; z-index:1; min-height: 100vh;
  display:flex; flex-direction:column; justify-content:center;
  padding: 140px 24px 80px; max-width: var(--max-w); margin:0 auto;
}
.hero-inner{
  display:grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items:center;
}
.hero-eyebrow{
  font-family: var(--font-mono); color: var(--accent); font-size:13px;
  letter-spacing: 0.1em; margin-bottom: 20px;
}

.terminal{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  overflow:hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.terminal-bar{
  display:flex; align-items:center; gap:8px; padding: 12px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.dot{ width:10px; height:10px; border-radius:50%; }
.dot.red{ background:#FF5F56; } .dot.amber{ background:#FFBD2E; } .dot.green{ background:#27C93F; }
.terminal-title{ margin-left:8px; font-family: var(--font-mono); font-size:12px; color: var(--text-dim); }
.terminal-body{
  padding: 22px 20px; font-family: var(--font-mono); font-size: 14px; line-height:1.9;
  min-height: 220px; white-space: pre-wrap;
}
.terminal-body .line-prompt{ color: var(--accent); }
.terminal-body .line-out{ color: var(--text-muted); }
.terminal-body .line-name{ color: var(--text); font-weight:700; font-size:17px; }
.terminal-cursor{
  display:inline-block; width:8px; height:16px; background: var(--accent);
  margin-left:2px; vertical-align: -3px; animation: blink 1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity:0; } }

.hero-actions{ display:flex; gap:14px; margin-top:28px; flex-wrap:wrap; }

.hero-stats{ display:flex; gap:40px; margin-top:44px; flex-wrap:wrap; }
.stat{ display:flex; flex-direction:column; gap:4px; }
.stat-num{ font-family: var(--font-mono); font-size: 34px; font-weight:800; color: var(--accent); }
.stat-label{ font-size:12px; color: var(--text-dim); text-transform:uppercase; letter-spacing:0.06em; }

.scan-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.scan-card-head{
  display:flex; align-items:center; justify-content:space-between;
  font-family: var(--font-mono); font-size:12px; color: var(--text-dim);
  padding-bottom:14px; margin-bottom:14px; border-bottom: 1px solid var(--border);
}
.pulse-dot{
  width:8px; height:8px; border-radius:50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(34,224,168,0.6); animation: pulse 2s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(34,224,168,0.5); }
  70%{ box-shadow: 0 0 0 8px rgba(34,224,168,0); }
  100%{ box-shadow: 0 0 0 0 rgba(34,224,168,0); }
}
.scan-list{ display:flex; flex-direction:column; gap:12px; }
.scan-list li{
  display:flex; align-items:center; gap:10px; font-family: var(--font-mono); font-size:13px; color: var(--text-muted);
}
.scan-status{ margin-left:auto; font-size:11px; color: var(--accent); }
.scan-footer{
  margin-top:16px; padding-top:14px; border-top:1px solid var(--border);
  font-family: var(--font-mono); font-size:11px; color: var(--text-dim);
}

.sev{
  font-family: var(--font-mono); font-size:11px; font-weight:800; padding: 3px 8px;
  border-radius: 4px; letter-spacing: 0.04em;
}
.sev-critical{ background: rgba(255,92,108,0.14); color: var(--critical); }
.sev-high{ background: rgba(255,154,66,0.14); color: var(--high); }
.sev-medium{ background: rgba(255,201,75,0.14); color: var(--medium); }
.sev-low{ background: rgba(76,201,240,0.14); color: var(--low); }
.sev-ai{ background: var(--accent-soft); color: var(--accent); }

.scroll-cue{
  position:absolute; bottom:28px; left:50%; transform: translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  font-family: var(--font-mono); font-size:11px; color: var(--text-dim); letter-spacing:0.1em;
}
.scroll-cue span{
  width:1px; height:26px; background: linear-gradient(var(--accent), transparent);
  animation: scrollcue 1.8s infinite;
}
@keyframes scrollcue{ 0%{ opacity:0; transform: scaleY(0.3);} 50%{opacity:1; transform: scaleY(1);} 100%{opacity:0; transform: scaleY(0.3);} }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid{ display:grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.about-text{ color: var(--text-muted); font-size:16px; margin-bottom:20px; max-width: 620px; }
.about-text strong{ color: var(--text); font-weight:600; }
.about-meta{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; height:fit-content;
}
.meta-row{
  display:flex; justify-content:space-between; padding: 11px 0; border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono); font-size: 13px;
}
.meta-row:last-child{ border-bottom:none; }
.meta-key{ color: var(--text-dim); }
.meta-val{ color: var(--text); display:flex; align-items:center; gap:6px; }
.live-dot{ width:7px; height:7px; border-radius:50%; background: var(--accent); box-shadow:0 0 0 0 rgba(34,224,168,.6); animation: pulse 2s infinite; }

/* ==========================================================================
   TIMELINE
   ========================================================================== */
.timeline{ position:relative; padding-left: 32px; }
.timeline::before{
  content:''; position:absolute; left:5px; top:6px; bottom:6px; width:1px;
  background: linear-gradient(var(--accent), var(--border) 60%, transparent);
}
.timeline-item{ position:relative; padding-bottom: 48px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-marker{
  position:absolute; left:-32px; top:4px; width:11px; height:11px; border-radius:50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline-content{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 28px;
}
.timeline-head{ display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:8px; margin-bottom:4px; }
.timeline-head h3{ font-size:19px; }
.timeline-date{ font-family: var(--font-mono); font-size:12px; color: var(--accent); }
.timeline-org{ color: var(--text-muted); font-size:14px; margin-bottom:16px; }
.timeline-list{ display:flex; flex-direction:column; gap:10px; }
.timeline-list li{
  position:relative; padding-left:18px; color: var(--text-muted); font-size:14.5px;
}
.timeline-list li::before{
  content:''; position:absolute; left:0; top:9px; width:6px; height:1px; background: var(--accent);
}
.timeline-list li strong{ color: var(--text); font-weight:600; }

/* ==========================================================================
   SKILLS
   ========================================================================== */
.skills-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:20px; margin-bottom: 56px; }
.skill-card.wide{ grid-column: span 2; }
.skill-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
  transition: border-color .25s, transform .25s;
}
.skill-card:hover{ border-color: var(--accent-dim); transform: translateY(-3px); }
.skill-card h3{ font-size:14px; color: var(--text-muted); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:16px; font-weight:600; }
.tag-row{ display:flex; flex-wrap:wrap; gap:8px; }
.tag{
  font-family: var(--font-mono); font-size:12.5px; padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--text); background: var(--surface-2);
}

.proficiency{ display:flex; flex-direction:column; gap:20px; }
.prof-row{ display:grid; grid-template-columns: 260px 1fr; align-items:center; gap:18px; }
.prof-label{ font-size:14px; color: var(--text-muted); font-family: var(--font-mono); }
.prof-bar{ height:6px; background: var(--surface-2); border-radius:4px; overflow:hidden; }
.prof-fill{
  height:100%; width:0; background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius:4px; transition: width 1.4s var(--ease);
}
.prof-fill.animate{ width: var(--val); }

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.projects-grid{ display:grid; grid-template-columns: 1fr; gap: 20px; }
.project-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: transform .25s, border-color .25s;
}
.project-card:hover{ transform: translateY(-4px); border-color: var(--accent-dim); }
.project-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.project-title{ font-size:22px; margin-bottom:6px; }
.project-card .timeline-list{ margin-bottom:22px; }
.project-actions{ margin-top:24px; }
.project-card .timeline-list li strong{ overflow-wrap:anywhere; }

/* ==========================================================================
   FINDINGS
   ========================================================================== */
.findings-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.finding-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; transition: transform .25s, border-color .25s;
}
.finding-card:hover{ transform: translateY(-4px); border-color: var(--accent-dim); }
.finding-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.finding-id{ font-family: var(--font-mono); font-size:11px; color: var(--text-dim); }
.finding-title{ font-size:17px; margin-bottom:6px; }
.finding-target{ font-family: var(--font-mono); font-size:12.5px; color: var(--accent); margin-bottom:12px; }
.finding-desc{ color: var(--text-muted); font-size:14px; margin-bottom:18px; }
.finding-bar{ height:5px; background: var(--surface-2); border-radius:4px; overflow:hidden; margin-bottom:16px; }
.finding-fill{ height:100%; width:0; border-radius:4px; transition: width 1.2s var(--ease); }
.finding-fill.animate{ width: var(--val); }
.sev-fill-critical{ background: var(--critical); }
.sev-fill-high{ background: var(--high); }
.sev-fill-medium{ background: var(--medium); }
.sev-fill-ai{ background: var(--accent); }
.finding-card-ai{ grid-column: 1 / -1; border-color: var(--accent-dim); }
.finding-card-ai:hover{ border-color: var(--accent); }
.finding-foot{ display:flex; align-items:center; gap:8px; font-family: var(--font-mono); font-size:12px; color: var(--text-dim); text-transform:uppercase; letter-spacing:0.05em; }
.status-dot{ width:6px; height:6px; border-radius:50%; background: var(--accent); }

/* ==========================================================================
   CERTS / EDUCATION
   ========================================================================== */
.certs-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:20px; margin-bottom: 24px; }
.cert-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; transition: transform .25s, border-color .25s;
}
.cert-card:hover{ transform: translateY(-4px); border-color: var(--accent-dim); }
.cert-badge{
  display:inline-flex; font-family: var(--font-mono); font-weight:800; font-size:13px;
  color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius:6px; margin-bottom:16px;
}
.cert-card h3{ font-size:16px; margin-bottom:6px; line-height:1.35; }
.cert-card p{ color: var(--text-dim); font-size:13px; }

.education-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 28px;
}
.edu-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; }
.edu-row h3{ font-size:17px; margin-bottom:6px; }
.edu-row p{ color: var(--text-muted); font-size:14px; }
.edu-date{ font-family: var(--font-mono); font-size:12.5px; color: var(--accent); white-space:nowrap; }
.edu-meta{ margin-top:12px; font-family: var(--font-mono); font-size:12.5px; color: var(--text-dim); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:16px; }
.contact-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; display:flex; flex-direction:column; gap:8px; transition: transform .25s, border-color .25s, background .25s;
}
.contact-card:hover{ transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.contact-label{ font-family: var(--font-mono); font-size:11px; color: var(--text-dim); text-transform:uppercase; letter-spacing:0.08em; }
.contact-val{ font-size:14.5px; color: var(--text); word-break: break-word; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer{ position:relative; z-index:1; border-top: 1px solid var(--border-soft); padding: 32px 24px; }
.footer-inner{
  max-width: var(--max-w); margin:0 auto; display:flex; justify-content:space-between; align-items:center;
  font-family: var(--font-mono); font-size:12.5px; color: var(--text-dim); flex-wrap:wrap; gap:12px;
}
.back-top{ color: var(--text-muted); transition: color .2s; }
.back-top:hover{ color: var(--accent); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px){
  .nav-links{ position:fixed; top:64px; left:0; right:0; background: var(--bg-soft); flex-direction:column;
    padding: 20px 24px; gap:18px; border-bottom:1px solid var(--border); transform: translateY(-130%); transition: transform .3s var(--ease); }
  .nav-links.open{ transform: translateY(0); }
  .nav-toggle{ display:flex; }
  .nav-cv{ margin-left:auto; }
}

@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; }
  .about-grid{ grid-template-columns: 1fr; }
  .skills-grid{ grid-template-columns: repeat(2, 1fr); }
  .skill-card.wide{ grid-column: span 2; }
  .findings-grid{ grid-template-columns: 1fr; }
  .finding-card-ai{ grid-column: 1 / -1; }
  .certs-grid{ grid-template-columns: repeat(2,1fr); }
  .contact-grid{ grid-template-columns: repeat(2,1fr); }
  .prof-row{ grid-template-columns: 1fr; gap:8px; }
}

@media (max-width: 760px){
  .skills-grid{ grid-template-columns: 1fr; }
  .skill-card.wide{ grid-column: span 1; }
  .nav-cv{ display:none; }
  .certs-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .hero-stats{ gap:26px; }
  .section{ padding: 88px 20px; }
}
