@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Variable-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sora';
  src: url('../fonts/Sora-Variable-latin.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Clash Display';
  src: url('../fonts/ClashDisplay-Medium.woff2') format('woff2'),
       url('../fonts/ClashDisplay-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ===== Tokens ===== */
:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --bg-elevated: #131316;
  --text: #f2f2f4;
  --text-dim: #a5a5ac;
  --text-faint: #8b8b93;
  --border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1080px;

  --red: #ff6b7a;
  --red-glass: rgba(255, 107, 122, 0.09);
  --red-glass-hover: rgba(255, 107, 122, 0.15);
  --red-border: rgba(255, 107, 122, 0.32);

  --blue: #5b9dff;
  --blue-glass: rgba(91, 157, 255, 0.09);
  --blue-glass-hover: rgba(91, 157, 255, 0.15);
  --blue-border: rgba(91, 157, 255, 0.32);

  --green: #4ade9a;
  --green-glass: rgba(74, 222, 154, 0.09);
  --green-glass-hover: rgba(74, 222, 154, 0.15);
  --green-border: rgba(74, 222, 154, 0.32);

  --accent: var(--text);
  --accent-glass: var(--glass-bg);
  --accent-glass-hover: var(--glass-bg-hover);
  --accent-border: var(--border);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Fixed full-page background image (main page only), sits behind everything */
.bg-image {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: url('../images/bg2.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  pointer-events: none;
}

/* Ambient background glow, tinted per page via body classes */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% -5%, var(--accent-glass), transparent 60%),
    radial-gradient(500px circle at 100% 20%, var(--accent-glass), transparent 55%);
  pointer-events: none;
}

body.theme-red {
  --accent: var(--red);
  --accent-glass: var(--red-glass);
  --accent-glass-hover: var(--red-glass-hover);
  --accent-border: var(--red-border);
  background:
    radial-gradient(1100px circle at 12% -8%, rgba(255, 107, 122, 0.18), transparent 60%),
    radial-gradient(900px circle at 100% 25%, rgba(255, 107, 122, 0.13), transparent 55%),
    linear-gradient(180deg, #1a0b0e 0%, #0e0a0b 45%, #0a0b10 100%);
}
body.theme-blue {
  --accent: var(--blue);
  --accent-glass: var(--blue-glass);
  --accent-glass-hover: var(--blue-glass-hover);
  --accent-border: var(--blue-border);
  background:
    radial-gradient(1100px circle at 12% -8%, rgba(91, 157, 255, 0.2), transparent 60%),
    radial-gradient(900px circle at 100% 25%, rgba(91, 157, 255, 0.15), transparent 55%),
    linear-gradient(180deg, #0a1120 0%, #0b0e16 45%, #0a0b10 100%);
}
body.theme-green {
  --accent: var(--green);
  --accent-glass: var(--green-glass);
  --accent-glass-hover: var(--green-glass-hover);
  --accent-border: var(--green-border);
  background:
    radial-gradient(1100px circle at 12% -8%, rgba(74, 222, 154, 0.18), transparent 60%),
    radial-gradient(900px circle at 100% 25%, rgba(74, 222, 154, 0.13), transparent 55%),
    linear-gradient(180deg, #081711 0%, #0a0e0c 45%, #0a0b10 100%);
}

h1, h2, h3, .brand {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Main page only: headings use Clash Display Medium instead of Archivo Expanded */
.page-main h1,
.page-main h2,
.page-main h3 {
  font-family: 'Clash Display', 'Sora', 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: -0.005em;
}

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Nav ===== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.brand {
  font-size: 1.05rem;
  color: var(--text);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-dim);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.2s ease;
}
.back-link:hover {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-glass);
}

/* ===== Glass card ===== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px;
}

.glass-card.accent {
  background: var(--accent-glass);
  border-color: var(--accent-border);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text);
  transition: all 0.22s ease;
  cursor: pointer;
}
.btn:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent-glass-hover);
  border-color: var(--accent-border);
  color: var(--text);
}
.btn-primary:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px -8px var(--accent);
}
/* ===== Chips ===== */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text-dim);
}

/* ===== Sections ===== */
.section { padding: 32px 0; }
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section h2 { font-size: 1.6rem; margin-bottom: 20px; }
.lede { color: var(--text-dim); font-size: 1.02rem; max-width: 680px; }

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.footer .social-row { display: flex; gap: 18px; }
.footer a { color: var(--text-faint); transition: color 0.2s ease; }
.footer a:hover { color: var(--text); }

/* ===== Utility ===== */
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.headshot {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated);
  border: 3px solid var(--bg);
}
.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-faint);
  font-family: 'Sora', sans-serif;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-bottom: 28px;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== Identity cards (Main page) ===== */
.identity-card {
  display: block;
  padding: 30px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.identity-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border);
  background: var(--card-glass-hover);
  box-shadow: 0 12px 40px -16px var(--card-color);
}
.identity-card.red { --card-color: var(--red); --card-border: var(--red-border); --card-glass-hover: var(--red-glass-hover); }
.identity-card.blue { --card-color: var(--blue); --card-border: var(--blue-border); --card-glass-hover: var(--blue-glass-hover); }
.identity-card.green { --card-color: var(--green); --card-border: var(--green-border); --card-glass-hover: var(--green-glass-hover); }

.identity-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--card-glass-hover);
  color: var(--card-color);
}
.identity-card .icon svg { width: 22px; height: 22px; }

.identity-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
}
.identity-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.identity-card .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--card-color);
}
.identity-card .go svg {
  width: 14px; height: 14px;
  transition: transform 0.2s ease;
}
.identity-card:hover .go svg { transform: translateX(4px); }

/* ===== Big subpage hero (name-style title) ===== */
.page-hero-big {
  padding: 12px 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.page-title-big {
  font-size: clamp(2.8rem, 9vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.page-tagline {
  margin-top: 20px;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: var(--text-dim);
}
.page-hero-big .lede {
  margin-top: 20px;
  text-align: center;
  max-width: 620px;
}
.page-hero-big.align-left {
  text-align: left;
  align-items: flex-start;
}
.page-hero-big.align-left .lede { text-align: left; margin-left: 0; }

/* Bigger section heading (e.g. "Why") + slightly smaller body copy under it */
.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 22px;
}
.lede-sm { font-size: 0.94rem; }

/* ===== Horizontal bar links (projects) ===== */
.bar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--glass-bg);
  transition: all 0.2s ease;
}
.bar-link:hover {
  border-color: var(--accent-border);
  background: var(--accent-glass);
  transform: translateX(4px);
}
.bar-link .bl-text { min-width: 0; }
.bar-link .bl-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
  margin-bottom: 5px;
}
.bar-link .bl-sub { color: var(--text-faint); font-size: 0.85rem; }
.bar-link .bl-arrow { flex-shrink: 0; color: var(--accent); }
.bar-link .bl-arrow svg { width: 18px; height: 18px; }

/* ===== Experience list ===== */
.exp-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.exp-item:last-child { border-bottom: none; }
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.exp-title { font-weight: 600; font-size: 1.02rem; color: var(--text); }
.exp-org { color: var(--accent); font-size: 0.88rem; }
.exp-date { color: var(--text-faint); font-size: 0.82rem; white-space: nowrap; }
.exp-item ul { padding-left: 20px; color: var(--text-dim); font-size: 0.92rem; }
.exp-item li { margin-bottom: 4px; }

/* ===== Full-page hero ===== */
.hero-full {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 24px;
}
.rays-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-full-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.03em;
  font-size: clamp(3rem, 12.5vw, 9.5rem);
}
.hero-name span { display: block; }
.hero-roles {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  letter-spacing: 0.02em;
}
.hero-roles a {
  color: inherit;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.hero-roles a:hover {
  color: var(--text);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
}
/* Desktop: these render as plain inline text, identical to before —
   the mobile media query below is what forces the two-line grouping. */
.hero-roles-line { display: inline; }
.hero-roles-sep { display: inline; }
.hero-icons {
  display: flex;
  gap: 16px;
  margin-top: 34px;
}
.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.22s ease;
}
.icon-btn:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
.icon-btn svg { width: 20px; height: 20px; }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}
.scroll-cue svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== About (two-column) ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  padding: 50px 0;
}
.who-am-i {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 22px;
}
.about-text .lede { font-size: 1.05rem; }
.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--glass-bg);
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Big identity cards ===== */
.identity-card.big {
  padding: 46px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 520px;
}
.identity-card.big .icon-lg {
  width: 60px;
  height: 60px;
  margin: 4px 0 24px;
  color: var(--card-color);
}
.identity-card.big .icon-lg svg { width: 100%; height: 100%; }
.identity-card.big .icon-lg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.identity-card.big h3 { font-size: 2.1rem; margin-bottom: 16px; }
.identity-card.big p { font-size: 1.02rem; margin-bottom: 0; flex: 1; max-width: 30ch; }
.identity-card.big .go { margin-top: 26px; padding-top: 0; font-size: 1rem; font-weight: 600; justify-content: center; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 22px;
  border-radius: 100px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
  padding: 50px 0 60px;
}
.contact-heading { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: 16px; }
.contact-sub { color: var(--text-dim); font-size: 1.1rem; }
.contact-card { width: 100%; }
.form-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-row label { font-size: 0.82rem; color: var(--text-faint); }
.form-row input,
.form-row textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glass-hover);
}
.form-row textarea { min-height: 120px; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .nav { padding: 22px 0; }
  .section { padding: 24px 0; }
  /* Reverse so the social links render above the copyright line, and
     center both — social-row is last in the HTML, copyright is first. */
  .footer {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }
  /* Five links outgrow a 320px screen: wrap instead of overflowing */
  .footer .social-row { flex-wrap: wrap; justify-content: center; gap: 8px 18px; }

  /* More breathing room on the sides than the desktop 24px inset. */
  .container { padding: 0 30px; }
  .hero-full { padding: 40px 30px; }

  /* "Psychology · Human Resource" and "Founder · Creator" as two
     separate centered lines instead of one wrapping line. */
  .hero-roles { text-align: center; }
  .hero-roles-line { display: block; }
  .hero-roles-sep { display: none; }

  /* Fixed-position layers cause visible jump/flicker on mobile scroll
     (address-bar resize + momentum scrolling). Let them scroll with the
     page instead — body is position:relative, so this still covers the
     full page, just without the "pinned" behavior that glitches. */
  body::before {
    position: absolute;
  }
  /* .bg-image needs its own explicit box: inset:0 on position:absolute
     would stretch it to the full (multi-screen-tall) page height, and
     background-size:cover would then blow the image up to cover that
     entire height — effectively making it disappear. Cap it to one
     screen's height instead so it renders sanely and just scrolls
     away with the content beneath it. */
  .bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    height: 100vh;
    height: 100svh;
    background-image: url('../images/bg2-mobile.webp');
  }

  /* Main page: headings and identity cards were sized for desktop —
     scale them down so mobile doesn't feel oversized. */
  .hero-name { font-size: clamp(3.6rem, 15vw, 9.5rem); }
  .who-am-i { font-size: clamp(1.7rem, 8vw, 2.3rem); margin-bottom: 16px; }
  .about-text .lede { font-size: 0.92rem; }
  .about-photo {
    order: -1;
    max-width: 238px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
  }
  .contact-heading { font-size: clamp(1.8rem, 8vw, 2.4rem); margin-bottom: 10px; }
  .contact-sub { font-size: 1rem; }
  .contact-grid > div:first-child { text-align: center; }

  .identity-card.big {
    min-height: 0;
    padding: 30px 26px;
  }
  .identity-card.big .icon-lg {
    width: 44px;
    height: 44px;
    margin: 0 0 18px;
  }
  .identity-card.big h3 { font-size: 1.4rem; margin-bottom: 10px; }
  .identity-card.big p { font-size: 0.92rem; flex: none; max-width: none; }
  .identity-card.big .go { margin-top: 18px; font-size: 0.92rem; }

  /* Subpage heroes (Psychology/Founder/Creator) are left-aligned on
     desktop by request — on mobile that reads as text stuck to the edge,
     so center them instead. */
  .page-hero-big.align-left {
    text-align: center;
    align-items: center;
  }
  .page-hero-big.align-left .lede {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  /* "Let's talk" note form — scale down for mobile */
  .contact-card { padding: 24px 20px; }
  .form-row { gap: 5px; margin-bottom: 14px; }
  .form-row label { font-size: 0.78rem; }
  .form-row input,
  .form-row textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  .form-row textarea { min-height: 96px; }

  /* Psychology / Founder / Creator subpages */
  .page-psychology .brand,
  .page-founder .brand,
  .page-creator .brand {
    font-size: 0.85rem;
  }
  .page-psychology .nav,
  .page-founder .nav,
  .page-creator .nav {
    padding-top: 40px;
  }
  .page-psychology .back-link,
  .page-founder .back-link,
  .page-creator .back-link {
    gap: 0;
    padding: 13px;
    width: 49px;
    height: 49px;
    border-radius: 50%;
    justify-content: center;
  }
  .page-psychology .back-link-text,
  .page-founder .back-link-text,
  .page-creator .back-link-text {
    display: none;
  }
  .page-psychology .page-hero-big,
  .page-founder .page-hero-big,
  .page-creator .page-hero-big {
    text-align: center;
    align-items: center;
    padding-top: 36px;
  }
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; padding: 35px 0; }
  .about-photo { max-width: 340px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; padding: 35px 0 45px; }
}
@media (max-width: 640px) {
  /* These share the .container class but their own padding shorthand
     (above) zeroes out the horizontal inset — restore it here so they
     get the same side breathing room as everything else on mobile. */
  .about-grid { padding: 35px 30px; }
  .contact-grid { padding: 35px 30px 45px; }

  /* Same source-order issue: the 860px rule above also sets a
     max-width/margin for .about-photo that would win the tie against
     the circular/smaller mobile version set earlier — reassert it here. */
  .about-photo {
    max-width: 238px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
  }
}

/* ===== Loading screen (main page) ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader-bar-track {
  width: 180px;
  height: 3px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--text);
  border-radius: 100px;
  animation: loaderFill 2s ease forwards;
}
@keyframes loaderFill {
  from { width: 0%; }
  to { width: 100%; }
}
.loader.loader-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .loader-bar-fill { animation: none; width: 100%; }
}

/* ===== Profile card (Creator "Find me here") ===== */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.25s ease;
}
.profile-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-glass);
  transform: translateY(-4px);
}
.pc-platform {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.pc-avatar {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 18px;
  border: 2px solid var(--accent-border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-avatar-fallback { color: var(--accent); width: 40%; height: 40%; }
.pc-handle { font-weight: 700; font-size: 1.05rem; color: var(--text); margin-bottom: 8px; }
.pc-desc { color: var(--text-dim); font-size: 0.9rem; max-width: 30ch; }

/* ===== Mobile side navigation (hidden on desktop) ===== */
.mobile-nav-toggle,
.mobile-nav-drawer,
.mobile-nav-overlay {
  display: none;
}
@media (max-width: 860px) {
  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 220;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .mobile-nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .mobile-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
  .mobile-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 210;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }

  .mobile-nav-drawer {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    z-index: 215;
    padding: 90px 30px 30px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }
  .mobile-nav-drawer.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
  }
  .mobile-nav-drawer a {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dim);
  }
  .mobile-nav-drawer a.active { color: var(--accent); }
}

/* Psychology / Founder / Creator: slightly smaller type overall,
   mobile only. Scales every rem-based size on the page uniformly
   instead of re-tuning each rule individually. */
@media (max-width: 640px) {
  html:has(body.page-psychology),
  html:has(body.page-founder),
  html:has(body.page-creator) {
    font-size: 90%;
  }
}


/* ===== Accessibility & robustness additions ===== */
.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus-visible { outline: none; }
.skip-loader .loader { display: none; }

/* Touch devices: grow the hit area of small text links without moving anything */
@media (pointer: coarse) {
  .hero-roles a,
  .footer .social-row a { position: relative; }
  .hero-roles a::after,
  .footer .social-row a::after {
    content: "";
    position: absolute;
    inset: -14px -6px;
  }
}

/* Tablet (641–860px): single-column cards were 520px-tall empty slabs */
@media (min-width: 641px) and (max-width: 860px) {
  .identity-card.big { min-height: 0; padding: 36px 32px; }
  .identity-card.big p { flex: none; max-width: 46ch; }
  .identity-card.big .go { margin-top: 22px; }
}

/* Smallest phones: keep the huge name inside the 30px side gutters */
@media (max-width: 340px) {
  .hero-name { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue svg,
  .status-dot { animation: none; }
}

/* Lock page scroll while the mobile menu is open */
html.nav-open { overflow: hidden; }

/* Phones are handled above (30px). Between phone and a wide desktop (container max-width 1080 + 2×24px gutter),
   .about-grid / .section / .contact-grid / the footer each set `padding: Npx 0`, which overrides .container's
   side gutter — so on tablets, iPad landscape and small laptops their content touched the screen edges. */
@media (min-width: 641px) and (max-width: 1127px) {
  .container.about-grid,
  .container.section,
  .container.contact-grid,
  .footer.container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Research papers are private on purpose — flag it so "request access" isn't a surprise */
.bar-link .bl-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  background: var(--accent-glass);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===== Roadmap timeline (Founder hero) ===== */
.timeline {
  position: relative;
  width: 100%;
  margin-top: 52px;
}
.tl-bar {
  position: relative;
  height: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--glass-bg);
}
.tl-fill {
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 40%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent-glass-hover), var(--accent));
  box-shadow: 0 0 14px -2px var(--accent);
  will-change: opacity;
  /* grow once (slowly), then a gentle opacity-only pulse (cheap: no repaint) */
  animation: tl-grow 3.4s cubic-bezier(0.25, 0.6, 0.25, 1) 0.6s both,
             tl-flash 3s ease-in-out 4s infinite alternate;
}
/* glowing head where the progress currently is */
.tl-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--accent);
}
.tl-points {
  position: relative;
  list-style: none;
  height: 3.4rem;
  margin-top: -7px;
}
.tl-point {
  position: absolute;
  top: 0;
  left: var(--p);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8b8b93;
}
.tl-point.is-done .tl-dot { background: var(--accent); }
.tl-name {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-dim);
  white-space: nowrap;
}

@keyframes tl-grow { from { width: 0; } }
@keyframes tl-flash {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

@media (max-width: 640px) {
  .timeline { margin-top: 40px; }
  .tl-points { height: 4rem; }
  .tl-name { white-space: normal; max-width: 4.2rem; font-size: 0.8rem; }
}
@media (max-width: 360px) {
  .tl-name { max-width: 3.4rem; font-size: 0.74rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-fill { animation: none; }
}
