/* ═══════════════════════════════════════════════════════
   TOKENS & THEMES
═══════════════════════════════════════════════════════ */
:root {
  --accent: #6c63ff;
  --accent-alt: #00d4ff;
  --accent-glow: rgba(108, 99, 255, 0.35);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 12px;
  --radius-sm: 8px;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-display: 'Playfair Display', serif;
}

[data-theme="dark"] {
  --bg: #0d0d0f;
  --bg-surface: #13151c;
  --bg-card: #1a1d28;
  --bg-card-hover: #1f2235;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(108,99,255,0.5);
  --text-primary: #e2e8f0;
  --text-secondary: #8892a4;
  --text-muted: #4a5568;
  --nav-bg: rgba(13,13,15,0.8);
  --input-bg: #1a1d28;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-surface: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(108,99,255,0.5);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --nav-bg: rgba(248,250,252,0.85);
  --input-bg: #f1f5f9;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: #7b74ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  padding: 12px 24px;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(4px);
}

.btn-full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-right: auto;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-links a.active { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}

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

.nav-cta { padding: 8px 18px; font-size: 0.875rem; }

.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-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px 24px;
  transform: translateY(-8px);
  opacity: 0;
  transition: all var(--transition);
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.mobile-menu a:hover { color: var(--accent); background: var(--bg-card); }

/* ═══════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 24px 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-photo-bg {
  position: absolute;
  inset: 0;
  background-image: url('profile.jpeg');
  background-size: contain;
  background-position: left top;
  background-repeat: no-repeat;
  opacity: 0.55;
  filter: grayscale(2%);
  mask-image: radial-gradient(ellipse 85% 100% at 75% 50%, black 45%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 85% 100% at 75% 50%, black 45%, transparent 85%);
}

[data-theme="light"] .hero-photo-bg {
  opacity: 0.75;
}

.grid-overlay {
  display: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: float 8s ease-in-out infinite;
}
.blob-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -100px; left: -100px;
}
.blob-2 {
  width: 400px; height: 400px;
  background: var(--accent-alt);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1520px;
  text-align: right;
}

.hero-eyebrow {
  font-size: 1rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 16px;
  animation-delay: 0.1s;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  animation-delay: 0.2s;
}

.hero-role {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 24px;
  min-height: 2rem;
  animation-delay: 0.3s;
}
.role-prefix { color: var(--text-muted); }
.typed-text { color: var(--accent); }
.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
  animation-delay: 0.4s;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  animation-delay: 0.5s;
}

.hero-socials {
  display: flex;
  gap: 16px;
  justify-content: center;
  animation-delay: 0.6s;
}
.hero-socials a {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeInUp 1s 1.2s both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ═══════════════════════════════════════════════════════
   SECTIONS — SHARED
═══════════════════════════════════════════════════════ */
.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 56px;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.1;
}

/* ═══════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════ */
.about { background: var(--bg-surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.025rem;
}
.about-text strong { color: var(--text-primary); }
.about-text .btn { margin-top: 8px; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.highlight-card:hover {
  border-color: var(--border-hover);
  transform: translateX(6px);
}
.highlight-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(108,99,255,0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.highlight-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.highlight-value {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.highlight-value.available { color: #22c55e; }

.stats-row {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4px;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════
   SKILLS
═══════════════════════════════════════════════════════ */
.skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}
.skill-group:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 1px var(--border-hover), 0 8px 32px rgba(108,99,255,0.08);
}

.skill-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.skill-group-title svg { color: var(--accent); flex-shrink: 0; }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-tag {
  padding: 6px 14px;
  background: rgba(108,99,255,0.08);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  transition: all var(--transition);
  cursor: default;
}
.skill-tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════════ */
.projects { background: var(--bg-surface); }

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  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(--accent-alt));
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(108,99,255,0.12);
  background: var(--bg-card-hover);
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.project-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(108,99,255,0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-links {
  display: flex;
  gap: 8px;
}
.project-links a {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.project-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.project-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.project-tags span {
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════ */
.contact { background: var(--bg); }

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.8;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color var(--transition);
}
.contact-item:hover { color: var(--accent); }
.contact-item-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: all var(--transition);
}
.contact-item:hover .contact-item-icon {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group textarea {
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.footer { padding: 32px 0; }
.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-alt), transparent);
  margin-bottom: 32px;
  opacity: 0.4;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-socials {
  display: flex;
  gap: 12px;
}
.footer-socials a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-socials a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   SCROLL ANIMATIONS
═══════════════════════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.7s ease forwards;
}

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

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.about-highlights .reveal:nth-child(1) { transition-delay: 0.05s; }
.about-highlights .reveal:nth-child(2) { transition-delay: 0.1s; }
.about-highlights .reveal:nth-child(3) { transition-delay: 0.15s; }
.about-highlights .reveal:nth-child(4) { transition-delay: 0.2s; }

.skills-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.skills-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.skills-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.skills-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.projects-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.projects-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.projects-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.projects-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.projects-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.projects-grid .reveal:nth-child(6) { transition-delay: 0.40s; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; align-items: center; }
  .section { padding: 72px 0; }
}

@media (max-width: 480px) {
  .hero-name { letter-spacing: -1px; }
  .contact-form { padding: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
