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

:root {
  --bg:           #090d14;
  --bg-alt:       #0d1120;
  --bg-card:      #111827;
  --border:       #1e2a3a;
  --border-hi:    #2a3a50;
  --accent:       #c9a34b;
  --accent2:      #e8c96a;
  --accent-dim:   rgba(201, 163, 75, 0.10);
  --accent-glow:  rgba(201, 163, 75, 0.18);
  --text:         #e2e8f0;
  --text-muted:   #8899aa;
  --text-dim:     #3d4f63;
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;
  --radius:       8px;
  --radius-lg:    14px;
  --trans:        0.25s ease;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--accent2); }
ul { list-style: none; }

/* ===== LAYOUT ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 6rem 0; }
.section-alt { background-color: var(--bg-alt); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

/* canvas injected by JS replaces this */
.hero-bg-grid { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 720px;
}

/* lang switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-hi);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  background: rgba(9, 13, 20, 0.7);
  backdrop-filter: blur(8px);
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  transition: all var(--trans);
}
.lang-btn.active { color: var(--accent); background: var(--accent-dim); }
.lang-btn:hover:not(.active) { color: var(--text); }
.lang-sep { color: var(--text-dim); font-size: 0.75rem; }

/* avatar */
.hero-avatar { margin-bottom: 1.5rem; }
.hero-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-dim), 0 0 40px var(--accent-glow);
}

/* hero label */
.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* hero name */
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2.5rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(4px);
  transition: all var(--trans);
}
.hero-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.hero-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.hero-link-book:hover { background: var(--accent-dim); }

.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  animation: bounce 2s infinite;
}
.hero-scroll-hint svg { width: 16px; height: 16px; }

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

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  height: 2px;
  width: 3rem;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* ===== ABOUT ===== */
.about-text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 3rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}
.stat:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 80%, transparent);
  border-radius: 2px;
}

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

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 1.2rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 0 12px var(--accent-glow);
  z-index: 1;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}
.timeline-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: 0 4px 24px var(--accent-dim);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.timeline-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}
.timeline-badge.current {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(201,163,75,0.35);
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.timeline-company {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.timeline-bullets { display: flex; flex-direction: column; gap: 0.3rem; }
.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 0.15em;
}

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

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.skill-category:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-dim);
}

.skill-cat-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  transition: all var(--trans);
}
.tag:hover { color: var(--text); border-color: var(--text-muted); }
.tag-accent {
  color: var(--accent);
  border-color: rgba(201,163,75,0.35);
  background: var(--accent-dim);
}
.tag-learning {
  color: #ffd166;
  border-color: rgba(255,209,102,0.3);
  background: rgba(255,209,102,0.07);
}

/* ===== CERTIFICATIONS ===== */
.cert-list { display: flex; flex-direction: column; }

.cert-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--trans);
}
.cert-item:last-child { border-bottom: none; }
.cert-item:hover {
  background: var(--accent-dim);
  border-radius: var(--radius);
  padding-left: 0.5rem;
}

.cert-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  min-width: 70px;
  padding-top: 0.1rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.cert-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
}
.cert-name { font-size: 0.9rem; color: var(--text); }
.cert-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px solid rgba(201,163,75,0.3);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  white-space: nowrap;
  transition: all var(--trans);
}
.cert-link:hover { background: var(--accent-dim); color: var(--accent2); }
.cert-wip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #ffd166;
  border: 1px solid rgba(255,209,102,0.3);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  background: rgba(255,209,102,0.07);
}

/* ===== PUBLICATIONS ===== */
.pub-list { display: flex; flex-direction: column; gap: 1.5rem; }

.pub-card {
  display: flex;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}
.pub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-dim);
}
.pub-year {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 80px;
  line-height: 1.2;
  opacity: 0.45;
}
.pub-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.pub-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.pub-link { font-size: 0.8rem; font-family: var(--font-mono); color: var(--accent); }
.pub-link:hover { text-decoration: underline; }

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--trans);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-dim);
}
.project-card:hover::before { opacity: 1; }

.project-period { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.1em; }
.project-title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.project-desc { font-size: 0.875rem; color: var(--text-muted); flex: 1; }
.project-metric {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.metric-num { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.metric-label { font-size: 0.8rem; color: var(--text-muted); }

/* ===== VOLUNTEERING ===== */
.vol-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 720px;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.vol-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-dim);
}

.vol-header { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.25rem; }
.vol-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--accent-dim);
  border: 1px solid rgba(201,163,75,0.3);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.vol-icon svg { width: 24px; height: 24px; }
.vol-role { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.vol-org { font-size: 0.875rem; color: var(--accent); margin-bottom: 0.2rem; }
.vol-period { font-size: 0.72rem; font-family: var(--font-mono); color: var(--text-muted); }

.vol-bullets { display: flex; flex-direction: column; gap: 0.4rem; }
.vol-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
}
.vol-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 0.15em;
}

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

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  color: inherit;
  transition: all var(--trans);
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px var(--accent-dim);
}
.contact-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--accent-dim);
  border: 1px solid rgba(201,163,75,0.2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-label { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.15rem; }
.contact-value { font-size: 0.9rem; color: var(--text); font-weight: 500; }

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

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* ===== LANG TRANSITION ===== */
[data-i18n] { transition: opacity 0.2s ease; }
body.lang-switching [data-i18n] { opacity: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .about-stats { grid-template-columns: 1fr; gap: 1rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: -1.9rem; }
  .pub-card { flex-direction: column; gap: 0.75rem; padding: 1.25rem; }
  .pub-year { font-size: 1.25rem; }
  .vol-header { flex-direction: column; gap: 1rem; }
  .cert-item { flex-direction: column; gap: 0.4rem; }
  .cert-date { min-width: auto; }
  .hero-links { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.5rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
