:root {
  --bg: #060c1a;
  --bg-soft: #0f1a30;
  --card: rgba(17, 25, 44, 0.72);
  --text: #edf2ff;
  --muted: #b3c1dc;
  --line: #2a3e63;
  --accent-a: #2ba9f1;
  --accent-b: #1d5fa8;
  --accent-c: #f3ac2d;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
  --glass-bg: linear-gradient(170deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  --pill-bg: rgba(26, 43, 74, 0.58);
  --pill-border: #375c90;
  --pill-color: #d7e8ff;
  --btn-main-text: #08192c;
  --sig-color: #9cb3d8;
}
[data-theme="light"] {
  --bg: #f2f5fa;
  --bg-soft: #e0e5ed;
  --card: rgba(255, 255, 255, 0.75);
  --text: #1a1e2b;
  --muted: #606d85;
  --line: #c8d2e4;
  --accent-a: #1a7fd1;
  --accent-b: #135b99;
  --accent-c: #d6931f;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.08);
  --glass-bg: linear-gradient(170deg, rgba(255,255,255,0.5), rgba(255,255,255,0.2));
  --pill-bg: rgba(255, 255, 255, 0.7);
  --pill-border: #c8d2e4;
  --pill-color: #33405c;
  --btn-main-text: #ffffff;
  --sig-color: #606d85;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(43,169,241,0.16), transparent 62%),
    radial-gradient(900px 560px at 8% 6%, rgba(29,95,168,0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(980px, 92vw); margin: 0 auto; }

/* header */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(6,12,26,0.9), rgba(6,12,26,0.55), transparent);
  border-bottom: 1px solid transparent;
}
[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(242,245,250,0.92), rgba(242,245,250,0.5), transparent);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.brand { font-weight: 700; letter-spacing: .2px; margin-right: auto; font-size: 1rem; }
.switch { display: flex; gap: 4px; border: 1px solid var(--pill-border); border-radius: 999px; padding: 3px; }
.switch button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.switch button[data-pressed="true"],
.switch button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: var(--btn-main-text);
}
.theme-toggle {
  border: 1px solid var(--pill-border); background: var(--pill-bg); color: var(--pill-color);
  border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: .95rem; line-height: 1;
}

/* hero */
.hero { padding: 56px 0 34px; }
.eyebrow {
  font-family: monospace; font-size: 1.25rem; color: var(--sig-color);
  margin: 0 0 6px;
}
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; margin: 0 0 14px; letter-spacing: -.02em; }
.lead { font-size: clamp(1rem, 1.9vw, 1.16rem); color: var(--muted); margin: 0 0 24px; max-width: 62ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.pill {
  border: 1px solid var(--pill-border); background: var(--pill-bg); color: var(--pill-color);
  border-radius: 999px; padding: 6px 13px; font-size: .84rem; font-weight: 500;
}
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  border-radius: 12px; padding: 11px 20px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
}
.btn-main { background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); color: var(--btn-main-text); }
.btn-alt { border-color: var(--pill-border); background: var(--pill-bg); color: var(--pill-color); }

/* sections */
section { padding: 34px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.65rem); margin: 0 0 6px; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 22px; max-width: 62ch; font-size: .95rem; }

.card {
  background: var(--glass-bg); background-color: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px;
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* stack */
.stack-group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* projects */
.project { margin-bottom: 16px; }
.project h3 { margin: 0 0 4px; font-size: 1.12rem; }
.project .role { color: var(--accent-a); font-size: .85rem; font-weight: 600; margin: 0 0 14px; }
.rows { display: grid; gap: 11px; }
.row { display: grid; gap: 3px; }
@media (min-width: 640px) { .row { grid-template-columns: 158px 1fr; gap: 16px; } }
.row dt { color: var(--muted); font-size: .84rem; font-weight: 600; margin: 0; }
.row dd { margin: 0; font-size: .95rem; }
.project-tags { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.shot-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.shot-thumb { height: 100px; width: auto; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }

.lightbox {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .82); padding: 5vh 5vw;
  align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }

/* experience */
.job { position: relative; padding-left: 22px; padding-bottom: 22px; border-left: 1px solid var(--line); }
.job:last-child { padding-bottom: 0; border-left-color: transparent; }
.job::before {
  content: ""; position: absolute; left: -5px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent-a);
}
.job .when { color: var(--muted); font-size: .82rem; font-weight: 600; }
.job h3 { margin: 2px 0 2px; font-size: 1.02rem; }
.job .where { color: var(--accent-a); font-size: .9rem; margin: 0 0 8px; }
.job p { margin: 0; font-size: .93rem; color: var(--muted); }

ul.clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
ul.clean li { padding-left: 20px; position: relative; font-size: .95rem; }
ul.clean li::before { content: "—"; position: absolute; left: 0; color: var(--accent-a); }

/* contact */
.contact-list { display: grid; gap: 12px; }
.contact-list a { color: var(--accent-a); text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }

footer { padding: 30px 0 46px; color: var(--muted); font-size: .85rem; }

@media print {
  .topbar, .theme-toggle, .switch, .cta { display: none; }
  body { background: #fff; color: #000; }
  section { break-inside: avoid; }
}
