/* ============================================================
   styles.css  —  Anthony Zhang Tutoring Website
   Palette:
     --accent:      #C9A84C  (warm gold)
     --accent-dark: #A8873A  (hover state)
     --bg:          #FFFFFF
     --surface:     #F9F7F4  (warm off-white for alternate sections)
     --text:        #2D2D2D  (dark charcoal)
     --text-muted:  #6B6B6B
     --border:      #E5E0D8
   ============================================================ */

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

:root {
  --accent:       #C9A84C;
  --accent-dark:  #A8873A;
  --bg:           #FFFFFF;
  --surface:      #F9F7F4;
  --text:         #2D2D2D;
  --text-muted:   #6B6B6B;
  --border:       #E5E0D8;
  --radius:       10px;
  --transition:   0.25s ease;
  --shadow:       0 4px 24px rgba(0,0,0,0.07);
}

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

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

/* When Chinese is active, prefer Noto Sans SC */
body.lang-zh {
  font-family: 'Noto Sans SC', 'Inter', sans-serif;
}

img { max-width: 100%; display: block; }

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

ul { list-style: none; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0.6rem auto 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  outline: none;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.navbar-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--transition);
}

.navbar-logo:hover { color: var(--accent); }

.navbar-links {
  display: flex;
  gap: 2rem;
}

.navbar-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  white-space: nowrap;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--accent);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language toggle button */
.lang-toggle {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.lang-toggle:hover {
  background: var(--accent);
  color: #fff;
}

/* Hamburger (mobile only) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  background: var(--surface);
  padding: 7rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle decorative background circle */
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* ---------- ABOUT ---------- */
.about {
  padding: 5rem 0;
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-avatar-wrap {
  display: flex;
  justify-content: center;
}

.about-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(201,168,76,0.3);
  flex-shrink: 0;
}

.avatar-initials {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

.about-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-text p strong { color: var(--text); }

/* ---------- SUBJECTS ---------- */
.subjects {
  padding: 5rem 0;
  background: var(--surface);
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 860px;
  margin-inline: auto;
}

.subject-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.subject-icon {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  line-height: 1;
}

.subject-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.subject-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.subject-card ul li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.subject-card ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- WHY CHOOSE ME ---------- */
.why {
  padding: 5rem 0;
  background: var(--bg);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.why-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.why-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.why-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- CONTACT ---------- */
.contact {
  padding: 5rem 0;
  background: var(--surface);
}

.contact-wrap {
  max-width: 680px;
}

.contact-sub {
  text-align: center;
  color: var(--text-muted);
  margin-top: -1.75rem;
  margin-bottom: 2.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-group textarea { resize: vertical; }

.contact-form .btn { align-self: flex-start; }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p { font-size: 0.875rem; }

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE — Tablet (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-avatar-wrap {
    justify-content: center;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  /* Navbar: hide desktop links, show hamburger */
  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .navbar-links.open { display: flex; }

  .navbar-links a {
    font-size: 1rem;
  }

  .hamburger { display: flex; }

  /* Hero */
  .hero { padding: 5rem 0 4rem; }

  /* Subjects: single column */
  .subjects-grid {
    grid-template-columns: 1fr;
  }

  /* Why: single column */
  .why-grid {
    grid-template-columns: 1fr;
  }

  /* Contact form row: single column */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav { justify-content: center; }
}
