/* ============================================================
   styles.css — Math Tutoring Site

   Colour hierarchy:
     1. White / near-white page background  (#f2f2f0)
     2. White panels and HUD window         (#ffffff)
     3. Dark chrome bars                    (#111111)  nav, hud bars
     4. Red accent throughout               (#c42b1e)  borders, highlights, CTAs
     5. Dark text on white                  (#111111)

   No colour hardcoded outside :root — always use CSS custom properties.
   Hex and circle geometry motifs throughout.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Orbitron:wght@400;500;700;900&family=Share+Tech+Mono&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Page */
  --bg:          #f2f2f0;

  /* Chrome — nav, dark panels */
  --chrome:        #111111;
  --chrome-text:   #ffffff;
  --chrome-border: rgba(255, 255, 255, 0.09);

  /* Accent */
  --accent:       #c42b1e;
  --accent-mid:   #e03020;
  --accent-dim:   rgba(196, 43, 30, 0.12);

  /* Text */
  --text:       #444444;
  --text-hi:    #111111;
  --text-muted: #999999;

  /* Typography */
  --font-display: 'Bebas Neue', 'Impact', 'Arial Black', sans-serif;
  --font-ui:      'Orbitron', 'Share Tech Mono', monospace;
  --font-body:    'Share Tech Mono', 'Courier New', monospace;

  /* Layout */
  --panel-pad: 1.5rem;
  --page-wrap: 1100px;
  --nav-h:     56px;

  /* Transitions */
  --dur:  150ms;
  --ease: ease-in-out;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  background-color: var(--bg);
  /* Subtle hex grid on the page background */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34.64' height='60'%3E%3Cpath d='M0 0V10 M0 50V60 M34.64 0V10 M34.64 50V60 M0 10L17.32 20 34.64 10 M17.32 20V40 M17.32 40L0 50 M17.32 40L34.64 50' stroke='black' stroke-opacity='0.05' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-size: 34.64px 60px;
  background-position: center top;
  color: var(--text);
  line-height: 1.7;
  padding: 12px;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Utilities ────────────────────────────────────────────── */
.wrap {
  max-width: var(--page-wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Site frame ───────────────────────────────────────────── */
.site-frame {
  background: transparent;
  position: relative;
}

/* Shared pulse animation — used by the nav availability dot and the
   hero availability indicator. */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.20; }
}

/* ── Panel header ─────────────────────────────────────────── */
.panel__hdr {
  font-family: var(--font-ui);
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chrome-text);
  background-color: var(--chrome);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.7rem 2.2rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: all var(--dur) var(--ease);
}

.btn--accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(196, 43, 30, 0.25);
}

.btn--accent:hover {
  background-color: var(--accent-mid);
  box-shadow: 0 4px 20px rgba(196, 43, 30, 0.40);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: transparent;
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--chrome);
  border: 1px solid rgba(17, 17, 17, 0.30);
}

.btn--secondary:hover {
  background-color: rgba(0, 0, 0, 0.06);
  border-color: var(--chrome);
  transform: translateY(-1px);
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  height: var(--nav-h);
  z-index: 100;
  background-color: var(--chrome);
  border-bottom: 1px solid var(--chrome-border);
  transition: box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__logo { flex-shrink: 0; }

.nav__monogram {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--chrome-text);
  letter-spacing: 0.08em;
  line-height: 1;
}

.nav__links {
  display: flex;
  gap: 0;
  margin-left: auto;
  align-items: center;
}

.nav__link {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all var(--dur) var(--ease);
  position: relative;
}

.nav__link:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: -1px;
  color: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--chrome-text);
  background-color: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav__link.is-active::before {
  content: '▸ ';
  color: var(--accent);
}

.nav__status {
  font-family: var(--font-ui);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.60);
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 20px;
  padding: 0.28rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav__status::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 6px;
}
.nav__burger span {
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.60);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  padding: 0.75rem 1.5rem 3rem;
  overflow: hidden;
  position: relative;
}


/* ══════════════════════════════════════════════════════════
   HUD WINDOW — white / red accent palette
   ══════════════════════════════════════════════════════════ */
.hud-window {
  --hud-white:  #ffffff;
  --hud-border: #c42b1e;       /* red — used for borders */

  position: relative;
  width: 100%;
  max-width: 1286px;
  height: 560px;
  margin: 0 auto;
  background: var(--hud-white);
  overflow: hidden;
  border-top:    2px solid var(--hud-border);
  border-bottom: 2px solid var(--hud-border);
  border-left:   1px solid rgba(196, 43, 30, 0.25);
  border-right:  1px solid rgba(196, 43, 30, 0.25);
  border-radius: 12px;
  box-shadow: 0 4px 32px rgba(196, 43, 30, 0.08);
}

/* ── Hero window — streamlined, content-led layout ───────── */
/* Content-driven height: avoids clipping/overflow at any viewport. */
.hud-window--hero {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero__intro {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  padding: 3.5rem;
  max-width: 620px;
}

.hero__eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-hi);
}

.hero__tagline {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 460px;
  text-transform: none;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero__avail {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__avail-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Portrait slot — circular frame echoing the .stat-circle ring treatment.
   Sized with clamp() so it scales smoothly between phone and desktop;
   the explicit mobile override below keeps it from crowding the intro
   text once the layout stacks. Drop an <img class="hero__portrait-img">
   inside (see markup comment) and object-fit: cover will frame it. */
.hero__portrait {
  position: relative;
  flex-shrink: 0;
  width: clamp(150px, 20vw, 240px);
  aspect-ratio: 1;
  margin-inline-end: 2rem;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: radial-gradient(circle, #ffffff 60%, var(--accent-dim) 100%);
  box-shadow: 0 0 0 4px var(--accent-dim),
              0 4px 16px rgba(196, 43, 30, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero__portrait-tag {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* TEMP — portrait hidden until a real headshot photo is ready to drop in.
   Delete this rule to bring the frame back into the hero layout; all of
   its sizing/styling above (and the markup comment in index.html) is
   left intact and ready to go. display: none removes it from the flex
   flow entirely, so .hero__intro quietly reclaims the full row. */
.hero__portrait {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   Sections (below the hero)
   ═══════════════════════════════════════════════════════════ */
.section {
  padding-block: 5rem;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 120px;
  height: 3px;
  background: var(--accent);
  opacity: 0.40;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  color: var(--chrome);
  line-height: 1;
  display: inline-block;
}

/* ── Services ─────────────────────────────────────────────── */
.services__panel-hdr {
  border: 1px solid rgba(196, 43, 30, 0.20);
  border-bottom: none;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

/* Card with hex icon */
.card {
  background-color: #ffffff;
  padding: var(--panel-pad);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: background-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(196, 43, 30, 0.10);
}

/* Red top edge */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.card:hover { background-color: #fdf8f7; box-shadow: 0 4px 20px rgba(196, 43, 30, 0.08); }
.card:hover::before { opacity: 1; }

/* Focus cards get a permanent red edge */
.card--focus { border-left: 2px solid var(--accent); }
.card--focus::before { opacity: 1; }

/* Hex icon badge */
.card__icon {
  width: 44px; height: 44px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--accent);
  flex-shrink: 0;
  transition: background var(--dur) var(--ease);
}

.card:hover .card__icon     { background: rgba(196, 43, 30, 0.20); }
.card--focus .card__icon    { background: rgba(196, 43, 30, 0.20); color: var(--accent); }

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-hi);
}

.card__level {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.10);
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.card__level--focus {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(196, 43, 30, 0.25);
}

.card__desc {
  font-size: 0.875rem;
  line-height: 1.88;
  color: var(--text);
  flex: 1;
  text-transform: none;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dotted rgba(196, 43, 30, 0.15);
}

.tag {
  font-family: var(--font-ui);
  font-size: 0.60rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(196, 43, 30, 0.15);
  padding: 0.18rem 0.55rem;
  border-radius: 3px;
  transition: background var(--dur) var(--ease);
}

.tag:hover { background: rgba(196, 43, 30, 0.18); }

/* ── About ────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.about__bio {
  background: #ffffff;
  border: 1px solid rgba(196, 43, 30, 0.15);
  border-top: 2px solid var(--accent);
  overflow: hidden;
  border-radius: 10px;
}

.about__bio-body {
  padding: 1.5rem;
}

.about__bio-body p {
  font-family: var(--font-body);
  font-size: 0.80rem;
  line-height: 1.92;
  color: var(--text);
  margin-bottom: 1rem;
  text-transform: none;
}
.about__bio-body p:last-child { margin-bottom: 0; }

/* Circular stat badges */
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* First circle sits alone on its own row, centered above the other two */
.about__stats .stat-circle:first-child {
  grid-column: 1 / -1;
  justify-self: center;
}

.stat-circle {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 130px;
  margin: 0 auto;
}

.stat-circle__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: radial-gradient(circle, #ffffff 60%, var(--accent-dim) 100%);
  box-shadow: 0 0 0 4px var(--accent-dim),
              0 4px 16px rgba(196, 43, 30, 0.12);
}

.stat-circle__inner {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(196, 43, 30, 0.20);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.stat-circle__value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.stat-circle__label {
  font-family: var(--font-ui);
  font-size: 0.60rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Contact ──────────────────────────────────────────────── */
.contact__panel {
  background-color: #ffffff;
  border: 1px solid rgba(196, 43, 30, 0.15);
  border-top: 2px solid var(--accent);
  overflow: hidden;
  border-radius: 10px;
  position: relative;
}

.contact__inner {
  text-align: center;
  padding: 3rem var(--panel-pad);
}

.contact__inner::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(196, 43, 30, 0.15) 0px,
    rgba(196, 43, 30, 0.15) 4px,
    transparent 4px,
    transparent 10px
  );
  margin-bottom: 2.5rem;
}

.contact__heading {
  font-family: var(--font-ui);
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-hi);
  margin-bottom: 1.25rem;
}

.contact__details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.75rem;
  margin-bottom: 2rem;
}

.contact__detail {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--accent);
  transition: color var(--dur) var(--ease);
}

.contact__detail:hover {
  color: var(--accent-mid);
}

.contact__invite {
  font-size: 0.875rem;
  color: var(--text);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: 2rem;
  line-height: 1.92;
  text-transform: none;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.social-link {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--chrome);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0.42rem 1.1rem;
  border-radius: 4px;
  transition: all var(--dur) var(--ease);
}
.social-link:hover {
  background: rgba(196, 43, 30, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid rgba(196, 43, 30, 0.15);
  padding-block: 1.25rem;
  background-color: var(--chrome);
  position: relative;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-family: var(--font-ui);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.version-badge {
  font-family: var(--font-ui);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 0.16rem 0.55rem;
  pointer-events: none;
}

/* ── Scroll-reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay:  80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }
.reveal:nth-child(5) { transition-delay: 320ms; }
.reveal:nth-child(6) { transition-delay: 400ms; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  body { padding: 0; }

  .nav__links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--chrome);
    border-bottom: 1px solid var(--chrome-border);
    padding: 1.25rem;
    gap: 0.4rem;
  }
  .nav__links.is-open { display: flex; }
  .nav__burger { display: flex; }
  .nav__link:not(:last-child)::after { display: none; }
  .nav__status { display: none; }

  .services__grid { grid-template-columns: 1fr; gap: 8px; }
  .about__grid    { grid-template-columns: 1fr; }
  .about__stats   { gap: 8px; }
  .stat-circle    { max-width: 80px; }
  .stat-circle__value { font-size: 1.2rem; }

  .hud-window {
    height: 480px;
    border-radius: 8px;
  }

  /* Hero stays content-driven height; just tighten its padding.
     Stack the portrait above the intro text — column-reverse keeps
     .hero__intro first in the markup (so it stays the primary
     reading-order content) while rendering the portrait on top. */
  .hud-window--hero {
    height: auto;
    flex-direction: column-reverse;
    gap: 0;
  }
  .hero__intro {
    padding: 2.25rem;
    max-width: none;
  }
  .hero__portrait {
    width: clamp(120px, 32vw, 180px);
    margin: 2.25rem auto 0;
  }
  .hero__actions { gap: 0.75rem; }
  .hero__actions .btn { padding: 0.8rem 2rem; font-size: 0.75rem; }

  .section { padding-block: 3.5rem; }
  .footer__inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .hud-window { height: 540px; }
  .hud-window--hero { height: auto; }
  .hero__intro { padding: 1.75rem; }
  .stat-circle { max-width: 120px; }
}
