/* Tony Stone Development: shared look for the home page and project pages. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1d2430;
  --muted: #5b6676;
  --line: #e2e6ec;
  --accent: #e8743b;
  --accent-ink: #ffffff;
  --accent-soft: #fdeee5;
  --link: #1f6feb;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 8px 24px rgba(20, 30, 50, .06);
  --radius: 14px;
  --hero-from: #1b2433;
  --hero-to: #2c3e5a;
}
/* Dark: when the system asks for it, unless Light was chosen, or when Dark was chosen. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151c;
    --panel: #181e27;
    --ink: #e6e9ef;
    --muted: #9aa5b5;
    --line: #273040;
    --accent: #f08a50;
    --accent-ink: #1a1208;
    --accent-soft: #2a1d15;
    --link: #6aa6ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --hero-from: #0d1118;
    --hero-to: #1b2638;
  }
}
:root[data-theme="dark"] {
  --bg: #11151c;
  --panel: #181e27;
  --ink: #e6e9ef;
  --muted: #9aa5b5;
  --line: #273040;
  --accent: #f08a50;
  --accent-ink: #1a1208;
  --accent-soft: #2a1d15;
  --link: #6aa6ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --hero-from: #0d1118;
  --hero-to: #1b2638;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; letter-spacing: .2px; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; }
.brand span { color: var(--accent); }
.top nav a { margin-left: 22px; color: var(--muted); font-size: 15px; }
.top nav a:hover { color: var(--ink); text-decoration: none; }
.top nav a.themebtn { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); margin: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 13px; white-space: nowrap; background: var(--bg); }
@media (max-width: 1420px) { .top .wrap { padding-right: 140px; } }

/* Hero */
.hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #eef2f8; padding: 72px 0 64px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.5px; }
.hero p.lead { font-size: 19px; max-width: 720px; color: #c9d3e2; margin: 0; }
.hero .kicker { text-transform: uppercase; letter-spacing: 2px; font-size: 13px; color: #f3b38d; margin-bottom: 12px; }

/* Announcement */
.announce { margin-top: -36px; }
.announce .card { display: grid; grid-template-columns: 120px 1fr auto; gap: 26px; align-items: center; padding: 28px 30px; border-left: 6px solid var(--accent); }
.announce img { width: 120px; height: 120px; object-fit: contain; }
.announce h2 { margin: 4px 0 6px; font-size: 26px; }
.announce p { margin: 0; color: var(--muted); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.button { font: inherit; font-weight: 650; border: 0; cursor: pointer; display: inline-block; padding: 11px 20px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 650; white-space: nowrap; }
.button:hover { text-decoration: none; filter: brightness(1.06); }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* Sections */
section { padding: 56px 0 8px; }
section h2.title { font-size: 28px; margin: 0 0 6px; }
section p.sub { color: var(--muted); margin: 0 0 26px; max-width: 760px; }

/* Project grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.project { overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.project:hover { transform: translateY(-3px); }
.project .shot { aspect-ratio: 16 / 10; background: var(--line); overflow: hidden; }
.project .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.project .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.project h3 { margin: 0 0 6px; font-size: 20px; }
.project p { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.project .links a { font-weight: 600; font-size: 15px; }
@media (min-width: 761px) {
  .project.wide { grid-column: 1 / -1; flex-direction: row; }
  .project.wide .shot { flex: 0 0 44%; aspect-ratio: auto; }
  .project.wide .body { padding: 24px 28px; }
}
.project.wide p { flex: none; }
.project .shot.white { background: #fff; }
.project .shot.white img { object-fit: contain; object-position: center; }
.project .pages { font-size: 14px; }
.footnote { color: var(--muted); font-size: 14px; margin: 22px 0 0; max-width: 760px; }
.footnote code { font-size: 13px; color: var(--ink); }
.project.wide .tags { margin-top: auto; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.about .card { padding: 24px 26px; }
.about ul { margin: 0; padding-left: 20px; color: var(--muted); }

footer { margin-top: 64px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Project page pieces */
.steps { counter-reset: step; display: grid; gap: 14px; }
.step { padding: 18px 22px 18px 70px; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 22px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; }
.step h3 { margin: 0 0 4px; font-size: 18px; }
.step .time { float: right; font-size: 13px; color: var(--muted); }
.step p { margin: 0; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.feature { padding: 20px 22px; }
.features.wide { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; }
.gallery figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.flow { padding: 16px; }
.flow img { margin: 0 auto; }
.note { padding: 16px 20px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 8px; color: var(--ink); }
table.plain { width: 100%; border-collapse: collapse; font-size: 15.5px; }
table.plain td, table.plain th { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { color: var(--muted); font-weight: 600; }

/* Comments */
.comments { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.comments form { padding: 22px 24px; display: grid; gap: 12px; }
.comments label { font-size: 14px; color: var(--muted); }
.comments input, .comments textarea { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.comments textarea { min-height: 130px; resize: vertical; }
.comments .hp { position: absolute; left: -10000px; }
.comments .status { font-size: 14px; color: var(--muted); min-height: 1.4em; }
.comments.single { grid-template-columns: 1fr; }
.comment { padding: 14px 18px; margin-bottom: 12px; }
.comment .who { font-weight: 650; }
.comment .when { color: var(--muted); font-size: 13px; margin-left: 8px; }
.comment p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Picture viewer */
.viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, .82); display: none; place-items: center; z-index: 50; cursor: zoom-out; padding: 24px; }
.viewer.open { display: grid; }
.viewer img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }

@media (max-width: 760px) {
  .announce .card { grid-template-columns: 1fr; text-align: left; }
  .announce img { width: 84px; height: 84px; }
  .about, .comments { grid-template-columns: 1fr; }
  .top .wrap { height: auto; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 10px; padding-bottom: 8px; }
  .top nav { width: 100%; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .top nav a { margin: 0 16px 0 0; }
  .hero { padding: 48px 0 56px; }
  .hero p.lead { font-size: 17px; }
}

/* About me */
.about .story p { color: var(--ink); margin: 0 0 14px; }
.about .story p:last-child { margin-bottom: 0; }

/* pascal.chat */
.chat { margin-top: 20px; padding: 22px 26px; display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; }
.chat h3 { margin: 0 0 6px; font-size: 20px; }
.chat p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 760px) { .chat { grid-template-columns: 1fr; } }

/* Stone art */
.hero.home { background: linear-gradient(180deg, #13233f 0%, #13233f 9%, rgba(19, 35, 63, 0) 24%), linear-gradient(90deg, #13233f 0%, #13233f 38%, rgba(19, 35, 63, 0) 62%), #13233f url(/assets/art/hero.jpg?v=20261020182339) right bottom / auto 90% no-repeat; padding: 96px 0 92px; }
.hero.home p.lead { max-width: 560px; }
.hero-split { display: grid; grid-template-columns: 1fr 230px; gap: 30px; align-items: center; }
.hero-art { width: 220px; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .35)); }
.side-art { float: right; width: 150px; margin: -10px 0 8px 18px; }
.side-art.wide-art { width: 210px; }
@media (max-width: 860px) {
  .hero.home { background: #13233f; padding: 56px 0 60px; }
  .hero-split { grid-template-columns: 1fr; }
  .hero-art { width: 130px; }
  .side-art { width: 96px; }
}

/* Ideas page */
.proto { margin-bottom: 18px; }
.proto .tags { margin: 4px 0 12px; }
.proto .badge { font-size: 11px; }
.gallery.mini { grid-template-columns: repeat(auto-fill, minmax(260px, 340px)); margin: 0 0 30px; }
.gallery img.plain { border: 0; box-shadow: none; max-height: 260px; width: auto; }

/* Home: ideas and prototypes card */
.announce .card.ideas-card { display: block; padding: 26px 30px; border-left: 6px solid var(--accent); }
.proto-list em.badge { font-style: normal; }
.ideas-card h2 { margin: 4px 0 4px; font-size: 26px; }
.ideas-card > p { margin: 0 0 16px; color: var(--muted); }
.proto-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.proto-list a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.proto-list a:hover { text-decoration: none; border-color: var(--accent); }
.proto-list strong { display: block; font-size: 17px; margin-bottom: 2px; }
.proto-list span { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 8px; }
.proto-list .badge { display: inline-block; margin: 0; }
@media (max-width: 760px) { .proto-list { grid-template-columns: 1fr; } }
