/* base reset */
body { margin: 0; }
img { max-width: 100%; display: block; }

/* Layout: sticky nav; two-column hero (statement left, glowing portrait disc right);
   then full-width bands for skills (4 cards), projects (one featured, two side by side, one compact), about and contact,
   all on one 1080px measure. Single dark look by design. */
:root {
  color-scheme: dark;
  --bg: #07100c;
  --surface: #0d1a14;
  --surface-2: #13251c;
  --line: #20382c;
  --fg: #eaf3ed;
  --fg-soft: #c6d4cb;
  --muted: #94a99c;
  --accent: #52d18b;
  --accent-soft: rgba(82, 209, 139, 0.14);
  --accent-glow: rgba(82, 209, 139, 0.34);
  --accent-ink: #04140b;
  --warm: #f0c36b;
  --warm-soft: rgba(240, 195, 107, 0.14);

  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: rgba(7, 16, 12, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 6px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-decoration: none;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}
.nav a {
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  padding-block: 10px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="true"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 78% 45%, #000 0%, transparent 62%);
  mask-image: radial-gradient(ellipse at 78% 45%, #000 0%, transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: 50%;
  width: 620px;
  height: 620px;
  max-width: 90%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(82, 209, 139, 0.16) 0%, transparent 62%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 40px;
  padding-block: clamp(48px, 9vw, 104px);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.status .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7.6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--accent);
  text-wrap: balance;
}
.hero h1 .hello {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--fg);
}
.hero h1 .role {
  display: block;
  margin-top: 16px;
  font-weight: 600;
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--fg);
}
.hero-lead {
  max-width: 52ch;
  font-size: 1.1rem;
  color: var(--fg);
}
.hero-lead + .hero-lead { color: var(--muted); font-size: 1rem; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 600 0.98rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.portrait {
  justify-self: center;
  width: min(320px, 100%);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background:
    radial-gradient(circle at 32% 26%, rgba(82, 209, 139, 0.28), transparent 58%),
    var(--surface-2);
  box-shadow: 0 0 0 10px var(--accent-soft), 0 0 90px var(--accent-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  animation: glow 5s ease-in-out infinite;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 10px var(--accent-soft), 0 0 70px var(--accent-glow); }
  50% { box-shadow: 0 0 0 14px var(--accent-soft), 0 0 120px var(--accent-glow); }
}

/* ---------- sections ---------- */
.section {
  padding-block: clamp(52px, 7vw, 88px);
  scroll-margin-top: 72px;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-head p { max-width: 62ch; color: var(--muted); }

/* ---------- skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.skill {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.skill svg { width: 28px; height: 28px; color: var(--accent); }
.skill h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.skill p { color: var(--muted); font-size: 0.95rem; }
.toolbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.toolbox .label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--fg);
  background: var(--surface);
  white-space: nowrap;
}

/* ---------- projects ---------- */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.project {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 26px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.project-shot {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  border: 1px solid #2c4a3b;
  transition: border-color 0.15s;
  border-radius: 10px;
}
.shot-link { display: block; border-radius: 10px; }
.shot-link:hover .project-shot { border-color: var(--accent); }
.project-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
/* featured: screenshot beside the write-up, across the full row */
.project-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 32px;
}
.project.project-featured h3 { font-size: 1.9rem; }
/* compact: no screenshot, so the write-up and points sit side by side */
.project-compact {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}
.project-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.chip-live { background: var(--accent-soft); color: var(--accent); }
.chip-wip { background: var(--warm-soft); color: var(--warm); }
.chip-lab { border: 1px solid var(--line); color: var(--muted); }
.kind {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.project h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.project > p, .project-body > p { color: var(--fg); }
.points {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--fg-soft);
  font-size: 0.95rem;
}
.points li { position: relative; padding-left: 18px; }
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 2px;
  background: var(--accent);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project .tag { background: transparent; }
.project-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.link:hover { border-bottom-color: var(--accent); }
.note {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  align-items: start;
}
.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 62ch;
  min-width: 0;
}
.about-text p:first-child { font-size: 1.12rem; }
.about-text p + p { color: var(--muted); }
.facts {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-top: 1px solid var(--line);
}
.facts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { font-weight: 500; }

/* ---------- contact ---------- */
#contact { padding-top: 0; scroll-margin-top: 96px; }
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 40px;
  padding: clamp(24px, 5vw, 48px);
  background:
    radial-gradient(circle at 100% 0%, rgba(82, 209, 139, 0.16), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.contact-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}
.contact-facts dd { overflow-wrap: anywhere; }
.contact-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.6vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.contact-main > p { max-width: 56ch; color: var(--muted); }
.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}
.email {
  min-width: 0;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  text-decoration: none;
  user-select: all;
}
/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}
.foot-inner a { color: var(--muted); }
.foot-inner a:hover { color: var(--accent); }

/* ---------- narrow screens ---------- */
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .portrait { justify-self: start; width: min(220px, 70%); }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project-featured, .project-compact { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .contact-card { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .project { padding: 22px; }
}

/* the nav wraps under the logo here, so the sticky header is taller */
@media (max-width: 540px) {
  .section { scroll-margin-top: 116px; }
  #contact { scroll-margin-top: 136px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portrait { animation: none; }
  .btn, .project-shot { transition: none; }
  .btn-primary:hover { transform: none; }
}
