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

:root {
  --bg:        #ffffff;
  --bg-alt:    #f7f8fa;
  --border:    #e5e7eb;
  --text:      #0f1117;
  --muted:     #57606a;
  --accent:    #111111;
  --accent-2:  #6366f1;
  --radius:    8px;
  --max-w:     780px;
  --font:      'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  height: 60px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 110;
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

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

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding-top: 80px;
}

.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1.5rem;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 1.8rem;
  letter-spacing: -0.01em;
}

.hero-bio {
  max-width: 540px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

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

.btn-primary {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: var(--text);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #2d2d2d;
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.15s;
}

.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

/* Decorative background elements */
.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.dec-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.dec-1 {
  width: 480px;
  height: 480px;
  right: -160px;
  top: 50%;
  transform: translateY(-50%);
}

.dec-2 {
  width: 280px;
  height: 280px;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
}

.dec-line {
  position: absolute;
  right: 120px;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: var(--border);
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 4rem);
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-meta {
  padding-top: 3px;
}

.tl-date {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.tl-role {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.tl-company {
  font-size: 13px;
  color: var(--accent-2);
  font-weight: 500;
  display: block;
  margin-bottom: 0.75rem;
}

.tl-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

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

.skill-group-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.skill-list li {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-2);
  flex-shrink: 0;
}

/* =============================================
   PROJECTS
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-card {
  background: var(--bg);
  padding: 2rem;
  transition: background 0.2s;
}

.project-card:hover {
  background: var(--bg-alt);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.project-stats {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.stat {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.project-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-links a {
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.project-links a:hover {
  color: var(--text);
}

.project-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.project-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  max-width: 560px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  font-size: 11px;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-wrap {
  text-align: center;
}

.contact-lead {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.8rem;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.2s;
  margin-bottom: 2.5rem;
}

.contact-email:hover {
  border-color: var(--text);
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 13px;
  color: var(--muted);
}

.social-links a {
  color: var(--muted);
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--text);
}

.dot {
  color: var(--border);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.75rem 1.75rem;
    gap: 1.25rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    z-index: 100;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    display: block;
    padding: 0.4rem 0;
  }

  .courses-grid,
  .books-grid {
    grid-template-columns: 1fr;
  }

  .courses-stat-row {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .tl-date {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-2);
  }

  .dec-circle,
  .dec-line {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 4rem;
  }

  .hero-inner {
    padding-top: 30px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 3.5rem 1.25rem;
  }

  .hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-ghost {
    width: 100%;
    text-align: center;
  }

  .course-card,
  .book-card,
  .project-card {
    padding: 1.25rem;
  }

  .courses-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .courses-stat-num {
    font-size: 1.6rem;
  }

  .courses-stat-label {
    font-size: 11px;
  }

  .contact-email {
    word-break: break-all;
    font-size: 1.1rem;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1rem;
  }
}

/* =============================================
   COURSES
   ============================================= */
.courses-intro {
  margin-bottom: 2.5rem;
}

.courses-stat-row {
  display: flex;
  gap: 3rem;
  margin-bottom: 1.5rem;
}

.courses-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.courses-stat-num {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.courses-stat-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

.courses-blurb {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.course-card {
  display: block;
  background: var(--bg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.course-card:hover {
  background: var(--bg-alt);
}

.course-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.course-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.course-badge.bestseller {
  background: #fef3c7;
  color: #92400e;
}

.course-badge.new {
  background: #dbeafe;
  color: #1e40af;
}

.course-rating {
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
}

.course-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.course-meta {
  font-size: 12px;
  color: var(--muted);
}

.courses-cta-wrap {
  display: flex;
  justify-content: center;
}

/* =============================================
   BOOKS
   ============================================= */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.book-card {
  display: block;
  background: var(--bg);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, transform 0.15s;
}

.book-card:hover {
  background: var(--bg-alt);
}

.book-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.book-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.book-format {
  font-size: 11px;
  color: var(--muted);
}

.book-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.book-subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
