/* =========================================
   CSS Custom Properties
   ========================================= */
:root {
  --bg: #000000;
  --bg-card: rgba(25, 18, 40, 0.85);
  --border: rgba(140, 100, 220, 0.12);
  --text: #e4e4e7;
  --text-muted: #8a8a9a;
  --accent: #a78bfa;
  --accent-dim: rgba(167, 139, 250, 0.12);
  --accent-glow: rgba(167, 139, 250, 0.25);
}

/* =========================================
   Light Mode Overrides
   ========================================= */
[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border: rgba(140, 100, 220, 0.18);
  --text: #1a1a2e;
  --text-muted: #5a5a6e;
  --accent: #7c3aed;
  --accent-dim: rgba(124, 58, 237, 0.1);
  --accent-glow: rgba(124, 58, 237, 0.2);
}

[data-theme="light"] body::before {
  background:
    repeating-conic-gradient(#e8e8ec 0% 25%, #ededf0 0% 50%) 0 0 / 4px 4px,
    linear-gradient(145deg, #f0f0f4 0%, #e8e8ec 30%, #f2f0f0 50%, #eaeaee 70%, #f0eeec 100%);
}

[data-theme="light"] .nav.scrolled {
  background: rgba(245, 245, 247, 0.92);
}

[data-theme="light"] .nav-dropdown-menu {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .code-header {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .code-var     { color: #2563eb; }
[data-theme="light"] .code-string  { color: #16a34a; }
[data-theme="light"] .code-bool    { color: #d97706; }

[data-theme="light"] .btn-primary {
  color: #ffffff;
}

[data-theme="light"] .project-stack span {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .stats-table tbody tr {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg); }

/* =========================================
   Theme Toggle Button
   ========================================= */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Show moon in dark mode, sun in light mode */
.icon-sun  { display: none; }
.icon-moon { display: block; }

[data-theme="light"] .icon-sun  { display: block; }
[data-theme="light"] .icon-moon { display: none; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Netherite texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-conic-gradient(#0a0a0a 0% 25%, #070707 0% 50%) 0 0 / 4px 4px,
    linear-gradient(145deg, #0c0c0c 0%, #050505 30%, #0a0808 50%, #060606 70%, #080706 100%);
<<<<<<< HEAD
}
=======
  opacity: 1;
}

>>>>>>> c302c981852cbca1d9092b202728e11845c7c50e

/* Ensure content sits above the background */
body > * {
  position: relative;
  z-index: 1;
}

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* =========================================
   Navigation
   ========================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 450;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* Nav Dropdowns */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.nav-dropdown-toggle::after {
  content: ' \25BE';
  font-size: 0.7em;
  opacity: 0.6;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  list-style: none;
  background: rgba(10, 6, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 170px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li {
  padding: 0;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-menu a:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* =========================================
   Hero
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-content {
  text-align: center;
  padding: 2rem;
  max-width: 680px;
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.accent {
  color: var(--accent);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 1.8rem;
}

.typed-text {
  color: var(--text);
  font-weight: 500;
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #0f0f14;
  box-shadow: 0 2px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =========================================
   Shared Section Styles
   ========================================= */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

section:not(.hero) {
  padding: 6rem 0;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* =========================================
   About Section
   ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Code block */
.code-block {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.code-header {
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.2);
  display: flex;
  gap: 0.5rem;
  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; }

.code-text {
  padding: 1.25rem 1.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.825rem;
  line-height: 1.85;
  overflow-x: auto;
}

.code-keyword { color: var(--accent); }
.code-var     { color: #93c5fd; }
.code-prop    { color: var(--text); }
.code-string  { color: #86efac; }
.code-bool    { color: #fdba74; }

/* =========================================
   Skills Section
   ========================================= */
.skills {
  border-top: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: border-color 0.2s ease;
}

.skill-card:hover {
  border-color: var(--accent-glow);
}

.skill-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tags span {
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  background: var(--accent-dim);
  border-radius: 4px;
  color: var(--accent);
}

/* =========================================
   Projects Section
   ========================================= */
.projects {
  border-top: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--accent-glow);
}

.project-card.featured {
  border-color: rgba(167, 139, 250, 0.2);
}

.project-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.project-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.625rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.project-stack span {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.project-links {
  display: flex;
  gap: 1.25rem;
  margin-top: auto;
}

.project-link {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: var(--accent);
}

/* =========================================
   Contact Section
   ========================================= */
.contact {
  text-align: center;
  border-top: 1px solid var(--border);
}

.contact .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.contact-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 380px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  margin: 0 auto;
}

.contact-email {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: opacity 0.2s ease;
}

.contact-email:hover { opacity: 0.8; }

.contact-socials {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.social-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.social-link:hover { color: var(--accent); }

/* =========================================
   Footer
   ========================================= */
.footer {
  padding: 2rem 0 6rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* =========================================
   Animations
   ========================================= */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: fadeInUp 0.5s ease both;
}

.hero-content > *:nth-child(1) { animation-delay: 0s; }
.hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }

.animate-in {
  animation: fadeInUp 0.5s ease both;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .contact-card { padding: 2rem 1.5rem; }
  .contact-socials { gap: 1rem; }
}
