@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* AcPlus IBM VGA 9x16 from the Oldschool PC Font Pack by VileR (int10h.org), CC BY-SA 4.0.
   Subset to digits, space, underscore and ">" for the Ninety Three tile; the subset is under the same license. */
@font-face {
  font-family: "IBM VGA 9x16";
  src: url("fonts/ibm-vga-9x16-subset.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: light;
  --display: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --ground: #FBF8F3;
  --surface: #FFFFFF;
  --band: #F2EEE7;
  --ink: #2A2233;
  --muted: #5E566A;
  --line: #E4DDD2;
  --plum: #3D2D5E;
  --plum-soft: #EDE6F6;
  --button: #3D2D5E;
  --on-button: #FBF8F3;
  --ember: #B4541A;
  --focus: #B4541A;
  --contact-bg: #3D2D5E;
  --contact-ink: #FBF8F3;
  --contact-muted: #E6DFF0;
  --card-shadow: 0 1px 0 rgba(42, 34, 51, 0.06), 0 16px 40px rgba(42, 34, 51, 0.08);
  --avatar-shadow: 0 24px 48px rgba(42, 34, 51, 0.22);
  --ph-bg: #FFF0B8;
  --ph-ink: #5A4500;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #16121C;
    --surface: #221B2B;
    --band: #1C1623;
    --ink: #F1ECF6;
    --muted: #B3A9C0;
    --line: #362E40;
    --plum: #CDBAF2;
    --plum-soft: #2E2540;
    --button: #CDBAF2;
    --on-button: #1E1628;
    --ember: #F2A066;
    --focus: #F2A066;
    --contact-bg: #2E2540;
    --contact-ink: #F1ECF6;
    --contact-muted: #CFC5DC;
    --card-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
    --avatar-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    --ph-bg: #4A3D10;
    --ph-ink: #FFE08A;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #16121C;
  --surface: #221B2B;
  --band: #1C1623;
  --ink: #F1ECF6;
  --muted: #B3A9C0;
  --line: #362E40;
  --plum: #CDBAF2;
  --plum-soft: #2E2540;
  --button: #CDBAF2;
  --on-button: #1E1628;
  --ember: #F2A066;
  --focus: #F2A066;
  --contact-bg: #2E2540;
  --contact-ink: #F1ECF6;
  --contact-muted: #CFC5DC;
  --card-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
  --avatar-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --ph-bg: #4A3D10;
  --ph-ink: #FFE08A;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--plum); text-underline-offset: 3px; }
a:hover { color: var(--ember); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

img { max-width: 100%; }

/* Components set their own display, which would otherwise override the hidden attribute. */
[hidden] { display: none !important; }

mark.ph {
  background: var(--ph-bg);
  color: var(--ph-ink);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: 1216px;
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 48px);
}

/* Header */

.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span { font-family: var(--display); font-size: 22px; font-weight: 900; }

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { background: var(--plum-soft); color: var(--plum); }
.site-nav a.nav-cta { background: var(--button); color: var(--on-button); }

/* Shared pieces */

.chip {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--plum-soft);
  color: var(--plum);
  font-size: 15px;
  font-weight: 700;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--button);
  color: var(--on-button);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { color: var(--on-button); filter: brightness(1.12); }
.button.secondary { background: var(--plum-soft); color: var(--plum); }
.button.secondary:hover { color: var(--plum); filter: none; box-shadow: inset 0 0 0 2px var(--plum); }

.app-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 25%;
  overflow: hidden;
  background: var(--bg, #3D2D5E);
  color: var(--fg, #FFFFFF);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}
.app-icon img { width: 72%; height: 72%; object-fit: contain; }
.app-icon.photo img { width: 100%; height: 100%; object-fit: cover; }
.app-icon img.fill { width: 98%; height: 98%; }
.app-icon img.mark-white { width: auto; height: 60%; filter: brightness(0) invert(1); }
.app-icon.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; }

/* Ninety Three: green phosphor text on a black tube, with glow, vignette and scanlines */
.app-icon.crt {
  position: relative;
  background: radial-gradient(ellipse at 50% 45%, #0E2A14 0%, #061208 55%, #010301 100%);
  color: #6BFF7F;
  font-family: "IBM VGA 9x16", ui-monospace, monospace;
  font-weight: 400;
  text-shadow: 0 0 1px #B6FFC0, 0 0 4px rgba(90, 255, 120, 0.9), 0 0 10px rgba(60, 255, 100, 0.55), 0 0 20px rgba(40, 255, 90, 0.3);
}
.app-icon.crt::before,
.app-icon.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.app-icon.crt::before {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(80, 255, 120, 0.12) 0%, rgba(80, 255, 120, 0) 60%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.7) 100%);
}
.app-icon.crt::after {
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0.3) 1px, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0) 3px);
}
.app-icon.crt > span { position: relative; }

.section { padding-block: 96px; }
.section.band { background: var(--band); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px 24px;
  margin-bottom: 32px;
}
.section-head h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 900; letter-spacing: -0.01em; line-height: 1.05; }
.section-head p { color: var(--muted); font-size: 17px; }

/* Hero */

.hero .wrap {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 72px;
  align-items: center;
  padding-block: 48px 104px;
}
.hero-avatar {
  width: 340px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 22%;
  box-shadow: var(--avatar-shadow);
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(46px, 7vw, 84px); line-height: 0.98; font-weight: 900; letter-spacing: -0.02em; }
.lede { max-width: 34em; font-size: clamp(18px, 2vw, 23px); line-height: 1.5; }

/* Things I've shipped */

.shipped {
  display: grid;
  grid-template-columns: 560px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.homescreen {
  position: relative;
  padding: 44px 40px;
  border-radius: 40px;
  overflow: hidden;
  background:
    radial-gradient(55% 70% at 0% 10%, #D9731F 0%, rgba(217, 115, 31, 0) 70%),
    radial-gradient(60% 70% at 100% 100%, #138EC4 0%, rgba(19, 142, 196, 0) 70%),
    radial-gradient(45% 50% at 10% 100%, #3E9A62 0%, rgba(62, 154, 98, 0) 70%),
    linear-gradient(160deg, #4A2A7A 0%, #2F3B8F 100%);
}
.homescreen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(24, 14, 44, 0.32);
}

.tiles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  container-type: inline-size;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #FFFFFF;
  font: inherit;
  cursor: pointer;
}
.tile .app-icon {
  width: 100%;
  max-width: 88px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 25%;
  font-size: clamp(22px, 9cqi, 40px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile .app-icon.mono-2 { font-size: clamp(17px, 7cqi, 30px); }
.tile .app-icon.emoji { font-size: clamp(28px, 10cqi, 46px); }
.tile .app-icon.crt { font-size: 32px; }
.tile:hover .app-icon { transform: translateY(-2px); }
.tile[aria-pressed="true"] .app-icon { box-shadow: 0 0 0 4px #FFFFFF, 0 8px 20px rgba(0, 0, 0, 0.35); }
.tile:focus-visible { outline-color: #FFFFFF; }
.tile-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.app-card {
  padding: 40px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.app-detail { display: flex; flex-direction: column; gap: 20px; }
.app-detail > header { display: flex; align-items: center; gap: 20px; }
.app-detail .app-icon { width: 96px; height: 96px; border-radius: 24px; font-size: 46px; }
.app-detail .app-icon.mono-2 { font-size: 34px; }
.app-detail .app-icon.emoji { font-size: 52px; }
.app-detail .app-icon.crt { font-size: 32px; }
.app-detail h3 { font-size: 32px; font-weight: 900; line-height: 1.1; }
.app-sub { color: var(--muted); font-size: 17px; }
.app-tag {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--band);
  color: var(--plum);
  font-size: 14px;
  font-weight: 600;
}
.app-detail ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 20px; font-size: 18px; }
.app-detail p { font-size: 18px; }
.app-detail dl { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.app-detail dt { color: var(--ember); font-size: 14px; font-weight: 700; }
.app-detail dd { margin: 4px 0 0; font-size: 17px; }

.shipped-note { margin-top: 24px; color: var(--muted); font-size: 16px; }

/* Principles */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.principle {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px;
  border-radius: 28px;
  background: var(--surface);
}
.principle h3 { font-size: 24px; line-height: 1.15; font-weight: 800; }
.principle p { font-size: 17px; }

/* Career */

.career { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 64px; }
.career-intro { display: flex; flex-direction: column; gap: 16px; }
.career-intro h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 900; letter-spacing: -0.01em; line-height: 1.05; }
.career-intro p { color: var(--muted); font-size: 18px; }

.history { margin: 0; padding: 0; list-style: none; }
.history > li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.history > li:last-child { border-bottom: 1px solid var(--line); }
.history-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.history-head h3 { font-size: 22px; font-weight: 900; }
.history-head span { color: var(--muted); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.role { color: var(--plum); font-size: 16px; font-weight: 600; }

/* Contact */

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px;
  align-items: center;
  padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 64px);
  border-radius: 40px;
  background: var(--contact-bg);
  color: var(--contact-ink);
}
.contact-copy { display: flex; flex-direction: column; gap: 14px; }
.contact-card h2 { font-size: clamp(36px, 5vw, 52px); font-weight: 900; }
.contact-card p { max-width: 30em; color: var(--contact-muted); font-size: 20px; }
.contact-card a { color: var(--contact-ink); }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; font-weight: 600; }
.email-button {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--ground);
  color: var(--plum);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}
.contact-card .email-button { color: var(--plum); }
.contact-card .email-button:hover { color: var(--ember); }

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 32px 48px;
  color: var(--muted);
  font-size: 15px;
}

/* Responsive */

@media (max-width: 1040px) {
  .shipped { grid-template-columns: 1fr; }
  .homescreen { max-width: 640px; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; padding-block: 16px 56px; }
  .hero-avatar { width: 168px; }
  .career { grid-template-columns: 1fr; gap: 24px; }
  .contact-card { grid-template-columns: 1fr; }
  .email-button { justify-self: start; }
}

@media (max-width: 760px) {
  .site-nav li:not(:last-child) { display: none; }
  .section { padding-block: 56px; }
  .principles { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .actions .button { flex: 1 1 100%; }
  .homescreen { padding: 28px 16px; border-radius: 32px; }
  .tiles { gap: 20px 8px; }
  .tile-name { font-size: 12px; }
  .app-card { padding: 24px; }
  .app-detail .app-icon { width: 72px; height: 72px; border-radius: 18px; font-size: 34px; }
  .app-detail .app-icon.mono-2 { font-size: 26px; }
  .app-detail .app-icon.emoji { font-size: 40px; }
  .tile .app-icon.crt, .app-detail .app-icon.crt { font-size: 24px; }
  .app-detail h3 { font-size: 26px; }
  .email-button { font-size: 18px; padding: 0 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile .app-icon { transition: none; }
  .tile:hover .app-icon { transform: none; }
}
