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

:root {
  --bg:        #0a0a0f;
  --bg2:       #111118;
  --bg3:       #1a1a24;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.14);
  --accent:    #00e5ff;
  --accent2:   #7c3aed;
  --accent3:   #f59e0b;
  --text:      #e8e8f0;
  --muted:     #6b6b80;
  --muted2:    #9494aa;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius:  10px;
  --radius2: 18px;
  --shadow:  0 8px 40px rgba(0,229,255,0.07);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

a { color: inherit; text-decoration: none; }

/* ── Noise Texture Overlay ────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.4;
}

/* ── Cursor Trail ─────────────────────────────────────────────────────── */
.cursor-dot {
  position: fixed;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

/* ── Navigation ───────────────────────────────────────────────────────── */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 4rem;
  transition: all 0.35s ease;
}
#main-nav.scrolled {
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(18px);
  padding: 1rem 4rem;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 2.2rem; }
.nav-link {
  font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted2);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ── Sections ─────────────────────────────────────────────────────────── */
section {
  padding: 7rem 4rem;
  max-width: 1140px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.6rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 3rem;
  line-height: 1.1;
}
.section-divider {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-bottom: 3rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 8rem;
  position: relative; overflow: hidden;
  max-width: 100%; margin: 0;
  padding-left: max(4rem, calc((100vw - 1140px) / 2 + 4rem));
  padding-right: max(4rem, calc((100vw - 1140px) / 2 + 4rem));
}

/* Animated grid background */
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 18s linear infinite;
  pointer-events: none;
}
/* Glow orb */
#hero::after {
  content: '';
  position: absolute; top: 20%; right: 10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

@keyframes gridMove { to { transform: translateY(60px); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-24px); } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--accent);
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  padding: 0.4rem 1rem; border-radius: 100px;
  margin-bottom: 1.8rem;
  animation: fadeDown 0.6s ease both;
}
.hero-badge::before { content: '▶'; font-size: 0.5rem; }

#hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  font-weight: 800; letter-spacing: -0.04em;
  line-height: 0.95;
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.5));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: fadeUp 0.8s 0.1s ease both;
  margin-bottom: 1.2rem;
}

#hero-title {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--accent); font-weight: 400;
  margin-bottom: 1rem;
  min-height: 2rem;
  animation: fadeUp 0.8s 0.25s ease both;
}
#hero-title::after { content: '|'; animation: blink 0.9s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

#hero-subtitle {
  font-size: 1.05rem; color: var(--muted2); max-width: 520px;
  line-height: 1.7; margin-bottom: 2.5rem;
  animation: fadeUp 0.8s 0.4s ease both;
}

.hero-links {
  display: flex; gap: 1rem; flex-wrap: wrap;
  animation: fadeUp 0.8s 0.55s ease both;
}
.hero-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.6rem; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}
.hero-btn-primary {
  background: var(--accent); color: #000;
}
.hero-btn-primary:hover { background: #33eaff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,229,255,0.3); }
.hero-btn-ghost {
  border: 1px solid var(--border2); color: var(--text);
}
.hero-btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-location {
  margin-top: 2rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--muted); display: flex; align-items: center; gap: 0.4rem;
  animation: fadeUp 0.8s 0.7s ease both;
}

/* ── Skills ───────────────────────────────────────────────────────────── */
#skills { background: var(--bg2); max-width: 100%; }
#skills > * { max-width: 1140px; margin-left: auto; margin-right: auto; }

#skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}
.skill-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.skill-card:hover {
  border-color: rgba(0,229,255,0.3);
  transform: translateY(-3px);
}
.skill-category {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-tag {
  font-size: 0.8rem; color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 0.25rem 0.7rem; border-radius: 100px;
  transition: background 0.2s;
}
.skill-tag:hover { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.3); }

/* ── Experience ───────────────────────────────────────────────────────── */
.exp-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 2rem 2.4rem;
  position: relative;
  transition: border-color 0.2s;
}
.exp-card::before {
  content: '';
  position: absolute; left: 0; top: 2rem; bottom: 2rem;
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
}
.exp-card:hover { border-color: rgba(0,229,255,0.25); }

.exp-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.4rem;
}
.exp-role {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.2rem;
}
.exp-company {
  font-size: 0.9rem; color: var(--accent);
  font-weight: 500;
}
.exp-meta { text-align: right; }
.exp-duration, .exp-location {
  display: block;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--muted2);
}
.exp-highlights {
  list-style: none; display: flex; flex-direction: column; gap: 0.65rem;
}
.exp-highlights li {
  font-size: 0.9rem; color: var(--muted2);
  padding-left: 1.2rem; position: relative;
  line-height: 1.6;
}
.exp-highlights li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--accent); font-size: 0.75rem;
}

/* ── Projects ─────────────────────────────────────────────────────────── */
#projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 2rem;
  transition: all 0.25s;
  position: relative; overflow: hidden;
  animation: fadeUp 0.6s ease both;
}
.project-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,229,255,0.04), transparent);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.project-card:hover { border-color: rgba(0,229,255,0.3); transform: translateY(-5px); box-shadow: var(--shadow); }
.project-card:hover::after { opacity: 1; }

.project-index {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--accent); opacity: 0.6;
  margin-bottom: 1rem;
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.8rem;
  line-height: 1.3;
}
.project-desc { font-size: 0.88rem; color: var(--muted2); margin-bottom: 1.2rem; line-height: 1.6; }
.project-highlights {
  list-style: none; display: flex; flex-direction: column; gap: 0.4rem;
  margin-bottom: 1.4rem;
}
.project-highlights li {
  font-size: 0.82rem; color: var(--muted);
  padding-left: 1rem; position: relative;
}
.project-highlights li::before {
  content: '·'; position: absolute; left: 0;
  color: var(--accent2); font-size: 1.2rem; line-height: 1;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tag {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--accent2); background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  padding: 0.2rem 0.65rem; border-radius: 100px;
}

/* ── Education ────────────────────────────────────────────────────────── */
.edu-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 2.4rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  max-width: 560px;
}
.edu-degree {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700; color: var(--text);
}
.edu-institution { font-size: 1rem; color: var(--accent); font-weight: 500; }
.edu-meta {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted2);
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.edu-gpa {
  background: rgba(0,229,255,0.1); border: 1px solid rgba(0,229,255,0.25);
  color: var(--accent); padding: 0.15rem 0.6rem; border-radius: 100px;
  font-size: 0.72rem;
}
.edu-coursework {
  font-size: 0.82rem; color: var(--muted); font-style: italic;
}

/* ── Certifications ───────────────────────────────────────────────────── */
#certs-list { display: flex; flex-direction: column; gap: 1rem; }
.cert-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.6rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem;
  transition: border-color 0.2s;
}
.cert-card:hover { border-color: rgba(245,158,11,0.3); }
.cert-name { font-size: 0.95rem; font-weight: 500; color: var(--text); }
.cert-meta { display: flex; gap: 1rem; }
.cert-issuer {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--accent3);
}
.cert-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 4rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  max-width: 100%;
}
.footer-text { font-size: 0.82rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-link { font-size: 0.82rem; color: var(--muted2); transition: color 0.2s; }
.footer-link:hover { color: var(--accent); }

/* ── Animations ───────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── Scrollbar ────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #main-nav { padding: 1rem 1.5rem; }
  #main-nav.scrolled { padding: 0.9rem 1.5rem; }
  .nav-links { gap: 1.2rem; }
  section { padding: 5rem 1.5rem; }
  #hero { padding-left: 1.5rem; padding-right: 1.5rem; }
  .exp-header { flex-direction: column; }
  .exp-meta { text-align: left; }
  footer { padding: 2rem 1.5rem; flex-direction: column; text-align: center; }
  .cursor-dot { display: none; }
}
