/* ===== TOKENS ===== */
:root {
  --bg:          #0A0F1E;
  --bg-surface:  #111827;
  --bg-card:     #151D30;
  --bg-card-2:   #1A2340;
  --cyan:        #00D4FF;
  --cyan-dim:    rgba(0, 212, 255, 0.12);
  --purple:      #7B61FF;
  --purple-dim:  rgba(123, 97, 255, 0.12);
  --text:        #EDF2FF;
  --text-muted:  #7A8AAA;
  --text-subtle: #3D4F6E;
  --border:      rgba(255,255,255,0.07);
  --border-cyan: rgba(0, 212, 255, 0.25);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       12px;
  --radius-lg:    20px;
}

/* ===== RESET ===== */
*, *::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-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(10, 15, 30, 0.97); }

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.logo-bracket { color: var(--text-muted); }
.logo-accent  { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta {
  color: var(--cyan);
  border: 1px solid var(--border-cyan);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a.nav-cta:hover {
  background: var(--cyan);
  color: var(--bg);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 5% 0;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 500px; height: 500px;
  background: rgba(0, 212, 255, 0.08);
  top: -150px; right: -100px;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: rgba(123, 97, 255, 0.07);
  bottom: -100px; left: -80px;
}

.hero-content {
  position: relative;
  max-width: 760px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.35s forwards;
}
.hero-title-accent { color: var(--cyan); }

/* Terminal */
.terminal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow: hidden;
  max-width: 560px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.5s forwards;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot-red    { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green  { background: #28C840; }
.terminal-title {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.terminal-body {
  padding: 14px 18px 18px;
  line-height: 2;
}
.terminal-line { display: flex; gap: 6px; }
.t-prompt { color: var(--cyan); }
.t-cmd    { color: var(--text); }
.t-out    { color: var(--text-muted); padding-left: 1.2rem; }
.cursor {
  color: var(--cyan);
  animation: blink 1s step-end infinite;
  line-height: 1;
}

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

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.65s forwards;
}

.btn-primary {
  display: inline-block;
  background: var(--cyan);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ghost {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-subtle); }

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 5%;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.9s forwards;
}
.hero-scroll-hint span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-subtle);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scroll-line {
  width: 40px; height: 1px;
  background: var(--text-subtle);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--cyan);
  animation: slide 2s ease infinite;
}
@keyframes slide { to { left: 100%; } }

/* ===== STATS BAND ===== */
.stats-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 5%;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 3rem;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 5%;
}
.section-dark {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 3.5rem;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  grid-column: span 4;
}
.project-card--featured {
  grid-column: span 8;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
}
.project-card:hover {
  border-color: var(--border-cyan);
  transform: translateY(-3px);
}
.project-card:hover .project-glow {
  opacity: 1;
}

.project-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border-cyan);
  padding: 2px 8px;
  border-radius: 4px;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.project-card--featured .project-title { font-size: 1.5rem; }

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-meta-item {
  font-size: 0.75rem;
  color: var(--text-subtle);
  background: rgba(255,255,255,0.04);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.project-footer {
  display: flex;
  gap: 1.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.project-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cyan);
  transition: opacity 0.2s;
}
.project-link:hover { opacity: 0.7; }
.project-link-ghost { color: var(--text-muted); }

/* ===== SKILLS ===== */
.skills-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}
.skill-group-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.skill-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skill-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.skill-pill:hover {
  border-color: var(--border-cyan);
  background: var(--cyan-dim);
}
.skill-icon { font-size: 1rem; }

/* ===== ABOUT ===== */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-text {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.75;
}
.about-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.about-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 100px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: pulse-dot 2s ease infinite;
}
.badge-dot-purple {
  background: var(--purple);
  box-shadow: 0 0 6px var(--purple);
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.about-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.about-card-row:last-of-type { border-bottom: none; }
.about-card-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.about-card-value {
  font-size: 0.87rem;
  font-weight: 500;
  text-align: right;
}
.about-btn { margin-top: 1.5rem; text-align: center; }

/* ===== CONTACT ===== */
.section-contact {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.contact-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.contact-sub {
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.contact-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-subtle); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--border-cyan); }
.form-group select option { background: var(--bg-card); }

.form-submit {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.contact-social {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.contact-social:hover { color: var(--cyan); }

/* ===== FOOTER ===== */
.footer {
  padding: 2rem 5%;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-subtle);
}
.footer-accent { color: var(--cyan); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { grid-column: span 1 !important; }
  .about-layout { grid-template-columns: 1fr; gap: 3rem; }
  .stat { padding: 0 1.5rem; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 5%;
    gap: 1.25rem;
  }
  .hero-title { font-size: 2.6rem; }
  .form-row { grid-template-columns: 1fr; }
  .stats-band { gap: 1.5rem; }
  .stat-divider { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
