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

/* ── VARIABLES ── */
:root {
  --bg:           #0a0a0f;
  --surface:      #1e1e2e;
  --surface2:     #13131f;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.16);
  --accent:       #7f77dd;
  --accent2:      #5dcaa5;
  --accent3:      #ef9f27;
  --text:         #f0eefc;
  --muted:        rgba(240,238,252,0.52);
  --faint:        rgba(240,238,252,0.18);
  --font-head:    'Syne', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --max:          1160px;
  --pad:          clamp(1.5rem, 5vw, 4rem);
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* grid lines bg */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(127,119,221,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127,119,221,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── GLOW ORBS ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 { width: 700px; height: 700px; background: #3b3499; opacity: 0.25; top: -200px; left: -200px; }
.orb-2 { width: 500px; height: 500px; background: #0d5e49; opacity: 0.22; bottom: 0; right: -100px; }

/* ── CURSOR DOT ── */
.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--accent2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: transform 0.1s;
}
@media (max-width: 768px) { .cursor-dot { display: none; } }

/* ── SIDE NAV DOTS ── */
.sidenav {
  position: fixed;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 200;
}
.sidenav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--faint);
  border: 1px solid var(--border-hover);
  transition: background 0.25s, transform 0.25s;
  position: relative;
  cursor: pointer;
}
.sidenav-dot::after {
  content: attr(data-label);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.sidenav-dot:hover::after { opacity: 1; }
.sidenav-dot.active {
  background: var(--accent);
  transform: scale(1.4);
  border-color: var(--accent);
}
@media (max-width: 1024px) { .sidenav { display: none; } }

/* ── TOP NAVBAR ── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem var(--pad);
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.topnav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.topnav ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.topnav ul a:hover { color: var(--text); }

/* hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.3s;
  z-index: 99;
}
.mobile-menu.open { max-height: 300px; padding: 1rem 0; }
.mobile-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem var(--pad);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.mobile-menu a:hover { color: var(--text); background: rgba(255,255,255,0.03); }

@media (max-width: 768px) {
  .topnav ul { display: none; }
  .hamburger { display: flex; }
}

/* ── SECTIONS ── */
section {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 7rem var(--pad) 5rem;
}

.section-header { margin-bottom: 0; }

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::after {
  content: '';
  height: 1px; width: 40px;
  background: var(--accent);
  opacity: 0.4;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 3rem;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 4rem;
  padding-top: 7rem;
}

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

.hero-name {
  font-family: var(--font-head);
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.25s forwards;
}
.hero-name .accent { color: var(--accent); }

.hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.4s forwards;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.5s forwards;
}
.chip {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}

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

/* ── HERO CARD ── */
.hero-right {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.5s forwards;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.hero-card-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.hero-card-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.hero-card-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}
.hero-card-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.green  { background: var(--accent2); }
.dot.purple { background: var(--accent); }
.dot.teal   { background: var(--accent3); }

.hero-card-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--accent2);
}
.status-ping {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent2);
  position: relative;
  flex-shrink: 0;
}
.status-ping::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--accent2);
  animation: ping 1.8s ease-out infinite;
  opacity: 0;
}

@keyframes ping {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2);   opacity: 0; }
}

/* hide hero-right on mobile */
@media (max-width: 900px) {
  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 8rem;
    padding-bottom: 4rem;
  }
  .hero-right { display: none; }
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--border-hover);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 6px;
  text-decoration: none;
  background: transparent;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-ghost:hover { border-color: var(--text); color: var(--text); transform: translateY(-2px); }

/* ── ABOUT ── */
#about { border-top: 1px solid var(--border); }

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.stat-number {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-label { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.05em; }

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── SKILLS ── */
#skills { border-top: 1px solid var(--border); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.skill-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.25s, transform 0.2s;
}
.skill-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.skill-name { font-size: 0.85rem; font-weight: 500; color: var(--text); margin-bottom: 0.25rem; }
.skill-desc { font-size: 0.72rem; color: var(--muted); line-height: 1.5; }

@media (max-width: 900px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .skills-grid { grid-template-columns: 1fr; } }

/* ── PROJECTS ── */
#projects { border-top: 1px solid var(--border); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.25s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.project-card:hover::before { opacity: 1; }

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-number { font-size: 0.68rem; color: var(--accent); letter-spacing: 0.15em; }
.project-ext {
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}
.project-ext:hover { color: var(--accent2); transform: translate(2px, -2px); }

.project-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.project-desc { font-size: 0.83rem; color: var(--muted); flex: 1; line-height: 1.65; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.tag {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(127,119,221,0.3);
  border-radius: 4px;
  color: var(--accent);
  background: rgba(127,119,221,0.07);
}

@media (max-width: 640px) { .projects-grid { grid-template-columns: 1fr; } }

/* ── CONTACT ── */
#contact { border-top: 1px solid var(--border); }

.contact-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}

.contact-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.contact-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  background: rgba(255,255,255,0.02);
}
.contact-link:hover {
  background: rgba(127,119,221,0.08);
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem var(--pad);
  border-top: 1px solid var(--border);
  font-size: 0.73rem;
  color: var(--faint);
  letter-spacing: 0.06em;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

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