/* The home page, /apps and /resume. 404 keeps /style.css. */
/* Fonts: latin subsets of Inter (variable) and IBM Plex Mono from Google Fonts, served from /fonts. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-500-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #fbfbfc;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5f6470;
  --line: #e3e5ea;
  --line-strong: #d3d6dd;
  --link: #1a56db;
  --link-hover: #1240a8;
  --accent: #1a56db;
  --on-accent: #ffffff;
  --button: #16181d;
  --on-button: #ffffff;
  --dot: #1a7f4b;
  --band: #16181d;
  --band-text: #ffffff;
  --band-muted: #b4b8c2;
  --band-line: #343842;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --text: #f2f3f5;
    --muted: #9aa0ad;
    --line: #262a33;
    --line-strong: #343842;
    --link: #7ea2ff;
    --link-hover: #a9c0ff;
    --accent: #7ea2ff;
    --on-accent: #0f1115;
    --button: #f2f3f5;
    --on-button: #0f1115;
    --dot: #3ccf7a;
    --band: #080a0d;
    --band-text: #f2f3f5;
    --band-muted: #9aa0ad;
    --band-line: #2a2e38;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
dd { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.mono { font-family: var(--mono); font-size: 13px; }
.label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { color: var(--on-accent); filter: brightness(1.08); }
.button-dark { background: var(--button); color: var(--on-button); }
.button-dark:hover { color: var(--on-button); }
.button-outline { border: 1px solid var(--line-strong); color: var(--text); }
.button-outline:hover { color: var(--text); border-color: var(--muted); }
.button-small { height: 36px; padding: 0 14px; font-size: 14px; }
.button svg { flex: none; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 18px 0; }
.site-nav .brand { color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.site-nav ul { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.site-nav ul a:not(.button) { color: var(--text); text-decoration: none; }
.site-nav ul a:not(.button):hover { color: var(--link); }

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-raised { background: var(--surface); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section h2 { font-size: 30px; font-weight: 700; }
.split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; }
.split h2 { margin-bottom: 12px; }
.split .intro { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }

/* Hero */
.hero { padding: 88px 0 64px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; align-items: start; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.status { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); flex: none; }
.hero h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.hero .lede { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 600px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.glance { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; font-size: 15px; }
.glance-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.glance dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px 16px; padding: 18px; }
.glance dt { color: var(--muted); }
.glance .links { display: flex; gap: 14px; flex-wrap: wrap; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 14px; padding: 24px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none;
}
a.card:hover { border-color: var(--muted); color: var(--text); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-meta .repo { font-weight: 500; color: var(--text); }
.card h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
.card p { font-size: 15px; color: var(--muted); }
.card .origin { font-size: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card .more { margin-top: auto; font-size: 14px; font-weight: 600; text-decoration: none; }
.card-project { gap: 8px; }
.card-project .kind { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card-project .name { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.card-project.with-shot { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 20px; align-items: center; }
.card-project.with-shot .text { display: flex; flex-direction: column; gap: 8px; }
.card-project .name.with-icon { display: flex; align-items: center; gap: 10px; }
.card-project .app-icon { display: block; width: 32px; height: 32px; }
.card-project .shot { width: 180px; height: 110px; object-fit: cover; object-position: left top; border-radius: 8px; border: 1px solid var(--line); }
.card-apps { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
.card-apps .text { display: flex; flex-direction: column; gap: 8px; }
.card-apps .kind { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card-apps .name { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.aside-note { margin-top: 28px; font-size: 15px; color: var(--muted); }

/* Experience */
.roles li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.roles li:last-child { border-bottom: 1px solid var(--line); }
.roles .when { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 4px; }
.roles .role { display: flex; flex-direction: column; gap: 6px; }
.roles .title { font-size: 18px; font-weight: 600; }
.roles .org { font-weight: 500; color: var(--muted); }
.roles .what { font-size: 15px; color: var(--muted); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; font-size: 15px; }
.skills > div { display: flex; flex-direction: column; gap: 6px; }

/* Contact band */
.band { background: var(--band); color: var(--band-text); }
.band .wrap { padding-top: 80px; padding-bottom: 80px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.band h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 16px; }
.band p { font-size: 18px; color: var(--band-muted); max-width: 460px; }
.band ul li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--band-line); }
.band ul li:last-child { border-bottom: 1px solid var(--band-line); }
.band ul span { color: var(--band-muted); }
.band ul a { color: var(--band-text); text-decoration: none; font-weight: 500; }
.band ul a:hover { text-decoration: underline; }

.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.band + .site-footer-band { background: var(--band); color: var(--band-muted); border-top: 1px solid var(--band-line); }
.band + .site-footer-band .site-footer { border-top: 0; color: inherit; }

/* Résumé page */
.resume { padding: 64px 0 80px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; }
.resume-side { display: flex; flex-direction: column; gap: 28px; font-size: 15px; }
.resume-side h1 { font-size: 30px; font-weight: 700; margin-bottom: 6px; }
.resume-side .who { display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.resume-side ul { display: flex; flex-direction: column; gap: 8px; }
.resume-side ul a { text-decoration: none; }
.resume-side ul a:hover { text-decoration: underline; }
.resume-side section { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.resume-side section div { display: flex; flex-direction: column; gap: 4px; }
.resume-side section div span:first-child { font-weight: 600; }
.resume-side section div span:last-child { color: var(--muted); }
.resume-main { display: flex; flex-direction: column; gap: 48px; }
.resume-main section { display: flex; flex-direction: column; gap: 16px; }
.resume-main .summary { font-size: 18px; }
.resume-main .entries { display: flex; flex-direction: column; gap: 28px; }
.resume-main .entries > li { display: flex; flex-direction: column; gap: 8px; }
.resume-main .entry-head { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; align-items: baseline; }
.resume-main .entry-head .title { font-weight: 600; font-size: 17px; }
.resume-main .entry-head .when { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.resume-main .bullets { list-style: disc; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.resume-main .oss { display: flex; flex-direction: column; gap: 16px; }
.resume-main .oss li { display: flex; flex-direction: column; gap: 4px; }
.resume-main .oss .name { font-weight: 600; }
.resume-main .oss .pr { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--muted); }
.resume-main .oss p { color: var(--muted); }
.resume-main .projects li { margin-bottom: 12px; }
.resume-main .projects .name { font-weight: 600; }
.resume-main .projects span:last-child { color: var(--muted); }
.download {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
}
.download .button { height: 42px; padding: 0 18px; }

/* Apps page */
.page-head { padding: 72px 0 40px; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { font-size: clamp(36px, 5vw, 54px); letter-spacing: -0.03em; font-weight: 700; }
.page-head .lede { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 640px; }
.apps { display: flex; flex-direction: column; gap: 20px; padding-bottom: 80px; }
.app { display: grid; grid-template-columns: 360px minmax(0, 1fr); border-radius: 12px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.app-media { min-height: 300px; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); border-right: 1px solid var(--line); }
.app-media img, .app-media video { display: block; max-height: 300px; width: auto; max-width: 100%; height: auto; border-radius: 8px; }
.app-body { display: flex; flex-direction: column; gap: 10px; padding: 24px 28px; }
.app-body .kind { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.app-body h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.app-body p { font-size: 15px; max-width: 640px; }
.app-body .role { color: var(--muted); }
.stores { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }

/* Writing */
.articles li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.articles li:last-child { border-bottom: 1px solid var(--line); }
.articles .when { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.articles a { font-weight: 600; text-decoration: none; color: var(--text); }
.articles a:hover { color: var(--link); }
.articles .where { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; }
  .cards { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .band .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 56px; padding-bottom: 56px; }
  .resume { grid-template-columns: 1fr; gap: 40px; }
  .app { grid-template-columns: 280px minmax(0, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .section { padding: 48px 0; }
  .section h2 { font-size: 26px; }
  .hero .lede { font-size: 17px; }
  .hero .actions { flex-direction: column; }
  .hero .actions .button { width: 100%; }
  .glance dl { grid-template-columns: 88px minmax(0, 1fr); font-size: 14px; }
  .card { padding: 20px; }
  .card-project.with-shot { grid-template-columns: 1fr; }
  .card-apps { flex-direction: column; align-items: stretch; }
  .card-apps .button { width: 100%; }
  .card-project .shot { width: 100%; height: auto; aspect-ratio: 16 / 9; order: -1; }
  .apps { padding-bottom: 56px; }
  .app { grid-template-columns: 1fr; }
  .app-media { min-height: 0; padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .app-media img, .app-media video { max-height: 260px; }
  .app-body { padding: 20px; }
  .page-head { padding: 48px 0 32px; }
  .page-head .lede { font-size: 17px; }
  .articles li { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
  .roles li { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .roles .when { padding-top: 0; font-size: 12px; }
  .roles .title { font-size: 17px; }
  .skills { grid-template-columns: 1fr; }
  .band h2 { font-size: 32px; }
  .band ul li { flex-direction: column; gap: 2px; }
  .band ul span { font-size: 13px; }
}

@media print {
  .site-header, .download, .site-footer { display: none; }
  body { font-size: 12pt; color: #000; background: #fff; }
  .resume { padding: 0; gap: 32px; }
}
