/* ==========================================================================
   Tokens
   Palette first, then the semantic names components should prefer.
   ========================================================================== */

:root {
  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-300: #a5b4fc;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --yellow-400: #facc15;
  --amber-500: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --color-primary: var(--indigo-600);
  --color-primary-strong: var(--indigo-700);
  --color-accent: var(--yellow-400);
  --color-accent-strong: var(--amber-500);
  --color-bg: var(--gray-50);
  --color-surface: #fff;
  --color-border: var(--gray-200);
  --color-heading: var(--gray-900);
  --color-text: var(--gray-800);
  --color-text-muted: var(--gray-600);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  --container: 80rem;
  --gutter: clamp(1rem, 3vw, 2rem);
  --header-height: 4rem;
  --ease: 300ms ease;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-height);
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.5;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--color-heading);
  line-height: 1.2;
  text-wrap: balance;
}

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

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

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: #fff;
  translate: 0 -200%;
}

.skip-link:focus {
  translate: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: 64rem;
}

.container--narrow {
  max-width: 56rem;
}

.page {
  padding-block: 3rem;
}

.stack-xl > * + * {
  margin-top: 5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 2rem;
}

.grid--tight {
  gap: 1.5rem;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--color-primary);
}

/* ==========================================================================
   Site header & footer
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-height);
}

.site-header__brand {
  color: var(--color-primary);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.site-header__toggle {
  display: grid;
  place-items: center;
  padding: 0.5rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: none;
  color: var(--color-text-muted);
}

/* Small screens: the nav is a popover menu opened by the toggle button. */
.site-nav {
  inset: var(--header-height) 0 auto;
  width: 100%;
  margin: 0;
  padding: 0.5rem var(--gutter) 1rem;
  border: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.site-nav__list {
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding-block: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
  transition: color var(--ease);
}

.site-nav__link:hover,
.site-nav__link[aria-current] {
  color: var(--color-primary);
}

.site-nav__link[aria-current] {
  font-weight: 700;
}

@media (width >= 48rem) {
  .site-header__toggle {
    display: none;
  }

  /* Wide screens: undo the popover so the nav is always shown inline. */
  .site-nav {
    display: block;
    position: static;
    width: auto;
    padding: 0;
    background: none;
    box-shadow: none;
  }

  .site-nav__list {
    display: flex;
    gap: 2rem;
  }

  .site-nav__link {
    padding-block: 0.25rem;
    border-bottom: 2px solid transparent;
  }

  .site-nav__link[aria-current] {
    border-bottom-color: currentcolor;
  }
}

.site-footer {
  padding-block: 2rem;
  background: var(--gray-900);
  color: #fff;
  text-align: center;
}

/* ==========================================================================
   Typography helpers
   ========================================================================== */

.page-header {
  margin-bottom: 3rem;
}

.page-header h1 {
  margin-bottom: 1rem;
  font-size: var(--text-4xl);
  font-weight: 800;
}

.page-header--center {
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 4rem;
  text-align: center;
}

.page-header--center h1 {
  font-size: var(--text-5xl);
}

.lead {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

.section-title {
  margin-bottom: 3rem;
  text-align: center;
}

.section-title h2 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 700;
  transition: color var(--ease);
}

.section-title .lead {
  margin-top: 1rem;
  font-size: var(--text-xl);
}

.eyebrow {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.underlined-heading {
  display: inline-block;
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--color-accent);
  font-size: var(--text-2xl);
  font-weight: 700;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* ==========================================================================
   Icons
   ========================================================================== */

.icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.icon--lg {
  width: 1.5rem;
  height: 1.5rem;
}

.icon--xl {
  width: 2rem;
  height: 2rem;
}

.icon--2xl {
  width: 2.5rem;
  height: 2.5rem;
}

.icon--3xl {
  width: 4rem;
  height: 4rem;
}

.icon-badge {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  padding: 0.75rem;
  border-radius: var(--radius-full);
  background: var(--indigo-50);
  color: var(--color-primary);
}

.icon-badge--plain {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--gray-400);
}

.icon-badge--xl {
  padding: 1.5rem;
}

/* ==========================================================================
   Buttons & badges
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: #fff;
  font-weight: 500;
  transition: background-color var(--ease), color var(--ease), translate var(--ease);
}

.button:hover {
  background: var(--color-primary-strong);
}

.button--lg {
  padding-inline: 2rem;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
}

.button--xl {
  padding: 1rem 2rem;
  box-shadow: var(--shadow-lg);
  font-size: var(--text-lg);
}

.button--lift:hover {
  translate: 0 -0.25rem;
}

.button--soft {
  width: 100%;
  padding: 0.5rem 1rem;
  background: var(--indigo-50);
  box-shadow: none;
  color: var(--color-primary);
  font-size: var(--text-sm);
}

.button--soft:hover {
  background: var(--color-primary);
  color: #fff;
}

.button--accent {
  background: var(--color-accent);
  color: var(--color-heading);
}

.button--accent:hover {
  background: var(--color-accent-strong);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* A divider separates the buttons from whatever follows them. */
.actions:not(:last-child) {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-100);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--indigo-100);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.badge--outline {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: none;
  color: var(--gray-400);
  letter-spacing: 0.05em;
}

.badge--date {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--indigo-50);
  font-size: var(--text-sm);
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}

/* ==========================================================================
   Avatar
   ========================================================================== */

.avatar {
  aspect-ratio: 1;
  border: 4px solid var(--color-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  object-fit: cover;
}

.avatar--lg {
  width: 16rem;
}

.avatar--md {
  width: 12rem;
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
  transition: scale var(--ease);
}

.avatar--md:hover {
  scale: 1.05;
}

/* Yellow disc peeking out from behind the photo. */
.avatar--offset {
  box-shadow: 0.75rem 0.75rem 0 var(--color-accent), var(--shadow-xl);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  transition: translate var(--ease), box-shadow var(--ease);
}

.card__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  transition: color var(--ease);
}

/* The card's main link (or button) stretches over the whole card. */
.card__link {
  padding: 0;
  border: 0;
  background: none;
  font-weight: inherit;
  text-align: inherit;
}

.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card__link:focus-visible {
  outline: none;
}

.card__link:focus-visible::after {
  border-radius: var(--radius-xl);
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.card__footer {
  margin-top: auto;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  transition: background-color var(--ease);
}

.card--interactive:hover {
  box-shadow: var(--shadow-2xl);
}

.card--interactive:hover .card__title {
  color: var(--color-primary);
}

.card--interactive:hover .card__footer {
  background: var(--indigo-50);
}

.card--lift:hover {
  translate: 0 -0.5rem;
}

.card--placeholder {
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  border: 2px dashed var(--gray-300);
  background: var(--gray-50);
  box-shadow: none;
  color: var(--gray-400);
  text-align: center;
}

.card--placeholder h2 {
  margin-top: 0.5rem;
  color: inherit;
  font-size: var(--text-xl);
}

.card--wide {
  grid-column: 1 / -1;
  padding-block: 3rem;
}

/* Course card (College page) */
.course-card::before {
  content: "";
  height: 0.5rem;
  background: var(--color-primary);
}

.course-card__body {
  display: grid;
  gap: 0.5rem;
  padding: 2rem;
  color: var(--color-text-muted);
}

.course-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: var(--gray-400);
}

.course-card:hover .course-card__meta .icon {
  color: var(--color-primary);
}

/* Essay card (course overview) */
.essay-card {
  gap: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
}

.essay-card .card__title {
  font-size: var(--text-xl);
  font-weight: 600;
}

.essay-card__icon {
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

.essay-card__summary {
  margin-bottom: 0.5rem;
  color: var(--gray-500);
  font-size: var(--text-sm);
}

/* Event card (Community page) */
.event-card__cover {
  height: 12rem;
  overflow: hidden;
  background: var(--color-border);
}

.event-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: scale 500ms ease;
}

.event-card:hover .event-card__cover img {
  scale: 1.05;
}

.event-card__body {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem;
  color: var(--color-text-muted);
}

.event-card .card__footer {
  text-align: center;
}

.event-card .link-arrow {
  font-size: var(--text-sm);
}

/* Document card (Annotations pages) */
.doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  transition: box-shadow var(--ease);
}

/* Yellow corner accent. */
.doc-card::before {
  content: "";
  position: absolute;
  top: -2rem;
  right: -2rem;
  width: 4rem;
  height: 4rem;
  background: var(--color-accent);
  opacity: 0.2;
  rotate: 45deg;
  transition: opacity var(--ease);
}

.doc-card:hover {
  box-shadow: var(--shadow-xl);
}

.doc-card:hover::before {
  opacity: 0.4;
}

.doc-card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.doc-card__title {
  font-size: var(--text-xl);
  font-weight: 700;
}

.doc-card__author {
  margin-bottom: 0.25rem;
  color: var(--color-heading);
  font-weight: 700;
}

.doc-card__description {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.doc-card__links {
  display: grid;
  gap: 0.25rem;
}

/* ==========================================================================
   Sheet: the large white panel used for essays, annotations, etc.
   ========================================================================== */

.sheet {
  position: relative;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--indigo-100);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-2xl);
}

.sheet__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.sheet__header .icon-badge {
  background: var(--indigo-100);
}

.sheet__heading {
  font-size: var(--text-3xl);
  font-weight: 700;
}

.sheet__subtitle {
  color: var(--gray-500);
}

.sheet__close {
  margin-left: auto;
  color: var(--gray-400);
  transition: color var(--ease);
}

.sheet__close:hover {
  color: var(--color-text-muted);
}

.sheet__title {
  margin-block: 1rem 0.5rem;
  color: var(--color-primary);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
  font-weight: 800;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-primary);
}

.back-link:hover {
  text-decoration: underline;
}

/* About page */
.prose > * + * {
  margin-top: 1.5rem;
}

.prose p {
  color: var(--gray-700);
  font-size: var(--text-lg);
}

.prose h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  color: var(--color-text);
  font-size: var(--text-xl);
  font-weight: 600;
}

.prose h2 .icon {
  color: var(--color-accent);
}

/* Google Docs page */
.drive {
  padding: 2.5rem;
  text-align: center;
}

.drive .sheet__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.drive .icon-badge {
  margin-bottom: 1.5rem;
}

.drive .lead {
  margin-block: 1rem 2rem;
}

/* ==========================================================================
   Tabs (essay versions, community years)
   ========================================================================== */

.tabs__list {
  display: flex;
  gap: 1rem;
  margin-block: 1rem 1.5rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--color-border);
}

.tabs__tab {
  padding: 0.5rem 1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: color var(--ease), border-color var(--ease), background-color var(--ease);
}

.tabs__tab:hover,
.tabs__tab[aria-selected="true"] {
  color: var(--color-primary);
}

.tabs__tab[aria-selected="true"] {
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.tabs__panel {
  animation: fade-in 300ms ease-in-out;
}

.tabs__panel > * + * {
  margin-top: 2rem;
}

.tabs--pills .tabs__list {
  margin-block: 0 2.5rem;
  padding-bottom: 1rem;
}

.tabs--pills .tabs__tab {
  padding: 0.5rem 1.5rem;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-500);
  font-weight: 500;
}

.tabs--pills .tabs__tab:hover {
  background: var(--color-border);
}

.tabs--pills .tabs__tab[aria-selected="true"] {
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: #fff;
  font-weight: 700;
}

@keyframes fade-in {
  from {
    opacity: 0;
    translate: 0 5px;
  }
}

/* ==========================================================================
   Paper: essay text styled like a printed page
   ========================================================================== */

.paper {
  max-width: 56rem;
  margin-inline: auto;
  padding: clamp(1.25rem, 5vw, 3rem);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: #000;
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 2;
}

.paper h2 {
  margin-bottom: 2rem;
  color: inherit;
  font-size: var(--text-xl);
  text-align: center;
}

.paper p {
  text-indent: 2rem;
}

.paper--plain p {
  margin-bottom: 1.25rem;
  text-indent: 0;
}

.paper--citations p {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  text-indent: -2rem;
}

.paper__figure {
  margin-block: 2.5rem;
}

.paper__figure img {
  margin-inline: auto;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Professor's comments */
.callout {
  max-width: 56rem;
  margin-inline: auto;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.callout h2 {
  margin-bottom: 1.5rem;
  color: inherit;
  font-size: var(--text-xl);
  text-align: center;
}

.callout p + p {
  margin-top: 1.25rem;
}

/* ==========================================================================
   Page sections
   ========================================================================== */

/* Home */
.home {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 3rem;
  margin-block: auto;
  text-align: center;
}

.home__heading {
  margin-bottom: 1.5rem;
  font-size: clamp(var(--text-4xl), 6vw, var(--text-5xl));
  font-weight: 800;
}

.home__lead {
  margin-bottom: 2rem;
  color: var(--color-text-muted);
  font-size: var(--text-xl);
  line-height: 1.625;
}

/* Course header bar */
.course-bar {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.course-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1rem;
}

.course-bar__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-size: var(--text-xl);
  font-weight: 700;
}

.course-bar__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.course-bar__nav a {
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.course-bar__nav a:hover,
.course-bar__nav a[aria-current] {
  color: var(--color-primary);
}

.course-bar__nav a[aria-current] {
  border-bottom-color: currentcolor;
}

/* Course profile hero */
.profile-card {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 2.5rem;
  padding: 2rem;
  border: 1px solid var(--indigo-100);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-2xl);
  text-align: center;
}

.profile-card__heading {
  margin-bottom: 1rem;
  font-size: clamp(var(--text-4xl), 6vw, var(--text-5xl));
  font-weight: 800;
}

.profile-card .lead {
  margin-bottom: 1.5rem;
}

@media (width >= 48rem) {
  .home,
  .profile-card {
    grid-template-columns: 1fr 2fr;
    justify-items: start;
    text-align: left;
  }

  .home > .avatar,
  .profile-card > .avatar {
    justify-self: center;
  }
}

/* Growth teaser (Academic Reading & Writing overview) */
.growth-teaser {
  display: block;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--indigo-200);
  border-radius: var(--radius-xl);
  background: var(--indigo-50);
  box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  transition: scale var(--ease), box-shadow var(--ease);
}

.growth-teaser:hover {
  scale: 1.01;
  box-shadow: var(--shadow-xl);
}

.growth-teaser:hover h2 {
  color: var(--color-primary);
}

.growth-teaser__stages {
  display: grid;
  gap: 2.5rem;
  padding: 0;
  list-style: none;
}

.growth-teaser__stages li {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-xl);
  color: var(--color-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
}

@media (width >= 48rem) {
  .growth-teaser__stages {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Connector line between stages. */
  .growth-teaser__stages li + li::before {
    content: "";
    position: absolute;
    top: 50%;
    right: calc(100% + 2px);
    width: 2.5rem;
    height: 2px;
    background: var(--indigo-300);
  }
}

/* Growth timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 3rem;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 1.25rem;
  width: 2px;
  background: var(--indigo-200);
  translate: -50%;
}

.timeline__item {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-items: center;
  gap: 1.5rem;
}

.timeline__marker {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid var(--color-surface);
  border-radius: var(--radius-full);
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
}

.timeline__card {
  padding: 2rem;
  border: 1px solid var(--indigo-100);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  color: var(--color-text-muted);
  line-height: 1.625;
  transition: box-shadow var(--ease);
}

.timeline__card:hover {
  box-shadow: var(--shadow-2xl);
}

.timeline__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: var(--text-2xl);
  font-weight: 700;
}

@media (width >= 48rem) {
  .timeline::before {
    left: 50%;
  }

  .timeline__item {
    grid-template-columns: 1fr 2.5rem 1fr;
  }

  .timeline__marker {
    grid-area: 1 / 2;
  }

  .timeline__item:nth-child(odd) .timeline__card {
    grid-area: 1 / 3;
  }

  .timeline__item:nth-child(even) .timeline__card {
    grid-area: 1 / 1;
  }
}

/* Resume */
.resume__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 2rem;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.resume__name {
  margin-bottom: 0.5rem;
  font-size: var(--text-4xl);
  font-weight: 800;
}

.resume__headline {
  color: var(--color-primary);
  font-weight: 500;
}

.resume__contact {
  display: grid;
  gap: 0.25rem;
  padding: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  list-style: none;
}

.resume__contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resume__contact .icon {
  width: 1rem;
  height: 1rem;
}

.resume__contact a:hover {
  color: var(--color-primary);
}

.resume__section {
  margin-bottom: 2rem;
  color: var(--gray-700);
  line-height: 1.625;
}

.resume__columns {
  display: grid;
  gap: 2rem;
}

.resume__languages ul {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

@media (width >= 48rem) {
  .resume__columns {
    grid-template-columns: 3fr 1fr;
  }

  .resume__languages {
    text-align: right;
  }
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.skills li {
  display: grid;
  place-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-full);
  background: var(--indigo-50);
  color: var(--indigo-700);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.job {
  margin-top: 1.5rem;
  padding-left: 1.5rem;
  border-left: 4px solid var(--indigo-100);
}

.job__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.job__company {
  color: var(--color-text);
  font-size: var(--text-xl);
  font-weight: 700;
}

.job__role {
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  font-weight: 500;
}

.job__bullets {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

.job__bullets + .job__role {
  margin-top: 1.5rem;
}

.education {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.education__item {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}

.education__item h3 {
  font-size: var(--text-base);
  font-weight: 700;
}

.education__dates {
  margin-block: 0.25rem 0.5rem;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* ==========================================================================
   Event dialog (Community)
   ========================================================================== */

.event-dialog {
  width: min(56rem, 100% - 2rem);
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  transition: opacity var(--ease), scale var(--ease);
}

@starting-style {
  .event-dialog[open] {
    opacity: 0;
    scale: 0.95;
  }
}

.event-dialog::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(4px);
}

.event-dialog__banner {
  position: relative;
  height: 16rem;
}

.event-dialog__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-dialog__heading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  background: linear-gradient(to top, rgb(0 0 0 / 0.7), transparent);
  color: var(--gray-200);
}

.event-dialog__heading h2 {
  margin-bottom: 0.5rem;
  color: #fff;
  font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
}

.event-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  padding: 0.5rem;
  border: 0;
  border-radius: var(--radius-full);
  background: rgb(255 255 255 / 0.2);
  backdrop-filter: blur(12px);
  color: #fff;
  transition: background-color var(--ease);
}

.event-dialog__close:hover {
  background: rgb(255 255 255 / 0.4);
}

.event-dialog__body {
  padding: clamp(1.5rem, 5vw, 2rem);
}

.event-dialog__description {
  color: var(--gray-700);
  font-size: var(--text-lg);
  line-height: 1.625;
}

.event-dialog__link {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
  text-align: center;
}

.event-dialog__gallery-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block: 2rem 1rem;
  font-size: var(--text-xl);
  font-weight: 700;
}

.event-dialog__gallery-title .icon {
  color: var(--color-primary);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 0;
  list-style: none;
}

@media (width >= 48rem) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}

.gallery a:hover {
  box-shadow: var(--shadow-md);
}

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-border);
  object-fit: cover;
}

/* ==========================================================================
   Motion & print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .course-bar {
    display: none;
  }
}
