:root {
  --bg: #f3f4f6;
  --surface: rgba(255, 255, 255, 0.98);
  --surface-strong: #ffffff;
  --ink: #000000;
  --muted: #000000;
  --accent: #64748b;
  --accent-deep: #334155;
  --line: rgba(15, 23, 42, 0.12);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 16px;
  --max-width: 1180px;
}

body[data-theme="forest"] {
  --accent: #5f7a63;
  --accent-deep: #35523a;
}

body[data-theme="oxblood"] {
  --accent: #7f4a4a;
  --accent-deep: #5a2c2c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "EB Garamond", Garamond, Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 18%, transparent), transparent 22%),
    linear-gradient(180deg, #f7f7f8 0%, #f1f3f5 50%, #eceff2 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 20%);
  pointer-events: none;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 24px auto 48px;
}

.hero,
.section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}

.hero {
  min-height: auto;
  padding: 20px 24px 22px;
}

.hero::after,
.section::after {
  content: "";
  position: absolute;
  inset: auto auto -70px -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(51, 65, 85, 0.035), transparent 70%);
  pointer-events: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 6px 14px;
  position: relative;
  border-bottom: 3px solid var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex: 1;
}

.brand,
.nav-links a,
.button,
.story-card a {
  text-decoration: none;
}

.brand {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.1;
  padding-right: 10px;
  text-shadow: none;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-deep) 32%, transparent);
  padding-bottom: 2px;
}

.brand.brand-intro {
  animation: brand-pulse 780ms ease-out;
}

.brand.brand-intro-strong {
  animation:
    brand-sweep-reveal 1540ms cubic-bezier(0.19, 1, 0.22, 1),
    brand-lettersettle 1480ms ease-out,
    brand-underline-settle 1180ms ease-out;
}

.brand::before {
  content: "";
  position: absolute;
  left: 0;
  right: 34%;
  bottom: -2px;
  height: 2px;
  background: color-mix(in srgb, var(--accent-deep) 38%, transparent);
  transform-origin: left center;
}

.brand::after {
  content: "";
  position: absolute;
  top: -22%;
  bottom: -22%;
  left: -30%;
  width: 30%;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 0%, transparent),
    color-mix(in srgb, var(--accent) 32%, transparent),
    rgba(255, 255, 255, 0.6),
    color-mix(in srgb, var(--accent) 32%, transparent),
    color-mix(in srgb, var(--accent) 0%, transparent)
  );
  transform: translateX(-220%) skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}

.brand.brand-intro-strong::before {
  animation: brand-underline-reveal 1120ms cubic-bezier(0.19, 1, 0.22, 1);
}

.brand.brand-intro-strong::after {
  animation: brand-shine 1560ms ease-out 180ms;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent-deep) 22%, transparent);
  background: #ffffff;
  transform: translateY(-2px);
}

.social-links svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-links .social-fill {
  fill: currentColor;
  stroke: none;
}

.linkedin-glyph {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.09em;
  transform: translateY(-0.5px);
  color: #0a66c2;
}

.nav-links a {
  font-family: "Roboto Slab", Georgia, serif;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 9px 13px;
  border-radius: 999px;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.story-card a:hover,
.story-card a:focus-visible,
.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--accent-deep);
}

.nav-links a.is-current {
  background: var(--accent-deep);
  color: #ffffff;
}

.hero-content {
  max-width: 760px;
  padding: 4vh 6px 3vh;
  animation: rise-in 720ms ease both;
}

.home-hero-content {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 320px;
  gap: 26px;
  align-items: center;
}

.home-hero-copy {
  max-width: 760px;
}

.home-hero-image-shell {
  display: flex;
  justify-content: flex-end;
}

.home-hero-image {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  object-fit: cover;
}

.eyebrow,
.section-kicker,
.card-type,
.placeholder-label {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.98;
}

h1,
h2 {
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 24ch;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.home-title {
  max-width: 34ch;
  font-size: clamp(1.85rem, 2.7vw, 2.45rem);
  white-space: normal;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 13ch;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-family: "Roboto Slab", Georgia, serif;
}

p,
li,
a,
code,
strong,
span {
  line-height: 1.6;
}

code {
  font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
}

.hero-copy,
.section-heading,
.statement-card p,
.video-placeholder p:last-child,
.story-card p:not(.card-type) {
  font-size: 0.96rem;
  color: var(--muted);
}

.hero-copy {
  max-width: 58ch;
  margin: 14px 0 0;
}

.home-note {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.home-note a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-deep) 24%, transparent);
}

.home-note a:hover,
.home-note a:focus-visible {
  color: var(--accent-deep);
  border-color: var(--accent-deep);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-family: "Roboto Slab", Georgia, serif;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.button-secondary {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.04);
}

.button-primary:hover,
.button-primary:focus-visible,
.button-secondary:hover,
.button-secondary:focus-visible,
.story-button:hover,
.story-button:focus-visible {
  background: var(--accent-deep);
  color: #ffffff;
  border-color: var(--accent-deep);
}

.section {
  margin-top: 20px;
  padding: 28px;
  border-radius: 4px;
}

main {
  margin-top: 22px;
  padding-top: 0;
}

main .section:first-child {
  margin-top: 0;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 30px;
}

.about-layout {
  padding: 22px 24px;
}

.about-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  gap: 20px;
  align-items: start;
}

.about-main,
.about-side {
  display: grid;
  gap: 14px;
}

.about-main h2 {
  max-width: none;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.08;
}

.about-lead {
  max-width: 60ch;
  font-size: 1.05rem;
}

.about-lead p {
  margin: 0 0 10px;
  line-height: 1.56;
}

.about-card,
.video-placeholder,
.reel-notes,
.story-card,
.resume-card {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-strong);
}

.about-card {
  padding: 22px;
}

.about-photo-card {
  display: grid;
  gap: 0;
  align-self: start;
}

.about-photo {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  object-fit: cover;
  justify-self: end;
}

.about-focus-card {
  max-width: 44ch;
  padding: 14px 16px;
}

.detail-card h3 {
  margin-bottom: 10px;
}

.detail-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.about-focus-card li + li {
  margin-top: 4px;
}

.reel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.reel-card {
  display: grid;
  gap: 10px;
}

.reel-card h2 {
  font-size: clamp(1.18rem, 1.8vw, 1.45rem);
  max-width: none;
  line-height: 1.08;
}

.works-section .section-heading h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  max-width: none;
}

.home-sections .section-heading h2 {
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  max-width: none;
}

.video-placeholder {
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.98)),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent-deep) 6%, transparent),
      color-mix(in srgb, var(--accent-deep) 2%, transparent)
    );
}

.video-placeholder p:last-child {
  max-width: 28ch;
  margin: 0 auto;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hub-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-strong);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.hub-card:hover,
.hub-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent-deep) 4%, white);
  box-shadow: 0 14px 28px rgba(21, 34, 57, 0.08);
}

.story-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.story-card a {
  color: var(--ink);
  font-weight: 800;
}

.story-title-link {
  color: var(--ink);
  text-decoration: none;
}

.story-title-link:hover,
.story-title-link:focus-visible {
  color: var(--ink);
}

.story-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: fit-content;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-deep) 4%, white);
}

.theme-picker {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.theme-picker button {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 6px;
  font: 600 0.78rem "Roboto Slab", Georgia, serif;
  cursor: pointer;
}

.theme-picker button.is-active {
  border-color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent-deep) 8%, white);
}

.article-hero {
  min-height: auto;
}

.article-hero .hero-content {
  max-width: 1100px;
  padding: 2.5vh 6px 2vh;
}

.article-hero h1 {
  max-width: 34ch;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-transform: none;
  color: var(--ink);
}

.article-hero .hero-copy {
  max-width: 72ch;
  margin-top: 10px;
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  color: var(--muted);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
}

.article-section {
  max-width: 980px;
}

.article-copy {
  display: grid;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 72ch;
  font-size: 1.08rem;
  line-height: 1.55;
  letter-spacing: 0;
}

.article-copy p {
  margin: 0;
  line-height: 1.55;
}

.article-button {
  width: fit-content;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.resume-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, 290px);
  gap: 14px;
  align-items: start;
}

.resume-pdf-shell {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-strong);
  overflow: hidden;
  width: 100%;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.resume-pdf-frame {
  display: block;
  width: 100%;
  min-height: 340px;
  border: 0;
  background: #ffffff;
}

.resume-summary-card {
  gap: 10px;
  padding: 10px 12px;
}

.resume-summary-card h2 {
  max-width: none;
  font-size: clamp(1.22rem, 1.7vw, 1.55rem);
}

.resume-summary-card p {
  max-width: 42ch;
}

.resume-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-quick-links .button {
  min-height: 38px;
  padding: 0 14px;
}

.resume-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
}

.resume-meta {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.resume-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.resume-section .section-heading {
  margin-bottom: 16px;
}

.resume-section h2 {
  max-width: 18ch;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.resume-section p {
  margin: 0;
}

.resume-section .resume-list li {
  margin-bottom: 2px;
}

.resume-section {
  padding: 18px;
}

.resume-section h3 {
  font-size: 1.02rem;
}

.resume-section .card-type {
  margin-bottom: 4px;
  font-size: 0.68rem;
}

.inline-code {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(23, 34, 53, 0.04);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes brand-pulse {
  0% {
    transform: translateY(2px) scale(0.97);
    opacity: 0.72;
  }

  42% {
    transform: translateY(-1px) scale(1.03);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes brand-pulse-strong {
  0% {
    transform: translateY(8px);
    opacity: 0.22;
  }

  38% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes brand-sweep-reveal {
  0% {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(8px);
    clip-path: inset(0 100% 0 0 round 0);
  }

  22% {
    opacity: 0.05;
    transform: translateY(4px);
    filter: blur(7px);
    clip-path: inset(0 88% 0 0 round 0);
  }

  52% {
    opacity: 0.92;
    transform: translateY(0);
    filter: blur(1px);
    clip-path: inset(0 16% 0 0 round 0);
  }

  74% {
    transform: translateY(-2px);
    opacity: 1;
    filter: blur(0);
    clip-path: inset(0 0 0 0 round 0);
  }

  88% {
    transform: translateY(1px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes brand-lettersettle {
  0% {
    letter-spacing: 0.11em;
  }

  100% {
    letter-spacing: 0.01em;
  }
}

@keyframes brand-underline-reveal {
  0% {
    transform: scaleX(0.08);
    opacity: 0;
  }

  54% {
    transform: scaleX(1.12);
    opacity: 1;
  }

  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes brand-underline-settle {
  0% {
    border-bottom-color: color-mix(in srgb, var(--accent-deep) 0%, transparent);
  }

  48% {
    border-bottom-color: color-mix(in srgb, var(--accent-deep) 88%, transparent);
  }

  100% {
    border-bottom-color: color-mix(in srgb, var(--accent-deep) 32%, transparent);
  }
}

@keyframes brand-shine {
  0% {
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0;
  }

  18% {
    opacity: 0.18;
  }

  34% {
    opacity: 1;
  }

  54% {
    opacity: 1;
  }

  100% {
    transform: translateX(620%) skewX(-18deg);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
  }

  .about-grid,
  .about-content-grid,
  .reel-grid,
  .resume-grid,
  .resume-top-grid,
  .cards,
  .hub-grid,
  .home-hero-content {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 13ch;
  }

  .home-hero-image-shell {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    margin: 10px auto 28px;
  }

  .hero,
  .section {
    border-radius: 24px;
  }

  .hero,
  .section {
    padding: 20px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand {
    order: 0;
    margin-left: 0;
    padding-right: 0;
  }

  .topbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-content {
    padding: 3vh 0 2vh;
  }

  .theme-picker {
    right: 10px;
    bottom: 10px;
    flex-wrap: wrap;
    max-width: calc(100vw - 20px);
  }

  h1 {
    font-size: clamp(2.9rem, 15vw, 4.4rem);
  }

  .home-title {
    white-space: normal;
    font-size: clamp(2.2rem, 9vw, 3.6rem);
  }

  h2 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .video-placeholder {
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
