/* jeffisaak.ca — shared styles. No frameworks, no web fonts, no third-party requests. */

:root {
  --blue: #0277bd;
  --blue-deep: #01497a;
  --orange: #f59300;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --ink: #1c2328;
  --ink-2: #47525a;
  --ink-3: #6f7980;
  --line: #e1dfd8;
  --link: #0270b0;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 8px 24px rgba(20, 30, 40, .06);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161a;
    --surface: #1a2026;
    --surface-2: #222a31;
    --ink: #ecefef;
    --ink-2: #bfc7cc;
    --ink-3: #8d979e;
    --line: #2c353d;
    --link: #5cb8ef;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  --bg: #12161a;
  --surface: #1a2026;
  --surface-2: #222a31;
  --ink: #ecefef;
  --ink-2: #bfc7cc;
  --ink-3: #8d979e;
  --line: #2c353d;
  --link: #5cb8ef;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h2 { font-size: 30px; }
h3 { font-size: 19px; }
p, ul, ol { margin: 0 0 1em; }
li + li { margin-top: .35em; }

code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.topbar .name { font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.topbar nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.topbar nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.topbar nav a:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(245, 147, 0, .35), transparent 60%),
    linear-gradient(155deg, var(--blue), var(--blue-deep));
  color: #fff;
}
.hero .wrap { padding-top: 96px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(44px, 9vw, 92px); letter-spacing: -.04em; margin: 0 0 20px; }
.hero .lead { font-size: clamp(18px, 2.4vw, 22px); color: rgba(255, 255, 255, .9); max-width: 36em; margin: 0 0 32px; }
.hero .lead a { color: #ffd38a; }

.links { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.links li { margin: 0; }
.links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .4);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.links a:hover { background: rgba(255, 255, 255, .12); }
.links svg { width: 18px; height: 18px; flex: none; }

/* ---------- sections ---------- */

section { padding: 80px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.sub { color: var(--ink-2); max-width: 40em; margin: 0 0 32px; }

/* ---------- project cards ---------- */

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.alt .project { background: var(--bg); }
.project .shot { aspect-ratio: 1024 / 500; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.project .shot img { width: 100%; height: 100%; object-fit: cover; }
.project .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.project h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.project p { color: var(--ink-2); font-size: 15.5px; }
.project .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-3);
}
.tag.live { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--link); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.chip:hover { border-color: var(--ink-3); }
.chip svg { width: 16px; height: 16px; }

.retired-head { margin-top: 56px; }

/* ---------- article pages ---------- */

.page-head { padding: 64px 0 8px; }
.page-head h1 { font-size: clamp(34px, 6vw, 52px); letter-spacing: -.035em; }
.page-head .sub { margin-bottom: 0; }
.article { padding: 32px 0 80px; }
.article h2 { font-size: 24px; margin-top: 48px; }
.article h3 { margin-top: 32px; }
.article .figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0 0 16px; }
.article .figure img { border-radius: 8px; background: #fff; }
.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  color: var(--ink-2);
}
.updated { color: var(--ink-3); font-size: 15px; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
thead th { background: var(--surface-2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td small { display: block; color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--ink-2); }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .projects { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .hero .wrap { padding-top: 64px; padding-bottom: 64px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .topbar nav a { padding: 6px 8px; }
}

/* ---------- project extras ---------- */


.projects.compact { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.projects.compact .body { padding: 16px 18px 18px; }
.projects.compact h3 { font-size: 17px; }
.projects.compact p { font-size: 14.5px; }

@media (max-width: 960px) { .projects.compact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .projects.compact { grid-template-columns: 1fr; } }

/* ---------- featured projects: screenshot showcase ---------- */

.project.feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr 1fr; }
.project.feature .body { padding: 32px 32px 32px 8px; justify-content: center; }
.project.feature h3 { font-size: 24px; }
.project.feature p { font-size: 16.5px; }

.showcase {
  --tint: #0f8b93;
  position: relative;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  background:
    radial-gradient(70% 80% at 85% 100%, color-mix(in srgb, var(--tint) 35%, transparent), transparent 70%),
    radial-gradient(60% 60% at 0% 0%, color-mix(in srgb, var(--tint) 12%, transparent), transparent 70%),
    var(--surface-2);
}
.showcase.refresh { --tint: #5f8c47; }

.showcase img { display: block; width: 100%; height: auto; }

.showcase .browser {
  position: absolute;
  left: 6%;
  top: 9%;
  width: 84%;
  border-radius: 10px;
  overflow: hidden;
  background: #0d1214;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .15);
}
.showcase .bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  background: #1c2328;
}
.showcase .bar i { width: 7px; height: 7px; border-radius: 50%; background: #3b464d; }
.showcase .bar span {
  margin-left: 10px;
  font-size: 9px;
  color: #8d979e;
  background: #12171a;
  border-radius: 5px;
  padding: 1px 10px;
}

.showcase .phone {
  position: absolute;
  right: 5%;
  bottom: -14%;
  width: 25%;
  padding: .8%;           /* % of the showcase width: about 3% of the phone, like a real bezel */
  border-radius: 13.5% / 6.6%;  /* the screen's radius plus the bezel, so the curves stay parallel */
  background: #0b0e10;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .12) inset,
    0 30px 50px -10px rgba(0, 0, 0, .55),
    -12px 0 40px -12px rgba(0, 0, 0, .35);
  transform: rotate(4deg);
}
.showcase .phone img { border-radius: 11% / 5%; }

.showcase.refresh .browser { width: 74%; top: 8%; left: 5%; }
.showcase.refresh .browser.second { left: auto; right: 5%; top: auto; bottom: 7%; width: 62%; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .showcase .browser { background: #fff; border-color: rgba(0, 0, 0, .08); }
  :root:not([data-theme="dark"]) .showcase .bar { background: #e9ebec; }
  :root:not([data-theme="dark"]) .showcase .bar i { background: #c9cfd3; }
  :root:not([data-theme="dark"]) .showcase .bar span { background: #fff; color: #6f7980; }
}

@media (max-width: 860px) {
  .project.feature { grid-template-columns: 1fr; }
  .project.feature .body { padding: 22px; }
}
.project.feature .actions { margin-top: 8px; }

/* ---------- stories ---------- */

.story-card {
  display: block;
  max-width: 760px;
  text-decoration: none;
  color: #2f2a24;
  background: #f6f1e7;
  border: 1px solid #e2d9c8;
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.story-card:hover { transform: translateY(-2px); border-color: #4f7a63; }
.story-card span { display: block; }
.story-kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #4f7a63; margin-bottom: 10px; }
.story-title { font: 600 34px/1.15 "Iowan Old Style", Charter, Palatino, Georgia, serif; letter-spacing: -.01em; margin-bottom: 10px; }
.story-dek { font: 400 17px/1.6 "Iowan Old Style", Charter, Palatino, Georgia, serif; color: #5a5249; margin-bottom: 16px; }
.story-go { font-weight: 700; font-size: 15px; color: #3f6b55; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .story-card { background: #26231f; border-color: #3a352f; color: #e8e1d5; }
  :root:not([data-theme="light"]) .story-dek { color: #c3b9aa; }
  :root:not([data-theme="light"]) .story-kicker, :root:not([data-theme="light"]) .story-go { color: #9cc4ab; }
}
