/* ============================================================
   CSS CUSTOM PROPERTIES — edit these to retheme the whole site
   ============================================================ */
:root {
  --clr-bg:          #0d1117;
  --clr-surface:     #161b22;
  --clr-surface-2:   #21262d;
  --clr-border:      #30363d;
  --clr-accent:      #4493f8;
  --clr-accent-dim:  rgba(68, 147, 248, 0.12);
  --clr-text:        #e6edf3;
  --clr-text-muted:  #8b949e;
  --clr-text-faint:  #484f58;
  --clr-tag-bg:      #1f2937;
  --clr-tag-text:    #93c5fd;

  --font-sans:  'Inter', system-ui, sans-serif;
  --font-head:  'Space Grotesk', 'Inter', sans-serif;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);

  --nav-height: 64px;
  --max-w:      900px;
  --section-gap: 96px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--clr-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

ul { list-style: none; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-gap) 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--clr-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 40px;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--clr-accent);
  margin-top: 10px;
  border-radius: 2px;
}

.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-2px);
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
  transition: border-color 0.3s;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--clr-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav__logo span { color: var(--clr-accent); }

.nav__links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--clr-text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav__links a:hover {
  color: var(--clr-text);
  background: var(--clr-surface-2);
}

/* Hamburger (mobile) */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 12px 24px 20px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}

.nav__mobile.open { display: flex; }

.nav__mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--clr-text-muted);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.nav__mobile a:hover {
  color: var(--clr-text);
  background: var(--clr-surface-2);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-height) + 64px);
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero__text { flex: 1; min-width: 0; }

/* Avatar */
.hero__avatar-wrap {
  flex-shrink: 0;
  opacity: 0;
  animation: fadeUp 0.5s 0.2s forwards;
}

.hero__avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--clr-border);
  box-shadow: 0 0 0 6px var(--clr-accent-dim), var(--shadow-card);
  display: block;
  transition: border-color 0.3s;
}

.hero__avatar:hover { border-color: var(--clr-accent); }

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--clr-accent);
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.5s 0.1s forwards;
}

.hero__name {
  font-family: var(--font-head);
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--clr-text);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.5s 0.2s forwards;
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 600;
  color: var(--clr-text-muted);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.5s 0.3s forwards;
}

.hero__desc {
  font-size: 17px;
  color: var(--clr-text-muted);
  max-width: 580px;
  line-height: 1.75;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.5s 0.4s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.5s 0.5s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--clr-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #6cb6ff;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--clr-surface-2);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}

.btn-secondary:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.hero__social {
  display: flex;
  gap: 16px;
  opacity: 0;
  animation: fadeUp 0.5s 0.6s forwards;
}

.hero__social a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.hero__social a:hover { color: var(--clr-accent); }

.hero__social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

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

/* ============================================================
   ABOUT
   ============================================================ */
.about__text {
  font-size: 17px;
  color: var(--clr-text-muted);
  line-height: 1.8;
  max-width: 700px;
}

.about__text strong { color: var(--clr-text); font-weight: 600; }

.about__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}

.about__meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--clr-text-muted);
}

.about__meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--clr-accent);
  flex-shrink: 0;
}

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

.skill-group__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-accent);
  margin-bottom: 12px;
}

.skill-group__title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 14px;
}

/* Skill chips — icon + label */
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--clr-text-muted);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}

.skill-chip:hover {
  border-color: var(--clr-accent);
  background: var(--clr-accent-dim);
  color: var(--clr-text);
}

/* Devicon inside chip */
.skill-chip i {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

/* Fallback SVG icon inside chip */
.skill-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--clr-accent);
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--clr-accent), transparent);
  border-radius: 1px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  width: 10px;
  height: 10px;
  background: var(--clr-accent);
  border: 2px solid var(--clr-bg);
  border-radius: 50%;
  margin-top: 8px;
  margin-left: 11px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--clr-accent-dim);
}

.timeline-content { }

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.timeline-role {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  color: var(--clr-text);
}

.timeline-company {
  font-size: 15px;
  font-weight: 500;
  color: var(--clr-accent);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--clr-text-muted);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.timeline-bullets {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-bullets li {
  font-size: 14px;
  color: var(--clr-text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.65;
}

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--clr-accent);
  font-size: 11px;
  top: 3px;
}

.timeline-bullets li strong {
  color: #adb5bd;
  font-weight: 600;
}

/* ============================================================
   EDUCATION
   ============================================================ */
.education__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.edu-card__degree {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 6px;
}

.edu-card__school {
  font-size: 14px;
  color: var(--clr-accent);
  margin-bottom: 4px;
}

.edu-card__year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--clr-text-muted);
}

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.certs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.cert-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cert-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--clr-accent-dim);
  border: 1px solid rgba(68, 147, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Wide variant for horizontal wordmark logos (e.g. Stripe) */
.cert-icon--wide {
  width: auto;
  padding: 0 14px;
  background: rgba(83, 58, 253, 0.1);
  border-color: rgba(83, 58, 253, 0.3);
}

.cert-icon--wide img {
  height: 20px;
  width: auto;
  display: block;
}

.cert-icon svg {
  width: 26px;
  height: 26px;
  color: var(--clr-accent);
}

.cert-card__title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 4px;
  line-height: 1.4;
}

.cert-card__issuer {
  font-size: 13px;
  color: var(--clr-accent);
  margin-bottom: 2px;
}

.cert-card__year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--clr-text-muted);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.contact-link:hover { text-decoration: none; }

.contact-link__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--clr-accent-dim);
  border: 1px solid rgba(68, 147, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-link__icon svg {
  width: 20px;
  height: 20px;
  color: var(--clr-accent);
}

.contact-link__label {
  font-size: 12px;
  color: var(--clr-text-muted);
  margin-bottom: 2px;
}

.contact-link__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--clr-text);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--clr-border);
  padding: 32px 0;
  text-align: center;
}

.footer__text {
  font-size: 13px;
  color: var(--clr-text-faint);
}

.footer__text a {
  color: var(--clr-text-muted);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.section-divider {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero__inner { flex-direction: column-reverse; align-items: flex-start; gap: 32px; }
  .hero__avatar { width: 140px; height: 140px; }
}

@media (max-width: 640px) {
  :root { --section-gap: 64px; }

  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .hero { padding-top: calc(var(--nav-height) + 48px); padding-bottom: 64px; }

  .contact__grid { grid-template-columns: 1fr; }

  .timeline::before { left: 7px; }
  .timeline-dot { margin-left: 3px; }
  .timeline-item { grid-template-columns: 20px 1fr; gap: 12px; }
}

@media (max-width: 480px) {
  .hero__name { font-size: 34px; }
  .hero__title { font-size: 18px; }
  .hero__actions { flex-direction: column; }
  .btn { justify-content: center; }
}
