:root {
  --bg: #14110e;
  --ink: #14110e;
  --text: #e8e2d8;
  --muted: #8a8074;
  --surface: #1b1713;
  --line: rgba(232, 226, 216, 0.1);
  --fade: #14110e;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Bricolage Grotesque", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.55;
}

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

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

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 6vw;
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}

.wordmark {
  --wordmark-lit: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 13px;
  line-height: 1.15;
  color: var(--text);
  opacity: calc(0.42 + var(--wordmark-lit) * 0.58);
  text-shadow: 0 0 calc(var(--wordmark-lit) * 16px) color-mix(in srgb, var(--text) calc(var(--wordmark-lit) * 45%), transparent);
}

@media (hover: none), (prefers-reduced-motion: reduce) {
  .wordmark {
    --wordmark-lit: 1;
    text-shadow: none;
  }
}

.nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.95rem;
}

.nav a[aria-current="page"] {
  color: var(--text);
}

.nav a:not([aria-current="page"]) {
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

.section {
  padding: 2.5rem 6vw 1rem;
}

.kicker,
.section-title {
  margin: 0 0 1rem;
}

.kicker {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 560;
}

.block {
  margin-bottom: 3.2rem;
}

.h-track-wrap {
  position: relative;
}

.h-track-wrap::before,
.h-track-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3.2rem;
  pointer-events: none;
  z-index: 2;
  opacity: 1;
}

.h-track-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--fade), transparent);
}

.h-track-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--fade), transparent);
}

.h-track-wrap.is-start::before,
.h-track-wrap.is-end::after {
  opacity: 0;
}

.h-track {
  overflow-x: auto;
  padding: 0.2rem 0;
  scroll-snap-type: x proximity;
  cursor: grab;
  overscroll-behavior-x: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.h-track::-webkit-scrollbar {
  display: none;
}

.h-track.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.h-track-inner {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding: 0 1.4rem 0.4rem;
}

.h-track .tile {
  flex: 0 0 16.5rem;
  scroll-snap-align: start;
}

.h-track .tile img,
.h-track .tile-video {
  -webkit-user-drag: none;
  user-select: none;
}

.h-track .tile.nda {
  flex-basis: 12.4rem;
}

.tile.nda {
  position: relative;
  pointer-events: none;
  cursor: default;
  opacity: 0.5;
}

.tile.nda img {
  filter: saturate(0.42);
}

.tile.nda::after {
  content: "";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.15rem;
  height: 1.15rem;
  pointer-events: none;
  opacity: 0.62;
  filter: drop-shadow(0 0 3px rgba(20, 17, 14, 0.7));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8e2d8' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.nda-note,
.section-blurb {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.section-blurb {
  margin: -0.25rem 0 1.1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tile {
  display: block;
  color: inherit;
}

.tile img,
.tile-video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--line);
}

.tile-video {
  display: block;
  pointer-events: none;
  max-width: 100%;
  height: auto;
}

.tile-video::-webkit-media-controls {
  display: none !important;
}

.tile-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.tile:not(.nda):hover .tile-label {
  color: var(--text);
}

.contact {
  padding-bottom: 5rem;
}

.contact-title {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 560;
}

.email-copy {
  display: inline-block;
  padding: 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

.email-copy:hover,
.email-copy.copied {
  color: var(--text);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  margin: 1.2rem 0 0.8rem;
}

.contact-links a {
  color: var(--muted);
}

.contact-links a:hover {
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.about-page {
  padding: 1.5rem 6vw 5rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr 1fr;
  grid-template-areas:
    "portrait copy personal"
    "giphy giphy personal";
  gap: 2.4rem;
  align-items: start;
  align-content: start;
}

.portrait {
  grid-area: portrait;
  margin: 0;
}

.copy {
  grid-area: copy;
}

.personal {
  grid-area: personal;
}

.portrait-hang {
  position: relative;
  transform-origin: 50% 3%;
  animation: portrait-sway 12s ease-in-out infinite;
}

.portrait-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 626 / 781;
  pointer-events: none;
}

.portrait-photo {
  position: absolute;
  z-index: 0;
  top: 15.7%;
  left: 16%;
  width: 64.5%;
  height: 50.6%;
  object-fit: cover;
  object-position: center top;
  background: transparent;
  border: 0;
}

@keyframes portrait-sway {
  0%,
  100% {
    transform: rotate(-1.2deg);
  }

  50% {
    transform: rotate(1.2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-hang {
    animation: none;
  }
}

.about-page .contact {
  margin-top: 3.5rem;
  padding: 0 0 0.5rem;
}

.copy h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
}

.role {
  margin: 0;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
}

.status {
  margin: 0.75rem 0 0.15rem;
}

.bio,
.hobby,
.how p,
.credit,
.tools {
  color: var(--muted);
}

.bio + .bio {
  margin-top: 0.7rem;
}

.personal > .credit-walk {
  display: none;
}

.personal:has(.tile.is-active[data-credit]) > .credit:not(.credit-walk) {
  display: none;
}

.personal:has(.tile.is-active[data-credit]) > .credit-walk {
  display: block;
}

.hobby {
  margin-top: 1rem;
}

.how {
  margin-top: 1.8rem;
}

.how h2 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  font-weight: 560;
  color: var(--text);
}

.how p {
  margin: 0 0 0.7rem;
}

.tools {
  margin-top: 1.4rem;
}

.personal,
.personal-carousel,
.personal-list,
.personal .tile {
  min-width: 0;
}

.personal-list {
  display: grid;
  gap: 1rem;
}

.personal .tile {
  display: block;
}

.personal .tile-video {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}

.personal .tile[hidden] {
  display: none;
}

.personal-nav {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.65rem;
}

.personal-nav button {
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
}

.personal-nav button:hover {
  color: var(--text);
}

.giphy-block {
  grid-area: giphy;
  margin-top: 2rem;
  min-width: 0;
}

.giphy-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0 0 1rem;
}

.giphy-head .kicker {
  margin: 0;
}

.giphy-views {
  font-size: 0.78rem;
}

.giphy-views:hover {
  color: var(--text);
}

.giphy-strip {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.giphy-strip::-webkit-scrollbar {
  display: none;
}

.giphy-strip a,
.giphy-strip img {
  flex: 0 0 auto;
  height: 110px;
  width: auto;
  background: var(--surface);
}

@media (max-width: 980px) {
  .about-layout {
    grid-template-columns: 1fr 1.2fr;
    grid-template-areas:
      "portrait copy"
      "personal personal"
      "giphy giphy";
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .site-header,
  .section,
  .about-page {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .about-layout,
  .grid {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-areas:
      "portrait"
      "copy"
      "personal"
      "giphy";
  }

  .h-track-wrap:not(.h-track-wrap--stack)::before,
  .h-track-wrap:not(.h-track-wrap--stack)::after {
    width: 2rem;
  }

  .h-track-wrap--stack::before,
  .h-track-wrap--stack::after {
    display: none;
  }

  .h-track-wrap--stack .h-track {
    overflow: visible;
    padding: 0;
    cursor: default;
  }

  .h-track-wrap--stack .h-track-inner {
    display: block;
    width: auto;
    padding: 0;
  }

  .h-track-wrap--stack .tile,
  .h-track-wrap--stack .tile.nda {
    flex: none;
    width: 100%;
    margin-bottom: 1rem;
  }
}
