/* ============ Tokens ============ */
:root{
  --bg:            #0A0B10;
  --bg-raised:     #12141C;
  --bg-raised-2:   #171A24;
  --ink:           #F3F4F8;
  --ink-soft:      #A7ACBB;
  --ink-faint:     #676D80;
  --line:          #24273350;
  --line-strong:   #2E3242;
  --violet:        #8C6BFF;
  --cyan:          #4CE0D2;
  --coral:         #FF6E5A;
  --grad: linear-gradient(120deg, #8C6BFF 0%, #4CE0D2 100%);
  --radius:        14px;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

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

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

/* faint blueprint grid backdrop */
.grid-overlay{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
}

/* glowing gradient orbs — the "eye catchy" signature */
.orb{
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
.orb-1{
  width: 480px; height: 480px;
  top: -120px; left: -100px;
  background: var(--violet);
  animation: float-a 18s ease-in-out infinite;
}
.orb-2{
  width: 420px; height: 420px;
  top: 20vh; right: -140px;
  background: var(--cyan);
  animation: float-b 22s ease-in-out infinite;
}
.orb-3{
  width: 380px; height: 380px;
  bottom: -140px; left: 30vw;
  background: var(--coral);
  opacity: 0.22;
  animation: float-a 26s ease-in-out infinite reverse;
}

@keyframes float-a{
  0%, 100%{ transform: translate(0,0); }
  50%{ transform: translate(60px, 40px); }
}
@keyframes float-b{
  0%, 100%{ transform: translate(0,0); }
  50%{ transform: translate(-50px, 60px); }
}

main, header, footer{ position: relative; z-index: 1; }

/* ============ Nav ============ */
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 6vw;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10,11,16,0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-strong);
}

.nav-mark{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cursor-dot{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--coral);
  display: inline-block;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink{ 50%{ opacity: 0; } }

.nav-links{ display: flex; gap: 32px; }

.nav-links a{
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.nav-links a:hover{ color: var(--ink); }

.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(--ink);
  display: block;
}

/* ============ Hero ============ */
.hero{ padding: 9vh 6vw 11vh; }

.hero-inner{
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 6vw;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.terminal{
  background: var(--bg-raised);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(140,107,255,0.08), 0 30px 70px -30px rgba(140,107,255,0.35);
  min-height: 280px;
}

.terminal-bar{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-raised-2);
  border-bottom: 1px solid var(--line-strong);
}

.dot{ width: 10px; height: 10px; border-radius: 50%; }
.dot-r{ background: #FF5F57; }
.dot-y{ background: #FEBC2E; }
.dot-g{ background: #28C840; }

.terminal-title{
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.terminal-body{
  padding: 22px 20px 26px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  min-height: 220px;
}

.term-line{ display: flex; gap: 10px; margin-bottom: 4px; }
.term-tag{ color: var(--cyan); white-space: nowrap; }
.term-tag.user{ color: var(--coral); }
.term-text{ color: var(--ink); }
.term-caret{
  display: inline-block;
  width: 7px; height: 15px;
  background: var(--violet);
  vertical-align: -2px;
  animation: blink 0.9s steps(1) infinite;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  background: rgba(76,224,210,0.1);
  border: 1px solid rgba(76,224,210,0.25);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-text h1{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 54px);
  line-height: 1.08;
  margin-bottom: 18px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub{
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 46ch;
  margin-bottom: 30px;
}

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

.btn{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 26px;
  border-radius: 999px;
  display: inline-block;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.btn:hover{ transform: translateY(-2px); }

.btn-primary{ background: var(--grad); color: #0A0B10; }
.btn-primary:hover{ box-shadow: 0 10px 30px -8px rgba(140,107,255,0.55); }

.btn-ghost{ border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover{ border-color: var(--violet); }

/* ============ Sections (shared) ============ */
.section{
  padding: 10vh 6vw;
  max-width: 1180px;
  margin: 0 auto;
}

.section-head{ margin-bottom: 46px; max-width: 60ch; }

.tag-label{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  display: block;
  margin-bottom: 14px;
}

.section-head h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
}

/* ============ About ============ */
.about-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-copy{ color: var(--ink-soft); font-size: 16.5px; }

.about-facts{ display: grid; gap: 22px; }

.fact{
  border-left: 2px solid var(--violet);
  padding-left: 16px;
}

.fact-num{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  display: block;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fact-label{ color: var(--ink-soft); font-size: 13.5px; }

/* ============ Skills ============ */
.skills-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-group{
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.skill-group:hover{ border-color: var(--violet); transform: translateY(-3px); }

.skill-group h3{
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.chips{ display: flex; flex-wrap: wrap; gap: 8px; }

.chip{
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(76,224,210,0.1);
  border: 1px solid rgba(76,224,210,0.22);
  color: var(--cyan);
  font-weight: 500;
}

.chip-mono{
  font-family: var(--font-mono);
  background: rgba(140,107,255,0.1);
  border: 1px solid rgba(140,107,255,0.25);
  color: var(--violet);
  border-radius: 6px;
}

/* ============ Projects ============ */
.projects-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card{
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover{
  transform: translateY(-4px);
  border-color: var(--violet);
  box-shadow: 0 20px 40px -24px rgba(140,107,255,0.5);
}

.project-card.featured{
  grid-column: 1 / -1;
  border-color: rgba(140,107,255,0.4);
  background: linear-gradient(150deg, rgba(140,107,255,0.08), var(--bg-raised) 55%);
}

.project-kicker{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--coral);
}

.project-top h3{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin-top: 6px;
}

.project-card p{ color: var(--ink-soft); font-size: 15px; }

/* ============ Experience / timeline ============ */
.timeline{
  border-left: 2px solid var(--line-strong);
  padding-left: 32px;
  display: grid;
  gap: 36px;
}

.timeline-item{ position: relative; }

.timeline-marker{
  position: absolute;
  left: -38px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--violet);
  box-shadow: 0 0 12px rgba(140,107,255,0.6);
}

.timeline-period{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.timeline-content h3{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 6px;
}

.timeline-content p:last-child{ color: var(--ink-soft); font-size: 14.5px; }

/* ============ Contact ============ */
.contact-sub{ color: var(--ink-soft); margin-bottom: 34px; max-width: 50ch; }

.contact-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-card{
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.contact-card:hover{
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -20px rgba(76,224,210,0.45);
}

.contact-label{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.contact-value{ font-weight: 600; font-size: 15px; word-break: break-word; }

/* ============ Footer ============ */
.footer{
  text-align: center;
  padding: 32px 6vw 48px;
  color: var(--ink-faint);
  font-size: 13px;
}

/* ============ Scroll reveal ============ */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view{
  opacity: 1;
  transform: translateY(0);
}

/* ============ Focus ============ */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ============ Responsive ============ */
@media (max-width: 860px){
  .nav-links{
    position: fixed;
    top: 69px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line-strong);
    flex-direction: column;
    padding: 20px 6vw;
    gap: 18px;
    display: none;
  }
  .nav-links.open{ display: flex; }
  .nav-toggle{ display: flex; }

  .hero-inner{ grid-template-columns: 1fr; gap: 48px; }
  .about-grid{ grid-template-columns: 1fr; }
  .skills-grid{ grid-template-columns: 1fr; }
  .projects-grid{ grid-template-columns: 1fr; }
  .project-card.featured{ grid-column: 1; }
  .contact-grid{ grid-template-columns: 1fr; }
  .orb{ opacity: 0.22; }
}

@media (prefers-reduced-motion: reduce){
  .cursor-dot, .term-caret, .orb{ animation: none; }
  .reveal{ opacity: 1; transform: none; transition: none; }
  html{ scroll-behavior: auto; }
}