@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
}

:root {
  --bone: #141413;
  --ink: #edece6;
  --ink-2: #c2c1b9;
  --hair: #34342f;
  --indigo: #b3befd;
  --indigo-soft: #1f2643;
  --pad: clamp(20px, 4vw, 40px);
  --maxw: 1056px;
  --surface: #1b1b19;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bone: #fbfbf9;
  --ink: #1a1a1a;
  --ink-2: #4a4a46;
  --hair: #dddbd4;
  --indigo: #2f4fb0;
  --indigo-soft: #e8ecf8;
  --surface: #f3f2ef;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--serif);
}

h1,
h2 {
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.625rem);
}

p {
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
}

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

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

::selection {
  background: var(--indigo-soft);
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.site-nav {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--hair);
}

.nav-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(20px, 4vw, 40px);
  min-height: 62px;
  height: 62px;
}

.wordmark {
  font-family: var(--serif);
  color: var(--indigo);
  font-size: clamp(19px, 2.7vw, 23px);
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1;
  white-space: nowrap;
}

.nav-sections {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: clamp(14px, 3vw, 28px);
}

.nav-sections a {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.nav-sections a {
  text-transform: uppercase;
  letter-spacing: 0.055em;
  display: inline-block;
  padding-block: 9px;
  border-bottom: 1px solid transparent;
}

.nav-sections a[aria-current="page"] {
  color: var(--indigo);
  border-color: currentColor;
}

.theme-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.theme-toggle:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.menu-toggle:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.menu-icon {
  display: block;
  width: 19px;
  height: 19px;
}

.menu-icon[hidden] {
  display: none;
}

.theme-icon {
  display: block;
  width: 19px;
  height: 19px;
}

.theme-icon[hidden] {
  display: none;
}


.portfolio,
.not-found {
  padding-block: clamp(36px, 5vw, 64px);
}

.intro {
  margin-bottom: 36px;
}

.intro p {
  margin-top: 12px;
}

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 192px);
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
}

.about-intro-copy {
  grid-column: 1;
  grid-row: 1;
}

.about-photo {
  display: block;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  justify-self: end;
  border: 1px solid var(--hair);
  border-radius: 50%;
  object-fit: cover;
}

.content-section {
  padding-block: 24px 32px;
  border-top: 1px solid var(--hair);
}

.site-footer {
  border-top: 1px solid var(--hair);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 32px;
  padding-block: 20px;
}

.site-footer h2 {
  font-size: 1.125rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.directory-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--hair);
  border-radius: 5px;
  background: var(--surface);
}

.directory-link:hover {
  border-color: var(--indigo);
}

.profile-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: var(--indigo-soft);
  color: var(--indigo);
}

.profile-monogram {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -0.06em;
}

.directory-arrow {
  margin-left: auto;
  color: var(--indigo);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.625rem);
}

.text-link {
  color: var(--indigo);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  overflow: hidden;
  border: 1px solid var(--hair);
  border-radius: 5px;
  background: var(--surface);
}

.blog-card:hover,
.blog-card:focus-visible {
  border-color: var(--indigo);
}

.blog-card > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.blog-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(22px, 3vw, 36px);
}

.blog-meta {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-copy h3 {
  margin: 14px 0 0;
  font-size: clamp(1.375rem, 2.7vw, 1.875rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.blog-copy > p:not(.blog-meta) {
  margin-top: 14px;
}

.blog-copy .text-link {
  margin-top: auto;
  padding-top: 22px;
}

.intro .text-link {
  display: inline-block;
  margin-top: 12px;
}

.post-list,
.video-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list {
  display: grid;
  gap: 16px;
  max-width: 72ch;
}

.post-card {
  padding: 16px 18px;
}

.content-section .post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: none;
}

.post-card:hover .post-text,
.post-card:focus-visible .post-text {
  color: var(--indigo);
}

.post-text {
  margin: 0 0 9px;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

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

.post-card,
.video-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--hair);
  border-radius: 5px;
  background: var(--surface);
}

.video-preview {
  position: relative;
  aspect-ratio: 16 / 9;
}

.video-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.video-duration {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #181729;
  color: #f4f3ff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.video-title {
  display: block;
  padding: 12px 14px 14px;
  font-size: 14px;
  line-height: 1.45;
}

.post-card:hover,
.post-card:focus-visible,
.video-card:focus-visible,
.video-card:hover {
  border-color: var(--indigo);
}

.video-card:hover .video-title,
.nav-inner a:hover,
.not-found a:hover {
  color: var(--indigo);
}

.work-status {
  margin-top: 0;
}

.not-found a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .nav-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    height: 62px;
    min-height: 62px;
    padding-block: 0;
  }

  .wordmark {
    grid-column: 1;
    grid-row: 1;
  }

  .nav-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
  }

  .nav-actions .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .menu-toggle {
    display: grid;
  }

  .nav-sections {
    position: absolute;
    top: calc(100% + 1px);
    right: var(--pad);
    left: var(--pad);
    z-index: 1;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: auto;
    gap: 4px 8px;
    padding: 8px;
    border: 1px solid var(--hair);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: var(--bone);
    box-shadow: 0 12px 28px rgb(0 0 0 / 18%);
  }

  .nav-inner.is-open .nav-sections {
    display: grid;
  }

  .nav-sections a {
    display: flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    padding: 10px 8px;
    font-size: 0.875rem;
    letter-spacing: 0.055em;
    line-height: 1.2;
    text-align: left;
  }

  .about-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .about-intro-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .about-photo {
    grid-column: 1;
    grid-row: 2;
    width: 120px;
    justify-self: start;
  }

  .blog-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-card > img {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .content-section .post-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .portfolio,
  .not-found {
    padding-block: 28px;
  }

  .intro {
    margin-bottom: 24px;
  }

  .content-section {
    padding-block: 20px 24px;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .post-card {
    padding: 14px 16px;
  }

  .post-text {
    line-height: 1.55;
  }

  .video-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
