/* Unify Portfolio — Gore-inspired cover + tile layout */

@import url("fonts.css");

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

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --bg-hover: #f0f0ee;
  --text: #0a0a0a;
  --text-muted: #6a6a6a;
  --text-faint: #9a9a9a;
  --border: #e6e6e4;
  --border-strong: #d0d0ce;
  --link: #0a0a0a;
  --max: 72rem;
  --prose: 42rem;
  --font: "PP Neue Montreal", system-ui, sans-serif;
  --radius: 14px;
  --radius-pill: 999px;
  --tracking-display-loosen: 0.4pt;
  --cover-ink: #ffffff;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover { opacity: 0.65; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg);
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 0;
  position: relative;
  z-index: 5;
}

.site-nav--cover {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-width: none;
  padding: 1.35rem clamp(1.25rem, 4vw, 2.75rem);
  margin: 0;
}

.site-nav--cover .site-nav__brand,
.site-nav--cover .site-nav__links a {
  color: var(--cover-ink);
}

.site-nav--cover .site-nav__links a {
  opacity: 0.85;
}

.site-nav--cover .site-nav__links a:hover {
  opacity: 1;
  color: var(--cover-ink);
}

.site-nav__brand {
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.site-nav__links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.site-nav__links a:hover { color: var(--text); opacity: 1; }

/* ========== Cover (100vh) ========== */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgb(23, 25, 28);
  color: var(--cover-ink);
}

.cover__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.cover__canvas,
.cover__video,
.cover__video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover__canvas {
  display: block;
  z-index: 0;
}

.cover__video {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.cover__video.is-ready {
  opacity: 1;
}

.cover__video video {
  background: transparent;
}

.cover__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.38) 100%);
  pointer-events: none;
}

.cover__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  max-width: 48rem;
}

.cover__label {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.cover__name {
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: calc(-0.04em + var(--tracking-display-loosen));
  color: #fff;
}

.cover__role {
  margin: 0;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}

.cover__intro {
  margin: 1.15rem auto 0;
  max-width: 36rem;
  font-size: clamp(0.88rem, 1.4vw, 0.98rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.cover__controls {
  position: absolute;
  bottom: 1.5rem;
  right: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 4;
}

.cover__pause {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.cover__pause:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.7);
}

.cover__pause[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.15);
}

.cover__scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  animation: cover-bounce 2.2s ease-in-out infinite;
}

.cover__scroll:hover {
  opacity: 1;
  color: #fff;
}

@keyframes cover-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

body.is-motion-paused .cover__scroll {
  animation: none;
}

/* ========== Project tiles ========== */
.project-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 6vh, 5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 10vw, 7rem);
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.project-row--text-right {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.project-row--text-right .project-row__copy {
  order: 2;
}

.project-row--text-right .project-row__media {
  order: 1;
}

.project-row__copy {
  min-width: 0;
}

.project-row__label {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.project-row__title {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: calc(-0.035em + var(--tracking-display-loosen));
  color: var(--text);
}

.project-row__body {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 28rem;
  letter-spacing: -0.015em;
}

.project-row__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
}

.project-row__cta:hover {
  opacity: 1;
  color: var(--text);
}

.project-row__media {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
  text-decoration: none;
}

.project-row__media img,
.project-row__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.45s ease;
}

.project-row__media:hover img,
.project-row__media:hover video {
  transform: scale(1.03);
}

/* Page shell (about + legacy) */
.page-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) 5rem;
}

.hero {
  padding: clamp(2.5rem, 8vh, 5rem) 0 clamp(2rem, 5vh, 3rem);
  max-width: 54rem;
}

.hero__statement {
  font-size: clamp(2.1rem, 5.8vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: calc(-0.045em + var(--tracking-display-loosen));
  font-weight: 500;
  margin: 0 0 1.75rem;
}

.hero__statement strong {
  font-weight: 600;
}

.hero__lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 0 2rem;
  letter-spacing: -0.02em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-pill:hover {
  opacity: 1;
  background: var(--bg-soft);
  border-color: var(--text);
}

.btn-pill__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-soft);
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  background: var(--bg);
}

/* Prose / context */
.section-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

.prose {
  max-width: var(--prose);
}

.prose--wide { max-width: 52rem; }

.prose h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  line-height: 1.15;
}

.prose h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.5rem;
}

.prose p { margin: 0 0 1rem; color: var(--text-muted); }

.prose ul, .prose ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.prose li { margin-bottom: 0.35rem; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0 1.5rem;
}

.prose th, .prose td {
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.75rem 0.55rem 0;
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 600;
  color: var(--text);
}

.prose td { color: var(--text-muted); }

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

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

.context-block {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.ai-sidebar {
  margin: 2rem 0 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-soft);
}

.ai-sidebar code {
  font-size: 0.85em;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}

.stats-row dt {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 0.2rem;
}

.stats-row dd {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* Footer */
.site-footer {
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--border);
}

.site-footer--home {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 5rem) clamp(1.25rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer__thanks {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.site-footer__contact {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.site-footer__contact a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
}

.site-footer__connect {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer__connect a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.site-footer__connect a:hover {
  color: var(--text);
  opacity: 1;
}

.site-footer__sign {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 2.5rem 0 0;
}

/* Case page visuals (shared) */
.bleed {
  width: 100%;
  max-width: 100%;
}

.hero-bleed {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 0;
  min-height: 0;
  background: transparent;
}

.hero-bleed img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  background: var(--bg-soft);
}

.media-bleed {
  margin: 2rem 0;
  background: transparent;
}

.media-bleed img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.annotated-caption {
  padding: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--text-faint);
  background: transparent;
  border: none;
  letter-spacing: -0.01em;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 2rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
}

.case-back:hover { color: var(--text); opacity: 1; }

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

  .cover__scroll {
    animation: none;
  }

  .cover__canvas {
    animation: none;
  }

  .project-row__media img,
  .project-row__media video {
    transition: none;
  }
}

body.is-motion-paused .cover__canvas {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .project-row,
  .project-row--text-right {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-row--text-right .project-row__copy,
  .project-row--text-right .project-row__media {
    order: unset;
  }

  .project-row__media {
    aspect-ratio: 4 / 3;
  }

  .project-row__body {
    max-width: none;
  }
}

@media (max-width: 640px) {
  html { font-size: 16px; }
  .site-nav__links { gap: 0.85rem; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .stats-row { gap: 1.25rem 2rem; }
  .cover__controls { bottom: 3.5rem; }
}
