:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #64706b;
  --paper: #f8f7f2;
  --panel: #ffffff;
  --mist: #edf2ee;
  --line: #dcd9cf;
  --green: #2d6a4f;
  --teal: #0f766e;
  --coral: #d45d4c;
  --gold: #b7791f;
  --blue: #315f72;
  --shadow: 0 18px 55px rgba(23, 33, 31, 0.13);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(220, 217, 207, 0.86);
  background: rgba(248, 247, 242, 0.92);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.project-filters,
.stage-controls,
.footer,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.84rem;
}

.brand-name,
.brand-line {
  display: block;
}

.brand-line {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  text-transform: uppercase;
}

.nav {
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
}

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

.hero,
.section,
.promedius-band {
  padding: clamp(58px, 8vw, 104px) clamp(18px, 4vw, 56px);
}

.section {
  max-width: 1220px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(34px, 7vw, 88px);
  align-items: center;
  min-height: calc(100vh - 73px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(118deg, rgba(45, 106, 79, 0.15), transparent 40%),
    linear-gradient(290deg, rgba(212, 93, 76, 0.15), transparent 42%),
    linear-gradient(0deg, rgba(183, 121, 31, 0.08), transparent 36%),
    var(--paper);
}

.hero-copy,
.hero-console,
.promedius-copy,
.project-stage,
.manifest-copy,
.section-heading,
.cv-card,
.contact > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  max-width: 900px;
  font-size: clamp(3.9rem, 7.4vw, 8rem);
}

h2 {
  font-size: clamp(2.25rem, 4.7vw, 4.6rem);
}

h3 {
  font-size: 1.16rem;
}

p {
  line-height: 1.7;
}

.lead {
  max-width: 760px;
  margin: 26px 0 0;
  color: #37413e;
  font-size: clamp(1.1rem, 2vw, 1.42rem);
}

.hero-note {
  max-width: 690px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  color: white;
}

.button.secondary {
  background: transparent;
}

.button.light {
  border-color: rgba(255, 255, 255, 0.52);
  background: white;
  color: var(--ink);
}

.hero-console {
  overflow: hidden;
  border: 1px solid rgba(23, 33, 31, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at 74% 18%, rgba(183, 121, 31, 0.2), transparent 34%);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}

.console-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 6px rgba(212, 93, 76, 0.14);
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
}

.console-grid article {
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.console-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.console-grid strong {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.1;
}

.signal {
  display: grid;
  grid-template-columns: 1fr 0.6fr 1.3fr 0.5fr 1.7fr 0.8fr;
  gap: 6px;
  height: 124px;
  align-items: end;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal span {
  border-radius: 6px 6px 0 0;
  background: var(--green);
}

.signal span:nth-child(2),
.signal span:nth-child(5) {
  background: var(--coral);
}

.signal span:nth-child(3) {
  background: var(--teal);
}

.signal span:nth-child(1) { height: 44%; }
.signal span:nth-child(2) { height: 78%; }
.signal span:nth-child(3) { height: 56%; }
.signal span:nth-child(4) { height: 32%; }
.signal span:nth-child(5) { height: 88%; }
.signal span:nth-child(6) { height: 48%; }

.hero-console p {
  margin: 22px 0 0;
  color: var(--muted);
}

.now-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.now-strip div {
  min-height: 118px;
  padding: 24px clamp(18px, 4vw, 42px);
  border-right: 1px solid var(--line);
}

.now-strip div:last-child {
  border-right: 0;
}

.now-strip span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.now-strip strong {
  display: block;
  max-width: 270px;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.16;
}

.manifest {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(30px, 6vw, 78px);
  align-items: start;
}

.manifest-copy {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 1.08rem;
}

.manifest-copy p {
  margin: 0;
}

.principle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.principle-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(23, 33, 31, 0.14);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.promedius-band {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
  background: var(--ink);
  color: white;
}

.promedius-copy p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.72);
}

.project-stage {
  position: relative;
  min-height: 460px;
}

.stage-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 240ms ease, transform 240ms ease;
  pointer-events: none;
}

.stage-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.stage-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  background: #dfe7e2;
}

.stage-card div {
  padding: 20px;
}

.stage-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.stage-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  gap: 8px;
}

.stage-dot {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(23, 33, 31, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.stage-dot.active {
  background: var(--coral);
}

.section-heading {
  max-width: 850px;
  margin-bottom: clamp(26px, 5vw, 48px);
}

.section-heading p {
  color: var(--muted);
}

.projects {
  max-width: 1320px;
}

.project-filters {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(23, 33, 31, 0.2);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.filter.active {
  background: var(--ink);
  color: white;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  overflow: hidden;
  border: 1px solid rgba(23, 33, 31, 0.14);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.08);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(23, 33, 31, 0.13);
}

.project-card[hidden] {
  display: none;
}

.project-card.feature {
  grid-column: span 2;
  grid-row: span 2;
}

.project-card.compact-card {
  display: grid;
  align-items: end;
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(45, 106, 79, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(212, 93, 76, 0.12), transparent 40%),
    var(--panel);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dfe7e2;
}

.project-card.feature img {
  aspect-ratio: 16 / 11;
}

.project-card div {
  padding: 18px;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tag {
  margin: 0 0 8px;
  color: var(--gold);
}

.status {
  margin-bottom: 10px;
  padding: 0 9px;
}

.status.live {
  background: rgba(45, 106, 79, 0.13);
  color: var(--green);
}

.status.prototype {
  background: rgba(183, 121, 31, 0.15);
  color: var(--gold);
}

.status.build {
  background: rgba(49, 95, 114, 0.14);
  color: var(--blue);
}

.project-card p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 380px);
  gap: 24px;
  align-items: start;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.timeline-date {
  color: var(--coral);
  font-weight: 850;
}

.timeline-item p {
  margin: 9px 0 0;
  color: var(--muted);
}

.cv-card {
  position: sticky;
  top: 92px;
  padding: 24px;
  border: 1px solid rgba(23, 33, 31, 0.14);
  border-radius: var(--radius);
  background: var(--mist);
}

.cv-card ul {
  display: grid;
  gap: 12px;
  padding-left: 18px;
  margin: 18px 0 0;
  color: var(--muted);
}

.mini-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--teal);
  font-weight: 850;
  text-decoration: none;
}

.mini-link:hover {
  color: var(--ink);
}

.contact {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.contact p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.footer {
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 1050px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero,
  .manifest,
  .promedius-band,
  .cv-layout {
    grid-template-columns: 1fr;
  }

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

  .now-strip div:nth-child(2) {
    border-right: 0;
  }

  .now-strip div:nth-child(1),
  .now-strip div:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: auto;
  }

  .project-stage {
    min-height: 430px;
  }

  .cv-card {
    position: static;
  }

  .contact {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 0;
    font-size: 0.92rem;
    text-align: center;
  }

  .brand-line {
    font-size: 0.68rem;
  }

  .hero {
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .hero-copy,
  .hero-console,
  .hero-copy > *,
  .hero-console > * {
    max-width: calc(100vw - 36px);
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    line-height: 1.55;
    max-width: 100%;
  }

  h1 {
    font-size: clamp(2.75rem, 14vw, 3.85rem);
  }

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .console-grid,
  .project-grid,
  .now-strip {
    grid-template-columns: 1fr;
  }

  .now-strip div,
  .now-strip div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .now-strip div:last-child {
    border-bottom: 0;
  }

  .project-card.feature {
    grid-column: span 1;
    grid-row: span 1;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px;
  }

  .project-stage {
    min-height: 390px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
