/* Tokens follow the albatross-analytics palette: near-black navy, ocean blues. */
:root {
  --bg:          #06090d;
  --bg-card:     #080e16;
  --border:      #0d1e2e;
  --ocean:       #0a3d62;
  --ocean-light: #185fa5;
  --ocean-mid:   #4a8ab5;
  --text:        #e8eef5;
  --muted:       #a8c4d8;
  --dim:         #4a6a85;
  --label:       #3a5a75;
  --accent:      #c8daea;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Montserrat', system-ui, sans-serif;
  --max:   1200px;
  --gut:   40px;
}
@media (max-width: 768px) { :root { --gut: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font: 300 15px/1.7 var(--sans); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 80% 60% at 75% -10%, rgba(24,95,165,.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at -10% 110%, rgba(10,61,98,.35), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  display: flex; flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* ── Nav ── */
nav.top { border-bottom: 1px solid var(--border); }
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.mark { font: 400 22px/1 var(--serif); color: var(--text); letter-spacing: .02em; white-space: nowrap; }
.links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.links a { font-size: 11px; letter-spacing: .18em; text-transform: lowercase; color: #7f9bb4; padding: 6px 0; border-bottom: 1px solid transparent; }
.links a { white-space: nowrap; }
.links a:hover { color: var(--muted); }
.links a[aria-current] { color: var(--text); border-bottom-color: var(--ocean-mid); }

main { flex: 1; padding: 56px 0 64px; }
footer { border-top: 1px solid var(--border); padding: 22px 0; font-size: 11px; letter-spacing: .14em; color: var(--dim); }

.label { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ocean-mid); margin-bottom: 14px; }
h1 { font: 300 clamp(34px, 4.6vw, 52px)/1.12 var(--serif); margin: 0 0 18px; color: var(--text); }
h2 { font: 400 26px/1.2 var(--serif); margin: 0 0 8px; color: var(--text); }
.intro { color: var(--muted); max-width: 46em; margin: 0; }

/* ── What I do ── */
/* 2 × 2 on desktop: right column gets a left rule, bottom row a top rule */
.services { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); margin-top: 48px; }
.services > div { padding: 30px 48px 30px 0; }
.services > div:nth-child(even) { padding-left: 48px; padding-right: 0; border-left: 1px solid var(--border); }
.services > div:nth-child(n+3) { border-top: 1px solid var(--border); }
.services .n { font: 400 13px/1 var(--serif); color: var(--ocean-mid); margin-bottom: 14px; }
.services p { color: var(--muted); font-size: 14px; margin: 0; }
.next { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 48px; }
.next a {
  font-size: 11px; letter-spacing: .18em; text-transform: lowercase;
  border: 1px solid var(--border); padding: 12px 20px; color: var(--muted); background: var(--bg-card);
}
.next a:hover { border-color: var(--ocean-light); color: var(--text); }

/* ── Portfolio grid ── */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 32px; margin-top: 40px; }
.item { margin: 0; }
.item button {
  all: unset; cursor: zoom-in; display: block; width: 100%;
  border: 1px solid var(--border); background: var(--bg-card); overflow: hidden;
}
.item button:focus-visible { outline: 1px solid var(--ocean-mid); }
.item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; opacity: .92; transition: opacity .2s; }
.item button:hover img { opacity: 1; }
.item h3 { font: 500 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 16px 0 6px; }
.item p { font-size: 14px; color: var(--muted); margin: 0; }
.note { margin-top: 36px; font-size: 12px; color: var(--dim); }

/* Diagram panel */
.panel { border: 1px solid var(--border); background: var(--bg-card); padding: 28px; }
.panel svg { width: 100%; height: auto; display: block; }
.two { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; margin-top: 40px; align-items: start; }
.points { list-style: none; margin: 0; padding: 0; }
.points li { padding: 14px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.points li b { display: block; font-weight: 500; color: var(--accent); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }

/* ── Lightbox ── */
dialog {
  border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh;
}
dialog::backdrop { background: rgba(3,5,8,.88); }
dialog img { max-width: 94vw; max-height: 86vh; border: 1px solid var(--border); }
dialog p { color: var(--muted); font-size: 13px; text-align: center; margin: 12px 0 0; }


@media (max-width: 860px) {
  .services, .grid, .two { grid-template-columns: 1fr; }
  .services > div, .services > div:nth-child(even) { padding: 24px 0 0; border-left: 0; }
  .services > div + div { margin-top: 24px; border-top: 1px solid var(--border); }
  .links { gap: 6px 16px; flex-wrap: wrap; }
  .links a { letter-spacing: .1em; }
}
@media (max-width: 600px) {
  nav.top .wrap { height: auto; padding-top: 16px; padding-bottom: 14px; flex-direction: column; align-items: flex-start; gap: 10px; }
  main { padding-top: 36px; }
}
