/* ==========================================================================
   Daniel Perlaky — design tokens
   ========================================================================== */

:root {
  --color-bg: #f6f5f2;
  --color-surface: #ffffff;
  --color-ink: #17171a;
  --color-ink-soft: #55534d;
  --color-ink-faint: #8a887f;
  --color-border: #e2e0d8;
  --color-accent: #fedd01;
  --color-accent-ink: #17171a;
  --color-link: #17171a;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1120px;
  --gutter: 24px;
  --radius: 10px;
  --radius-sm: 6px;

  --header-h: 76px;
}

/* Per-page background tints — desert chaparral palette, each about as
   light as the original neutral grey, like colored stock in a printed book. */
body.page-home     { --color-bg: #eef3f5; } /* light sky */
body.page-about    { --color-bg: #eef2ea; } /* light sage */
body.page-projects { --color-bg: #f0ecf7; } /* light lilac */
body.page-speaking { --color-bg: #f5eee6; } /* light clay */

/* ==========================================================================
   Reset
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

ul { padding: 0; list-style: none; }

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

a { color: inherit; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

html, body { height: 100%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-ink-soft);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; }

h1, h2, h3, h4 {
  color: var(--color-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p { max-width: 68ch; }

a {
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

a.inline-link {
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  transition: background-color 0.15s ease;
}

a.inline-link:hover { background-color: var(--color-accent); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.logo img { height: 26px; width: auto; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.site-nav.is-open { max-height: 320px; }

.site-nav ul {
  padding: 8px var(--gutter) 16px;
}

.site-nav a {
  display: block;
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}

.site-nav li:last-child a { border-bottom: 0; }

.site-nav a:hover,
.site-nav a.active { color: var(--color-ink); background-color: var(--color-accent); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    background: none;
    border-bottom: 0;
  }

  .site-nav ul {
    display: flex;
    gap: 4px;
    padding: 0;
  }

  .site-nav a {
    border-bottom: 0;
    border-radius: 999px;
    padding: 8px 14px;
  }
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */

.hero {
  padding: 0 0 64px;
}

.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero-portrait {
  justify-self: start;
  width: 220px;
}

.hero-copy h1 {
  font-size: clamp(28px, 5vw, 42px);
  margin-bottom: 20px;
}

.hero-copy p {
  font-size: 17px;
  margin-bottom: 16px;
}

.hero-copy p a { color: var(--color-ink); text-decoration-color: var(--color-accent); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  background: var(--color-surface);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover { border-color: var(--color-accent); background-color: var(--color-accent); }

.btn.btn-primary {
  background: var(--color-ink);
  color: #fff;
  border-color: var(--color-ink);
}

.btn.btn-primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}

@media (min-width: 720px) {
  .hero .wrap { grid-template-columns: 240px 1fr; align-items: start; }
  .hero-copy { padding-top: 56px; }
  .hero-portrait { justify-self: start; width: 100%; }
}

/* ==========================================================================
   Page hero (about / projects / speaking)
   ========================================================================== */

.page-hero {
  padding: 48px 0 8px;
}

.page-hero h1 {
  font-size: clamp(26px, 4.2vw, 36px);
  max-width: 46ch;
}

/* ==========================================================================
   Prose columns (about)
   ========================================================================== */

.prose-columns {
  padding-top: 32px;
  padding-bottom: 16px;
  display: grid;
  gap: 32px;
}

.prose-columns p { max-width: none; margin-bottom: 16px; font-size: 15px; }

@media (min-width: 860px) {
  .prose-columns { grid-template-columns: 1fr 1fr; gap: 48px; }
}

.pull-quote {
  margin: 40px 0 56px;
  padding: 24px 28px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.5;
  max-width: 68ch;
}

/* ==========================================================================
   Cards (projects / speaking)
   ========================================================================== */

.section {
  padding-top: 32px;
  padding-bottom: 32px;
}

.section-title {
  font-size: 22px;
  margin-bottom: 20px;
}

.category-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
  margin: 0 0 16px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.category-heading:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card.is-placeholder {
  background: transparent;
  border-style: dashed;
}

.card.is-placeholder p {
  font-style: italic;
  color: var(--color-ink-faint);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-media {
  aspect-ratio: 16 / 9;
  background: var(--color-border);
}

.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card h3, .card h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.card p { font-size: 14.5px; margin-bottom: 10px; }

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ink-soft);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 12px;
}

.project-figure {
  margin-top: 8px;
}

.project-figure img { border-radius: var(--radius); }

.project-figure figcaption {
  font-size: 13px;
  font-style: italic;
  color: var(--color-ink-faint);
  margin-top: 8px;
}

/* ==========================================================================
   Speaking topics
   ========================================================================== */

.topic-list {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .topic-list { grid-template-columns: 1fr 1fr; }
}

.topic {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
}

.topic h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.topic p { font-size: 14.5px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
  padding: 28px 0 40px;
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--color-ink-faint);
}

.footer-links a {
  color: var(--color-ink-soft);
  text-decoration: none;
  margin-right: 14px;
}

.footer-links a:hover { color: var(--color-ink); }

@media (min-width: 640px) {
  .site-footer .wrap { flex-direction: row; justify-content: space-between; align-items: center; }
}

