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

:root {
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Dark theme (default) */
  --bg: #0a0a0f;
  --bg-2: #10101a;
  --bg-3: #16162a;
  --surface: #1a1a2e;
  --surface-2: #22223a;
  --border: rgba(255,255,255,0.07);
  --text: #e8e8f0;
  --text-muted: #888899;
  --text-faint: #444460;
  --accent: #7c6af7;
  --accent-2: #a78bfa;
  --accent-dim: rgba(124,106,247,0.12);
  --accent-glow: rgba(124,106,247,0.25);
  --current: #22d3a5;
  --current-dim: rgba(34,211,165,0.12);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 8px;
  --nav-h: 68px;
}

[data-theme="light"] {
  --bg: #f5f5fa;
  --bg-2: #eeeef8;
  --bg-3: #e8e8f5;
  --surface: #ffffff;
  --surface-2: #f0f0f9;
  --border: rgba(0,0,0,0.08);
  --text: #14141f;
  --text-muted: #666680;
  --text-faint: #aaaacc;
  --accent: #5b45e8;
  --accent-2: #7c6af7;
  --accent-dim: rgba(91,69,232,0.08);
  --accent-glow: rgba(91,69,232,0.18);
  --current: #0fa87c;
  --current-dim: rgba(15,168,124,0.1);
  --shadow: 0 8px 32px rgba(0,0,0,0.10);
}

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

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ── Typography ───────────────────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.section-title em {
  font-style: italic;
  color: var(--accent-2);
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 4px 32px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-right: auto;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  transition: all 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }

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

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 15%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  opacity: 0;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  opacity: 0;
}

.hero-name .accent-line { color: var(--accent); }

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  opacity: 0;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  opacity: 0;
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  opacity: 0;
}
.hero-scroll-hint svg { width: 14px; height: 14px; animation: bounceDown 1.8s ease infinite; }

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

/* ── Reveal animation classes ─────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(40px); }
.reveal.in-view { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-child { opacity: 0; transform: translateY(30px); }
.reveal-child.in-view { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s ease; }

/* ── About ────────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.avatar-ring {
  width: 160px; height: 160px;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.avatar-ring svg { width: 100%; height: 100%; }

.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--current);
  background: var(--current-dim);
  border: 1px solid rgba(34,211,165,0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  white-space: nowrap;
}

.badge-dot {
  width: 7px; height: 7px;
  background: var(--current);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
}
.about-text p strong { color: var(--text); font-weight: 500; }

.about-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.fact { display: flex; flex-direction: column; }
.fact-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.fact-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.3;
}

/* ── Skills ───────────────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.skill-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-dim);
}

.skill-card-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
}
.skill-card-icon svg { width: 22px; height: 22px; }

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.learning-badge {
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tags span {
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  transition: all 0.2s;
}
.skill-tags span:hover { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

.skill-bars { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.65rem; }
.bar-row { display: flex; align-items: center; gap: 1rem; }
.bar-row span { font-size: 0.78rem; color: var(--text-muted); width: 90px; flex-shrink: 0; }
.bar { flex: 1; height: 5px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill.animated { width: var(--w); }

.lang-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.lang-item { display: flex; align-items: center; justify-content: space-between; }
.lang-name { font-size: 0.88rem; color: var(--text); }
.lang-level {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}
.lang-level.native { background: rgba(124,106,247,0.15); color: var(--accent); }
.lang-level.fluent { background: rgba(34,211,165,0.12); color: var(--current); }
.lang-level.conv { background: var(--bg-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Timeline / Experience ────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 0.35rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  transition: all 0.2s;
}
.timeline-dot.current {
  background: var(--current);
  border-color: var(--current);
  box-shadow: 0 0 12px var(--current-dim);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.timeline-card:hover {
  border-color: rgba(124,106,247,0.3);
  box-shadow: var(--shadow);
}

.tc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tc-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tc-company {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.tc-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tc-date.current-tag {
  background: var(--current-dim);
  color: var(--current);
  border-color: rgba(34,211,165,0.25);
}

.tc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.tc-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.6;
}
.tc-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

.tc-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.75rem 0 0.4rem;
}

.tc-tools {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.internship-tag {
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(167,139,250,0.15);
  color: var(--accent-2);
  border: 1px solid rgba(167,139,250,0.25);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

/* ── Education ────────────────────────────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.edu-card:hover { border-color: rgba(124,106,247,0.3); box-shadow: var(--shadow); }
.edu-card.featured { border-color: var(--accent); background: var(--accent-dim); }

.edu-icon {
  width: 42px; height: 42px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.edu-icon svg { width: 20px; height: 20px; }

.edu-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(124,106,247,0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  margin-bottom: 0.6rem;
}
.edu-tag.distinction {
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.25);
}

.edu-body h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.edu-inst {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.edu-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Contact ──────────────────────────────────────────────────────────────── */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-left .section-title { margin-bottom: 1rem; }
.contact-left > p { color: var(--text-muted); margin-bottom: 2rem; }

.contact-email,
.contact-phone,
.contact-location {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  transition: color 0.2s;
}
.contact-email svg,
.contact-phone svg,
.contact-location svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.contact-email:hover, .contact-phone:hover { color: var(--accent); }

.contact-right h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.25s;
}
.social-card svg { width: 20px; height: 20px; flex-shrink: 0; }
.social-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
footer p { font-size: 0.8rem; color: var(--text-faint); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-avatar { flex-direction: row; }
  .skills-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .nav-links { display: none; flex-direction: column; position: fixed; inset: var(--nav-h) 0 0; background: var(--bg); padding: 2rem 1.5rem; gap: 0.5rem; }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.1rem; padding: 0.75rem 1rem; }
  .nav-hamburger { display: flex; }
  .hero-name { font-size: clamp(2.4rem, 10vw, 4rem); }
  .social-grid { grid-template-columns: 1fr; }
  .tc-header { flex-direction: column; gap: 0.5rem; }
  .about-facts { grid-template-columns: repeat(2, 1fr); }
  .timeline { padding-left: 1rem; }
  .timeline-item { padding-left: 1.5rem; }
  .timeline-dot { left: -1.8rem; }
  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .about-avatar { flex-direction: column; align-items: center; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
