/* =========================================================
   Bich Nguyen — TESOL Teaching Portfolio
   Design system: "proficiency scale" motif drawn from ACTFL
   levels (Novice → Intermediate → Advanced → Superior), which
   run through the syllabi and assessments in this portfolio.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Color */
  --bg: #F5F6F0;
  --bg-panel: #ECEEE3;
  --bg-panel-2: #E3E7D8;
  --white: #FFFFFF;
  --ink: #1B2A22;
  --ink-soft: #46564C;
  --teal: #2F6F62;
  --teal-dark: #1F4D44;
  --gold: #9C6B2B;       /* darkened from initial pick for AA text contrast */
  --gold-bg: #F1E4CC;
  --rule: #D7DBCB;
  --focus: #1857C9;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Scale */
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.8rem + 2.6vw, 3.6rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4.5rem;

  --radius: 6px;
  --max-w: 68rem;
  --max-w-text: 42rem;
}

/* ---------- Reset-lite ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin-top: 0;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0, "calt" 0, "hlig" 0;
}
h1 { font-size: var(--step-4); font-weight: 500; }
h2 { font-size: var(--step-3); margin-bottom: var(--space-2); }
h3 { font-size: var(--step-2); margin-bottom: var(--space-1); }
h4 { font-size: var(--step-1); margin-bottom: var(--space-1); }

p { margin: 0 0 var(--space-2); max-width: 68ch; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--gold); }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink);
  color: var(--white);
  padding: 0.75em 1.25em;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.prose { max-width: var(--max-w-text); }
.section { padding-block: var(--space-5); }
.section--tight { padding-block: var(--space-4); }
.section--panel { background: var(--bg-panel); }
.section--dark { background: var(--ink); color: var(--bg); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }
.section--dark a { color: #CFE8E0; }
.section--dark a:hover { color: var(--gold-bg); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--teal-dark);
  margin: 0 0 0.6em;
  display: block;
}
.section--dark .eyebrow { color: #9FCFC2; }

/* ---------- Proficiency-scale signature motif ---------- */
.scale-rule {
  display: flex;
  list-style: none;
  margin: var(--space-2) 0 var(--space-4);
  padding: 0;
  gap: 0;
  border-top: 2px solid var(--rule);
  flex-wrap: wrap;
}
.scale-rule li {
  flex: 1 1 auto;
  position: relative;
  padding: 0.9em 0.4em 0 0;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  min-width: 7rem;
}
.scale-rule li::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--teal);
}
.scale-rule li:nth-child(1)::before { background: #7FA98F; }
.scale-rule li:nth-child(2)::before { background: var(--teal); }
.scale-rule li:nth-child(3)::before { background: var(--teal-dark); }
.scale-rule li:nth-child(4)::before { background: var(--gold); }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 0.9rem;
}
.site-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}
.site-title small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.site-title:hover { color: var(--teal-dark); }

.nav-toggle {
  display: none;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 0.5em 0.8em;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.3em 0.1em;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--teal-dark); border-color: var(--gold); }
.site-nav a[aria-current="page"] {
  color: var(--teal-dark);
  border-color: var(--teal);
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
  }
  .site-nav.is-open { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; gap: 0.1rem; padding-block: 0.6rem; }
  .site-nav a { display: block; padding: 0.6em 0.1em; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--space-5) var(--space-4);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: var(--space-4);
  align-items: center;
}
.hero h1 { margin-bottom: 0.3em; }
.hero .role {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--teal-dark);
  margin-bottom: var(--space-2);
}
.hero .lede { font-size: 1.1rem; color: var(--ink-soft); }
.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -22px rgba(27,42,34,0.45);
}
.hero-photo img { width: 100%; }

@media (max-width: 780px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { max-width: 260px; margin-inline: auto; }
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: var(--space-3); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.3em;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid var(--teal-dark);
}
.btn--primary { background: var(--teal-dark); color: var(--white); }
.btn--primary:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }
.btn--ghost { background: transparent; color: var(--teal-dark); }
.btn--ghost:hover { background: var(--bg-panel); color: var(--teal-dark); }
.section--dark .btn--ghost { border-color: #9FCFC2; color: #CFE8E0; }
.section--dark .btn--ghost:hover { background: rgba(255,255,255,0.08); }

/* ---------- Cards / grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}
.card h3 { font-size: 1.2rem; margin: 0; }
.card p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.card a.card-link {
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
}
.card a.card-link::after { content: " →"; }

/* ---------- Document / resource blocks ---------- */
.resource {
  border: 1px solid var(--rule);
  border-left: 5px solid var(--teal);
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.resource h3 { margin-bottom: 0.2em; }
.resource .meta {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 0.5em;
}
.resource .download {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.7em;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--teal-dark);
  border: 1px solid var(--teal-dark);
  padding: 0.5em 0.9em;
  border-radius: var(--radius);
}
.resource .download:hover { background: var(--teal-dark); color: var(--white); }
.resource .download .filesize { font-weight: 400; opacity: 0.8; }

/* ---------- Tables ---------- */
.data-table-wrap { overflow-x: auto; margin: var(--space-2) 0 var(--space-3); }
table.data-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  background: var(--white);
  font-size: 0.92rem;
}
table.data-table caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.5em;
  color: var(--ink-soft);
}
table.data-table th, table.data-table td {
  border: 1px solid var(--rule);
  padding: 0.6em 0.8em;
  text-align: left;
  vertical-align: top;
}
table.data-table thead th {
  background: var(--bg-panel-2);
  color: var(--ink);
}

/* ---------- Pull quote / feedback ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}
blockquote.feedback-quote {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
}
blockquote.feedback-quote footer {
  margin-top: 0.6em;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.stat {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-2);
  text-align: center;
}
.stat .num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--teal-dark);
  font-weight: 600;
}
.stat .label { font-size: 0.8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Placeholder box (video/calendar) ---------- */
.placeholder-box {
  border: 2px dashed var(--rule);
  border-radius: var(--radius);
  padding: var(--space-3);
  color: var(--ink-soft);
  background: var(--bg-panel);
}
.placeholder-box strong { color: var(--ink); }

/* ---------- Video embeds ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.video-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: var(--ink);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-card-body { padding: var(--space-2) var(--space-3) var(--space-3); }
.video-card-body h3 { font-size: 1.05rem; margin-bottom: 0.3em; }
.video-card-body p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ---------- Definition-style list for beliefs/outcomes ---------- */
.belief-list { list-style: none; padding: 0; margin: var(--space-3) 0 0; }
.belief-list li {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--rule);
}
.belief-list li:first-child { border-top: none; }
.belief-list h3 { margin-bottom: 0.3em; }

.belief-list--numbered { counter-reset: belief; }
.belief-list--numbered li {
  padding-left: 2.6rem;
  position: relative;
  counter-increment: belief;
}
.belief-list--numbered li::before {
  content: counter(belief);
  position: absolute;
  left: 0;
  top: var(--space-2);
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--teal-dark);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding-block: var(--space-4);
}
.site-footer a { color: #CFE8E0; }
.site-footer a:hover { color: var(--gold-bg); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-3);
}
.footer-grid h2 { font-size: 1.1rem; color: var(--white); margin-bottom: 0.5em; }
.footer-note { margin-top: var(--space-3); font-size: 0.82rem; color: #A9B7AE; border-top: 1px solid #33453B; padding-top: var(--space-2); }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.mt-0 { margin-top: 0; }
.text-soft { color: var(--ink-soft); }
