/* andrewbruno.com - single stylesheet, no build step.
   Every colour is a semantic token set per theme on the <html> element via
   data-theme. Light (the tricolore palette: white, azzurri blue, green and
   red) is the default; dark overrides the same tokens. Other palettes are
   parked in drafts/themes.css. Roboto, sharp corners and wide-tracked
   uppercase labels throughout. */

:root {
  /* light (default): white ground, azzurri blue, green and red accents */
  --bg: #ffffff; --bg-2: #f2f6fa; --bg-3: #e9f0f7;
  --text: #0d2a4a; --text-2: #2c4666; --heading: #0d2a4a;
  --mute: rgba(13, 42, 74, .64); --line: rgba(13, 42, 74, .13); --line-strong: rgba(13, 42, 74, .4);
  --card: rgba(13, 42, 74, .04); --card-2: rgba(13, 42, 74, .07);
  --accent: #0057b8; --on-accent: #ffffff; --accent-fg: #0057b8; --accent-hover: #003f8a;
  --kicker: #008c45; --icon: #0057b8; --mark-bg: #cd212a; --on-mark: #ffffff;
  --tone-1: #0d2a4a; --tone-2: #008c45; --tone-3: #cd212a;
  --hero-a: #ffffff; --hero-b: #f2f6fa; --hero-text: #0d2a4a; --hero-heading: #0d2a4a;
  --hero-mute: rgba(13, 42, 74, .64); --hero-line: rgba(13, 42, 74, .4);
  --glow: rgba(0, 87, 184, .12); --shadow: rgba(13, 42, 74, .18);
  --deep-bg: #0d2a4a; --deep-text: #ffffff; --deep-heading: #ffffff;
  --deep-mute: rgba(255, 255, 255, .66); --deep-line: rgba(255, 255, 255, .2); --deep-accent: #29ccff; --deep-link: #ffffff;
  --head-bg: rgba(255, 255, 255, .92); --focus: #cd212a;
  --radius: 0;
  --font: "Roboto", "Helvetica Neue", Arial, system-ui, sans-serif;

  --wrap: 1120px;
  --sp-1: clamp(20px, 3vh, 40px);
  --sp-2: clamp(36px, 5vh, 60px);
  --sp-3: clamp(72px, 10vh, 120px);
}

/* dark: near-black navy, bone and azzurro */
:root[data-theme="dark"] {
  --bg: #111d30; --bg-2: #0c1524; --bg-3: #070d18;
  --text: #f4efe6; --text-2: #d9d2c5; --heading: #ffffff;
  --mute: rgba(244, 239, 230, .62); --line: rgba(244, 239, 230, .16); --line-strong: rgba(244, 239, 230, .45);
  --card: rgba(255, 255, 255, .05); --card-2: rgba(255, 255, 255, .08);
  --accent: #2fb4ff; --on-accent: #0f1c2e; --accent-fg: #2fb4ff; --accent-hover: #7dd0ff;
  --kicker: #2fb4ff; --icon: #2fb4ff; --mark-bg: #2fb4ff; --on-mark: #0f1c2e;
  --tone-1: #e8dcc6; --tone-2: #8a9a5b; --tone-3: #c9714a;
  --hero-a: #111d30; --hero-b: #0c1524; --hero-text: #f4efe6; --hero-heading: #ffffff;
  --hero-mute: rgba(244, 239, 230, .62); --hero-line: rgba(244, 239, 230, .45);
  --glow: rgba(47, 180, 255, .16); --shadow: rgba(0, 0, 0, .6);
  --deep-bg: #070d18; --deep-text: #f4efe6; --deep-heading: #ffffff;
  --deep-mute: rgba(244, 239, 230, .62); --deep-line: rgba(244, 239, 230, .2); --deep-accent: #2fb4ff; --deep-link: #f4efe6;
  --head-bg: rgba(12, 21, 36, .94); --focus: #2fb4ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-fg); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.015em; color: var(--heading); }
h1 { font-size: clamp(2.6rem, 6.5vw, 4.8rem); font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1rem; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

/* Uppercase, wide-tracked labels are the signature of the style. */
.eyebrow, .kicker, .sub-head, .card-kicker, .card-date, .timeline .when, .quotes cite, .article-meta strong {
  font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}

.skip {
  position: absolute; left: -999px; top: 0; padding: .6rem 1rem;
  background: var(--accent); color: var(--on-accent); z-index: 100;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--head-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; font-weight: 500; letter-spacing: .04em; }
.mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius);
  background: var(--mark-bg); color: var(--on-mark); font-weight: 700; font-size: .9rem; letter-spacing: .02em;
}
.nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.nav a:hover { color: var(--accent-hover); }
.head-tools { display: flex; align-items: center; gap: .6rem; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0;
}
.theme-toggle:hover { border-color: var(--accent-fg); color: var(--accent-fg); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ----------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: var(--radius); font-weight: 700; text-decoration: none;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-family: inherit; cursor: pointer;
  border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(.9); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent-fg); color: var(--accent-hover); }
.btn-small { padding: .5rem .95rem; font-size: .72rem; background: transparent; color: var(--text) !important; border-color: var(--line-strong); }
.btn-small:hover { border-color: var(--accent-fg); }

/* -------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(900px 500px at 85% -10%, var(--glow), transparent 60%),
    linear-gradient(180deg, var(--hero-a) 0%, var(--hero-b) 100%);
  color: var(--hero-text);
  padding: var(--sp-3) 0 var(--sp-2);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { color: var(--kicker); margin-bottom: 1.2rem; }
.eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, currentColor 50%, transparent); }
.eyebrow a:hover { border-bottom-color: currentColor; }
.hero h1 { margin-bottom: 1.2rem; color: var(--hero-heading); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--hero-text); max-width: 40rem; margin-bottom: 1.8rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero .btn-ghost { color: var(--hero-text); border-color: var(--hero-line); }
.hero .btn-ghost:hover { border-color: var(--accent); }
.now { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; color: var(--hero-mute); max-width: 38rem; margin: 0; }
.now a { color: var(--hero-text); }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--tone-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone-2) 25%, transparent); margin-top: .45rem; }
.hero-photo { margin: 0; justify-self: end; text-align: center; }
.hero-photo img {
  width: min(100%, 380px); aspect-ratio: 1; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: 0 30px 60px var(--shadow);
}
.hero-photo figcaption { margin-top: .9rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-mute); }

/* ---------------------------------------------------------- sections */
section:not(.hero) { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: var(--sp-2); }
.kicker { color: var(--kicker); margin-bottom: .7rem; }
.section-lede { font-size: 1.12rem; color: var(--mute); margin-top: 1rem; }
.sub-head { color: var(--mute); margin: 3rem 0 1rem; }

/* alternating grounds */
.views { background: var(--bg); }
.places-section { background: var(--bg-2); }
.experience { background: var(--bg-2); }
.ai { background: var(--bg-3); }
.beyond { background: var(--bg-2); }

/* the deep band: contact and footer share it in every theme */
.contact { background: var(--deep-bg); color: var(--deep-text); border-bottom: 0; }
.contact h2 { color: var(--deep-heading); }
.contact .kicker { color: var(--deep-accent); }
.contact .section-lede { color: var(--deep-mute); }
.contact .btn-primary { background: var(--deep-accent); color: var(--deep-bg); }
.contact .btn-primary:hover { background: var(--deep-link); color: var(--deep-bg); }
.contact .btn-ghost { color: var(--deep-text); border-color: var(--deep-line); }
.contact .btn-ghost:hover { border-color: var(--deep-accent); color: var(--deep-accent); }

/* ------------------------------------------------------------- tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tiles li {
  display: flex; flex-direction: column; gap: .6rem;
  background: var(--bg); padding: 1.6rem 1.5rem 1.4rem;
}
.places-section .tiles li { background: var(--bg-2); }
.tiles li:hover { background: var(--card-2); }
.tiles h3 { margin-top: .3rem; }
.tiles p { margin: 0; color: var(--text-2); font-size: .97rem; }
.tiles .who { color: var(--mute); font-size: .86rem; line-height: 1.5; padding-top: .7rem; border-top: 1px solid var(--line); margin-top: .3rem; }
.domains { grid-template-columns: repeat(3, 1fr); }
.places { grid-template-columns: repeat(4, 1fr); }
.ways { grid-template-columns: repeat(2, 1fr); }
.icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--card-2); color: var(--icon); border: 1px solid var(--line);
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ quotes */
.quotes { grid-template-columns: repeat(3, 1fr); }
.quotes li { background: var(--bg); }
.quotes blockquote { margin: 0; color: var(--tone-1); font-size: 1rem; line-height: 1.6; }
.quotes blockquote::before { content: "\201C"; color: var(--tone-3); font-size: 2.4rem; line-height: 0; margin-right: .15rem; vertical-align: -0.65rem; font-weight: 900; }
.quotes cite { font-style: normal; color: var(--mute); font-size: .7rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); }
/* show a full grid at each width; the button reveals the rest */
.quotes li:nth-child(n+10) { display: none; }
.quotes.all li { display: flex; }
.more-row { margin: 1.2rem 0 0; }

/* --------------------------------------------------------- timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline .when { font-variant-numeric: tabular-nums; color: var(--accent-fg); font-size: .72rem; white-space: nowrap; }
.timeline div { display: flex; flex-direction: column; gap: .15rem; }
.timeline strong { color: var(--heading); font-weight: 700; }
.timeline div span { color: var(--mute); font-size: .95rem; }

.skills dl { display: grid; grid-template-columns: 260px 1fr; gap: .9rem 1.5rem; margin: 0; }
.skills dt { font-weight: 500; color: var(--tone-1); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; padding-top: .15rem; }
.skills dd { margin: 0; color: var(--text-2); font-size: .97rem; }

/* ---------------------------------------------------------------- ai */
.ai-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.ai-grid .section-head { margin-bottom: 0; }
.ai-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ai-list li { padding: 1.4rem 1.5rem; background: var(--bg-3); }
.ai-list h3 { color: var(--heading); font-size: 1.05rem; margin-bottom: .4rem; }
.ai-list p { margin: 0; color: var(--text-2); font-size: .97rem; }

/* ------------------------------------------------------------ beyond */
.beyond-copy { max-width: 52rem; font-size: 1.08rem; color: var(--text-2); margin: 0; }

/* ----------------------------------------------------------- contact */
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem; }

/* ------------------------------------------------------------ footer */
.site-foot { background: var(--deep-bg); color: var(--deep-mute); padding: 2rem 0; font-size: .9rem; border-top: 1px solid var(--deep-line); }
.site-foot a { color: var(--deep-link); }
.site-foot p { margin: 0 0 .4rem; }
.fine { font-size: .82rem; opacity: .8; }

/* ---------------------------------------------------- article pages */
.article { background: var(--bg); }
.article .wrap { max-width: 46rem; }
.article-head { margin-bottom: 2rem; }
.article-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: .6rem 0 1rem; }
.article-meta { color: var(--text-2); font-size: .98rem; }
.article-meta strong { color: var(--kicker); font-size: .72rem; }
.article h2 { font-size: 1.5rem; margin: 2.4rem 0 .8rem; }
.article h3 { margin: 1.6rem 0 .5rem; }
.article ul, .article ol { padding-left: 1.3rem; }
.article li { margin-bottom: .5rem; color: var(--text-2); }
.article li strong { color: var(--heading); }
.article p { color: var(--text-2); }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.article em { color: var(--mute); }
.article blockquote { margin: 1.4rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--tone-3); color: var(--tone-1); }
.article blockquote p { margin: 0; }
.article .table-wrap { overflow-x: auto; margin: 1.2rem 0; }
.article table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.article th, .article td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { color: var(--heading); background: var(--card); }
.article tr td:first-child { color: var(--mute); white-space: nowrap; }
.article .back { display: inline-block; margin-bottom: 1rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.article .also { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.also-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .4rem; }

/* cards and record lists (kept for the writing pages when they return) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { display: flex; flex-direction: column; gap: .7rem; background: var(--bg); padding: 1.6rem; color: var(--text); text-decoration: none; }
.card:hover { background: var(--card-2); color: var(--text); }
.card h3 { font-size: 1.2rem; }
.card > p { color: var(--text-2); margin: 0; font-size: .97rem; }
.card-more { margin-top: auto; padding-top: .8rem; font-weight: 700; color: var(--accent-fg); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.card-more::after { content: " \2192"; }
.record { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 2.5rem; }
.record li { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.record strong { color: var(--heading); }
.record strong a { color: var(--heading); text-decoration: none; }
.record strong a:hover { color: var(--accent-hover); }
.record span { color: var(--mute); font-size: .95rem; }

/* -------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .domains, .places, .quotes, .cards { grid-template-columns: repeat(2, 1fr); }
  .quotes li:nth-child(n+9) { display: none; }
  .ai-grid { grid-template-columns: 1fr; }
  .record { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-head .wrap { flex-wrap: wrap; }
  .head-tools { margin-left: auto; }
  .nav-toggle { display: block; }
  .nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: flex-start; gap: .2rem; padding: .5rem 0 1rem; margin-left: 0; }
  .nav a { padding: .55rem 0; }
  .nav.open { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; order: -1; }
  .hero-photo img { width: 140px; }
  .hero-photo figcaption { display: none; }
  .domains, .places, .ways, .quotes, .cards { grid-template-columns: 1fr; }
  .quotes li:nth-child(n+7) { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; }
  .skills dl { grid-template-columns: 1fr; gap: .2rem .5rem; }
  .skills dd { margin-bottom: .9rem; }
}
.quotes.all li { display: flex !important; }
