/* ─── Space theme: black / purple / red ─────────────────────────── */
:root {
  --bg: #06030c;
  --bg-soft: #0d0716;
  --purple: #a855f7;
  --purple-dim: #7c3aed;
  --red: #ef4444;
  --red-dim: #dc2626;
  --green: #22c55e;
  --text: #e9e4f5;
  --text-dim: #9d92b8;
  --card: rgba(20, 12, 34, 0.65);
  --border: rgba(168, 85, 247, 0.22);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
}

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

html { scroll-behavior: smooth; }

/* Disable text selection and the text-insertion caret across the page */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}

a, button, .btn, .nav-cta, .project-link, .contact-card, .skill-col li {
  cursor: pointer;
}

/* Only the hero typewriter caret should ever appear, and nowhere else */
.caret { user-select: none; }


::selection { background: var(--purple); color: #fff; }

/* Starfield canvas + nebulae + cursor glow + progress bar */
#starfield { position: fixed; inset: 0; z-index: -3; }

#cursor-glow {
  position: fixed;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--purple));
  z-index: 200;
  transition: width 0.1s linear;
}

.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -2;
  pointer-events: none;
  opacity: 0.5;
}
.nebula-1 {
  width: 60vw; height: 60vw;
  top: -20vw; right: -15vw;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.32), transparent 70%);
}
.nebula-2 {
  width: 50vw; height: 50vw;
  bottom: -25vw; left: -15vw;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.2), transparent 70%);
}

/* ─── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 2.5rem;
  background: rgba(6, 3, 12, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.nav-logo span {
  background: linear-gradient(90deg, var(--red), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: 0.2s;
}
.nav-toggle span:nth-child(1) { width: 100%; }
.nav-toggle span:nth-child(2) { width: 75%; }
.nav-toggle span:nth-child(3) { width: 50%; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { width: 100%; transform: translateY(-7px) rotate(-45deg); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--purple); }
.nav-cta {
  border: 1px solid var(--purple);
  border-radius: 8px;
  padding: 0.4rem 1rem;
  color: var(--purple) !important;
}
.nav-cta:hover { background: rgba(168, 85, 247, 0.12); }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

.hero-planet {
  position: absolute;
  width: 340px; height: 340px;
  top: 12%; right: 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(239, 68, 68, 0.55), transparent 55%),
    radial-gradient(circle at 65% 70%, rgba(124, 58, 237, 0.75), rgba(30, 10, 50, 0.9) 70%);
  box-shadow:
    0 0 80px rgba(168, 85, 247, 0.35),
    inset -30px -30px 80px rgba(0, 0, 0, 0.7);
  opacity: 0.85;
  animation: float 9s ease-in-out infinite;
  z-index: -1;
}
.hero-planet::after {
  content: '';
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247, 0.25);
  transform: rotate(-18deg) scaleY(0.32);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-24px); }
}

/* Availability / hiring badge — controlled by SITE_CONFIG.hiring in script.js */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.6rem;
  border: 1px solid;
  backdrop-filter: blur(8px);
}
.availability::before {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
}
.availability.hiring {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}
.availability.hiring::before {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
.availability.not-hiring {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}
.availability.not-hiring::before { background: var(--red); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-eyebrow {
  color: var(--purple);
  letter-spacing: 0.15em;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: 0.04em;
  background: linear-gradient(115deg, var(--red) 0%, var(--purple) 55%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.45));
  animation: heroGlow 4s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { filter: drop-shadow(0 0 25px rgba(168, 85, 247, 0.35)); }
  50% { filter: drop-shadow(0 0 55px rgba(239, 68, 68, 0.5)); }
}

.hero-roles {
  margin-top: 1rem;
  font-size: 1.25rem;
  color: var(--text-dim);
  min-height: 1.8em;
  white-space: nowrap;
}
#typed-role { color: var(--purple); font-weight: 600; }
.caret { color: var(--red); animation: blink 1s step-end infinite; font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 580px;
}

.hero-hint {
  margin-top: 2.2rem;
  font-size: 0.8rem;
  color: rgba(157, 146, 184, 0.5);
  letter-spacing: 0.08em;
}

.hero-actions { margin-top: 2.5rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.btn {
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: linear-gradient(120deg, var(--red-dim), var(--purple-dim));
  color: #fff;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
}
.btn-primary:hover { box-shadow: 0 0 45px rgba(239, 68, 68, 0.5); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--purple); background: rgba(168, 85, 247, 0.08); }

.hero-hint {
  margin-top: 2.2rem;
  font-size: 0.8rem;
  color: rgba(157, 146, 184, 0.5);
  letter-spacing: 0.08em;
}

.hero-scroll {
  position: absolute;
  bottom: 2.2rem;
  width: 26px; height: 44px;
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 14px;
}
.hero-scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--purple);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 0; }
}

/* ─── Sections ──────────────────────────────────────────────────── */
.section {
  max-width: 1050px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.section.visible { opacity: 1; transform: translateY(0); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 3rem;
  letter-spacing: 0.04em;
}
.section-title .accent { color: var(--red); margin-right: 0.5rem; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p { color: var(--text-dim); margin-bottom: 1.2rem; font-size: 1.05rem; word-break: normal; }
.about-text p:first-child { color: var(--text); }

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  backdrop-filter: blur(8px);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--red), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.85rem; color: var(--text-dim); }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.project-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card:hover {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 10px 45px rgba(124, 58, 237, 0.25);
}
.project-card.featured { grid-column: 1 / -1; }
.project-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25), transparent 70%);
  pointer-events: none;
}
.project-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.9rem;
}
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}
.project-card > p { color: var(--text-dim); font-size: 0.98rem; margin-bottom: 1.2rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.project-tech span {
  font-size: 0.78rem;
  color: var(--purple);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
}
.project-link { color: var(--red); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.project-link:hover { text-decoration: underline; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.skill-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.25s;
}
.skill-col:hover { border-color: rgba(168, 85, 247, 0.5); transform: translateY(-4px); }
.skill-col h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1rem;
}
.skill-col ul { list-style: none; }
.skill-col li {
  color: var(--text-dim);
  padding: 0.35rem 0 0.35rem 1.1rem;
  position: relative;
}
.skill-col li::before { content: '▸'; position: absolute; left: 0; color: var(--red); }

/* Contact */
.contact-lead { color: var(--text-dim); margin: -1.5rem 0 2.5rem; }
.contact-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 200px;
  padding: 2rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  font-family: var(--font-body);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s;
  will-change: transform;
}
.contact-card:hover {
  border-color: var(--purple);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.3);
}
.contact-icon { font-size: 1.8rem; color: var(--purple); }
.contact-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact-value { color: var(--text); font-weight: 600; }
.contact-hint { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.08em; }
.contact-hint.copied { color: var(--green); }

/* Footer */
.footer {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border-top: 1px solid rgba(168, 85, 247, 0.12);
  color: var(--text-dim);
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.1), transparent 70%);
}
.footer-big {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.footer-big span {
  background: linear-gradient(90deg, var(--red), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.footer-small { font-size: 1rem; color: var(--text-dim); }
.footer-small a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
}
.footer-small a:hover { color: var(--red); text-decoration: underline; }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: rgba(6, 3, 12, 0.95);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-links a {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
    text-align: center;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta { margin-top: 0.5rem; }

  .hero { padding: 5.5rem 1.25rem 3.5rem; }
  .hero-eyebrow { font-size: 0.85rem; }
  .hero-name { font-size: 3.2rem; }
  .hero-roles { font-size: 1rem; white-space: normal; }
  .hero-tagline { font-size: 1rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero-planet { display: none; }

  .section { padding: 4rem 1.25rem; }
  .section-title { margin-bottom: 2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-text { max-width: 100%; }
  .about-card { grid-template-columns: 1fr 1fr; gap: 1.2rem; padding: 1.25rem; }

  .projects-grid { grid-template-columns: 1fr; }
  .project-card { padding: 1.4rem; }
  .project-card.featured { grid-column: auto; }

  .skills-grid { grid-template-columns: 1fr; }

  .contact-links { flex-direction: column; gap: 1rem; }
  .contact-card { width: 100%; padding: 1.5rem 1rem; }

  .availability { font-size: 0.78rem; padding: 0.4rem 0.9rem; margin-bottom: 1.2rem; }
}
