/* seanr.org — cobalt and navy, with a sky-blue spark. Outfit for display, the system font for reading. */

/* Outfit, a variable font (all weights), hosted here. Licence: assets/fonts/Outfit-OFL.txt */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/outfit-latin.woff2") format("woff2");
}

:root {
  --accent: #1f4fd6;
  --accent-strong: #163ba6;
  --accent-soft: #e7eefd;
  --sky: #2aa7f0;
  --navy: #0b1f4b;
  --bg: #f5f7fc;
  --surface: #ffffff;
  --text: #0f1a2e;
  --muted: #56627a;
  --line: #dde3ef;
  --grid: rgb(31 79 214 / 7%);
  --shadow: 0 1px 2px rgb(11 31 75 / 6%), 0 10px 30px rgb(11 31 75 / 9%);
  --radius: 16px;
  --max: 1120px;
  --prose: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Outfit for headings; Futura if it ever fails to load. */
  --font-display: "Outfit", Futura, "Century Gothic", "Avenir Next", var(--font);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7ea6ff;
    --accent-strong: #a9c3ff;
    --accent-soft: #15234a;
    --sky: #5ec8ff;
    --bg: #080e1c;
    --surface: #0f1830;
    --text: #e7eeff;
    --muted: #9aabcc;
    --line: #1f2c4a;
    --grid: rgb(126 166 255 / 7%);
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 10px 30px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; }
::selection { background: var(--sky); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.home .site-header { background: color-mix(in srgb, var(--navy) 88%, transparent); border-bottom-color: rgb(255 255 255 / 8%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 500; font-size: 19px; }
.brand:hover { color: var(--text); }
.home .brand, .home .brand:hover { color: #fff; }
/* Sean's GitHub avatar */
.mark { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgb(255 255 255 / 70%), 0 1px 3px rgb(11 31 75 / 25%); }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a { font-family: var(--font-display); font-weight: 500; color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 11px; border-radius: 999px; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); background: var(--accent-soft); }
.site-nav .nav-cta { background: var(--accent); color: #fff; }
.site-nav .nav-cta:hover { background: var(--accent-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .site-nav .nav-cta, .site-nav .nav-cta:hover { color: #08122b; } }
.home .site-nav a { color: rgb(255 255 255 / 75%); }
.home .site-nav a:hover { color: #fff; background: rgb(255 255 255 / 10%); }
.home .site-nav .nav-cta { background: #fff; color: var(--navy); }
.home .site-nav .nav-cta:hover { background: var(--sky); color: #fff; }
@media (max-width: 640px) {
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 0; }
  .site-nav a { padding: 6px 8px; font-size: 14px; }
}

/* Buttons */
.button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-family: var(--font-display); font-weight: 500; text-decoration: none; background: var(--accent); color: #fff; }
.button:hover { background: var(--accent-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .button, .button:hover { color: #08122b; } }
.more { font-family: var(--font-display); font-weight: 500; text-decoration: none; }
.more::after { content: " →"; transition: margin 0.15s; }
.more:hover::after { margin-left: 4px; }

/* Hero: a deep blue gradient */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 90% at 85% 10%, #2a63f0 0%, transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, #12307a 55%, #1d47c4 100%);
  margin-top: -61px; padding-top: 61px;
}
@media (prefers-color-scheme: dark) { .hero { background-color: #060c1a; } }
.hero-inner { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 88px; }
@media (min-width: 900px) { .hero-inner { padding-top: 112px; padding-bottom: 128px; } }
.hero-kicker { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #9fd9ff; margin: 0 0 18px; }
.hero h1 { font-size: clamp(48px, 10vw, 104px); line-height: 1; margin: 0 0 24px; letter-spacing: -0.01em; }
.caret { display: inline-block; width: 0.08em; height: 0.82em; margin-left: 0.08em; background: var(--sky); vertical-align: -0.04em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.hero-lede { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.5; max-width: 32em; color: rgb(255 255 255 / 82%); margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .button { background: #fff; color: var(--navy); }
.hero .button:hover { background: var(--sky); color: #fff; }
.hero .button.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 45%); }
.hero .button.ghost:hover { background: rgb(255 255 255 / 10%); box-shadow: inset 0 0 0 1.5px #fff; }

/* Sections */
.section { padding: 72px 0 0; }
.section-label { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 500; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.section-label::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--sky); }
.section-title { font-size: clamp(28px, 4vw, 38px); margin: 0 0 28px; }
.section-title.spaced { margin-top: 72px; margin-bottom: 8px; }
.sub { color: var(--muted); margin: 0 0 28px; }
.years { margin: 0; font-family: var(--font-display); font-size: 14px; letter-spacing: 0.06em; color: var(--muted); }

/* Featured app */
.feature-app { display: grid; gap: 32px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); overflow: hidden; }
@media (min-width: 860px) { .feature-app { grid-template-columns: 1.25fr 0.75fr; padding: 48px; } }
.feature-title { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.feature-title h2 { font-size: clamp(30px, 4vw, 42px); margin: 0; }
.app-icon { width: 72px; height: 72px; border-radius: 17px; box-shadow: var(--shadow); }
.feature-copy p { color: var(--muted); }
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 24px 0 8px; }
.feature-shot { position: relative; display: flex; justify-content: center; }
.feature-shot::before { content: ""; position: absolute; inset: 10% -10%; background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 22px 22px; border-radius: 50%; }
.feature-shot img { position: relative; width: 62%; max-width: 250px; border-radius: 30px; border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(3deg); transition: transform 0.3s; }
.feature-app:hover .feature-shot img { transform: rotate(0deg) translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .feature-shot img, .feature-app:hover .feature-shot img { transition: none; } }
.app-store-badge { margin: 0; line-height: 0; }
.app-store-badge img { height: 46px; width: auto; }

/* Past apps */
.app-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.app-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.app-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.app-shot { display: flex; align-items: flex-end; justify-content: center; height: 210px; padding: 22px 22px 0; background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px, var(--accent-soft); overflow: hidden; }
.app-shot img { max-height: 100%; width: auto; object-fit: contain; object-position: bottom; filter: drop-shadow(0 8px 16px rgb(11 31 75 / 18%)); }
.app-card.wide .app-shot { align-items: center; padding: 22px 14px; }
.app-meta { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 20px; }
.app-meta strong { font-family: var(--font-display); font-weight: 500; font-size: 21px; }
.app-meta .summary { color: var(--muted); font-size: 15px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .app-card, .app-card:hover { transition: none; transform: none; } }

/* Post lists */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--line); }
.post-list li:first-child { border-top: 0; }
.post-list a { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; color: var(--text); text-decoration: none; }
.post-list a:hover strong, .post-list a:hover { color: var(--accent); }
.post-list time { flex: none; min-width: 3.6em; font-family: var(--font-display); font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-list strong { font-weight: 600; }
.post-list .excerpt { display: block; color: var(--muted); font-size: 15px; }
.year { font-size: 22px; margin: 40px 0 4px; color: var(--accent); }
.year:first-child { margin-top: 0; }

/* Pages and posts */
.page { padding-top: 56px; }
.prose { max-width: var(--prose); }
.page .prose, .post-nav { margin-left: auto; margin-right: auto; }
.page > .page-head.prose { margin-left: 0; }
.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.05; margin: 0 0 16px; }
.eyebrow { font-family: var(--font-display); font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.eyebrow a { color: var(--muted); }
.lede { font-size: 21px; line-height: 1.5; color: var(--muted); margin: 0; }
.status { display: inline-block; margin: 18px 0 0; padding: 8px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 15px; }
.prose h2 { font-size: 28px; margin: 48px 0 12px; }
.prose h3 { font-size: 21px; margin: 32px 0 8px; }
.prose blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--sky); color: var(--muted); }
.prose blockquote p:first-child { margin-top: 0; }
.prose li + li { margin-top: 6px; }
.prose img { display: block; margin: 28px auto; }
.prose img.wide { width: 100%; }
.prose img.phone { max-width: 220px; }
@media (min-width: 700px) { .prose img.right { float: right; margin: 6px 0 20px 32px; } }
.prose .button { margin-top: 8px; }
.prose .app-store-badge img { margin: 28px 0 0; }
.tags { clear: both; display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.tags span { font-family: var(--font-display); font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; }
.post-nav a { text-decoration: none; font-family: var(--font-display); font-weight: 500; }
.post-nav small { display: block; font-family: var(--font); font-size: 13px; color: var(--muted); }
.post-nav .next { text-align: right; margin-left: auto; }

/* Footer */
.site-footer { margin-top: 112px; padding: 36px 0 52px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer p { margin: 0; }

/* Figures and videos in posts */
.prose figure { margin: 28px 0; text-align: center; }
.prose figure img, .prose figure video { display: block; margin: 0 auto; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.prose figcaption { margin-top: 10px; font-family: var(--font-display); font-size: 14px; color: var(--muted); }
