/* Kevin Cigolini portfolio — shared styles */
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/IBMPlexMono-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/IBMPlexMono-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/Inter-400-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #111111;
  --text: #2B2B29;
  --muted: #555551;
  --soft: #444441;
  --line: #E5E5E2;
  --panel: #F2F2EF;
  --bg: #FFFFFF;
  --accent: #0B6E4F;
  --accent-ink: #085A40;
  --sans: "Inter", 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; align-items: center; 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(56px, 8vw, 104px) 0 clamp(36px, 5vw, 56px); 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; }

/* Prototype loop on project cards */
.vwrap { position: relative; display: block; width: 100%; max-height: 100%; }
.vwrap img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; opacity: 0; transition: opacity .35s var(--ease); pointer-events: none; background: #fff; }
.card-video.on { opacity: 1; }
.project:hover .vwrap img, .project:hover .card-video { transform: scale(1.03); }
.card-video { transition: opacity .35s var(--ease), transform .6s var(--ease); }

/* 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: 100%; height: auto; 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; }

/* Hero showcase: work + growth line */
.growth { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.growth.g-mob { display: none; }
.growth .gl { stroke: #DCDBD5; stroke-width: calc(var(--sw) * .38); stroke-dasharray: 1 1.2; }
.growth .ln { fill: none; stroke: var(--accent); stroke-width: var(--sw); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.growth .nd { fill: #fff; stroke: var(--accent); stroke-width: calc(var(--sw) * .8); }
.growth .end { fill: var(--accent); }
.growth .ring { fill: none; stroke: var(--accent); stroke-width: calc(var(--sw) * .6); opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .showcase .growth .ln { stroke-dashoffset: 1; }
.js .showcase .growth .area, .js .showcase .growth .nd, .js .showcase .growth .end { opacity: 0; }
.js .showcase.in .growth .ln { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(.45,.05,.25,1) .2s; }
.js .showcase.in .growth .area { opacity: 1; transition: opacity 1.2s ease 1.6s; }
.js .showcase.in .growth .nd, .js .showcase.in .growth .end { opacity: 1; transition: opacity .4s ease; }
.js .showcase.in .growth .nd1 { transition-delay: .35s; }
.js .showcase.in .growth .nd2 { transition-delay: .95s; }
.js .showcase.in .growth .nd3 { transition-delay: 1.5s; }
.js .showcase.in .growth .end { transition-delay: 1.95s; }
.js .showcase.in .growth .ring { animation: ring 2.4s ease-out 2.1s infinite; }
@keyframes ring { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.showcase { position: relative; aspect-ratio: 2 / 1; background: var(--panel); border-radius: 16px; overflow: hidden; margin-bottom: clamp(40px, 6vw, 72px); }
.shot { position: absolute; z-index: 2; display: block; text-decoration: none; color: inherit; transition: transform .45s var(--ease); }
.shot img { width: 100%; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 18px 40px -12px rgba(0,0,0,.22); background: #fff; }
.shot .chip { position: absolute; left: 10px; top: -14px; z-index: 1; font-family: var(--mono); font-size: 12px; letter-spacing: .02em; background: var(--accent); color: #fff; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.shot:hover { transform: translateY(-6px); color: inherit; }
.shot-kors { left: 4%; top: 57%; width: 33%; }
.shot-podium { left: 41%; top: 30%; width: 12%; }
.shot-vanta { left: 67%; top: 14%; width: 29%; }
.js .showcase .shot { opacity: 0; transform: translateY(16px); }
.js .showcase.in .shot { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .showcase.in .shot-kors { transition-delay: .3s; }
.js .showcase.in .shot-podium { transition-delay: .9s; }
.js .showcase.in .shot-vanta { transition-delay: 1.5s; }
.js .showcase.in .shot:hover { transform: translateY(-6px); transition-delay: 0s; }

/* External links */
.ext { font-size: .85em; display: inline-block; transition: transform .25s var(--ease); }
a:hover .ext { transform: translate(2px, -2px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Now line */
.now { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; color: var(--soft); max-width: 680px; }
.now-dot { flex: none; width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(11, 110, 79, .45); animation: nowPulse 2.4s ease-out infinite; }
.now-label { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-right: 6px; }
@keyframes nowPulse { 0% { box-shadow: 0 0 0 0 rgba(11, 110, 79, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(11, 110, 79, 0); } }

/* Share button */
.share { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid #D4D4D0; border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: border-color .2s, background .2s, transform .15s var(--ease); }
.share:hover { border-color: var(--ink); }
.share:active { transform: scale(.96); }
.share.done { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; box-shadow: 0 12px 32px -8px rgba(0,0,0,.35); opacity: 0; transform: translate(-50%, 12px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast svg { flex: none; color: #6FD3A8; }
.toast a { color: #fff; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.toast a:hover { color: #6FD3A8; }

/* Jump menu (full case studies) */
.toc { position: sticky; top: var(--hdr, 64px); z-index: 4; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.toc-inner { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
.toc-inner::-webkit-scrollbar { display: none; }
.toc a { flex: none; font-size: 13px; text-decoration: none; color: var(--soft); padding: 6px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.toc a:hover { color: var(--ink); background: var(--panel); }
.toc a.on { color: #fff; background: var(--ink); }
[data-toc] main section[id] { scroll-margin-top: calc(var(--hdr, 64px) + 64px); }

/* Page transitions (Chrome, Safari; other browsers load normally) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* 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; align-items: center; }
  .site-header .wrap { position: relative; }
  .share { position: absolute; right: var(--gutter); top: 12px; width: 36px; height: 36px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .share svg { width: 16px; height: 16px; }
  .toast { bottom: 16px; font-size: 14px; flex-wrap: wrap; }
  .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; }
  .showcase { border-radius: 12px; }
  .shot .chip { font-size: 11px; top: -12px; left: 8px; padding: 4px 8px; }
  .shot img { border-radius: 7px; }
  .showcase { aspect-ratio: 1 / 1.2; }
  .shot .chip { font-size: 10px; }
  .shot-kors { left: 4%; top: 64%; width: 50%; z-index: 4; }
  .shot-podium { left: 37%; top: 38%; width: 20%; z-index: 3; }
  .shot-vanta { left: 55%; top: 13%; width: 41%; z-index: 2; }
  .growth.g-desk { display: none; }
  .growth.g-mob { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
  .js .showcase .shot { opacity: 1; transform: none; }
  .js .showcase .growth .ln { stroke-dashoffset: 0; }
  .js .showcase .growth .area, .js .showcase .growth .nd, .js .showcase .growth .end { opacity: 1; }
}
