/* nphyt.net: dark-first personal site. Light theme via [data-theme="light"]. */
:root {
  --bg: #161616;
  --surface: #1c1c1c;
  --surface-2: #232323;
  --text: #acacac;
  --strong: #ffffff;
  --line: rgba(255, 255, 255, .14);
  --light-card: #faf7f6;
  --lime: #ddf160;
  --violet: #9f8be7;
  --on-card: #161616;
  --on-card-muted: #4a4a4a;
  --focus: #ddf160;
  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --body: "Funnel Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 3.25rem);
  --radius-lg: clamp(28px, 4vw, 50px);
  --radius-md: clamp(20px, 2.6vw, 30px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #faf7f6;
  --surface: #ffffff;
  --surface-2: #f0ece9;
  --text: #5e5e5e;
  --strong: #161616;
  --line: rgba(22, 22, 22, .16);
  --light-card: #ffffff;
  --focus: #6b55c9;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { color: var(--strong); font-family: var(--display); font-weight: 500; margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; padding: .6rem 1rem; background: var(--strong); color: var(--bg); z-index: 20; border-radius: 999px; }
.skip:focus { left: 1rem; top: 1rem; }
svg { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.5rem;
  padding: 1.1rem var(--gutter); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--strong); margin-right: auto; }
.brand-mark {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--strong); color: var(--bg);
  display: grid; place-items: center; font: 600 1.05rem/1 var(--display); letter-spacing: -.02em;
}
.brand-name { font: 500 .95rem/1.1 var(--display); }
.links { display: flex; gap: 1.6rem; font-size: .95rem; }
.links a { text-decoration: none; }
.links a:hover { color: var(--strong); }
.top-actions { display: flex; gap: .6rem; align-items: center; }
.icon-btn {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--strong); display: grid; place-items: center; cursor: pointer; font-size: 1.15rem;
}
.icon-btn:hover { border-color: var(--strong); }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }

.pill-btn {
  display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--strong); color: var(--strong); text-decoration: none; font-weight: 500; font-size: .98rem;
  transition: background-color .2s, color .2s;
}
.pill-btn:hover, .pill-btn.solid { background: var(--strong); color: var(--bg); }
.pill-btn.solid:hover { background: var(--lime); border-color: var(--lime); color: var(--on-card); }

/* Hero */
main { padding: 0 var(--gutter); }
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); }
.intro { color: var(--strong); font: 500 clamp(1.05rem, 1.6vw, 1.3rem)/1.35 var(--display); max-width: 25rem; margin: 0 0 clamp(1.5rem, 3vw, 2.5rem); }
h1 {
  font-size: clamp(3.4rem, 15.8vw, 15.5rem); line-height: .86; letter-spacing: -.045em; font-weight: 600;
  margin-left: -.04em;
}
h1 .ln { display: block; animation: rise .9s cubic-bezier(.2, .75, .2, 1) both; }
h1 .ln + .ln { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li {
  border: 1px solid currentColor; border-radius: 999px; padding: .22rem .7rem; font-size: .82rem; line-height: 1.4;
  white-space: nowrap;
}
.hero > .tags { margin-top: clamp(1.5rem, 3vw, 2.5rem); max-width: 60rem; color: var(--strong); }
.hero > .tags li { border-color: var(--line); }

.hero-panel {
  margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: 1.25rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end;
}
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.fact {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; min-height: 9.5rem; justify-content: space-between;
}
.fact-n { color: var(--strong); font: 500 clamp(2.4rem, 4.4vw, 3.6rem)/1 var(--display); letter-spacing: -.03em; }
.fact-l { font-size: .92rem; line-height: 1.35; }
.hero-cta { display: grid; gap: 1rem; }
.status { margin: 0; display: flex; gap: .6rem; align-items: baseline; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--lime); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 25%, transparent); }
.row { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 6rem) 0 0; }
.big { font-size: clamp(2.8rem, 8vw, 5.6rem); line-height: .95; letter-spacing: -.035em; margin-bottom: clamp(1.5rem, 3vw, 2.75rem); }

/* What I do: stacking cards */
.stack-cards { display: grid; gap: 1.25rem; }
.scard {
  position: sticky; top: calc(5.5rem + var(--n, 0) * 1.1rem);
  border-radius: var(--radius-lg); padding: clamp(1.6rem, 3.6vw, 3rem);
  min-height: clamp(17rem, 34vw, 22rem); display: flex; flex-direction: column; gap: 1.1rem;
  color: var(--on-card-muted); box-shadow: 0 -10px 40px rgba(0, 0, 0, .18);
}
.scard:nth-child(1) { --n: 0; } .scard:nth-child(2) { --n: 1; } .scard:nth-child(3) { --n: 2; }
.scard:nth-child(4) { --n: 3; } .scard:nth-child(5) { --n: 4; }
.scard h3 { color: var(--on-card); font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.02; letter-spacing: -.03em; max-width: 14ch; margin-bottom: auto; }
.scard p { margin: 0; max-width: 46ch; font-size: 1rem; }
.scard .tags { color: var(--on-card); }
.c-light { background: var(--light-card); }
.c-lime { background: var(--lime); }
.c-violet { background: var(--violet); }
.c-dark { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.c-dark h3, .c-dark .tags { color: var(--strong); }
:root[data-theme="light"] .c-light { border: 1px solid var(--line); }
:root[data-theme="light"] .c-dark { background: #1c1c1c; color: #acacac; border: none; }
:root[data-theme="light"] .c-dark h3, :root[data-theme="light"] .c-dark .tags { color: #fff; }

/* Products */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 2.6vw, 2rem) 1.25rem; }
.project.wide { grid-column: 1 / -1; }
.shot { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 1100 / 290; object-fit: cover; object-position: left center; }
.shot.square img { aspect-ratio: 4 / 3; }
.on-shot { position: absolute; left: 1.1rem; bottom: 1.1rem; right: 1.1rem; color: #fff; }
.on-shot li { background: rgba(22, 22, 22, .55); border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.project h3 { font: 400 clamp(1.1rem, 1.8vw, 1.4rem)/1.35 var(--display); color: var(--text); margin: 1rem 0 0 .25rem; }
.project h3 b { color: var(--strong); font-weight: 600; }

/* Experience */
.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.job {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 1.25fr); gap: .5rem 2rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.4rem 1.6rem;
}
.years { font-variant-numeric: tabular-nums; padding-top: .2rem; font-size: .95rem; }
.job h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.2; letter-spacing: -.01em; }
.org { margin: .2rem 0 0; font-size: .95rem; }
.desc { margin: 0; font-size: .98rem; max-width: 60ch; }

/* Contact */
.contact { padding-bottom: clamp(3rem, 6vw, 5rem); }
.huge { font-size: clamp(4rem, 17vw, 15rem); line-height: .85; letter-spacing: -.05em; font-weight: 600; margin-left: -.04em; }
.contact-lede { color: var(--strong); font: 500 clamp(1.1rem, 1.8vw, 1.35rem)/1.4 var(--display); max-width: 34rem; margin: 1.5rem 0 2rem; }
.contact-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.contact-rows > li > * {
  display: flex; align-items: center; gap: .8rem; padding: 1.25rem 1.5rem; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--strong);
  font: 500 clamp(1rem, 1.6vw, 1.2rem)/1.35 var(--display);
}
.contact-rows a:hover { border-color: var(--strong); }
.plus { color: var(--lime); font-size: 1.3em; line-height: 1; }
:root[data-theme="light"] .plus { color: var(--violet); }

.foot { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem var(--gutter) 2rem; font-size: .9rem; border-top: 1px solid var(--line); }

/* Responsive */
@media (max-width: 960px) {
  .links { display: none; }
  .hero-panel { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: .35rem; }
}
@media (max-width: 640px) {
  .brand-name { display: none; }
  .pill-btn { padding: .6rem .95rem; }
  .facts { grid-template-columns: 1fr; }
  .fact { min-height: 0; flex-direction: row; align-items: baseline; gap: 1rem; justify-content: flex-start; }
  .fact-n { min-width: 3.4rem; }
  .projects { grid-template-columns: 1fr; }
  .shot img { aspect-ratio: 4 / 3; }
  .scard { position: relative; top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1 .ln { animation: none; }
  .pill-btn { transition: none; }
}

@media print {
  .top, .skip, .row, #services { display: none; }
  body { background: #fff; color: #333; }
}
