/* Gino Torriero — site styles. Clarity, deference, depth. */
:root {
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --ink: #1D1D1F;
  --ink2: #424245;
  --ink3: #6E6E73;
  --accent: #416180;
  --accent-hi: #35526D;
  --deep: #1D2D3D;
  --line: rgba(29, 29, 31, .1);
  --fill: #E8E8ED;
  --r-card: 22px;
  --pad: clamp(20px, 5vw, 72px);
  --shadow: 0 1px 2px rgba(29, 29, 31, .04), 0 8px 28px rgba(29, 29, 31, .06);
  --shadow-hi: 0 2px 4px rgba(29, 29, 31, .05), 0 16px 40px rgba(29, 29, 31, .1);
}
/* San Francisco on iPhone, iPad and Safari */
@supports (font: -apple-system-body) {
  :root { --font: -apple-system, "SF Pro Text", "Instrument Sans", "Helvetica Neue", sans-serif; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--deep); }
p a, dd a, figcaption a { text-decoration: underline; text-decoration-color: rgba(65, 97, 128, .38); text-decoration-thickness: 1px; text-underline-offset: 3px; }
p a:hover, dd a:hover, figcaption a:hover { text-decoration-color: currentColor; }
::selection { background: rgba(65, 97, 128, .22); }
[id] { scroll-margin-top: 84px; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(65, 97, 128, .7); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 18px; border-radius: 980px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; }
.skip:focus { left: 12px; color: #fff; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Navigation bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 245, 247, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(29, 29, 31, .08);
}
.bar-in { display: flex; align-items: center; gap: 18px; min-height: 60px; max-width: 1344px; margin: 0 auto; padding: 8px var(--pad); }
.brand { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; color: var(--ink); font-size: 19px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.navlinks { display: flex; align-items: center; gap: 28px; }
.navlinks a { display: inline-flex; align-items: center; min-height: 44px; color: rgba(29, 29, 31, .8); font-size: 14px; }
.navlinks a:hover { color: var(--ink); }
#menubtn { display: none; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px; border: 0; border-radius: 980px;
  font: inherit; font-size: 16px; font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { border-radius: 980px; }
.btn-sm { min-height: 36px; padding: 8px 16px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hi); color: #fff; }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(29, 29, 31, .28); }
.btn-ghost:hover { background: rgba(29, 29, 31, .06); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(29, 29, 31, .6); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #F5F5F7; color: var(--ink); }
.btn-ghost-d { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }
.btn-ghost-d:hover { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.btn-text-d { padding-left: 8px; padding-right: 8px; color: #fff; }
.btn-text-d:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Type ---------- */
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); }
section { padding: clamp(56px, 9vh, 104px) 0 0; }
section > .eyebrow { margin-bottom: 10px; }
h2 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.08; letter-spacing: -.026em; }
h3 { letter-spacing: -.015em; }
.lead-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px clamp(24px, 5vw, 96px); align-items: end; }
.lead-row p { max-width: 52ch; color: var(--ink2); }

/* ---------- Hero ---------- */
#hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px clamp(24px, 5vw, 96px); align-items: center; padding-top: clamp(40px, 8vh, 96px); }
#hero h1 { margin: 14px 0 0 -.04em; font-size: clamp(56px, 9vw, 116px); line-height: .96; letter-spacing: -.045em; }
.sub { margin-top: 22px; max-width: 26ch; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1.18; letter-spacing: -.02em; }
.intro { margin-top: 18px; max-width: 56ch; color: var(--ink2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chips li { padding: 6px 14px; border-radius: 980px; background: rgba(29, 29, 31, .06); color: var(--ink2); font-size: 14px; font-weight: 500; }
.portrait { width: min(320px, 100%); }
.portrait img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 36px; background: var(--fill); box-shadow: var(--shadow); }

/* ---------- Surfaces ---------- */
.card { border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; margin-top: 30px; }
.facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.fact { padding: 24px 26px 26px; }
.fact dt { font-size: 14px; font-weight: 600; color: var(--accent); }
.fact .big { margin-top: 8px; font-size: 27px; font-weight: 600; line-height: 1.12; letter-spacing: -.022em; }
.fact .note { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--ink3); }

.about { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px clamp(28px, 5vw, 80px); align-items: start; margin-top: 4px; }
.about h2 { margin-bottom: 24px; }
.about .copy p { max-width: 62ch; color: var(--ink2); }
.about .copy p + p { margin-top: 16px; }
.about .copy strong { color: var(--ink); font-weight: 600; }
.photos { display: grid; gap: 22px; }
.photos img { width: 100%; border-radius: var(--r-card); background: var(--fill); }
.photos .tall img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
figcaption { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink3); }

.cols3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.tile { display: flex; flex-direction: column; gap: 12px; padding: 26px 26px 24px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); position: relative; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); }
.tile h3 { font-size: 26px; line-height: 1.12; letter-spacing: -.022em; }
.tile p:not(.eyebrow) { flex: 1; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.tile .more { display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0 -10px; font-size: 16px; font-weight: 500; }
.tile .more::after, .post h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.posts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 36px; }
.post .meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.post .meta span { color: var(--accent); }
.post .meta time { color: var(--ink3); font-weight: 500; white-space: nowrap; }
.post h3 { font-size: 21px; line-height: 1.2; letter-spacing: -.018em; }
.post h3 a { color: var(--ink); }
.post:hover h3 a { color: var(--accent); }
.post .more { font-size: 15px; color: var(--accent); }

.rows { margin-top: 30px; padding: 6px 26px; }
.row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) minmax(0, 1fr); gap: 8px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row:last-child { border-bottom: 0; }
.row .when { font-size: 14px; font-weight: 600; color: var(--accent); }
.row h3 { font-size: 21px; line-height: 1.2; }
.row p { font-size: 16px; line-height: 1.5; color: var(--ink2); }

.linkgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 30px 22px; margin-top: 30px; align-items: start; }
.linkgrid h3 { margin: 0 0 12px 4px; font-size: 19px; }
.linkgrid h3:not(:first-child) { margin-top: 30px; }
.list { padding: 2px 20px; }
.list a { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.list li:last-child a { border-bottom: 0; }
.list strong { font-weight: 600; }
.list span { color: var(--ink3); font-size: 15px; text-align: right; overflow-wrap: anywhere; }
.list a:hover strong { color: var(--accent); }

.bio { margin-top: 36px; padding: 30px clamp(22px, 3vw, 36px) 32px; }
.bio h3 { margin-bottom: 16px; font-size: 24px; letter-spacing: -.02em; }
.bio p { max-width: 80ch; color: var(--ink2); }
.bio p + p { margin-top: 14px; }
.bio strong { color: var(--ink); font-weight: 600; }

.faq { margin-top: 30px; padding: 6px 26px; }
.qa { padding: 24px 0; border-bottom: 1px solid var(--line); }
.qa:last-child { border-bottom: 0; }
.qa h3 { font-size: 20px; line-height: 1.25; }
.qa p { margin-top: 8px; max-width: 76ch; font-size: 16px; color: var(--ink2); }

.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px 48px; margin-top: clamp(56px, 9vh, 104px); padding: clamp(36px, 6vw, 72px); border-radius: 30px; background: var(--deep); color: #fff; }
.cta .eyebrow { color: #9EBBD8; margin-bottom: 12px; }
.cta > div:first-child { flex: 1 1 380px; }
.cta p:not(.eyebrow) { margin-top: 14px; max-width: 48ch; color: rgba(255, 255, 255, .82); }
.cta .actions { margin-top: 0; }
.cta a:focus-visible { outline-color: #fff; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; margin-top: clamp(48px, 8vh, 88px); padding: 28px 0 44px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink3); }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink3); }
footer a:hover { color: var(--ink); }
footer > span { display: inline-flex; align-items: center; min-height: 44px; }

/* 404 */
.lost { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px; text-align: center; }
.lost h1 { margin: 12px 0 14px; font-size: clamp(40px, 8vw, 64px); line-height: 1.02; letter-spacing: -.035em; }
.lost p { max-width: 44ch; margin: 0 auto; color: var(--ink2); }
.lost .btn { margin-top: 28px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 900px) {
  #menubtn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--ink); cursor: pointer;
  }
  #menubtn span, #menubtn span::before { display: block; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease); }
  #menubtn span { position: relative; transform: translateY(-3.5px); }
  #menubtn span::before { content: ""; position: absolute; left: 0; top: 0; transform: translateY(7px); }
  #menubtn[aria-expanded="true"] span { transform: rotate(45deg); }
  #menubtn[aria-expanded="true"] span::before { transform: rotate(-90deg); }
  .navlinks { display: none; }
  .navlinks.open {
    display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px var(--pad) 24px; background: var(--bg); border-bottom: 1px solid rgba(29, 29, 31, .08); box-shadow: 0 24px 40px rgba(29, 29, 31, .1);
  }
  .navlinks.open a { min-height: 54px; font-size: 19px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); }
  .navlinks.open a:last-child { border-bottom: 0; }
  #hero { grid-template-columns: minmax(0, 1fr); }
  .portrait { order: -1; width: min(220px, 60%); }
  .portrait img { border-radius: 30px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .photos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
@media (max-width: 620px) {
  h1, h2, h3, p, span, a, dd, dt { overflow-wrap: anywhere; }
  #hero h1 { font-size: clamp(52px, 15.5vw, 72px); }
  .actions .btn { flex: 1 1 auto; min-height: 50px; font-size: 17px; }
  .rows, .faq { padding-left: 20px; padding-right: 20px; }
  .cta { padding: 32px 24px; border-radius: 26px; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .bar, .skip { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}
.bar .btn-sm { position: relative; }
.bar .btn-sm::after { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }

/* ---------- Article ---------- */
.article { max-width: 720px; margin: 0 auto; padding-top: clamp(28px, 6vh, 64px); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font-size: 14px; color: var(--ink3); }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink3); }
.crumb a:hover { color: var(--ink); }
.article > .eyebrow { margin-top: 14px; }
.article h1 { margin-top: 10px; font-size: clamp(36px, 5.6vw, 60px); line-height: 1.04; letter-spacing: -.035em; }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.4; color: var(--ink3); }
.byline img { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--fill); }
.byline strong { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.byline a { color: var(--ink); }
.prose { margin-top: 32px; }
.prose > * + * { margin-top: 18px; }
.prose p { font-size: 19px; line-height: 1.6; color: var(--ink2); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose .lede { font-size: clamp(21px, 2.4vw, 24px); line-height: 1.45; letter-spacing: -.012em; color: var(--ink); }
.prose h2 { margin-top: 48px; font-size: clamp(26px, 3vw, 34px); line-height: 1.12; letter-spacing: -.024em; }
.points { padding: 6px 26px; }
.points li { padding: 16px 0; font-size: 17px; line-height: 1.5; color: var(--ink2); }
.points li + li { border-top: 1px solid var(--line); }
.points a { text-decoration: underline; text-decoration-color: rgba(65, 97, 128, .38); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.readmore { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.readmore .tile p:not(.eyebrow) { font-size: 16px; line-height: 1.5; }
.prose .note { font-size: 15px; line-height: 1.5; color: var(--ink3); }
.prose .about-author { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 620px) {
  .prose p { font-size: 18px; }
  .points { padding: 4px 20px; }
}

/* ---------- Experience and projects pages (15 Nov 2026) ---------- */
.after { margin-top: 18px; font-size: 16px; line-height: 1.5; color: var(--ink3); }
.after a { display: inline-block; padding: 6px 0; color: var(--accent); }
.crumb > span:last-child { color: var(--ink3); }
.rows.two { margin-top: 18px; }
.rows.two .row { grid-template-columns: 8.5em minmax(0, 1fr); }
.rows.two .row:last-child { border-bottom: 0; }
.rows.two .row h3 { font-size: 19px; }
.rows.two .row h3 + p { margin-top: 6px; font-size: 16px; line-height: 1.55; }
.rows.two .row a, .proj a, .prose .note a { text-decoration: underline; text-decoration-color: rgba(65, 97, 128, .38); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.projlist { display: grid; gap: 18px; }
.proj { padding: 26px; }
.proj h2 { margin-top: 6px; font-size: clamp(24px, 2.8vw, 30px); }
.proj p { margin-top: 10px; font-size: 17px; line-height: 1.55; }
.proj .eyebrow { margin-top: 0; }
.proj .projlinks { font-size: 15px; color: var(--ink3); }
@media (max-width: 620px) {
  .rows.two .row { grid-template-columns: minmax(0, 1fr); }
  .proj { padding: 22px 20px; }
}
