@import url('https://fonts.googleapis.com/css2?family=Yatra+One&display=swap');

.site-nav__inner { gap: 20px; }
.nav-links { margin-left: auto; gap: 24px; }
.theme-picker { display: flex; flex-shrink: 0; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 50px; min-height: 44px; padding: 4px; border: 0; border-radius: 4px; background: transparent; color: var(--pencil-light); cursor: pointer; }
.theme-toggle__track { position: relative; display: block; flex-shrink: 0; width: 42px; height: 24px; border-radius: 12px; background: #66736c; transition: background .2s; }
.theme-toggle__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform .2s; }
.theme-toggle[aria-checked='true'] .theme-toggle__track { background: var(--accent-blue); }
.theme-toggle[aria-checked='true'] .theme-toggle__track::after { transform: translateX(18px); }
.theme-toggle:hover { color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .theme-toggle__track, .theme-toggle__track::after { transition: none; } }
.error-theme { display: flex; justify-content: center; margin-top: 28px; text-align: left; }

html[data-theme='mithila'] {
  --bg: #fdfdf9;
  --fg: #242822;
  --muted: #cbd0c5;
  --paper-100: #fdfdf9;
  --paper-200: #edf2ed;
  --paper-300: #edf2ed;
  --accent-red: #973d40;
  --accent-blue: #265e56;
  --pencil: #242822;
  --pencil-light: #525b53;
  --theme-ochre: #ac761c;
}
html[data-theme='mithila'] body::before,
html[data-theme='mithila'] body::after { content: ''; position: fixed; top: 0; bottom: 0; width: 18px; z-index: 55; pointer-events: none; background: url('../img/mithila-border.svg') center top / 18px 180px repeat-y; }
html[data-theme='mithila'] body::before { left: 0; }
html[data-theme='mithila'] body::after { right: 0; transform: scaleX(-1); }
html[data-theme='mithila'] :is(h1, h2, .brand, .impact-grid strong, .project-number) { font-family: 'Yatra One', serif; font-weight: 400; }
html[data-theme='mithila'] :focus-visible { outline-color: var(--theme-ochre); }
html[data-theme='mithila'] .site-nav { background: rgba(253,253,249,.97); }
html[data-theme='mithila'] .brand { text-decoration: none; font-size: 28px; }
html[data-theme='mithila'] .brand:hover { transform: none; }
html[data-theme='mithila'] .eyebrow { color: var(--accent-red); }
html[data-theme='mithila'] .masthead { background-image: none; text-align: center; padding: 20px 0 30px; }
html[data-theme='mithila'] .masthead > .wrap { position: relative; isolation: isolate; padding-left: 130px; padding-right: 130px; }
html[data-theme='mithila'] .masthead > .wrap::before,
html[data-theme='mithila'] .masthead > .wrap::after { content: ''; position: absolute; width: 120px; height: 360px; top: 55px; z-index: -1; pointer-events: none; background: url('../img/mithila-vine.svg') center / contain no-repeat; }
html[data-theme='mithila'] .masthead > .wrap::before { left: 24px; }
html[data-theme='mithila'] .masthead > .wrap::after { right: 24px; transform: scaleX(-1); }
html[data-theme='mithila'] .masthead-meta { justify-content: center; flex-wrap: wrap; gap: 8px 24px; }
html[data-theme='mithila'] .handwritten { display: none; }
html[data-theme='mithila'] .name-row { flex-direction: column-reverse; gap: 16px; animation: none; }
html[data-theme='mithila'] .name-row h1 { font-size: 80px; }
html[data-theme='mithila'] .hero-portrait { width: 96px; height: 110px; border-radius: 55% 55% 4px 4px; border: 1px solid var(--pencil); outline: 1px solid var(--theme-ochre); outline-offset: 5px; box-shadow: none; transform: none; }
html[data-theme='mithila'] .hero-role { color: var(--accent-blue); }
html[data-theme='mithila'] .masthead-summary { margin-left: auto; margin-right: auto; max-width: 620px; }
html[data-theme='mithila'] :is(.hero-actions, .practice-line) { justify-content: center; }
html[data-theme='mithila'] .practice-line { font: 13px 'DM Sans', sans-serif; }
html[data-theme='mithila'] .impact-strip { background: transparent; border-top: 5px double var(--pencil); }
html[data-theme='mithila'] .impact-grid strong { color: var(--accent-red); }
html[data-theme='mithila'] .impact-grid div { border-color: var(--muted); }
html[data-theme='mithila'] .btn { border-radius: 3px; box-shadow: none; }
html[data-theme='mithila'] .btn:hover { transform: none; box-shadow: none; }
html[data-theme='mithila'] .btn--primary:hover { background: #1b4943; color: white; }
html[data-theme='mithila'] .project-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
html[data-theme='mithila'] .project-card { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 12px 32px; padding: 26px 0; border: 0; border-top: 1px solid var(--muted); border-radius: 0; background: transparent; }
html[data-theme='mithila'] .project-meta { grid-column: 1 / -1; margin-bottom: 0; }
html[data-theme='mithila'] .project-number { color: var(--accent-red); }
html[data-theme='mithila'] .project-card h3 { grid-column: 1; font-size: 23px; margin: 0; }
html[data-theme='mithila'] .project-card > p { grid-column: 1; max-width: 65ch; }
html[data-theme='mithila'] .project-outcome { grid-column: 2; grid-row: 2 / span 2; align-content: start; margin: 0; padding: 0; border: 0; }
html[data-theme='mithila'] .project-card details { grid-column: 1 / -1; border: 0; padding: 0; }
html[data-theme='mithila'] .card-grid .card { border: 0; border-bottom: 1px solid var(--muted); border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme='mithila'] .card-grid .hoverable:hover { transform: none; box-shadow: none; }
html[data-theme='mithila'] .post-card__img { border: 1px solid var(--muted); background: white; }
html[data-theme='mithila'] .post-card__body { padding: 20px 0; }
html[data-theme='mithila'] .post-card__tag { color: var(--accent-red); }
html[data-theme='mithila'] .skill-group { border-top: 2px solid var(--accent-blue); padding-top: 16px; }
html[data-theme='mithila'] .skill-chips span { background: transparent; padding: 0 8px 0 0; }
html[data-theme='mithila'] .site-footer { border-top: 5px double var(--pencil); }

@media (max-width: 850px) {
  .site-nav__inner { gap: 12px; }
  .nav-links { display: none; }
  .theme-picker { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .nav-mobile.is-open { display: flex; }
  .error-theme .theme-picker { margin-left: 0; }
  html[data-theme='mithila'] .masthead > .wrap { padding-left: 80px; padding-right: 80px; }
  html[data-theme='mithila'] .masthead > .wrap::before,
  html[data-theme='mithila'] .masthead > .wrap::after { width: 60px; }
}
@media (max-width: 600px) {
  html[data-theme='mithila'] body::before,
  html[data-theme='mithila'] body::after { width: 8px; background-size: 8px 100px; }
  html[data-theme='mithila'] .masthead > .wrap { padding-left: 26px; padding-right: 26px; }
  html[data-theme='mithila'] .masthead > .wrap::before,
  html[data-theme='mithila'] .masthead > .wrap::after { width: 48px; height: 110px; top: 50px; }
  html[data-theme='mithila'] .name-row h1 { font-size: 52px; }
  html[data-theme='mithila'] .project-card { grid-template-columns: minmax(0,1fr); }
  html[data-theme='mithila'] .project-outcome { grid-column: 1; grid-row: auto; margin-top: 8px; }
}