/* ============================================================
   CSS Variables & Reset
   ============================================================ */
:root {
  --bg: #f8fafc;
  --bg-dark: #0f172a;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-light: #e0e7ff;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 10px -5px rgba(0,0,0,0.05);
  --radius: 14px;
  --radius-sm: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }

/* ============================================================
   Navbar
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.125rem;
  margin-left: auto;
}

.nav-links a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--border);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-nav {
  background: var(--accent);
  color: white;
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}
.btn-nav:hover { background: var(--accent-dark); }

/* ============================================================
   Section Shared
   ============================================================ */
section { padding: 6rem 0; }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0.75rem auto 0;
  font-size: 1.0625rem;
}

.section-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.875rem;
  border-radius: 100px;
  margin-bottom: 0.875rem;
}

.accent { color: var(--accent); }

/* ============================================================
   Hero
   ============================================================ */
#hero {
  padding: 10rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(1.125rem, 2.5vw, 1.625rem);
  font-weight: 500;
  color: var(--text-muted);
  margin: 0.5rem 0 1.25rem;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}

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

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.hero-glow {
  position: absolute;
  right: -150px;
  top: -50px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

/* ============================================================
   Journey Feed
   ============================================================ */
#journey {
  background: var(--bg-dark);
  color: white;
}

#journey .section-header h2 { color: white; }
#journey .section-header p { color: #94a3b8; }
#journey .section-tag { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }

.journey-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.journey-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.35s ease;
  opacity: 0;
  transform: translateY(24px);
  position: relative;
}

.journey-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.journey-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.journey-card.featured {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
}

.journey-card.featured::before {
  content: 'LATEST';
  position: absolute;
  top: -12px;
  left: 1.5rem;
  background: var(--accent);
  color: white;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
}

.journey-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.journey-date {
  font-size: 0.8125rem;
  color: #94a3b8;
  font-weight: 500;
}

.journey-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
}

.tag-event    { background: rgba(239, 68, 68, 0.2);   color: #fca5a5; }
.tag-learning  { background: rgba(6, 182, 212, 0.2);  color: #67e8f9; }
.tag-milestone { background: rgba(34, 197, 94, 0.2);  color: #86efac; }
.tag-cert      { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }
.tag-reading   { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }

/* Book list inside journey card */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 0.25rem;
}

.book-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.book-status {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  flex-shrink: 0;
}

.book-status.in-progress { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }
.book-status.done        { background: rgba(34, 197, 94, 0.2);  color: #86efac; }

.book-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #e2e8f0;
}

.journey-card h3 { color: white; margin-bottom: 0.75rem; font-size: 1.125rem; }
.journey-card p  { color: #94a3b8; font-size: 0.9375rem; line-height: 1.7; }

.journey-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8125rem;
  color: #475569;
}

.journey-icon { font-size: 1rem; }

/* ============================================================
   Demo
   ============================================================ */
#demo { background: white; }

.demo-card {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.demo-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.demo-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.875rem;
}

.demo-info p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

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

.demo-tags span {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
}

.demo-slides {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.demo-slide-item {
  background: var(--bg-dark);
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

@media (max-width: 768px) {
  .demo-card { grid-template-columns: 1fr; }
  .demo-preview { display: none; }
}

/* ============================================================
   About
   ============================================================ */
#about { background: white; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4.5rem;
  align-items: start;
}

.about-text .section-tag { margin-bottom: 0.875rem; }

.about-text h2 { margin-bottom: 1.5rem; }

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 2rem;
}

.pillar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.pillar-icon { font-size: 1.125rem; flex-shrink: 0; }

.about-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 6rem;
  box-shadow: var(--shadow-md);
}

.about-card-row {
  display: flex;
  flex-direction: column;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}
.about-card-row:last-of-type { border-bottom: none; }

.card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.card-value { font-size: 0.9375rem; font-weight: 500; }
.card-value a { color: var(--accent); }
.card-value a:hover { text-decoration: underline; }

/* ============================================================
   Experience Timeline
   ============================================================ */
#experience { background: var(--bg); }

.timeline {
  position: relative;
  padding-left: 2.25rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  opacity: 0;
  transform: translateX(-12px);
  transition: all 0.4s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

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

.timeline-dot {
  position: absolute;
  left: -2.5625rem;
  top: 0.375rem;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  transition: transform 0.2s;
}

.timeline-item:hover .timeline-dot { transform: scale(1.3); }

.timeline-content {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.timeline-content:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

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

.timeline-content h3 { margin-bottom: 0.2rem; }

.timeline-role {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.timeline-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}

.timeline-date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline-location {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.timeline-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.timeline-content ul li {
  padding-left: 1.375rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.timeline-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.875rem;
}

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

.timeline-tags span {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
}

/* ============================================================
   Skills
   ============================================================ */
#skills { background: white; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem;
}

.skill-group {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.35s ease;
}

.skill-group.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-group h4 { margin-bottom: 1rem; }

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

.skill-tags span {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  cursor: default;
}

.skill-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ============================================================
   Education
   ============================================================ */
#education { background: var(--bg); }

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.edu-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.35s ease;
}

.edu-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.edu-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.edu-school { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.375rem; }
.edu-degree { color: var(--accent); font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.5rem; }
.edu-meta   { font-size: 0.875rem; color: var(--text-muted); }

.edu-activities {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

/* ============================================================
   Contact
   ============================================================ */
#contact {
  background: var(--bg-dark);
  color: white;
  text-align: center;
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

#contact .section-tag { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
#contact h2 { color: white; margin-bottom: 1rem; }

#contact > .container > .contact-inner > p {
  color: #94a3b8;
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}

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

#contact .btn-ghost {
  color: white;
  border-color: rgba(255,255,255,0.18);
}
#contact .btn-ghost:hover {
  border-color: var(--accent);
  color: #a5b4fc;
}

.contact-phone {
  color: #475569;
  font-size: 0.9375rem;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem 0;
  text-align: center;
  color: #334155;
  font-size: 0.875rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-card { position: static; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .btn-nav { margin-left: auto; }

  #hero { padding: 7rem 0 4rem; }
  .hero-stats { gap: 2rem; }

  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: -2rem; }
  .timeline-header { flex-direction: column; }
  .timeline-right { align-items: flex-start; }

  .about-pillars { grid-template-columns: 1fr; }

  section { padding: 4rem 0; }

  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
