/* philism.me — shared stylesheet.
   Tokens first; light is the default, dark follows the system setting. */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f2f0ec;
  --text: #1d1d1f;
  --muted: #5f6368;
  --line: #e4e1db;
  --accent: #0f7f88;          /* Cook Thru teal, darkened for AA on white */
  --accent-2: #e56a00;        /* Cook Thru orange */
  --accent-soft: #e3f3f4;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --radius: 18px;
  --wrap: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --surface: #1b1e21;
    --surface-2: #24282c;
    --text: #f2f2f0;
    --muted: #a3a9ae;
    --line: #2e3337;
    --accent: #4cc3cc;
    --accent-2: #ff9a3c;
    --accent-soft: #16343a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 740px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { display: block; padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding-block: 32px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }

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

main { display: block; }
.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .6em; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 42em; }
.muted { color: var(--muted); }

.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  text-decoration: none; font-weight: 600; font-size: .98rem;
}
.button:hover { opacity: .88; }
.button.secondary { background: var(--surface-2); color: var(--text); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }

.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.pill.live { background: color-mix(in srgb, #2ea44f 16%, transparent); color: #2a8a45; }
@media (prefers-color-scheme: dark) { .pill.live { color: #5fd27d; } }

.app-icon { border-radius: 22.5%; box-shadow: var(--shadow); }

/* ---------- Home ---------- */

.intro { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; padding-block: 72px 48px; }
.intro .avatar { width: 128px; height: 128px; border-radius: 50%; background: var(--surface-2); }
@media (max-width: 640px) { .intro { grid-template-columns: 1fr; gap: 20px; padding-block: 48px 32px; } .intro .avatar { width: 96px; height: 96px; } }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; margin-top: 28px; }
.app-card {
  display: grid; grid-template-columns: 76px 1fr; gap: 18px; align-items: start;
  padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.app-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.app-card img { width: 76px; height: 76px; }
.app-card h3 { margin: 2px 0 4px; }
.app-card p { margin: 0 0 10px; color: var(--muted); font-size: .95rem; }

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

.app-hero { padding-block: 72px 56px; text-align: center; }
.app-hero .app-icon { width: 132px; height: 132px; margin: 0 auto 24px; }
.app-hero .lede { margin-inline: auto; }
.app-hero .actions { justify-content: center; }
.platforms { margin-top: 18px; color: var(--muted); font-size: .92rem; }

/* ---------- Feature rows ---------- */

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-block: 64px; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature-text p { color: var(--muted); }
.feature-text ul { color: var(--muted); padding-left: 1.1em; margin: 0; }
.feature-text li { margin-bottom: .35em; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 28px; padding-block: 48px; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
}

.stage {
  background: linear-gradient(160deg, var(--accent-soft), var(--surface-2));
  border-radius: 28px; padding: 36px 20px;
  display: flex; justify-content: center; align-items: center; gap: 18px;
  min-height: 360px; flex-wrap: wrap;
}

/* ---------- Illustrative UI mockups (swap for real screenshots later) ---------- */

.phone {
  width: 250px; max-width: 100%;
  background: var(--surface); color: var(--text);
  border: 8px solid #1d1d1f; border-radius: 38px;
  padding: 22px 16px 18px; box-shadow: var(--shadow);
  font-size: .86rem; line-height: 1.4;
}
@media (prefers-color-scheme: dark) { .phone { border-color: #3a3f44; } }
.phone .bar { font-size: .72rem; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 12px; }
.phone .title { font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.phone .step-big { font-size: 1.15rem; font-weight: 600; line-height: 1.35; margin: 10px 0 14px; }
.phone .chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); margin: 0 4px 6px 0; font-size: .76rem; }
.phone .timer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.phone .progress { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.phone .progress i { display: block; height: 100%; width: 43%; background: var(--accent); }
.phone .row { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.phone .row:last-child { border-bottom: 0; }
.phone .group { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 2px; font-weight: 700; }
.phone .day { border-radius: 12px; background: var(--surface-2); padding: 8px 10px; margin-bottom: 8px; }
.phone .day b { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.phone .day.today { outline: 2px solid var(--accent); }
.phone .suggest { color: var(--accent); font-size: .76rem; font-weight: 600; }

.page-scan {
  width: 190px; aspect-ratio: 3 / 4; max-width: 100%;
  background: #fffdf6; color: #3a3530; border-radius: 6px; padding: 16px 14px;
  box-shadow: var(--shadow); transform: rotate(-3deg);
  font-family: Georgia, "Times New Roman", serif; font-size: .62rem; line-height: 1.45;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start;
}
.page-scan h4 { grid-column: 1 / -1; margin: 0 0 4px; font-size: .9rem; }
.page-scan p { margin: 0 0 4px; }
.arrow { font-size: 1.8rem; color: var(--accent); }
@media (max-width: 560px) { .arrow { transform: rotate(90deg); } }

.bubble { max-width: 260px; padding: 12px 16px; border-radius: 20px; box-shadow: var(--shadow); font-size: .95rem; }
.bubble.you { background: var(--surface); border-bottom-right-radius: 6px; align-self: flex-end; }
.bubble.siri { background: var(--accent); color: #fff; border-bottom-left-radius: 6px; }
@media (prefers-color-scheme: dark) { .bubble.siri { color: #0b1f22; } }
.stack { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 300px; }

.source-list { display: grid; gap: 10px; width: 100%; max-width: 300px; }
.source { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); font-weight: 600; font-size: .92rem; }
.source .glyph { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1rem; flex: none; }
.source small { display: block; color: var(--muted); font-weight: 400; }

.devices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 320px; }
.device { padding: 10px 16px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: .92rem; }

.icon-choices { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.icon-choices figure { margin: 0; text-align: center; font-size: .88rem; color: var(--muted); }
.icon-choices img { width: 112px; height: 112px; margin-bottom: 10px; }
.swatches { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.swatches span { width: 26px; height: 26px; border-radius: 50%; box-shadow: var(--shadow); }

/* ---------- Callout / cards ---------- */

.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 24px; }
.card-grid .callout h3 { margin-bottom: .35em; }
.card-grid .callout p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Prose pages (privacy, support, resume) ---------- */

.prose { padding-block: 56px 0; }
.prose h1 { font-size: clamp(2rem, 4.2vw, 2.8rem); }
.prose h2 { font-size: 1.45rem; margin-top: 2em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .4em; }
.prose .page-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.prose .page-head img { width: 64px; height: 64px; }
.prose .page-head h1 { margin: 0; }
.updated { color: var(--muted); font-size: .92rem; }

details { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; background: var(--surface); margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
details p:last-child { margin-bottom: 0; }

.phrase-list { list-style: none; padding: 0 !important; }
.phrase-list li { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: .95rem; }

/* Resume */
.resume-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.resume-head img { width: 96px; height: 96px; border-radius: 50%; background: var(--surface-2); }
.resume-head h1 { margin-bottom: .1em; }
.contact { display: flex; gap: 16px; flex-wrap: wrap; list-style: none; padding: 0 !important; margin: 10px 0 0; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; }
.tags li { background: var(--surface-2); border-radius: 999px; padding: 4px 12px; font-size: .9rem; margin: 0; }
.job { padding-block: 22px; border-top: 1px solid var(--line); }
.job h3 { margin: 0; font-size: 1.15rem; }
.job .role { color: var(--muted); margin: 2px 0 8px; }

/* Screenshot gallery (Solitary) */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 24px; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gallery img { width: 100%; height: 220px; object-fit: contain; padding: 10px; }
