/* ============================================================
  styles.css  —  Sophia Tutoring Website
  Theme refresh: feminine Chinese-classical aesthetic
  ============================================================ */

/* ---------- Self-hosted Fonts ---------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --accent:       #9a2f2a;
  --accent-dark:  #71201d;
  --accent-soft:  #f3e3ca;
  --gold:         #b68d4a;
  --jade:         #355e5b;
  --ink:          #22303a;
  --bg:           #f8f0e3;
  --surface:      #f4eadb;
  --surface-alt:  #ecdfcb;
  --text:         #2d2420;
  --text-muted:   #5f5249;
  --border:       #d4c2a9;
  --radius:       10px;
  --transition:   0.25s ease;
  --shadow:       0 12px 30px rgba(58, 45, 40, 0.13);
  --font-ink:     'STKaiti', 'KaiTi', 'Kaiti SC', 'Songti SC', 'Noto Serif SC', 'SimSun', 'Times New Roman', serif;
}

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

body {
  font-family: 'Plus Jakarta Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body.lang-zh .navbar-logo,
body.lang-zh .hero-eyebrow,
body.lang-zh .hero-title,
body.lang-zh .section-title,
body.lang-zh .about-intro h2,
body.lang-zh .about-card h3,
body.lang-zh .track-header h3,
body.lang-zh .why-card h3,
body.lang-zh .contact .section-title,
body.lang-zh .footer p {
  font-family: var(--font-ink);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 16%, rgba(154,47,42,0.13) 0%, transparent 40%),
    radial-gradient(circle at 86% 10%, rgba(53,94,91,0.12) 0%, transparent 36%),
    radial-gradient(circle at 72% 78%, rgba(182,141,74,0.12) 0%, transparent 34%),
    linear-gradient(180deg, #faf3e8 0%, #f4e8d7 44%, #ecdeca 100%);
}

/* When Chinese is active, prefer system CJK fonts (no external request needed) */
body.lang-zh {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Plus Jakarta Sans', sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

ul { list-style: none; }

/* ---------- Keyword Emphasis ---------- */
.kword {
  position: relative;
  display: inline;
  color: #692725;
  font-weight: 600;
  background-image: linear-gradient(180deg, transparent 56%, rgba(154,47,42,0.24) 56%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  animation: kwordPulse 3.4s ease-in-out infinite;
}

.kword-glow {
  background-image: linear-gradient(180deg, transparent 52%, rgba(154,47,42,0.3) 52%);
  text-shadow: 0 0 10px rgba(154,47,42,0.16);
}

.kword-pill {
  padding: 0.02em 0.38em;
  border-radius: 999px;
  background-image: linear-gradient(180deg, rgba(235,225,215,0.9) 0%, rgba(228,216,203,0.92) 100%);
  border: 1px solid rgba(127,47,56,0.16);
}


@keyframes kwordPulse {
  0%, 100% { background-size: 100% 100%; }
  50% { background-size: 100% 94%; }
}

@media (prefers-reduced-motion: reduce) {
  .kword {
    animation: none;
  }

  .hero-avatar {
    animation: none;
  }
}

/* ---------- Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

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

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

.section-title::after {
  content: '';
  display: block;
  width: 3.4rem;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--jade) 20%, var(--gold) 52%, var(--accent) 80%, transparent 100%);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

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

.btn-primary {
  background-color: #9a2f2a;
  background-image: none;
  color: #fff;
  border-color: #8b2c27;
  box-shadow: 0 8px 20px rgba(90, 39, 35, 0.24);
}

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

.btn-outline {
  background: rgba(236,223,203,0.72);
  color: var(--jade);
  border-color: rgba(53,94,91,0.42);
}

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

/* ---------- Icon Accents ---------- */
.hero-actions .btn,
.footer-nav a,
.contact .form-group label,
.about-badge,
.navbar-links a,
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.hero-actions .btn {
  justify-content: center;
}

.hero-actions .btn::before,
.footer-nav a::before,
.contact .form-group label::before,
.about-badge::before,
.navbar-links a::before,
.nav-dropdown-toggle::before {
  font-size: 0.9em;
  line-height: 1;
}

.navbar-links a[href="#about"]::before,
.footer-nav a[href="#about"]::before {
  content: '◎';
  color: var(--accent-dark);
}

.navbar-links a[href="#why"]::before {
  content: '✦';
  color: var(--accent-dark);
}

.navbar-links a[href="#subjects"]::before {
  content: '☰';
  color: var(--accent-dark);
}

.navbar-links a[href="#contact"]::before,
.footer-nav a[href="#contact"]::before {
  content: '✉';
  color: var(--accent-dark);
}

.footer-nav a[href="#subjects"]::before {
  content: '☰';
  color: var(--accent-dark);
}

.nav-dropdown-menu a[href="#subjects-chinese-title"]::before {
  content: '中';
  color: var(--accent-dark);
}

.nav-dropdown-menu a[href="#subjects-math-title"]::before {
  content: 'π';
  color: var(--accent-dark);
}

.nav-dropdown-toggle::before {
  content: '☰';
  color: var(--accent-dark);
}

.hero-actions .btn-primary::before {
  content: '✉';
}

.hero-actions .hero-tracks-btn::before {
  content: '☰';
}

.contact label[for="name"]::before {
  content: '◌';
  color: var(--accent-dark);
}

.contact label[for="email"]::before {
  content: '@';
  color: var(--accent-dark);
}

.contact label[for="subject"]::before {
  content: '§';
  color: var(--accent-dark);
}

.contact label[for="message"]::before {
  content: '✎';
  color: var(--accent-dark);
}

.about-badge:nth-child(1)::before {
  content: '⏳';
}

.about-badge:nth-child(2)::before {
  content: '✦';
}

.about-badge:nth-child(3)::before {
  content: '★';
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 241, 227, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.navbar-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #5f2b28;
  white-space: nowrap;
  transition: color var(--transition);
}

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

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

.navbar-links > a,
.nav-dropdown-toggle {
  min-height: 1.5rem;
  line-height: 1;
}

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

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

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
  padding: 0;
  margin: 0;
  line-height: 1;
}

.navbar-links a::before,
.nav-dropdown-toggle::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95em;
  height: 0.95em;
  line-height: 1;
  flex: 0 0 auto;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--accent);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 220px;
  background: #f6ecde;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 30px rgba(110, 76, 76, 0.14);
  padding: 0.45rem;
  display: none;
  z-index: 120;
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-dropdown-menu a {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: var(--text-muted);
}

.nav-dropdown-menu a:hover {
  background: var(--surface);
  color: var(--text);
}

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

.lang-toggle {
  background: rgba(246,235,220,0.92);
  border: 1.5px solid rgba(53,94,91,0.38);
  color: var(--accent-dark);
  border-radius: 999px;
  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 {
  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.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:
    radial-gradient(circle at 14% 26%, rgba(154,47,42,0.16) 0%, transparent 42%),
    radial-gradient(circle at 86% 70%, rgba(53,94,91,0.14) 0%, transparent 40%),
    linear-gradient(145deg, #f8f0e4 0%, #f2e4d0 52%, #ebdac3 100%);
  padding: 7.8rem 0 6.8rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34,48,58,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,48,58,0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 93%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  right: -140px;
  top: -140px;
  background: radial-gradient(circle, rgba(154,47,42,0.16) 0%, rgba(154,47,42,0.02) 72%, transparent 78%);
  pointer-events: none;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 2.6rem;
  align-items: center;
}

.hero-media {
  display: flex;
  justify-content: center;
  order: 2;
}

.hero-panel {
  order: 1;
  text-align: left;
  background: rgba(249,239,224,0.78);
  border: 1px solid rgba(216,203,189,0.95);
  border-radius: 8px;
  padding: clamp(2rem, 2.8vw, 2.8rem);
  box-shadow: 0 14px 30px rgba(84, 65, 59, 0.12);
}

.hero-avatar {
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(216,203,189,0.9);
  box-shadow: 0 14px 34px rgba(64, 49, 49, 0.18);
  animation: floatAvatar 6s ease-in-out infinite;
}

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

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: none;
  color: #7a312c;
  margin-bottom: 0.85rem;
}

.hero-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.2rem;
  padding: 0.22rem 0.62rem;
  border-radius: 2px;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(154,47,42,0.48);
  color: #7a2925;
  background: rgba(243,227,202,0.6);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 700;
}

.hero-title {
  font-size: clamp(1.65rem, 3.2vw, 2.55rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.95rem;
}

.hero-tagline {
  font-size: clamp(1rem, 1.65vw, 1.2rem);
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 1.45rem;
}

.hero-note {
  margin-top: -0.35rem;
  margin-bottom: 1.35rem;
  font-size: 0.92rem;
  color: #6d5c54;
  letter-spacing: 0.06em;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 0.8rem;
  max-width: 520px;
  width: 100%;
}

.hero-actions .btn {
  min-width: 0;
  width: 100%;
  text-align: center;
  white-space: nowrap;
}

/* ---------- Section Transitions ---------- */
.about,
.subjects,
.why,
.contact {
  position: relative;
  isolation: isolate;
}

.about::before,
.subjects::before,
.why::before,
.contact::before {
  content: none;
}

.about::after,
.subjects::after,
.why::after,
.contact::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 12px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(34,48,58,0.12) 22%, rgba(154,47,42,0.22) 50%, rgba(34,48,58,0.12) 78%, transparent 100%),
    linear-gradient(90deg, transparent 0%, rgba(182,141,74,0.06) 30%, rgba(182,141,74,0.15) 50%, rgba(182,141,74,0.06) 70%, transparent 100%),
    linear-gradient(90deg, transparent 0%, rgba(34,48,58,0.04) 36%, rgba(34,48,58,0.1) 50%, rgba(34,48,58,0.04) 64%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 100% 1px, 100% 1px, 100% 8px;
  background-position: 0 2px, 0 7px, 0 0;
  opacity: 0.68;
  pointer-events: none;
}

.hero-tracks-btn {
  border-color: rgba(53,94,91,0.48);
  color: #2e5553;
  background: rgba(236,223,203,0.8);
  box-shadow: none;
}

.hero-tracks-btn:hover,
.hero-tracks-btn:focus-visible {
  background: rgba(227,211,189,0.88);
  color: #204443;
  border-color: var(--jade);
}

/* ---------- ABOUT ---------- */
.about {
  padding: 6.2rem 0;
  background:
    radial-gradient(circle at 9% 18%, rgba(154,47,42,0.12) 0%, transparent 38%),
    radial-gradient(circle at 88% 80%, rgba(182,141,74,0.12) 0%, transparent 32%),
    linear-gradient(180deg, #f8efe1 0%, #f1e4d0 100%);
}

.about-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}

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

.about-poem {
  margin-top: -0.4rem;
  margin-bottom: 1rem;
  color: #6e5950;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
}

.about-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  max-width: 980px;
  padding: 1.4rem;
  border-radius: 8px;
  background: rgba(255,248,236,0.62);
  border: 1px solid rgba(216,203,189,0.95);
  box-shadow: 0 8px 18px rgba(72, 56, 50, 0.08);
}

.about-story-grid p {
  color: var(--text-muted);
  margin-bottom: 0;
  padding: 0.1rem 0 0.1rem 0.9rem;
  border-left: 2px solid rgba(154,47,42,0.45);
}

.about-story-grid p:nth-child(3) {
  grid-column: 1 / -1;
  max-width: 72ch;
}

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

.about-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 2rem;
  padding-top: 0.9rem;
}

.about-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 8px 18px rgba(74, 57, 51, 0.08);
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.about-card h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  min-height: 2.8rem;
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(154,47,42,0.12);
}

.about-focus-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.15rem;
  flex: 1;
}

.about-focus-item {
  background: #f3e7d6;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.05rem;
}

.about-focus-item h4 {
  font-size: 0.96rem;
  margin-bottom: 0.25rem;
}

.about-focus-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.about-focus-note {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed rgba(154,47,42,0.2);
  color: #5f5249;
  font-size: 0.9rem;
  line-height: 1.55;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.about-highlights li {
  padding-left: 1.2rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.about-highlights li + li {
  margin-top: 0.12rem;
}

.about-highlights li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #9a2f2a;
  font-weight: 700;
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
}

.about-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  background: rgba(243,227,202,0.88);
  border: 1px solid var(--border);
  color: #574b46;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------- SUBJECTS ---------- */
.subjects {
  padding: 6.2rem 0;
  background:
    radial-gradient(circle at 84% 12%, rgba(53,94,91,0.14) 0%, transparent 36%),
    radial-gradient(circle at 14% 84%, rgba(182,141,74,0.14) 0%, transparent 34%),
    linear-gradient(180deg, #f3e8d8 0%, #eadcc6 100%);
}

.tracks-wrap {
  max-width: 960px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.track-card {
  background: rgba(255,249,240,0.75);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.2rem;
  box-shadow: var(--shadow);
  border-left: 1px solid rgba(53,94,91,0.46);
}

.track-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.2rem;
}

.track-header h3 {
  font-size: 1.4rem;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

#subjects-chinese-title,
#subjects-math-title {
  scroll-margin-top: 86px;
}

.track-header p {
  color: var(--text-muted);
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  min-width: 0;
}

.track-grid.single-column {
  grid-template-columns: 1fr;
}

.track-grid.three-column {
  grid-template-columns: repeat(3, 1fr);
}

.track-column {
  background: rgba(240,229,212,0.88);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.35rem;
  min-width: 0;
}

.track-column h4 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  overflow-wrap: anywhere;
}

.track-column ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.track-column ul li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.track-column ul li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #9a2f2a;
  font-weight: 700;
}

.subject-icon {
  font-size: 2.75rem;
  font-weight: 700;
  color: #8d2d29;
  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: 6.2rem 0;
  background:
    radial-gradient(circle at 14% 82%, rgba(34,48,58,0.14) 0%, transparent 40%),
    radial-gradient(circle at 86% 14%, rgba(154,47,42,0.13) 0%, transparent 34%),
    linear-gradient(180deg, #f1e7d7 0%, #e8dcc8 100%);
}

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

.why-card {
  background: rgba(255,249,239,0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.25rem 1.65rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.why-card:hover {
  transform: translateY(-2px);
  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: 6.2rem 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(154,47,42,0.14) 0%, transparent 38%),
    radial-gradient(circle at 14% 78%, rgba(53,94,91,0.1) 0%, transparent 34%),
    linear-gradient(180deg, #f0e4d4 0%, #e5d6bf 100%);
}

.contact-wrap {
  max-width: 680px;
  background: rgba(255,248,236,0.76);
  border: 1px solid rgba(216,203,189,0.95);
  border-radius: 8px;
  padding: clamp(1.25rem, 2vw, 2rem);
  box-shadow: 0 10px 24px rgba(74, 58, 52, 0.1);
}

.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-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.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: rgba(255,255,255,0.92);
  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(154,47,42,0.15);
}

.form-group textarea { resize: vertical; }

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

.contact-form .btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.contact-status {
  min-height: 1.35rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.contact-status.is-success {
  color: #176a37;
}

.contact-status.is-error {
  color: #9f2525;
}

.contact-status.is-info {
  color: var(--text-muted);
}

/* ---------- FOOTER ---------- */
.footer {
  background: linear-gradient(180deg, #23343b 0%, #1b272c 55%, #3d231f 100%);
  color: rgba(241,232,222,0.74);
  padding: 2.4rem 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(232,220,207,0.74);
  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);
  }

  .hero-shell {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }

  .hero-media {
    justify-content: center;
    order: 1;
  }

  .hero-panel {
    order: 2;
    text-align: center;
    padding: 1.3rem 1.1rem;
  }

  .hero-avatar {
    width: min(100%, 300px);
  }

  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    margin-inline: auto;
    max-width: 520px;
  }

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

  .about-story-grid p:nth-child(3) {
    grid-column: auto;
    max-width: none;
  }

  .track-grid {
    grid-template-columns: 1fr;
  }

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

  .about-card {
    min-height: 0;
  }

  .about-card h3 {
    min-height: 0;
    border-bottom: 0;
    padding-bottom: 0;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  /* Navbar: full-screen centered overlay */
  .navbar-links {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    min-height: calc(100dvh - 68px);
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 99;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    visibility: hidden;
    overflow-y: auto;
  }

  .navbar-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }

  .navbar-links a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
  }

  .navbar-links > a,
  .navbar-links > .nav-dropdown {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.24s ease, transform 0.24s ease;
  }

  .navbar-links.open > a,
  .navbar-links.open > .nav-dropdown {
    opacity: 1;
    transform: translateY(0);
  }

  .navbar-links.open > *:nth-child(1) { transition-delay: 0.03s; }
  .navbar-links.open > *:nth-child(2) { transition-delay: 0.07s; }
  .navbar-links.open > *:nth-child(3) { transition-delay: 0.11s; }
  .navbar-links.open > *:nth-child(4) { transition-delay: 0.15s; }

  .nav-dropdown {
    flex-direction: column;
    align-items: center;
  }

  .nav-dropdown-toggle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    width: auto;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0.5rem 0 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    max-height: 180px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-dropdown-menu a {
    padding: 0.2rem 0;
    border-radius: 0;
    font-size: 1rem;
    text-align: center;
    color: var(--text-muted);
  }

  .nav-dropdown-menu a:hover {
    background: transparent;
    color: var(--accent);
  }

  .hamburger { display: flex; z-index: 100; }

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

  .hero-title {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .hero-tagline {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

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

  .hero-panel {
    border-radius: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .about-story-grid p {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-left: 2px solid rgba(127,47,56,0.32);
    border-radius: 8px;
    background: rgba(255,255,255,0.8);
  }

  .tracks-wrap,
  .track-card,
  .track-grid,
  .track-column {
    min-width: 0;
  }

  .track-grid.three-column {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .track-column {
    padding: 0.95rem;
  }

  .track-column ul li {
    font-size: 0.9rem;
  }

  .track-card {
    padding: 1.25rem;
  }

  .track-header {
    grid-template-columns: 1fr;
    text-align: left;
  }

  /* 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; }

  .hero-actions .btn::before,
  .footer-nav a::before,
  .contact .form-group label::before,
  .about-badge::before,
  .navbar-links a::before,
  .nav-dropdown-toggle::before {
    width: 1.05rem;
    text-align: center;
  }
}
