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

/* ─── Design Tokens ─────────────────────────────────────────────────── */
:root {
  /* Dark mode (default) */
  --bg:        #0a0a0f;
  --bg-card:   #111118;
  --bg-hover:  #16161f;
  --nav-bg:    rgba(10, 10, 15, 0.88);
  --text:      #e8e8e8;
  --text-body: #c4c4d4;
  --muted:     #a0a0b0;
  --accent:    #4f8ef7;
  --border:    #1e1e2e;
  --radius:    10px;
  --shadow:    0 4px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg:        #ffffff;
  --bg-card:   #f6f6fb;
  --bg-hover:  #ededf8;
  --nav-bg:    rgba(255, 255, 255, 0.92);
  --text:      #0f0f1a;
  --text-body: #3a3a5a;
  --muted:     #5a5a7a;
  --border:    #e0e0ee;
  --shadow:    0 4px 32px rgba(0, 0, 0, 0.08);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}

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

/* ─── Navbar ────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s, background 0.25s, border-color 0.25s;
}

nav.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0 auto; /* center between logo and controls */
}

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

/* Nav controls: lang + theme + hamburger */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1;
}
.ctrl-btn:hover { color: var(--accent); border-color: rgba(79,142,247,0.5); }

.icon-btn { padding: 5px 8px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4.5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── Layout ────────────────────────────────────────────────────────── */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 48px;
  color: var(--text);
}

/* ─── Hero ──────────────────────────────────────────────────────────── */
#hero { padding: 120px 0 96px; }

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

.hero-text { flex: 1; min-width: 0; }

.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 0 40px rgba(79, 142, 247, 0.15);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.hero-image img:hover {
  border-color: var(--accent);
  box-shadow: 0 0 60px rgba(79, 142, 247, 0.25);
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 32px;
}

.hero-summary {
  max-width: 660px;
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.85;
  margin-bottom: 14px;
}


.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #6ba3ff;
  border-color: #6ba3ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(79, 142, 247, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--bg-hover);
  border-color: rgba(79, 142, 247, 0.5);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── About ─────────────────────────────────────────────────────────── */
.about-text {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.85;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.about-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.about-tag svg { color: var(--accent); flex-shrink: 0; }

/* ─── Experience ────────────────────────────────────────────────────── */
.exp-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.exp-logo {
  color: var(--muted);
  opacity: 0.7;
  margin-bottom: 10px;
  transition: opacity 0.3s, color 0.3s;
}

.exp-logo svg {
  width: 156px;
  height: 36px;
}

.exp-card:hover .exp-logo {
  opacity: 1;
  color: var(--text);
}
.exp-card:hover {
  border-color: rgba(79, 142, 247, 0.35);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.12);
}

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

.exp-company {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.exp-dates {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(79, 142, 247, 0.08);
  border: 1px solid rgba(79, 142, 247, 0.18);
  border-radius: 99px;
  padding: 2px 10px;
  white-space: nowrap;
}

.exp-role {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-bullets li {
  font-size: 0.9rem;
  color: var(--text-body);
  padding-left: 18px;
  position: relative;
  line-height: 1.65;
}
.exp-bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ─── Skills ────────────────────────────────────────────────────────── */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 16px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
  cursor: default;
}
.skill-tag:hover {
  color: var(--accent);
  border-color: rgba(79, 142, 247, 0.45);
  background: rgba(79, 142, 247, 0.06);
  transform: translateY(-1px);
}

/* ─── Education ─────────────────────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.edu-card:hover {
  border-color: rgba(79, 142, 247, 0.35);
  transform: translateY(-2px);
}

.edu-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.edu-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.edu-card-sub {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Contact ───────────────────────────────────────────────────────── */
#contact { padding-bottom: 80px; }

.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 52px 44px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.contact-box p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ─── Stats ────────────────────────────────────────────────────────── */
#stats { padding: 48px 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-plus {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Certifications ───────────────────────────────────────────────── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.cert-card:hover {
  border-color: rgba(79, 142, 247, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.cert-icon {
  margin-bottom: 14px;
}

.cert-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.cert-issuer {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.cert-date {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

/* ─── Scroll Reveal Animations ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered children */
.reveal-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-children.visible > *:nth-child(2) { transition-delay: 100ms; }
.reveal-children.visible > *:nth-child(3) { transition-delay: 200ms; }
.reveal-children.visible > *:nth-child(4) { transition-delay: 300ms; }

/* ─── Nav link underline animation ─────────────────────────────────── */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ─── Footer ────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── Responsive — tablet ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 0 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: 12px 28px;
    font-size: 0.95rem;
    color: var(--text);
  }
  .nav-links li a:hover { color: var(--accent); }
}

/* ─── Responsive — mobile ───────────────────────────────────────────── */
@media (max-width: 640px) {
  section { padding: 72px 0; }
  #hero    { padding: 80px 0 72px; }

  .hero-layout {
    flex-direction: column-reverse;
    text-align: center;
    gap: 32px;
  }

  .hero-image img {
    width: 160px;
    height: 160px;
  }

  .hero-ctas { justify-content: center; }

  .section-title { font-size: 1.4rem; margin-bottom: 32px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat-number, .stat-plus { font-size: 2rem; }

  .exp-card { padding: 22px 20px; }
  .contact-box { padding: 36px 24px; }

  .hero-ctas { gap: 10px; }
  .btn { padding: 10px 18px; font-size: 0.84rem; }
}

@media (max-width: 400px) {
  .nav-logo { font-size: 0.88rem; }
  .ctrl-btn { padding: 4px 8px; font-size: 0.74rem; }
}
