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

:root {
  --bg: #0f1117;
  --bg-alt: #161b27;
  --surface: #1e2535;
  --surface-hover: #252d3f;
  --primary: #6c63ff;
  --primary-light: #8b85ff;
  --accent: #00d4aa;
  --text: #e6eaf3;
  --text-muted: #8890a4;
  --border: #2a3147;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --font-body: 'Inter', sans-serif;
  --font-code: 'Fira Code', monospace;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

/* ============================
   NAV
   ============================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-code);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-light);
  letter-spacing: 0.02em;
}

.nav nav {
  display: flex;
  gap: 2rem;
}

.nav nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav nav a:hover { color: var(--text); }

/* ============================
   HERO
   ============================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108, 99, 255, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(0, 212, 170, 0.07), transparent),
    var(--bg);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  max-width: 900px;
  width: 100%;
}

.hero-avatar img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 6px rgba(108, 99, 255, 0.15), var(--shadow);
  object-fit: cover;
  flex-shrink: 0;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-family: var(--font-code);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--text) 40%, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 1.2rem;
  line-height: 1.75;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
}

.hero-tags span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-scroll {
  margin-top: 3rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.35);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text-muted);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-2px);
}

/* ============================
   SECTIONS
   ============================ */
.section {
  padding: 6rem 2rem;
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
}

/* ============================
   SKILLS
   ============================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
}

.skill-card:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.skill-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.skill-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skill-card ul li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.skill-card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================
   CERTIFICATIONS
   ============================ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all var(--transition);
}

.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.cert-badge {
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.cert-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.certs-footer {
  text-align: center;
}

/* ============================
   CONTACT
   ============================ */
.contact-container {
  text-align: center;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 160px;
  color: var(--text);
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: var(--text);
}

.contact-icon {
  font-size: 2rem;
}

.contact-card span:nth-child(2) {
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-handle {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================
   FOOTER
   ============================ */
.footer {
  text-align: center;
  padding: 2rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================
   TIMELINE (EXPERIENCE)
   ============================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.timeline-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  transition: border-color var(--transition);
}

.timeline-group:hover {
  border-color: var(--primary);
}

.timeline-org {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tl-total {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.tl-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 6px;
}

.tl-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tl-date {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
  font-family: var(--font-code);
}

.tl-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================
   EDUCATION
   ============================ */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: all var(--transition);
}

.edu-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.edu-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.edu-body h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.edu-org {
  display: block;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 0.2rem;
}

.edu-date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-code);
}

/* ============================
   PUBLICATIONS
   ============================ */
.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.pub-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  transition: all var(--transition);
}

.pub-item:hover {
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.pub-year {
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--primary-light);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}

.pub-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pub-body a {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
  transition: color var(--transition);
}

.pub-body a:hover {
  color: var(--accent);
}

.pub-venue {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================
   FADE-IN ANIMATION
   ============================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 700px) {
  .nav { padding: 1rem 1.25rem; }
  .nav nav { gap: 1rem; }
  .nav nav a { font-size: 0.78rem; }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 1.75rem;
  }
  .hero-bio { margin-inline: auto; }
  .hero-tags { justify-content: center; }
  .hero-links { justify-content: center; }

  .contact-links { flex-direction: column; align-items: center; }
}
