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

:root {
  --bg: #07070c;
  --bg2: #0a0a12;
  --surface: rgba(20, 20, 30, 0.55);
  --surface2: rgba(28, 28, 42, 0.6);
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(124, 106, 247, 0.5);
  --accent: #8b7bff;
  --accent2: #5ee7b0;
  --accent3: #ff7eb6;
  --text: #ecedf5;
  --muted: #9a9ab8;
  --faint: #5a5a78;
  --danger: #f87171;
  --warn: #fbbf24;
  --success: #5ee7b0;
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(1200px 800px at 70% -10%, #14122b 0%, var(--bg2) 45%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  cursor: none;
}

/* Restore native cursor on touch / fine-pointer fallback */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor-glow { display: none; }
}

a { color: inherit; text-decoration: none; }
::selection { background: rgba(139, 123, 255, 0.35); color: #fff; }

/* ─── Ambient background ────────────────────────────── */
.aurora {
  position: fixed; inset: 0; z-index: -2;
  overflow: hidden; pointer-events: none;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora-blob.a1 {
  width: 50vw; height: 50vw; max-width: 620px; max-height: 620px;
  background: radial-gradient(circle, rgba(139,123,255,0.55), transparent 70%);
  top: -10%; left: -5%;
  animation: drift1 22s ease-in-out infinite;
}
.aurora-blob.a2 {
  width: 45vw; height: 45vw; max-width: 560px; max-height: 560px;
  background: radial-gradient(circle, rgba(94,231,176,0.4), transparent 70%);
  bottom: -15%; right: -8%;
  animation: drift2 26s ease-in-out infinite;
}
.aurora-blob.a3 {
  width: 38vw; height: 38vw; max-width: 480px; max-height: 480px;
  background: radial-gradient(circle, rgba(255,126,182,0.3), transparent 70%);
  top: 40%; left: 45%;
  animation: drift3 30s ease-in-out infinite;
}

.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}

/* Custom cursor */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(139,123,255,0.8);
  background: rgba(139,123,255,0.08);
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 9999;
  transition: width 0.18s, height 0.18s, background 0.18s, border-color 0.18s;
  mix-blend-mode: screen;
}
.cursor-glow.hovering {
  width: 52px; height: 52px;
  background: rgba(94,231,176,0.12);
  border-color: rgba(94,231,176,0.8);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 200;
  box-shadow: 0 0 12px rgba(139,123,255,0.6);
}

/* ─── NAV ───────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(8, 8, 14, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, padding 0.3s;
}
nav.scrolled {
  background: rgba(8, 8, 14, 0.82);
  border-bottom-color: var(--border);
  padding: 0.7rem 2rem;
}

.logo {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo .dot { color: var(--accent); }

nav ul {
  display: flex; gap: 2rem; list-style: none;
}
nav ul a {
  position: relative;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}
nav ul a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.25s ease;
}
nav ul a:hover, nav ul a.active { color: var(--text); }
nav ul a:hover::after, nav ul a.active::after { width: 100%; }

.nav-cta {
  font-size: 0.85rem; font-weight: 600;
  padding: 0.5rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--border-hi);
  color: var(--text);
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: rgba(139,123,255,0.15); transform: translateY(-2px); }

/* ─── SECTIONS ──────────────────────────────────────── */
section { padding: 7rem 1.5rem; position: relative; }
.section-inner { max-width: 900px; margin: 0 auto; }

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent2);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 2.5rem;
  letter-spacing: -1px;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2,0.7,0.2,1), transform 0.7s cubic-bezier(0.2,0.7,0.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ─── HERO ──────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 5rem;
  position: relative;
}

.hero-inner { position: relative; z-index: 1; max-width: 720px; }

.greeting {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent2);
  margin-bottom: 1.25rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out infinite; }

h1 {
  font-size: clamp(2.7rem, 7.5vw, 5.2rem);
  font-weight: 900;
  letter-spacing: -2.5px;
  line-height: 1.04;
  margin-bottom: 1.25rem;
}

.highlight {
  background: linear-gradient(110deg, var(--accent), var(--accent2) 45%, var(--accent3));
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
}

.tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.sub {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.hero-btns {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}

.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #6d5af0);
  color: #fff;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px -8px rgba(139,123,255,0.6);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25), transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -10px rgba(139,123,255,0.75); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary .arrow { transition: transform 0.25s; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--border-hi); background: rgba(139,123,255,0.1); transform: translateY(-3px); }

.hero-badge {
  margin-top: 3rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--muted);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 0 0 rgba(94,231,176,0.7);
  display: inline-block;
  animation: pulse 2s infinite;
}

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  animation: bob 2.2s ease-in-out infinite;
}
.mouse {
  display: block; width: 24px; height: 38px;
  border: 2px solid var(--faint); border-radius: 14px;
  position: relative;
}
.wheel {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 7px; border-radius: 2px; background: var(--accent2);
  animation: wheel 1.6s ease-in-out infinite;
}

/* ─── Glass card base ───────────────────────────────── */
.tilt {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.25s, box-shadow 0.25s;
  transform-style: preserve-3d;
}
.tilt:hover { border-color: var(--border-hi); }

/* ─── ABOUT ─────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}
.about-text em { color: var(--accent2); font-style: normal; font-weight: 600; }

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-card {
  padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  text-align: center;
}
.stat-num {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ─── SKILLS ────────────────────────────────────────── */
.skills-notice {
  display: flex; gap: 1.25rem;
  background: var(--surface);
  border: 1px solid rgba(251,191,36,0.35);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
}
.notice-icon { font-size: 2rem; flex-shrink: 0; }
.notice-text strong { display: block; margin-bottom: 0.5rem; color: var(--warn); }
.notice-text p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.5rem; }

.skills-grid {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
}
.skill-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-family: var(--mono);
  color: var(--text);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s;
}
.skill-tag:hover {
  border-color: var(--border-hi); color: var(--accent);
  transform: translateY(-3px); background: rgba(139,123,255,0.1);
}
.skill-tag.blink {
  border-color: var(--accent2); color: var(--accent2);
  animation: blinkBorder 1.5s infinite;
}

/* ─── PROJECTS ──────────────────────────────────────── */
.terminal {
  background: rgba(10, 10, 18, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s;
}
.terminal:hover { border-color: var(--border-hi); }
.terminal-header {
  background: rgba(255,255,255,0.04);
  padding: 0.8rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.terminal-header .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.terminal-title { font-size: 0.75rem; color: var(--muted); margin-left: 0.5rem; }

.terminal-body { padding: 1.5rem; font-size: 0.875rem; line-height: 2; }
.prompt { color: var(--accent); margin-right: 0.5rem; }
.output { color: var(--muted); padding-left: 1.25rem; }
.output.comment { color: var(--faint); }
.output.success { color: var(--accent2); }
.cursor { display: inline-block; animation: blink 1s infinite; color: var(--accent); }

.projects-cta { color: var(--muted); font-size: 0.98rem; margin-bottom: 1.5rem; }
.projects-cta strong { color: var(--text); }

/* ─── CONTACT ───────────────────────────────────────── */
.contact-inner { text-align: center; }
.contact-sub { color: var(--muted); margin-bottom: 0.5rem; font-size: 1.02rem; }
.contact-links {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  margin-top: 2.5rem;
}
.contact-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.6rem;
  font-size: 0.92rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.contact-card:hover {
  border-color: var(--border-hi); transform: translateY(-4px);
  background: rgba(139,123,255,0.08);
}
.contact-icon { font-size: 1.3rem; }

/* ─── FOOTER ────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-sub { margin-top: 0.35rem; opacity: 0.55; }

/* ─── ANIMATIONS ────────────────────────────────────── */
@keyframes shimmer { to { background-position: 220% center; } }
@keyframes wave {
  0%,60%,100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); } 40% { transform: rotate(-4deg); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94,231,176,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(94,231,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(94,231,176,0); }
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes blinkBorder {
  0%,100% { border-color: var(--accent2); opacity: 1; }
  50% { border-color: transparent; opacity: 0.6; }
}
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }
@keyframes wheel { 0% { opacity: 0; top: 7px; } 40% { opacity: 1; } 100% { opacity: 0; top: 18px; } }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.1); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,-30px) scale(1.15); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px,50px) scale(0.9); } }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 760px) {
  nav { padding: 0.9rem 1.2rem; }
  nav ul { gap: 1rem; }
  .nav-cta { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  section { padding: 5rem 1.2rem; }
}
@media (max-width: 460px) {
  nav ul { gap: 0.8rem; font-size: 0.8rem; }
  .about-cards { grid-template-columns: 1fr 1fr; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
