/* Dennis Gross portfolio, version 3 */
:root {
  --ink: #10100f;
  --paper: #e9e5dc;
  --paper-soft: #d6d1c6;
  --red: #ff3b30;
  --red-dark: #b4231c;
  --line: rgba(233, 229, 220, 0.18);
  --muted: #aaa69e;
  --panel: #171715;
  --panel-hover: #1d1d1a;
  --header-bg: rgba(16, 16, 15, 0.9);
  --meter: #d0ccc3;
  --max: 1240px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="light"] {
  --ink: #f3f0e8;
  --paper: #171716;
  --paper-soft: #393833;
  --red: #c92c24;
  --red-dark: #9f211b;
  --line: rgba(23, 23, 22, 0.17);
  --muted: #66635c;
  --panel: #e8e3d9;
  --panel-hover: #dfd9ce;
  --header-bg: rgba(243, 240, 232, 0.92);
  --meter: #5d5a53;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.record-dot {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--red-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.record-dot::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 59, 48, 0.46);
  content: "";
  animation: record-pulse 1.4s cubic-bezier(0.2, 0.65, 0.35, 1) infinite;
}

.wordmark-name {
  flex: 0 0 auto;
  white-space: nowrap;
}

@keyframes record-pulse {
  0%, 18% {
    opacity: 0.34;
    transform: scale(1);
  }
  74%, 100% {
    opacity: 0;
    transform: scale(2.45);
  }
}

.main-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.main-nav a {
  color: var(--paper-soft);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-button {
  min-height: 2.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  color: var(--paper-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.control-button:hover {
  color: var(--paper);
  border-color: var(--paper-soft);
  background: var(--panel);
}

.control-label {
  min-height: 0.85rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.control-value {
  min-height: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1;
}

.control-value strong,
.control-value span {
  display: inline-flex;
  align-items: center;
  min-height: 0.85rem;
  line-height: 1;
}

.control-value strong {
  color: var(--red);
  font-weight: 700;
}

.control-value i {
  width: 1px;
  height: 0.8rem;
  background: var(--line);
}

.theme-symbol {
  width: 0.85rem;
  height: 0.85rem;
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

:root[data-theme="light"] .theme-symbol {
  transform: rotate(180deg);
}

.scroll-rail {
  position: fixed;
  top: 50%;
  right: max(1rem, calc((100vw - var(--max)) / 2 - 8.25rem));
  z-index: 20;
  width: 7.5rem;
  display: grid;
  grid-template-columns: 1px 1fr;
  gap: 1rem;
  transform: translateY(-44%);
}

.rail-track {
  width: 1px;
  height: 100%;
  overflow: hidden;
  background: var(--line);
}

.rail-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
}

.scroll-rail nav {
  display: grid;
  gap: 0.45rem;
}

.scroll-rail a {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.35rem;
  align-items: center;
  padding: 0.35rem 0;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.62;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.scroll-rail a:hover,
.scroll-rail a.is-active {
  color: var(--paper);
  opacity: 1;
}

.scroll-rail a.is-active {
  transform: translateX(0.25rem);
}

.scroll-rail a span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.scroll-rail a b {
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero,
.section,
.contact {
  scroll-margin-top: 7rem;
}

.hero,
.section,
.contact,
footer {
  max-width: var(--max);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: clamp(3rem, 8vw, 8rem);
  padding: clamp(5rem, 10vw, 9rem) 2rem 0;
}

.hero-copy {
  align-self: center;
}

.eyebrow,
.project-meta,
.signal-topline,
.signal-footer {
  margin: 0 0 1.5rem;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 2rem;
  font-size: clamp(3.7rem, 8vw, 8.1rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

h1 em {
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-intro {
  max-width: 720px;
  margin-bottom: 2.25rem;
  color: var(--paper-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-primary {
  background: var(--red);
  color: #fff;
}

.button-primary:hover {
  background: #ff554c;
}

.signal-panel {
  position: relative;
  width: 100%;
  height: clamp(430px, 38vw, 460px);
  min-height: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 0 rgba(255, 59, 48, 0);
  transition: border-color 180ms ease, box-shadow 180ms ease;
  touch-action: pan-y;
}

.signal-panel:hover {
  border-color: color-mix(in srgb, var(--red) 40%, var(--line));
}

.signal-panel.is-fluse {
  border-color: var(--red);
  box-shadow: inset 0 0 3rem rgba(255, 59, 48, 0.09);
}

.signal-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 43px, rgba(128, 128, 128, 0.08) 44px);
}

.signal-topline,
.signal-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.timecode-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.25rem;
}

.signal-topline span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.signal-topline span:first-child::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--red);
}

.timecode {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2rem, 3.8vw, 3.7rem);
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.drift-readout {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.waveform-shell {
  position: relative;
  z-index: 1;
  height: 94px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.waveform-axis {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}

.waveform {
  position: absolute;
  inset: 10px 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.waveform span {
  flex: 1;
  min-width: 1px;
  height: 10px;
  border-radius: 999px;
  background: var(--meter);
  opacity: 0.78;
  transform-origin: center;
  transition: height 70ms linear, background-color 160ms ease;
}

.waveform span:nth-child(8n),
.waveform span:nth-child(8n + 1) {
  background: var(--red);
}

.waveform-label {
  position: absolute;
  right: 0.35rem;
  bottom: 0.25rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
}

.track-bank {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.45rem;
}

.audio-track {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) 2.8rem;
  gap: 0.7rem;
  align-items: center;
}

.track-name,
.audio-track output {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.audio-track output {
  text-align: right;
}

.track-meter {
  position: relative;
  height: 0.55rem;
  overflow: hidden;
  background: repeating-linear-gradient(to right, var(--line) 0 7px, transparent 7px 10px);
}

.track-meter i {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to right, var(--meter) 0 7px, transparent 7px 10px);
  transform: scaleX(var(--fill, 0.5));
  transform-origin: left;
  transition: transform 80ms linear;
}

.track-meter b {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--peak, 70%);
  width: 2px;
  background: var(--red);
  transform: translateX(-1px);
}

.drift-trigger {
  position: relative;
  z-index: 2;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.drift-trigger span {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.drift-trigger:hover,
.drift-trigger:focus-visible {
  color: var(--red);
}

.signal-panel.is-fluse .drift-readout,
.signal-panel.is-fluse #take-indicator {
  color: var(--red);
}

.hero-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(2rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-facts div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.25rem;
  min-height: 128px;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
}

.hero-facts div:last-child {
  border-right: 0;
}

.hero-facts strong {
  color: var(--red);
  font-family: var(--mono);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 500;
}

.hero-facts span {
  max-width: 200px;
  color: var(--muted);
  font-size: 0.86rem;
}

.section {
  padding: clamp(6rem, 10vw, 10rem) 2rem;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  gap: 3rem;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.section-heading h2,
.contact h2 {
  margin-bottom: 0;
  font-size: clamp(2.8rem, 6vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.service-grid article {
  min-height: 370px;
  padding: 1.75rem;
  border-right: 1px solid var(--line);
}

.service-grid article:last-child {
  border-right: 0;
}

.service-number,
.project-index,
.project-year {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.service-grid h3 {
  margin: 7rem 0 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.service-grid p,
.work-heading > p,
.featured-project p,
.project-list > article > p,
.approach-copy p {
  color: var(--muted);
}

.work-heading {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: end;
}

.work-heading .eyebrow {
  margin-bottom: 1.5rem;
}

.work-heading > p {
  margin-bottom: 0;
}

.featured-project {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: 2rem;
  padding: 2rem 0 4.5rem;
  border-top: 1px solid var(--paper-soft);
}

.project-main h3 {
  max-width: 800px;
  margin-bottom: 2rem;
  font-size: clamp(2.2rem, 5vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.project-main > p {
  max-width: 660px;
}

.project-role {
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.project-role > p:first-child {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-role ul {
  margin: 0 0 3rem;
  padding: 0;
  list-style: none;
}

.project-role li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.award-note {
  font-size: 0.82rem;
}

.text-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--paper);
  text-decoration-color: var(--red);
  text-underline-offset: 6px;
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-list article {
  display: grid;
  grid-template-columns: 80px 1fr minmax(170px, 0.25fr);
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.project-list .project-meta {
  margin-bottom: 0.4rem;
}

.project-list h3,
.project-list p {
  margin-bottom: 0;
}

.project-list h3 {
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 500;
}

.project-list > article > p {
  text-align: right;
  font-size: 0.88rem;
}

.profile-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 5rem;
  background: var(--line);
}

.profiles .profile-links {
  margin-top: 0;
}

.profile-links a {
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--ink);
  text-decoration: none;
}

.profile-links a:hover {
  background: var(--panel-hover);
}

.profile-links span:first-child {
  font-size: 1.35rem;
  font-weight: 600;
}

.profile-links span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
}

.approach {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.approach .section-heading {
  display: block;
  margin-bottom: 0;
}

.approach-copy .lead {
  color: var(--paper);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.35;
}

.approach-copy p + p {
  margin-top: 2rem;
}

.contact {
  padding: clamp(6rem, 12vw, 12rem) 2rem;
  text-align: center;
}

.contact .eyebrow {
  margin-bottom: 2rem;
}

.contact h2 {
  color: var(--red);
}

.contact > p:not(.eyebrow) {
  max-width: 650px;
  margin: 2rem auto 2.5rem;
  color: var(--paper-soft);
  font-size: 1.1rem;
}

.contact-actions {
  justify-content: center;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 2rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

footer p {
  margin-bottom: 0;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.footer-version {
  min-height: 1.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.42rem;
  color: var(--red);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

footer a {
  text-underline-offset: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.25rem;
}

@media (max-width: 1500px) {
  .scroll-rail {
    right: 0.65rem;
    width: 2.4rem;
  }

  .scroll-rail a {
    grid-template-columns: 1fr;
  }

  .scroll-rail a b {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 900px) {
  .site-header-inner {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
  }

  .scroll-rail {
    display: none;
  }

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

  .signal-panel {
    height: 420px;
    min-height: 0;
  }

  .hero-facts,
  .service-grid,
  .profile-links {
    grid-template-columns: 1fr;
  }

  .hero-facts div,
  .service-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-grid article {
    min-height: 300px;
  }

  .section-heading,
  .work-heading,
  .approach {
    grid-template-columns: 1fr;
  }

  .featured-project {
    grid-template-columns: 50px 1fr;
  }

  .project-role {
    grid-column: 2;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .site-header-inner {
    padding: 1rem;
  }

  .main-nav {
    gap: 0.8rem;
  }

  .main-nav a {
    font-size: 0.65rem;
  }

  .wordmark {
    gap: 0.55rem;
  }

  .control-button {
    min-height: 2.35rem;
    padding: 0.45rem 0.6rem;
  }

  .language-toggle .control-label,
  .theme-toggle .control-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .hero,
  .section,
  .contact {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }

  .signal-panel {
    height: 400px;
    min-height: 0;
    padding: 1rem;
  }

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

  .hero-facts div {
    grid-template-columns: 85px 1fr;
  }

  .service-grid h3 {
    margin-top: 4rem;
  }

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

  .project-index,
  .project-role {
    grid-column: 1;
  }

  .project-list article {
    grid-template-columns: 55px 1fr;
    gap: 1rem;
  }

  .project-list > article > p {
    grid-column: 2;
    text-align: left;
  }

  footer {
    flex-direction: column;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .record-dot::after {
    opacity: 0.22;
    transform: scale(1.65);
  }

}
