/* —— Design tokens —— */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-faint: #a8a29e;
  --accent: #b91c1c;
  --accent-hover: #991b1b;
  --border: #e7e5e4;
  --radius: 10px;
  --font: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --max-width: 40rem;
  --header-h: 4rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* —— Header —— */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 1.5rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

@supports not (backdrop-filter: blur(10px)) {
  .header {
    background: var(--bg);
    border-bottom-color: var(--border);
  }
}

.logo {
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  justify-content: flex-end;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

/* —— Main —— */
main {
  flex: 1;
  width: 100%;
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* —— Hero (first screen) —— */
.hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 2rem 0 3rem;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
  background: var(--bg);
  scroll-margin-top: 0;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(87, 83, 78, 0.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(87, 83, 78, 0.28) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.75;
  mask-image: radial-gradient(circle at 35% 40%, #000 0%, rgba(0, 0, 0, 0.5) 60%, transparent 90%);
}

.hero-inner {
  width: 100%;
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

.hero-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-name {
  color: var(--accent);
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 32rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero-scroll-hint:hover {
  color: var(--accent);
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 2rem;
  background: linear-gradient(
    to bottom,
    var(--accent),
    transparent
  );
  opacity: 0.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-faint);
  background: var(--bg);
}

/* —— Sections —— */
.section {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
  padding: 2.75rem 0;
  border-top: 1px solid var(--border);
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 4.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.section-text {
  margin: 0;
  max-width: var(--max-width);
  color: var(--text-muted);
}

.section-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.section-text a:hover {
  color: var(--accent-hover);
}

.projects-placeholder {
  font-style: italic;
  color: var(--text-faint);
}

.project-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.project-card {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent);
}

.project-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.project-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 0.85rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-faint);
  background: color-mix(in srgb, var(--text) 5%, var(--bg));
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

.course-list {
  margin: 0;
  padding-left: 1.15rem;
  list-style: disc;
}

.course-list li {
  margin-bottom: 0.5rem;
}

.course-list li:last-child {
  margin-bottom: 0;
}

.contact-link {
  font-weight: 500;
  color: var(--text) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--border);
}

.contact-link:hover {
  color: var(--accent) !important;
  border-bottom-color: var(--accent);
}

.contact-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-faint);
  font-style: italic;
}

/* —— Footer —— */
.footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

@media (min-width: 640px) {
  .header {
    padding: 0 2rem;
  }

  main {
    padding: 0 2rem 5rem;
  }

  .hero {
    padding: 2.5rem 0 3.5rem;
  }

  .hero-inner {
    padding: 0 2rem;
  }

  .contact-note {
    display: inline;
    margin-top: 0;
    margin-left: 0.35rem;
  }
}
