/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --card-bg: #ffffff;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.10);
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --bg: #0a0f1e;
  --bg-alt: #0f1629;
  --text: #e5e9f0;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --card-bg: #121b30;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff;
  padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============ TYPOGRAPHY ============ */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-eyebrow {
  font-family: var(--mono); font-size: 0.85rem; color: var(--primary);
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; font-weight: 600;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.section-subtitle { color: var(--text-muted); max-width: 560px; margin-bottom: 40px; font-size: 1.05rem; }
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }

/* ============ REVEAL ANIMATION ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px;
  border-radius: 10px; font-weight: 600; font-size: 0.95rem; transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4); }
.btn-outline {
  border: 1.5px solid var(--border); color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ============ NAVBAR ============ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.navbar::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
}
.navbar.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-badge {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.85rem;
}
.nav-links { display: flex; gap: 32px; }
.nav-link { font-size: 0.92rem; font-weight: 500; color: var(--text-muted); position: relative; padding: 4px 0; transition: color 0.2s ease; }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); transition: width 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--text-muted); transition: background 0.2s ease, color 0.2s ease; }
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
.nav-resume-btn { display: inline-flex; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 24px; }
.hamburger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s ease; }
.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); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    background: var(--bg); flex-direction: column; padding: 32px 24px; gap: 24px;
    transform: translateX(100%); transition: transform 0.35s ease; overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-resume-btn { display: none; }
  .hamburger { display: flex; }
}

/* ============ BADGE ============ */
.availability-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--border); padding: 6px 14px; border-radius: 20px;
  margin-bottom: 16px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 rgba(34,197,94,0.5); animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ============ HERO ============ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 90px; overflow: hidden; }
.hero-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; animation: float 8s ease-in-out infinite; }
.blob-1 { width: 380px; height: 380px; background: var(--primary); top: -80px; right: -60px; }
.blob-2 { width: 320px; height: 320px; background: var(--accent); bottom: -60px; left: -60px; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, 30px); } }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%); opacity: 0.4;
}

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.eyebrow { font-family: var(--mono); color: var(--primary); font-weight: 600; margin-bottom: 12px; }
.hero-name { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; line-height: 1.1; margin-bottom: 8px; }
.hero-role { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; margin-bottom: 20px; color: var(--text-muted); min-height: 1.4em; }
.cursor { animation: blink 1s step-start infinite; color: var(--primary); }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { color: var(--text-muted); max-width: 520px; margin-bottom: 32px; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-socials { display: flex; gap: 14px; }
.social-link {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  transition: all 0.25s ease;
}
.social-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); }

.hero-image { display: flex; justify-content: center; }
.headshot-wrap {
  position: relative; width: 100%; max-width: 340px; aspect-ratio: 1; border-radius: 50%;
  padding: 8px; background: var(--border);
}
.headshot {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 6px solid var(--bg);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-socials { justify-content: center; }
  .hero-image { order: -1; margin-bottom: 12px; }
  .headshot-wrap { max-width: 220px; }
}

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; font-size: 1.02rem; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-number { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

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

/* ============ SKILLS ============ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.skill-category {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.skill-category:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.skill-category h3 { font-size: 1rem; margin-bottom: 14px; color: var(--primary); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  font-size: 0.82rem; padding: 6px 12px; border-radius: 20px; background: var(--bg-alt);
  border: 1px solid var(--border); font-weight: 500; transition: all 0.2s ease;
}
.skill-tag:hover { border-color: var(--primary); color: var(--primary); }

/* ============ TIMELINE (EXPERIENCE) ============ */
.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--border), var(--border));
}
.timeline-item { position: relative; padding-left: 56px; margin-bottom: 44px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: 12px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--primary); z-index: 1;
}
.timeline-content {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 28px; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.timeline-content:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.timeline-date {
  font-family: var(--mono); font-size: 0.8rem; color: var(--primary); font-weight: 600;
  background: color-mix(in srgb, var(--primary) 10%, transparent); display: inline-block;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 10px;
}
.timeline-role { font-size: 1.15rem; font-weight: 700; margin-bottom: 2px; }
.timeline-company { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px; }
.timeline-company a { color: var(--primary); }
.timeline-points { margin-bottom: 14px; }
.timeline-points li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: 0.94rem; margin-bottom: 6px; }
.timeline-points li::before { content: '▸'; position: absolute; left: 0; color: var(--primary); }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 640px) {
  .timeline-content { padding: 18px 20px; }
}

/* ============ PROJECTS ============ */
.project-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
  padding: 8px 18px; border-radius: 20px; border: 1.5px solid var(--border);
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted); transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; color: #fff; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.project-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0; transform: translateY(20px); animation: cardIn 0.5s ease forwards;
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project-thumb {
  height: 160px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--bg-alt)), color-mix(in srgb, var(--accent) 18%, var(--bg-alt)));
  color: var(--primary);
}
.project-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.project-category { font-family: var(--mono); font-size: 0.72rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-bottom: 8px; }
.project-title { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.project-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 16px; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.project-links { display: flex; gap: 14px; }
.project-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text); transition: color 0.2s ease; }
.project-links a:hover { color: var(--primary); }

/* ============ CERTIFICATION ============ */
.certifications-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.cert-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cert-badge {
  width: 46px; height: 46px; border-radius: 12px; background: var(--bg-alt); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cert-title { font-weight: 700; font-size: 1.02rem; }
.cert-issuer { color: var(--primary); font-size: 0.88rem; }
.cert-date { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); }
.cert-link { font-size: 0.85rem; font-weight: 600; margin-top: auto; }
.cert-link:hover { color: var(--primary); }

/* ============ EDUCATION ============ */
.education-list { display: grid; gap: 20px; max-width: 800px; margin: 0 auto; }
.education-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 28px; display: flex; gap: 20px; align-items: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.education-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.education-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.education-degree { font-weight: 700; font-size: 1.05rem; }
.education-institution { color: var(--primary); font-size: 0.92rem; margin-bottom: 4px; }
.education-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; font-family: var(--mono); }
.education-details { color: var(--text-muted); font-size: 0.92rem; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  display: flex; align-items: center; gap: 16px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  transition: all 0.25s ease;
}
.contact-card:hover { transform: translateX(6px); border-color: var(--primary); }
.contact-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--bg-alt); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-card strong { display: block; font-size: 0.9rem; }
.contact-card span span { font-size: 0.85rem; color: var(--text-muted); }

.contact-form { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-status { margin-top: 12px; font-size: 0.88rem; }
.form-status.success { color: #16a34a; }
.form-status.error { color: #dc2626; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-inner p { color: var(--text-muted); font-size: 0.88rem; }
.back-to-top {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  transition: all 0.25s ease;
}
.back-to-top:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); }
