/* Kevin Cigolini portfolio — shared styles */
:root {
  --ink: #111111;
  --text: #2B2B29;
  --muted: #555551;
  --soft: #444441;
  --line: #E5E5E2;
  --panel: #F2F2EF;
  --bg: #FFFFFF;
  --accent: #0B6E4F;
  --accent-ink: #085A40;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 24px;
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -.01em; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; }
.nav a { text-decoration: none; position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { font-weight: 600; }
.nav .contact { color: var(--accent); font-weight: 600; }

/* Type */
.eyebrow { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.display { font-size: clamp(36px, 6vw, 76px); line-height: 1.04; font-weight: 600; letter-spacing: -.03em; }
.title { font-size: clamp(32px, 5vw, 64px); line-height: 1.06; font-weight: 600; letter-spacing: -.03em; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--soft); max-width: 680px; }
.statement { font-size: clamp(21px, 2.4vw, 26px); line-height: 1.42; font-weight: 500; letter-spacing: -.01em; }
.body-lg { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; }
.muted { color: var(--soft); }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }

/* Sections */
.hero { padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 88px); display: flex; flex-direction: column; gap: 24px; }
.section { padding: clamp(56px, 8vw, 100px) 0; }
.rule-strong { border-top: 1px solid var(--ink); }
.rule { border-top: 1px solid var(--line); }
.split { display: flex; flex-wrap: wrap; gap: 20px 56px; }
.split > .label { flex: 1 1 240px; }
.split > .content { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 280px)), 1fr)); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 220px)), 1fr)); column-gap: 32px; border-top: 1px solid var(--ink); }
.stats.light { border-top-color: var(--line); }
.stat { padding: 26px 0; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.num { font-family: var(--mono); font-size: clamp(30px, 3.4vw, 40px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .num.accent { color: var(--accent); }
.stat span:last-child { font-size: 15px; color: var(--soft); line-height: 1.4; }
.inline-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; font-family: var(--mono); font-size: 16px; }

/* Glance */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 24px 32px; padding: 28px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.glance div { display: flex; flex-direction: column; gap: 4px; }
.glance .eyebrow { font-size: 12px; }

/* Project rows (home) */
.project { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 40px; padding: 40px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.project:last-of-type { border-bottom: 1px solid var(--line); }
.project .text { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.project h3 { font-size: clamp(24px, 2.8vw, 34px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.project .media { flex: 1 1 460px; min-width: 0; aspect-ratio: 16 / 10; background: var(--panel); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 20px; }
.project .media img { max-height: 100%; width: auto; border-radius: 6px; transition: transform .6s var(--ease); }
.project:hover { color: inherit; }
.project:hover .media img { transform: scale(1.03); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 13px; padding: 5px 12px; border: 1px solid #D4D4D0; border-radius: 999px; }

/* Links with arrows */
.go { font-weight: 600; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.go .arr { display: inline-block; transition: transform .25s var(--ease); }
.go:hover .arr, .project:hover .go .arr { transform: translateX(5px); }
.back .arr { transition: transform .25s var(--ease); display: inline-block; }
.back:hover .arr { transform: translateX(-5px); }
.back { font-family: var(--mono); font-size: 13px; color: var(--muted); text-decoration: none; }

/* Figures */
.figure { background: var(--panel); border-radius: 12px; padding: clamp(16px, 3.5vw, 48px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.figure img { width: auto; max-height: 860px; border-radius: 8px; }
.figure.bleed { padding: 0; overflow: hidden; }
.figure.bleed img { width: 100%; max-height: none; border-radius: 0; }
.figure.fill img { width: 100%; max-height: none; }
figcaption { font-size: 14px; color: var(--muted); align-self: flex-start; }
.figure.center figcaption { align-self: center; text-align: center; }

/* Cards & quotes */
.card { border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 21px; font-weight: 600; }
.card img { width: 100%; border-radius: 8px; }
.quote { background: var(--panel); border-radius: 12px; padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 16px; }
.quote.outline { background: transparent; border: 1px solid var(--line); }
.quote blockquote { font-size: 18px; line-height: 1.5; }
.quote figcaption { font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.quote figcaption strong { color: var(--ink); font-weight: 600; }
.pull { font-size: clamp(24px, 3vw, 32px); line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 32px 40px; }
.points > div { display: flex; flex-direction: column; gap: 8px; }
.points h3 { font-size: 19px; font-weight: 600; }
.points p { color: var(--soft); }
.points .step { font-family: var(--mono); color: var(--accent); }
.points .big { font-family: var(--mono); font-size: 32px; font-weight: 500; }
.loop { border-top: 1px solid var(--ink); gap: 0; }
.loop > div { padding: 26px 24px 26px 0; }
ul.list { padding-left: 20px; color: var(--soft); line-height: 1.7; }

/* Timeline */
.timeline { list-style: none; padding: 0; }
.timeline li { display: flex; flex-wrap: wrap; gap: 8px 56px; padding: 26px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { flex: 1 1 240px; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.timeline .what { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.timeline h3 { font-size: 21px; font-weight: 600; }
.timeline p { color: var(--soft); }
.timeline .now .when { color: var(--accent); }

/* Password gate */
.gate { scroll-margin-top: 96px; margin: clamp(56px, 8vw, 96px) 0; padding: clamp(28px, 4vw, 48px); border-radius: 16px; background: var(--panel); display: flex; flex-wrap: wrap; gap: 32px 40px; align-items: center; }
.gate .text { flex: 2 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.gate h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 600; letter-spacing: -.02em; }
.gate form { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; gap: 8px; }
.field input { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border: 1px solid #C9C9C4; border-radius: 8px; font: inherit; font-size: 16px; background: #fff; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 110, 79, .18); }
.btn { height: 50px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: transform .15s var(--ease), background .2s; }
.btn:hover { background: #2a2a28; color: #fff; }
.btn:active { transform: scale(.97); }
.error { color: #A3261B; font-size: 14px; }
.shake { animation: shake .45s var(--ease); }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

/* Footer */
.site-footer { border-top: 1px solid var(--ink); padding: clamp(56px, 8vw, 96px) 0 48px; margin-top: clamp(32px, 6vw, 64px); }
.site-footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px; }
.site-footer h2 { font-size: clamp(32px, 4vw, 52px); font-weight: 600; letter-spacing: -.02em; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.site-footer .made { margin-top: 40px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.mail { font-size: clamp(18px, 2vw, 21px); color: var(--accent); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding: 40px 0; border-top: 1px solid var(--ink); font-size: 17px; }
.pager a { text-decoration: none; }
.pager .next { font-weight: 600; }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { padding-top: 14px; padding-bottom: 12px; }
  .nav { gap: 2px 18px; font-size: 14px; }
  .loop > div { padding-right: 0; }
  .project { padding: 32px 0; }
  .field { flex-direction: column; }
  .field input { flex: none; width: 100%; }
  .btn { width: 100%; }
  .project .media { aspect-ratio: 4 / 3; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
