@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;550;600;650;700;750;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* Theme and base elements */
:root {
  color-scheme: dark;
  --bg: #090d16;
  --panel: #101827;
  --line: #253247;
  --text: #f0f4fb;
  --muted: #afbdd0;
  --accent: #8eafff;
  --mint: #8ee2c2;
  --max: 1180px;
  font-family: Inter,system-ui,sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-underline-offset: 4px;
}

a:hover {
  color: #c3d4ff;
}

img,video {
  display: block;
  max-width: 100%;
  height: auto;
}

button,a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,button:focus-visible,summary:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 5px;
}

::selection {
  background: #315888;
}

/* Page layout and navigation */
.wrap {
  width: min(var(--max),calc(100% - 64px));
  margin: auto;
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 10px;
}

.skip:focus {
  top: 10px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #090d16ed;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.7px;
  text-decoration: none;
  color: var(--text);
}

.brand b {
  color: var(--mint);
}

.navlinks {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 550;
}

.navlinks a {
  color: var(--muted);
  text-decoration: none;
}

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

.language {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 9px;
  color: var(--text)!important;
}

.eyebrow,.label {
  font-family: 'JetBrains Mono',monospace;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--mint);
}

/* Homepage and project cards */
.hero {
  padding: 90px 0 60px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 85% 5%,#192c503d,transparent 55%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 70px;
  align-items: center;
}

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

h1 {
  font-size: clamp(38px,5.4vw,70px);
  line-height: 1.08;
  letter-spacing: -.052em;
  font-weight: 650;
  margin-bottom: 27px;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  font-size: clamp(17px,1.7vw,21px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 47px;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: #111b2b;
}

.button.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: #0c211b;
}

.button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.button.primary:hover {
  background: #b9f5df;
  color: #0c211b;
}

.status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
}

.status:before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  margin-right: 9px;
}

.proof-list {
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof-list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.proof-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
  font-size: 17px;
  display: block;
}

.proof-list span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.proof-list small {
  float: right;
  color: var(--mint);
  font-size: 18px;
}

.section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: 32px;
}

.section-head p {
  max-width: 430px;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

h2 {
  font-size: clamp(28px,3.3vw,42px);
  line-height: 1.17;
  letter-spacing: -.035em;
  font-weight: 600;
  margin-bottom: 16px;
}

h3 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -.02em;
  font-weight: 600;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  margin-bottom: 24px;
}

.project-media {
  background: #0b101d;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  border-right: 1px solid var(--line);
}

.project-media img {
  width: 100%;
  aspect-ratio: 1.42;
  object-fit: cover;
  object-position: top;
  border: 1px solid #354259;
  border-radius: 7px;
}

.project-copy {
  padding: 32px;
}

.project h3 {
  font-size: 27px;
  margin: 12px 0 14px;
}

.project p {
  font-size: 15px;
  color: var(--muted);
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  font-size: 10px;
  font-family: 'JetBrains Mono',monospace;
  border: 1px solid #345b50;
  color: var(--mint);
  padding: 3px 7px;
  border-radius: 4px;
}

.badge.neutral {
  border-color: var(--line);
  color: var(--muted);
}

.result {
  border-left: 2px solid var(--mint);
  padding-left: 14px;
  color: var(--text)!important;
}

.stack {
  font-family: 'JetBrains Mono',monospace;
  font-size: 11px!important;
  line-height: 1.9;
}

.project .actions {
  margin-top: 19px;
}

.textlink {
  font-size: 13px;
  font-weight: 600;
}

.grid2,.grid3 {
  display: grid;
  gap: 24px;
}

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

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

.tile {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1522;
}

.tile p {
  color: var(--muted);
  font-size: 14px;
}

.tile h3 {
  font-size: 21px;
}

.tile img {
  border-radius: 5px;
  margin-bottom: 24px;
  aspect-ratio: 1.55;
  object-fit: cover;
  object-position: top;
}

.tile .label {
  margin-bottom: 16px;
}

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

.caption,figcaption {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 12px;
}

.demo {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #0b101c;
}

.demo video {
  width: 100%;
  aspect-ratio: 16/10;
  background: #090d16;
  border-radius: 5px;
  object-fit: contain;
}

.demo h3 {
  margin: 20px 0 6px;
  font-size: 18px;
}

.demo p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 65px;
}

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

.callout {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 20px;
  margin: 25px 0;
}

.callout p {
  margin: 0;
}

.contact {
  padding: 68px 0;
}

.contact .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.contact h2 {
  margin-bottom: 8px;
}

.contact p {
  margin: 0;
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--line);
  padding: 23px 0;
  font-size: 12px;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.crumb {
  font-size: 13px;
  margin-bottom: 25px;
}

/* Case studies and architecture */
.case-hero {
  padding: 62px 0 44px;
}

.case-hero h1 {
  max-width: 920px;
  font-size: clamp(36px,5.1vw,62px);
  margin-top: 20px;
}

.case-hero .lead {
  max-width: 800px;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 25px;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  margin-top: 32px;
}

.case-meta p {
  margin: 7px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.case-layout {
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 60px;
  padding-bottom: 60px;
}

.case-nav {
  position: sticky;
  top: 110px;
  align-self: start;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.case-nav a {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  padding: 7px 0;
}

.case-body section {
  padding: 25px 0 28px;
  border-bottom: 1px solid var(--line);
}

.case-body h2 {
  font-size: 28px;
  margin-bottom: 18px;
}

.case-body p,.case-body li {
  color: var(--muted);
  font-size: 16px;
}

.case-body ul {
  padding-left: 22px;
}

.case-body li {
  padding-left: 5px;
  margin-bottom: 10px;
}

.case-body figure {
  margin: 25px 0;
}

.case-body figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.case-body .tile h3 {
  font-size: 17px;
}

.case-body .tile p {
  font-size: 14px;
}

.flow {
  background: #0d1625;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
}

.flow-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.node {
  border: 1px solid #395078;
  border-radius: 6px;
  padding: 15px 13px;
  flex: 1;
  min-width: 120px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: #152238;
}

.node strong {
  display: block;
  font-size: 14px;
}

.node span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}

.node.emphasis {
  border-color: var(--mint);
  background: #142d2b;
}

.connector {
  color: var(--mint);
  text-align: center;
  font-size: 12px;
  padding: 10px 0;
}

.flow figcaption {
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  margin: 22px 0;
}

th,td {
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #142035;
  color: var(--text);
  font-weight: 550;
}

td {
  color: var(--muted);
}

pre {
  background: #070a10;
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.7;
  color: #d9e6ff;
}

code {
  font-family: 'JetBrains Mono',monospace;
  font-size: .85em;
}

.sources {
  font-size: 13px;
  padding-left: 20px;
}

.sources li {
  font-size: 13px;
}

.fact-note {
  font-size: 12px!important;
  color: var(--muted);
}

.case-body .lead {
  font-size: 19px;
}

.hidden {
  display: none!important;
}

.resume-link {
  white-space: nowrap;
}

/* Responsive layouts */
@media(max-width:980px) {
  .hero-grid {
    gap: 35px;
    grid-template-columns: 1.25fr 1fr;
  }
  .case-layout {
    grid-template-columns: 170px minmax(0,1fr);
    gap: 30px;
  }
  .project-copy {
    padding: 24px;
  }
  .project-media {
    padding: 15px;
  }
  .grid3 {
    grid-template-columns: 1fr;
  }
  .about {
    gap: 30px;
  }
}

@media(max-width:720px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .nav .wrap {
    min-height: 68px;
    gap: 12px;
  }
  .navlinks {
    gap: 13px;
    font-size: 12px;
  }
  .navlinks .desktop {
    display: none;
  }
  .hero {
    padding: 52px 0 38px;
  }
  .hero-grid,.project,.grid2,.about {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    gap: 35px;
  }
  .hero h1 {
    max-width: 17ch;
  }
  .section {
    padding: 49px 0;
  }
  .section-head {
    display: block;
  }
  .section-head p {
    margin-top: 15px;
  }
  .project-media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }
  .project-media img {
    aspect-ratio: 1.55;
  }
  .project-copy {
    padding: 24px;
  }
  .project h3 {
    font-size: 25px;
  }
  .case-layout {
    display: block;
  }
  .case-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 15px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
  }
  .case-nav a {
    font-size: 11px;
    padding: 0;
  }
  .case-meta {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .case-hero {
    padding-top: 36px;
  }
  .case-body section {
    padding-block: 25px;
  }
  .flow {
    padding: 16px;
  }
  .flow-row {
    gap: 8px;
  }
  .node {
    min-width: 110px;
    padding: 12px 9px;
  }
  .contact .wrap {
    display: block;
  }
  .contact .actions {
    margin-top: 22px;
  }
  footer .wrap {
    display: block;
  }
  footer p {
    margin-bottom: 8px;
  }
  h1 {
    letter-spacing: -.04em;
  }
}

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

@media print {
  .nav,.case-nav,.contact,footer,.actions {
    display: none;
  }
  body {
    background: #fff;
    color: #111;
  }
  .case-layout {
    display: block;
  }
  .wrap {
    width: 100%;
  }
  .case-body p,.case-body li,.lead {
    color: #333;
  }
  .section {
    break-inside: avoid;
  }
}

/* Owner-provided mobile screenshots: preserve full interface, never crop. */
.project-media .phone-preview {
  display: block;
  width: 100%;
  max-width: 245px;
}

.project-media .phone-preview img {
  border-radius: 14px;
}

.phone-gallery {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
}

.case-body .phone-shot {
  flex: 0 1 295px;
  min-width: 0;
  margin: 24px 0;
}

.case-body .phone-shot img {
  border-radius: 14px;
}

@media(max-width:600px) {
  .project-media .phone-preview {
    max-width: 230px;
  }
  .phone-gallery {
    gap: 0;
  }
  .case-body .phone-shot {
    flex-basis: 270px;
  }
}

.stock-gallery {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  margin-bottom: 24px;
  align-items: start;
}

.tile .stock-gallery img {
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* Explicit media type: portrait screenshots must never inherit landscape crops. */
.project-media img.portrait,
.case-body img.portrait,
.tile img.portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 590 / 1280;
  object-fit: contain;
}

/* Collaboration process: ordered steps keep the sequence clear on mobile. */
.process-title {
  margin-top: 48px;
}
.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding-left: 24px;
  margin: 28px 0 0;
}
.process-list li::marker {
  color: var(--mint);
  font-weight: 600;
}
.process-list h3 {
  font-size: 18px;
}
.process-list p {
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 980px) {
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .process-list { grid-template-columns: 1fr; gap: 16px; }
}
