/* Portfolio — Swiss / International Typographic Style */

:root {
  --bg: #000000;
  --bg-tint: #0a0a0a;
  --text: #ffffff;
  --text-muted: #9a9a9a;
  --separator: #4a4a4a;
  --sidebar-width: min(42vw, 520px);
  --layout-padding-top: clamp(2rem, 5vh, 4rem);
  --layout-padding-side: clamp(1.75rem, 4vw, 3.5rem);
  --gap: clamp(1.5rem, 3vw, 3rem);
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-title: "Nunito", "Varela Round", system-ui, sans-serif;
  --transition: 0.2s ease;
  --thumbnail-ratio: 4 / 3;
  --project-gap: 1.25rem;
  --project-content-max: 56rem;
  --projects-padding-x: clamp(0.75rem, 1.5vw, 1.5rem);
  --bg-pattern-color: #f088b8;
  --bg-pattern-opacity: 1;
  --bg-texture-opacity: 0.16;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  overflow-x: clip;
}

html::before,
html::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

html::before {
  z-index: 0;
  opacity: var(--bg-pattern-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3Cpattern id='g' width='72' height='72' patternUnits='userSpaceOnUse'%3E%3Cpath d='M72 0H0V72' fill='none' stroke='%23f088b8' stroke-opacity='0.05' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='1440' height='900' fill='url(%23g)'/%3E%3Ccircle cx='1210' cy='210' r='290' fill='none' stroke='%23f088b8' stroke-opacity='0.14' stroke-width='3'/%3E%3Ccircle cx='1210' cy='210' r='118' fill='%23f088b8' fill-opacity='0.05'/%3E%3Crect x='96' y='118' width='156' height='156' fill='none' stroke='%23f088b8' stroke-opacity='0.12' stroke-width='2'/%3E%3Crect x='96' y='118' width='78' height='78' fill='%23f088b8' fill-opacity='0.045'/%3E%3Crect x='0' y='404' width='380' height='32' fill='%23f088b8' fill-opacity='0.07'/%3E%3Crect x='348' y='404' width='32' height='148' fill='%23f088b8' fill-opacity='0.09'/%3E%3Cpolygon points='690,690 860,690 775,545' fill='none' stroke='%23f088b8' stroke-opacity='0.13' stroke-width='2'/%3E%3Cpolygon points='690,690 775,545 690,545' fill='%23f088b8' fill-opacity='0.04'/%3E%3Cpath d='M0 760A180 180 0 0 1 180 940H0Z' fill='%23f088b8' fill-opacity='0.055'/%3E%3Ccircle cx='930' cy='730' r='54' fill='%23f088b8' fill-opacity='0.08'/%3E%3Crect x='1080' y='520' width='220' height='24' fill='none' stroke='%23f088b8' stroke-opacity='0.1' stroke-width='2'/%3E%3Cline x1='1040' y1='490' x2='1320' y2='770' stroke='%23f088b8' stroke-opacity='0.09' stroke-width='2'/%3E%3Cline x1='1040' y1='770' x2='1320' y2='490' stroke='%23f088b8' stroke-opacity='0.06' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

html::after {
  z-index: 0;
  opacity: var(--bg-texture-opacity);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 12% 8%, rgba(240, 136, 184, 0.1), transparent 58%),
    radial-gradient(100% 85% at 88% 92%, rgba(232, 112, 168, 0.08), transparent 52%);
  background-repeat: repeat, no-repeat, no-repeat;
  background-size: 220px 220px, cover, cover;
}

body {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

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

ul,
ol {
  list-style: none;
}

/* Shared background across both columns */
.layout {
  min-height: 100vh;
  background: transparent;
}

.sidebar-header {
  width: 100%;
}

/* Fixed left column */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--layout-padding-top) var(--layout-padding-side);
  background: transparent;
  overflow: hidden;
}

.site-title {
  font-family: var(--font-title);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  max-width: 32ch;
  white-space: nowrap;
  width: max-content;
  cursor: default;
}

.sidebar-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 2.5rem;
}

.sidebar-nav li:not(:last-child)::after {
  content: "|";
  margin: 0 0.45rem;
  color: var(--separator);
  pointer-events: none;
}

.sidebar-nav a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.sidebar-nav a.is-active {
  color: var(--text);
  font-weight: 600;
}

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

.bio {
  max-width: 32ch;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.works-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--text);
}

.works-list {
  counter-reset: works;
  margin-bottom: 1.5rem;
}

.works-list li {
  counter-increment: works;
  margin-bottom: 0.2rem;
}

.works-list a {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.works-list a:hover {
  color: var(--text);
  font-weight: 600;
}

.layout:has(.project-detail) .works-list a.is-active {
  color: var(--text);
  font-weight: 600;
}

.works-list a::before {
  content: counter(works) ". ";
  font-variant-numeric: tabular-nums;
}

.specializations-list li {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.specializations-list li::before {
  content: counter(works) ". ";
  font-variant-numeric: tabular-nums;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.linkedin-link,
.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.linkedin-link:hover,
.email-link:hover {
  color: var(--text);
}

/* Gallery thumbnails — shared across Design, Photo, Experimental */
.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--project-gap);
}

.gallery .project {
  margin-bottom: 0;
  content-visibility: visible;
  contain-intrinsic-size: auto 28vw;
}

.gallery .project-link {
  display: block;
}

.gallery .project-media {
  position: relative;
  border-radius: 0.5rem;
}

.gallery .project-hover-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.gallery .project-hover-heading {
  margin: 0;
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
}

.gallery .project-link:hover .project-hover-overlay,
.gallery .project-link:focus-visible .project-hover-overlay {
  opacity: 1;
}

.gallery .project-media > img,
.gallery .project-media > .project-placeholder {
  border-radius: 0.5rem;
  filter: brightness(1);
  transition: filter 0.2s ease;
}

.gallery .project-link:hover .project-media > img,
.gallery .project-link:hover .project-media > .project-placeholder,
.gallery .project-link:focus-visible .project-media > img,
.gallery .project-link:focus-visible .project-media > .project-placeholder {
  opacity: 1;
  filter: brightness(0.68);
}

.gallery .project-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery .project-media--grounded-roots {
  transform: translateZ(0);
}

.gallery .project-media--grounded-roots > img {
  object-position: 80% 40%;
  transform: scale(1.2);
  transform-origin: 80% 40%;
  transition: filter 0.2s ease;
}

.gallery .project-media--sequoyah > img {
  object-position: 28% center;
}

/* Scrollable right column */
.projects {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--layout-padding-top) var(--projects-padding-x) clamp(2rem, 5vh, 3rem);
  background: transparent;
  scroll-behavior: auto;
  box-sizing: border-box;
}

/* Content width cap — never set width here; column sizing lives on .projects above */
.projects.gallery,
.projects.project-detail,
.projects.about-page {
  max-width: min(var(--project-content-max), 100%);
  min-width: 0;
}

.project {
  scroll-margin-top: 1rem;
}

.project-link {
  display: block;
  width: 100%;
  color: inherit;
}

.project-link:hover .project-media > img,
.project-link:hover .project-media > .project-placeholder,
.project-link:hover .project-media > video,
.project-link:focus-visible .project-media > img,
.project-link:focus-visible .project-media > .project-placeholder,
.project-link:focus-visible .project-media > video {
  opacity: 0.82;
}

.project-media {
  width: 100%;
  aspect-ratio: var(--thumbnail-ratio);
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    hsl(var(--hue, 280) 4% 16%) 0%,
    hsl(calc(var(--hue, 280) + 35) 6% 22%) 45%,
    hsl(calc(var(--hue, 280) + 70) 5% 14%) 100%
  );
}

.project-media > img,
.project-placeholder img {
  display: block;
  object-position: center;
}

.project-detail .project-media,
.project-detail .project-media > img,
.project-card-grid .project-media,
.project-card-grid .project-media > img {
  border-radius: 0;
}

.project-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: 2rem;
}

.project-page-number {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.project-page-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.project-page-body {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vh, 2rem);
}

.project-page-intro {
  color: var(--text);
  width: 100%;
}

.project-page-text {
  color: var(--text-muted);
  width: 100%;
}

.project-page-credit {
  color: var(--text-muted);
  width: 100%;
  margin: 0;
}

.project-page-credits {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.project-page-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.project-page-link:hover {
  opacity: 0.75;
}

.project-page-figure {
  margin: 0;
}

.project-page-spread-media {
  display: grid;
  gap: 0;
  width: 100%;
  overflow: hidden;
}

.project-page-spread-media > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: fill;
  display: block;
}

.project-detail .project-media {
  width: 100%;
  aspect-ratio: unset;
  height: auto;
  overflow: visible;
}

.project-detail .project-media > img {
  width: 100%;
  height: auto;
  object-fit: unset;
}

.project-detail .project-media > video,
.project-page-video {
  width: 100%;
  height: auto;
  display: block;
  background-color: var(--bg-tint);
}

.project-detail .project-placeholder {
  width: 100%;
  aspect-ratio: var(--thumbnail-ratio);
  height: auto;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns, 4), minmax(0, 1fr));
  gap: clamp(1rem, 2vh, 1.5rem);
  width: 100%;
}

.project-card-grid-item {
  margin: 0;
}

.project-card-grid .project-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card-grid .project-media > img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-card-grid--cover .project-media {
  overflow: hidden;
}

.project-card-grid--cover .project-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-grid--natural-aspect .project-media {
  aspect-ratio: unset;
  height: auto;
  overflow: visible;
}

.project-card-grid--natural-aspect .project-media > img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-page-caption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* About & static content pages */
.page-content {
  max-width: 52ch;
}

.about-page.page-content {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 1025px) {
  .about-page.page-content {
    min-height: calc(
      100vh - var(--layout-padding-top) - clamp(2rem, 5vh, 3rem)
    );
  }

  .about-carousel {
    margin-top: auto;
    flex-shrink: 0;
  }
}

.about-block {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.about-page .about-block h2 {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.about-page .about-block p {
  margin: 0 0 1rem;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-wrap: break-word;
  word-break: break-word;
}

.about-page .about-block p:last-child {
  margin-bottom: 0;
}

.about-page .about-block a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.about-page .about-block a:hover {
  color: var(--text-muted);
}

.about-inline-photo {
  display: none;
  margin: 0;
  overflow: hidden;
}

.about-inline-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-intro-lead {
  min-width: 0;
}

.about-intro-lead::after {
  content: "";
  display: block;
  clear: both;
}

.about-carousel {
  align-self: flex-start;
  min-width: 0;
  overflow: hidden;
  --about-marquee-gap: 0.375rem;
  --about-marquee-duration: 60s;
  --about-marquee-height: 12rem;
}

.about-carousel-track {
  display: flex;
  width: max-content;
  gap: var(--about-marquee-gap);
  height: var(--about-marquee-height);
  will-change: transform;
}

.about-carousel-track.is-ready {
  animation: about-marquee-scroll var(--about-marquee-duration) linear infinite;
}

.about-carousel-slide {
  flex: 0 0 auto;
  height: 100%;
  margin: 0;
}

.about-carousel-slide img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

@keyframes about-marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-1 * var(--about-marquee-distance, 50%)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-carousel-track {
    animation: none;
  }
}

.page-content h2 {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.page-content h2:not(:first-child) {
  margin-top: 2.5rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.page-content p:last-child {
  margin-bottom: 0;
}

.page-content a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.page-content a:hover {
  color: var(--text-muted);
}

/* Phone & tablet: stack columns, page scrolls normally */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 100%;
    --mobile-section-gap: clamp(2rem, 5vh, 3rem);
  }

  body {
    overflow: auto;
    height: auto;
  }

  .sidebar {
    display: contents;
  }

  .sidebar-header {
    order: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--layout-padding-top) var(--layout-padding-side)
      var(--mobile-section-gap);
  }

  .site-title {
    margin-left: auto;
    margin-right: auto;
  }

  .sidebar-nav ul {
    justify-content: center;
    margin-bottom: 0;
  }

  .sidebar-footer {
    order: 3;
    width: 100%;
    margin-top: 0;
    padding: 0 var(--layout-padding-side) clamp(2rem, 5vh, 3rem);
  }

  .bio,
  .works-index,
  .specializations-index {
    display: none;
  }

  .projects {
    order: 2;
    margin-left: 0;
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 0 var(--layout-padding-side) var(--mobile-section-gap);
  }

  .projects.gallery,
  .projects.project-detail,
  .projects.about-page {
    max-width: 100%;
  }

  .about-inline-photo {
    display: block;
    float: left;
    margin: 0 1rem 0.875rem 0;
  }

  .about-inline-photo img {
    aspect-ratio: auto;
  }

  .about-intro-lead > p {
    width: auto;
    max-width: none;
    margin-top: 0;
  }

  .about-intro-lead > p + p {
    margin-top: 0;
  }

  .about-carousel {
    display: none;
  }

  .layout {
    display: flex;
    flex-direction: column;
  }
}
