:root {
  --bg-main: #1f3a56;
  --bg-alt: #162c42;
  --bg-deep: #112233;
  --text-main: #f5f5f5;
  --text-secondary: #e6d5b8;
  --text-muted: rgba(230, 213, 184, 0.72);
  --accent: #ff6b5a;
  --line: rgba(230, 213, 184, 0.16);
  --shadow: 0 28px 90px rgba(4, 10, 18, 0.35);
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Mono", monospace;
  color: var(--text-main);
  background:
    linear-gradient(180deg, rgba(255, 107, 90, 0.08), transparent 22%),
    radial-gradient(circle at top right, rgba(255, 107, 90, 0.1), transparent 18%),
    linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alt) 52%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("guairita-removebg-preview.png");
  background-repeat: repeat;
  background-size: 780px auto;
  background-position: center top;
  opacity: 0.18;
  mix-blend-mode: screen;
  filter: sepia(0.65) saturate(0.6) hue-rotate(335deg) brightness(1.8) contrast(0.95);
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  right: 3%;
  top: 10%;
  width: 22rem;
  height: 22rem;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 107, 90, 0.12), transparent 68%);
  filter: blur(10px);
  z-index: -1;
}

a {
  color: inherit;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding-bottom: 5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.header-logo,
.footer-logo {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.site-mark,
.site-nav a,
.entry-card,
.lang-button {
  text-decoration: none;
}

.site-mark {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.header-actions,
.site-nav,
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text-main);
}

.lang-switch {
  border: 1px solid var(--line);
  padding: 0.22rem;
}

.lang-button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.lang-button.is-active {
  background: var(--accent);
  color: var(--bg-deep);
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 3rem 0 2rem;
}

.hero::before,
.section::before {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.7fr);
  gap: 2rem;
  align-items: start;
}

.section-kicker,
.micro-label,
.hero-name,
.note-date,
.entry-index,
.gallery-index {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
}

.hero-name {
  margin-top: 1.25rem;
  margin-bottom: 0;
}

h1,
h2,
h3,
.entry-card strong {
  margin: 0;
  font-family: "Sora", sans-serif;
}

h1 {
  margin-top: 0.75rem;
  max-width: 8ch;
  font-size: clamp(3.4rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

h2 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

h3,
.entry-card strong {
  font-size: 1.2rem;
  line-height: 1.15;
}

.hero-break,
.hero-statement {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  color: var(--text-secondary);
}

.hero-break {
  margin-top: 1.5rem;
}

.hero-text,
.section-intro,
.lab-card p,
.narrative-block p,
.about-grid p,
.note-item p,
.obsession-note,
.annotation-list li,
.gallery-card p {
  color: var(--text-main);
  line-height: 1.8;
}

.hero-support,
.section-intro,
.lab-card p,
.about-grid p,
.note-item p,
.obsession-note,
.gallery-card p {
  color: var(--text-muted);
}

.hero-statement {
  margin-top: 1.25rem;
}

.hero-statement-accent,
.obsession-topic,
.quote-block p {
  color: var(--accent);
}

.hero-side {
  display: grid;
  gap: 0.75rem;
  padding-top: 1rem;
  align-content: start;
  justify-items: center;
}

.portrait-card,
.signal-card,
.entry-card,
.lab-card,
.narrative-block,
.quote-block,
.gallery-card,
.note-item {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 44, 66, 0.66), rgba(17, 34, 51, 0.82));
  box-shadow: var(--shadow);
}

.portrait-card {
  margin: 0;
  width: min(220px, 100%);
  justify-self: center;
  padding: 6px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(22, 44, 66, 0.2), rgba(17, 34, 51, 0.2)),
    linear-gradient(135deg, rgba(255, 107, 90, 0.95), rgba(255, 107, 90, 0.55));
}

.portrait-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 16%;
  border-radius: 50%;
}

.signal-card,
.lab-card,
.narrative-block,
.quote-block,
.note-item {
  position: relative;
}

.signal-card::after,
.lab-card::after,
.narrative-block::after,
.quote-block::after,
.note-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 107, 90, 0.2);
  pointer-events: none;
}

.signal-card,
.lab-card,
.narrative-block,
.quote-block,
.gallery-card,
.note-item {
  padding: 1.25rem;
}

.hero-side .signal-card {
  width: min(100%, 320px);
}

.annotation-list {
  margin: 0.8rem 0 0;
  padding-left: 1rem;
  color: var(--text-muted);
}

.obsession-topic {
  margin: 0.5rem 0;
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.clickable-card {
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 90, 0.38);
  background: linear-gradient(180deg, rgba(255, 107, 90, 0.1), rgba(17, 34, 51, 0.88));
}

.obsession-cta {
  margin: 1rem 0 0;
  color: var(--accent);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.entry-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  color: var(--text-main);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.lab-card,
.narrative-block,
.gallery-card {
  min-height: 220px;
}

.lab-card h3,
.narrative-block p,
.gallery-card h3 {
  max-width: 18ch;
}

.entry-card span:last-child {
  color: var(--text-muted);
  line-height: 1.7;
}

.lab-link {
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.lab-link:hover,
.lab-link:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 90, 0.38);
  background: linear-gradient(180deg, rgba(255, 107, 90, 0.1), rgba(17, 34, 51, 0.88));
}

.lab-card .micro-label {
  color: var(--accent);
}

.lab-quote-card {
  display: grid;
  align-content: start;
}

.lab-quote-card .lab-quote {
  margin: 0;
  color: var(--accent);
  font-family: "Sora", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.25;
  text-transform: uppercase;
}

.entry-card:hover,
.entry-card:focus-visible,
.lang-button:hover,
.lang-button:focus-visible {
  transform: translateY(-2px);
}

.entry-card:hover,
.entry-card:focus-visible {
  border-color: rgba(255, 107, 90, 0.38);
  background: linear-gradient(180deg, rgba(255, 107, 90, 0.1), rgba(17, 34, 51, 0.88));
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid rgba(230, 213, 184, 0.08);
}

.systems-section,
.expression-section,
.notes-section {
  background: linear-gradient(180deg, rgba(17, 34, 51, 0.16), rgba(17, 34, 51, 0));
}

.section-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.section-intro {
  max-width: 62rem;
  margin: 0;
}

.lab-grid,
.gallery-grid,
.about-grid,
.notes-list {
  display: grid;
  gap: 1rem;
}

.lab-grid,
.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.effort-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 1rem;
}

.effort-feature-card {
  min-height: 260px;
}

.effort-statement-card {
  min-height: 260px;
}

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

.gallery-card {
  min-height: 240px;
  display: grid;
  align-content: start;
  background:
    linear-gradient(180deg, transparent 0%, rgba(17, 34, 51, 0.92) 100%),
    linear-gradient(135deg, rgba(255, 107, 90, 0.12), rgba(22, 44, 66, 0.88));
  transition: transform 180ms ease, border-color 180ms ease;
}

.gallery-link {
  color: inherit;
  text-decoration: none;
}

.note-item {
  display: block;
  max-width: 760px;
  padding: 1.6rem 0;
  border: 0;
  border-top: 1px solid rgba(230, 213, 184, 0.14);
  background: transparent;
  box-shadow: none;
}

.notes-list {
  gap: 0;
  max-width: 760px;
}

.note-item::after {
  display: none;
}

.note-item p {
  max-width: 58ch;
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--text-secondary);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.35;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding-top: 1.5rem;
}

.footer-logo {
  width: 54px;
  height: 54px;
  opacity: 0.9;
}

.social-strip {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.social-link svg {
  width: 22px;
  height: 22px;
  display: block;
}

.social-link:hover,
.social-link:focus-visible {
  opacity: 0.82;
  transform: translateY(-2px);
}

.subpage-main {
  padding-top: 2rem;
}

.subpage-hero {
  display: grid;
  gap: 1rem;
  padding: 2rem 0 3rem;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
}

.subpage-intro {
  max-width: 60rem;
  color: var(--text-muted);
  line-height: 1.8;
}

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

.project-entry {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 44, 66, 0.66), rgba(17, 34, 51, 0.82));
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.project-entry-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.project-entry-link:hover,
.project-entry-link:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 90, 0.38);
  background: linear-gradient(180deg, rgba(255, 107, 90, 0.08), rgba(17, 34, 51, 0.88));
}

.project-entry-accent {
  border-color: rgba(255, 107, 90, 0.34);
  background: linear-gradient(180deg, rgba(255, 107, 90, 0.08), rgba(17, 34, 51, 0.84));
}

.project-entry-accent h3,
.project-entry-accent .micro-label,
.project-entry-accent .project-focus,
.project-entry-accent .project-cta {
  color: var(--accent);
}

.project-entry h3 {
  margin-bottom: 0.8rem;
}

.project-entry p {
  color: var(--text-muted);
  line-height: 1.8;
}

.project-points {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-main);
  line-height: 1.8;
}

.project-focus {
  margin-top: 1rem;
  color: var(--text-secondary);
}

.project-cta {
  margin: 1rem 0 0;
  color: var(--accent);
}

.project-link-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.project-inline-link {
  color: var(--accent);
  text-decoration: none;
}

.project-inline-link:hover,
.project-inline-link:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  opacity: 0.82;
}

.pelagos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pelagos-panel,
.image-placeholder {
  min-height: 250px;
}

.image-placeholder {
  border: 1px dashed rgba(230, 213, 184, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 107, 90, 0.04), rgba(17, 34, 51, 0.68)),
    rgba(17, 34, 51, 0.4);
  display: grid;
  place-items: center;
  padding: 1.4rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.8;
}

.pelagos-image-panel {
  margin: 0;
  align-content: center;
}

.pelagos-image-panel img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid rgba(255, 107, 90, 0.18);
  background: rgba(6, 13, 22, 0.52);
}

.pelagos-closing {
  grid-column: 1 / -1;
  display: grid;
  align-items: center;
}

.pelagos-closing .pelagos-quote {
  max-width: 100%;
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.08;
  text-transform: uppercase;
}

.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 90, 0.34);
}

.expression-minimal-hero {
  min-height: 52vh;
  align-content: end;
}

.observation-flow {
  display: grid;
  justify-items: center;
  gap: clamp(5rem, 12vw, 11rem);
  padding: 2rem 0 8rem;
}

.observation-item,
.motion-item {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: zoom-in;
}

.observation-item {
  width: min(100%, 760px);
  transition: opacity 180ms ease, transform 220ms ease;
}

.observation-item:nth-child(even) {
  width: min(88%, 620px);
}

.observation-item:nth-child(3n) {
  justify-self: start;
  margin-left: min(8vw, 6rem);
}

.observation-item:nth-child(4n) {
  justify-self: end;
  margin-right: min(8vw, 6rem);
}

.observation-item img,
.motion-item img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(230, 213, 184, 0.12);
  background: rgba(17, 34, 51, 0.58);
  box-shadow: 0 28px 80px rgba(4, 10, 18, 0.28);
}

.observation-item:hover,
.observation-item:focus-visible {
  opacity: 0.9;
  transform: translateY(-4px);
}

.motion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.75rem);
  padding: 2rem 0 8rem;
}

.motion-item {
  opacity: 0.58;
  filter: grayscale(1) saturate(0.45);
  transition: opacity 180ms ease, filter 180ms ease, transform 220ms ease;
}

.motion-item:nth-child(2n) {
  margin-top: clamp(2rem, 6vw, 5rem);
}

.motion-item:hover,
.motion-item:focus-visible {
  opacity: 1;
  filter: grayscale(0) saturate(1);
  transform: translateY(-4px);
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background:
    radial-gradient(circle at center, rgba(255, 107, 90, 0.08), transparent 38%),
    rgba(6, 13, 22, 0.94);
  cursor: zoom-out;
}

.media-lightbox[hidden] {
  display: none;
}

.lightbox-media {
  display: block;
  max-width: min(100%, 1200px);
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid rgba(255, 107, 90, 0.24);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.56);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 81;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 107, 90, 0.4);
  color: var(--accent);
  background: rgba(17, 34, 51, 0.84);
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 107, 90, 0.12);
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .site-header,
  .header-actions {
    display: grid;
    justify-content: stretch;
  }

  .hero-grid,
  .entry-grid,
  .lab-grid,
  .gallery-grid,
  .pelagos-grid,
  .effort-layout,
  .about-grid,
  .note-item {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .expression-minimal-hero {
    min-height: auto;
  }

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

  h1,
  h2 {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .site-header {
    position: static;
  }

  .site-nav {
    gap: 0.4rem 0.8rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .observation-flow {
    gap: 4rem;
    justify-items: stretch;
  }

  .observation-item,
  .observation-item:nth-child(even),
  .observation-item:nth-child(3n),
  .observation-item:nth-child(4n) {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-self: stretch;
  }

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

  .motion-item:nth-child(2n) {
    margin-top: 0;
  }
}
