
/* @font-face {
  font-display: swap;font-family: 'DM Sans';font-style: normal;font-weight: 300;
  src: url('/fonts/dm-sans-v17-latin_latin-ext-300.woff2') format('woff2');
}

@font-face {
  font-display: swap;font-family: 'DM Sans';font-style: italic;font-weight: 300;
  src: url('/fonts/dm-sans-v17-latin_latin-ext-300italic.woff2') format('woff2');
} */

/* @font-face {
  font-display: swap;font-family: 'DM Sans';font-style: normal;font-weight: 400;
  src: url('/fonts/dm-sans-v17-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap; font-family: 'DM Sans'; font-style: italic; font-weight: 400;
  src: url('/fonts/dm-sans-v17-latin_latin-ext-italic.woff2') format('woff2');
}

@font-face {
  font-display: swap;font-family: 'DM Sans';font-style: normal;font-weight: 500;
  src: url('/fonts/dm-sans-v17-latin_latin-ext-500.woff2') format('woff2'); 
} */

/* @font-face {
  font-display: swap; font-family: 'DM Sans'; font-style: normal; font-weight: 300;
  src: url('/fonts/dm-sans-v17-latin-300.woff2') format('woff2');
}

@font-face {
  font-display: swap; font-family: 'DM Sans'; font-style: italic; font-weight: 300;
  src: url('/fonts/dm-sans-v17-latin-300italic.woff2') format('woff2');
} */

/* 
@font-face {
  font-display: swap;font-family: 'DM Mono';font-style: normal;font-weight: 400;
  src: url('/fonts/dm-mono-v16-latin_latin-ext-regular.woff2') format('woff2');
} */

/* @font-face {
  font-display: swap;font-family: 'DM Mono';font-style: normal;font-weight: 500;
  src: url('/fonts/dm-mono-v16-latin_latin-ext-500.woff2') format('woff2');
} */


@font-face {
  font-display: swap; font-family: 'DM Serif Display'; font-style: normal; font-weight: 400;
  src: url('/fonts/dm-serif-display-v17-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;font-family: 'DM Serif Display';font-style: italic;font-weight: 400;
  src: url('/fonts/dm-serif-display-v17-latin-italic.woff2') format('woff2');
}

@font-face {
  font-display: swap; font-family: 'DM Sans'; font-style: normal; font-weight: 400;
  src: url('/fonts/dm-sans-v17-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap; font-family: 'DM Sans';font-style: italic;font-weight: 400;
  src: url('/fonts/dm-sans-v17-latin-italic.woff2') format('woff2');
}

@font-face {
  font-display: swap;font-family: 'DM Sans';font-style: normal;font-weight: 500;
  src: url('/fonts/dm-sans-v17-latin-500.woff2') format('woff2');
}

@font-face {
  font-display: swap;font-family: 'DM Sans';font-style: normal;font-weight: 600;
  src: url('/fonts/dm-sans-v17-latin_latin-ext-600.woff2') format('woff2');
}

@font-face {
  font-display: swap; font-family: 'DM Mono'; font-style: normal; font-weight: 400;
  src: url('/fonts/dm-mono-v16-latin-regular.woff2') format('woff2');
}

/* =====================================================
    SHARED TOKENS — spacing, type, radii, shadows
    These never change between themes.
===================================================== */
:root {
  --sp-xs:  clamp(0.5rem,  1vw,   0.625rem);
  --sp-sm:  clamp(0.75rem, 1.5vw, 1rem);
  --sp-md:  clamp(1.25rem, 2.5vw, 1.75rem);
  --sp-lg:  clamp(2rem,    4vw,   3rem);
  --sp-xl:  clamp(3rem,    6vw,   5rem);
  --sp-2xl: clamp(5rem,    9vw,   8rem);

  --t-xs:   clamp(0.85rem,  1.4vw, 0.875rem);
  --t-sm:   clamp(0.875rem, 1.7vw, 0.9375rem);
  --t-base: clamp(1rem,     1.9vw, 1.0625rem);
  --t-md:   clamp(1.125rem, 2.2vw, 1.25rem);
  --t-lg:   clamp(1.375rem, 2.8vw, 1.625rem);
  --t-xl:   clamp(1.75rem,  3.8vw, 2.25rem);
  --t-2xl:  clamp(2.25rem,  5vw,   3.25rem);
  --t-3xl:  clamp(3rem,     6.5vw, 4.5rem);

  --r-sm: 5px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
  --max-w: 1100px;
  --prose: 65ch;


  /* Typography */
  --f-display: 'DM Serif Display', serif;
  --f-body: 'DM Sans', sans-serif;
  --f-mono: 'DM Mono', monospace;
}

/* =====================================================
    LIGHT THEME TOKENS
===================================================== */
[data-theme="light"] {
  color-scheme: light;

  /* Brand accents */
  --accent-hero:     #ED6B1F;
  --accent:          #be5619;
  --accent-eyebrow:  #C25311;
  --accent-mid:      #F07E3A;
  --accent-light:    #FDE9D5;
  --accent-pale:     #FEF5ED;
  --accent-dark:     #AF4912;
  --accent-dim:      #FEF5ED;   /* tinted panel bg */
  --accent-border:   rgba(237,107,31,.18);

  /* --teal:            #2A9E96; */
  --teal:            rgb(18, 123, 116);
  --teal-mid:        #3AB8AE;
  --teal-light:      #CCF0ED;
  --teal-pale:       #EBF9F8;
  --teal-dark:       #0D726C;
  --teal-darker:     #0b655f;
  --teal-dim:        #EBF9F8;   /* tinted panel bg */
  --teal-border:     rgba(42,158,150,.18);

  /* Surfaces */
  --bg:              #FFFCF8;
  --bg-raised:       #F5F0EA;
  --surface:         #FFFCF8;
  --surface-hi:      #EBF9F8;

  /* Borders */
  --border:          #E8E2D8;
  --border-strong:   #CAC2B5;

  /* Text */
  --text-primary:    #1E1B18;
  --text-secondary:  #44403B;
  --text-soft:       #6B6560;
  --text-muted:      #776b5b;

  /* Header backdrop */
  --header-bg:       rgba(255,253,253,.74);

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(30,27,24,.06);
  --sh-sm: 0 2px 8px rgba(30,27,24,.08);
  --sh-md: 0 6px 24px rgba(30,27,24,.10);
  --sh-lg: 0 16px 56px rgba(30,27,24,.12);

  /* Icon tints */
  --icon-orange-bg:  #FDE9D5;
  --icon-orange-fg:  #C05419;
  --icon-teal-bg:    #CCF0ED;
  --icon-teal-fg:    #1c756d;
  --icon-stone-bg:   #F5F0EA;
  --icon-stone-fg:   #6B6560;
  --icon-border:     transparent;

  /* Code spans */
  --code-bg:         #CCF0ED;
  --code-fg:         #1c756d;
  --code-n-bg:       #F5F0EA;
  --code-n-fg:       #6B6560;

  /* Link colours for panels */
  --link-teal:       #1c756d;
  --link-teal-hov:   hsl(175, 61%, 28%);
  --link-orange:     hsl(21, 75%, 41%);
  --link-orange-hov: hsl(21, 75%, 31%);
  --link-neutral:    hsl(27, 5%, 40%);
  --link-neutral-hov:hsl(27, 5%, 30%);

  /* Footer */
  --footer-bg:       #1E1B18;
  --footer-text:     rgba(255,255,255,.62);
  --footer-muted:    rgba(255,255,255,.46);
  --footer-subtle:   rgba(255,255,255,.50);
  --footer-border:   rgba(255,255,255,.1);
  --footer-heading:  rgba(255,255,255,.70);

  /* Theme toggle appearance */
  --toggle-bg:       #F5F0EA;
  --toggle-border:   #E8E2D8;
  --toggle-fg:       #6B6560;
  --toggle-hover-bg: #E8E2D8;

  /* Stat numbers, section eyebrows */
  --stat-num:        #DF6721;
}

/* =====================================================
    DARK THEME TOKENS
===================================================== */
[data-theme="dark"] {
  color-scheme: dark;

  /* Brand accents */
  --accent-hero:     #F2813A;
  --accent:          #BC5919;
  --accent-eyebrow:  #c95e19;
  --accent-mid:      #F09060;

  --accent-light:    #3D1E08;
  --accent-pale:     #2A1608;
  --accent-dark:     #F09060;
  --accent-dim:      #2A1608;
  --accent-border:   #5C2E10;

  --teal:            #3DC4BB;
  --teal-mid:        #5DD4CB;
  --teal-light:      #0F3330;
  --teal-pale:       #081E1C;
  --teal-dark:       #5DD4CB;
  --teal-dim:        #081E1C;
  --teal-border:     #154840;

  /* Surfaces */
  --bg:              #141210;
  --bg-raised:       #1C1916;
  --surface:         #242018;
  --surface-hi:      #2C2620;

  /* Borders */
  --border:          #38322A;
  --border-strong:   #50473E;

  /* Text */
  --text-primary:    #EDE8E0;
  --text-secondary:  #A89E94;
  --text-soft:       #91857c;
  --text-muted:      #938573;

  /* Header backdrop */
  --header-bg:       hsla(30, 11%, 3%, 0.75);

  /* Shadows */
  --sh-xs: 0 1px 3px rgba(0,0,0,.35);
  --sh-sm: 0 2px 10px rgba(0,0,0,.4);
  --sh-md: 0 6px 28px rgba(0,0,0,.5);
  --sh-lg: 0 16px 56px rgba(0,0,0,.65);

  /* Icon tints */
  --icon-orange-bg:  #2A1608;
  --icon-orange-fg:  #F2813A;
  --icon-teal-bg:    #081E1C;
  --icon-teal-fg:    #3DC4BB;
  --icon-stone-bg:   #1C1916;
  --icon-stone-fg:   #A89E94;
  --icon-border:     transparent;

  /* Code spans */
  --code-bg:         #0F3330;
  --code-fg:         #3DC4BB;
  --code-n-bg:       #1C1916;
  --code-n-fg:       #A89E94;

  --link-teal:       #5DD4CB;
  --link-teal-hov:   hsl(175, 58%, 70%);
  --link-orange:     hsl(20, 83%, 66%);
  --link-orange-hov: hsl(20, 83%, 76%);
  --link-neutral:    hsl(26, 9%, 70%);
  --link-neutral-hov:hsl(26, 9%, 80%);

  /* Footer — slightly lighter than bg to read as distinct */
  --footer-bg:       #1C1916;
  --footer-text:     #A89E94;
  --footer-muted:    #8c8071;

  --footer-subtle:   #8F7F6C;
  --footer-border:   #38322A;
  --footer-heading:  #917F6A;

  /* Theme toggle appearance */
  --toggle-bg:       #242018;
  --toggle-border:   #38322A;
  --toggle-fg:       #A89E94;
  --toggle-hover-bg: #2C2620;

  /* Stat numbers, section eyebrows */
  --stat-num:        #F2813A;
}

/* =====================================================
    SMOOTH THEME TRANSITIONS
    Only colour properties — avoids layout jank.
    Not applied to prefers-reduced-motion users.
===================================================== */
@media (prefers-reduced-motion: no-preference) {
  body, .site-header, .stat-strip, .section,
  .screenshot-section, .download-section,
  .recognition-section, .cta-section, .site-footer,
  .fc, .cat-row, .audience-item, .award-card,
  .panel, .dl-card, .pill {
    transition:
      background-color .25s ease,
      border-color .25s ease,
      color .25s ease;
  }
}

/* =====================================================
    RESET
===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration:.01ms!important;transition-duration:.01ms!important;animation-iteration-count:1!important; }
}

body {
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.75;
  color: var(--text-secondary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
ul  { list-style: none; }
a   { color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }

.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  background: var(--accent); color: #fff;
  font-family: var(--f-body); font-weight: 600; font-size: var(--t-sm);
  padding: .5rem 1.25rem; border-radius: 0 0 var(--r-md) var(--r-md);
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 0; }

.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: clamp(1.25rem,5vw,2.5rem); }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.icon { display:inline-block;vertical-align:middle;flex-shrink:0; }

/* =====================================================
    HEADER / NAV
===================================================== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap { display:flex;align-items:center;justify-content:space-between;gap:var(--sp-md);padding-block:clamp(.75rem,1.5vw,1rem); }

.logo-link { display:flex;align-items:center;gap:.625rem;text-decoration:none;flex-shrink:0; }
.logo-link img { height:clamp(34px,4.5vw,42px);width:auto; }
.logo-wordmark { font-family:var(--f-display);font-size:clamp(1.1rem,2.5vw,1.3rem);line-height:1;color:var(--text-primary);letter-spacing:-.01em; }
.logo-wordmark .edu   { color:var(--accent); }
.logo-wordmark .activ { color:var(--teal); }

.nav-list { display:flex;align-items:center;gap:clamp(.2rem,1.5vw,1.25rem); }
.nav-list a { font-size:var(--t-sm);font-weight:500;color:var(--text-soft);text-decoration:none;padding:.375rem .55rem;border-radius:var(--r-sm);transition:color .15s,background .15s;white-space:nowrap; }
.nav-list a:hover { color:var(--text-primary);background:var(--bg-raised); }
.nav-list a[aria-current="page"] { color:var(--accent-dark);background:var(--accent-dim); }

.nav-dl { font-weight:600!important;background:var(--accent)!important;color:#fff!important;padding:.4rem 1rem!important;border-radius:var(--r-pill)!important;transition:background .15s,box-shadow .15s!important; }
.nav-dl:hover { background:var(--accent-hero)!important;color:#fff!important;box-shadow:0 2px 8px rgba(237,107,31,.35)!important; }

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--toggle-bg);
  border: 1.5px solid var(--toggle-border);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--toggle-fg);
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.theme-toggle:hover { background:var(--toggle-hover-bg);border-color:var(--border-strong); }
.theme-toggle svg { pointer-events: none; }

/* Show correct icon per theme */
.theme-toggle .icon-sun  { display:none; }
.theme-toggle .icon-moon { display:block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display:block; }
[data-theme="dark"] .theme-toggle .icon-moon { display:none; }

/* Mobile hamburger */
.nav-toggle { display:none;align-items:center;justify-content:center;width:36px;height:36px;background:none;border:1.5px solid var(--border);border-radius:var(--r-md);cursor:pointer;color:var(--text-soft);transition:border-color .15s; }
.nav-toggle:hover { border-color:var(--border-strong); }
.nav-toggle svg { pointer-events:none; }

@media (max-width:780px) {
  .nav-toggle { display:flex; }
  .nav-list {
    display:none;position:absolute;top:calc(100% + 1px);inset-inline:0;
    flex-direction:column;align-items:stretch;gap:0;
    background:var(--bg);border-bottom:1px solid var(--border);
    box-shadow:var(--sh-md);padding:var(--sp-sm) var(--sp-md) var(--sp-md);
  }
  .nav-list.is-open { display:flex; }
  .nav-list a { padding:.625rem .75rem;border-radius:var(--r-md); }
  .nav-dl { text-align:center;margin-top:.5rem; }
}

/* =====================================================
    BUTTONS
===================================================== */
.btn { display:inline-flex;align-items:center;gap:.45em;font-family:var(--f-body);font-weight:600;font-size:var(--t-sm);line-height:1;padding:.75em 1.5em;border-radius:var(--r-pill);text-decoration:none;border:2px solid transparent;cursor:pointer;transition:transform .15s,box-shadow .15s,background .15s,color .15s,border-color .15s;white-space:nowrap; }
.btn:hover { transform:translateY(-1px); }
.btn:active { transform:translateY(0); }

.btn-primary { background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 2px 10px rgba(237,107,31,.28); }
.btn-primary:hover { background:var(--accent-hero);border-color:var(--accent-hero);color:#fff;box-shadow:0 4px 18px rgba(237,107,31,.4); }

.btn-outline { background:transparent;color:var(--text-primary);border-color:var(--border-strong); }
.btn-outline:hover { border-color:var(--text-soft);color:var(--text-primary);box-shadow:var(--sh-sm); }

.btn-teal { background:var(--teal);color:#fff;border-color:var(--teal); }
.btn-teal:hover { background:var(--teal-dark);border-color:var(--teal-dark);color:#fff;box-shadow:0 4px 16px rgba(42,158,150,.35); }
[data-theme="dark"] .btn-teal { color:var(--bg); }
[data-theme="dark"] .btn-teal:hover { color:var(--bg); }

/* =====================================================
    FOOTER
===================================================== */
.site-footer { background:var(--footer-bg);padding-block:var(--sp-xl) var(--sp-lg);border-top:1px solid var(--footer-border); }
.footer-grid { display:grid;grid-template-columns:1fr;gap:var(--sp-lg); }
@media (min-width:560px) { .footer-grid { grid-template-columns:1.6fr 1fr 1fr;gap:var(--sp-xl);align-items:start; } }
.footer-brand-name { font-family:var(--f-display);font-size:var(--t-lg);color:var(--footer-text);margin-bottom:.5rem; }
[data-theme="dark"] .footer-brand-name { color:var(--text-primary); }
.footer-brand-name .edu   { color:var(--accent-mid); }
.footer-brand-name .activ { color:var(--teal-mid); }
.footer-brand-desc { font-size:var(--t-sm);line-height:1.7;max-width:36ch;color:var(--footer-muted); }
.footer-col-heading { font-size:var(--t-xs);font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--footer-heading);margin-bottom:.875rem; }
.footer-links { display:flex;flex-direction:column;gap:.45rem; }
.footer-links a { font-size:var(--t-sm);color:var(--footer-text);text-decoration:none;transition:color .15s; }
.footer-links a:hover { color:#fff; }
[data-theme="dark"] .footer-links a:hover { color:var(--text-primary); }
.footer-bottom { margin-top:var(--sp-xl);padding-top:var(--sp-md);border-top:1px solid var(--footer-border);display:flex;flex-wrap:wrap;gap:.75rem var(--sp-md);align-items:center;justify-content:space-between; }
.footer-copy { font-size:var(--t-xs);color:var(--footer-muted); }
.footer-bottom-links { display:flex;gap:var(--sp-md); }
.footer-bottom-links a { font-size:var(--t-xs);font-weight:500;color:var(--footer-subtle);text-decoration:none;transition:color .15s; }
.footer-bottom-links a:hover { color:var(--footer-text); }
