:root {
  --bg: #050711;
  --bg-elevated: #0c1120;
  --border: rgba(130, 163, 255, 0.18);
  --text: #edf3ff;
  --text-muted: #9ba9c5;
  --accent: #76a8ff;
  --accent-soft: rgba(88, 144, 255, 0.14);
  --radius: 14px;
  --max-width: 1080px;
  --gutter: 24px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img, video, svg, canvas { max-width: 100%; }
h1, h2, h3, p, li, dd { overflow-wrap: break-word; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% -5%, rgba(59, 97, 220, 0.2), transparent 70%),
    radial-gradient(ellipse 50% 35% at 95% 20%, rgba(104, 46, 201, 0.13), transparent 75%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: linear-gradient(rgba(126, 160, 255, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 160, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The home page is a project showcase, so it should use the wider canvas on
   desktop screens instead of looking like a narrow reading column. */
.home-page .container { max-width: 1440px; }
.home-page .hero { max-width: 920px; }

/* The vault is a media grid, not a column of text. Let it fill the screen
   instead of the 1080px reading width, so wide monitors don't get two large
   empty gutters. */
.col-page .container {
  max-width: 100%;
}

a { color: inherit; text-decoration: none; }

/* Header */

.site-header {
  border-bottom: 1px solid rgba(130, 163, 255, 0.2);
  position: sticky;
  top: 0;
  background: rgba(5, 7, 17, 0.76);
  backdrop-filter: blur(18px) saturate(130%);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 40px;
}

.brand { margin-right: 24px; flex-shrink: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(123, 183, 255, 0.28), rgba(131, 72, 255, 0.22));
  border: 1px solid rgba(145, 186, 255, 0.44);
  box-shadow: 0 0 20px rgba(93, 150, 255, 0.18);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.brand-name { font-size: 15px; }

.site-nav { display: flex; align-items: center; gap: 28px; }

.site-nav a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.site-nav a:hover { color: var(--text); }
.site-nav > a:not(.icon-link) { position: relative; }
.site-nav > a:not(.icon-link)::after { content: ""; position: absolute; right: 0; bottom: -4px; left: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .22s ease; box-shadow: 0 0 8px var(--accent); }
.site-nav > a:not(.icon-link):hover::after, .site-nav > a:not(.icon-link)[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.site-nav a[aria-current="page"] { color: var(--text); }

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Social links sit in their own tight cluster so the 28px nav gap doesn't
   stretch them across the header. */
.nav-social {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-nav .nav-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav .nav-social a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Icons */

.ic {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-sm { width: 14px; height: 14px; }

/* Hero */

.hero {
  padding: 126px 24px 106px;
  max-width: 760px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 16px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-wrap: balance;
  background: linear-gradient(110deg, #fff 20%, #a5c5ff 55%, #c39dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 20px;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 560px;
}

.hero-actions { display: flex; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(100deg, #83b2ff, #9582ff);
  color: #060815;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(91, 133, 255, 0.38); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: #3a4048; }

/* Section headings */

.section-heading { margin-bottom: 32px; }

.section-heading :is(h1, h2) {
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.section-heading p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15px;
}

/* Section: projects */

.projects, .about, .contact {
  padding: 60px 24px;
  border-top: 1px solid var(--border);
}

/* Project grid */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.projects-more { margin: 24px 0 0; text-align: center; }

.project-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%);
  opacity: 0.06;
  color: var(--text);
  pointer-events: none;
  object-fit: contain;
}

.project-card:not(.project-card-placeholder):hover {
  border-color: #333a44;
  transform: translateY(-2px);
}

.project-card-placeholder {
  border-style: dashed;
  opacity: 0.6;
}

.project-card-top { margin-bottom: 14px; }

.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.project-tag-muted {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.project-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.project-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.project-logo .icon {
  width: 17px;
  height: 17px;
}

.project-logo-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.project-logo-muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.project-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
  flex-grow: 1;
}

.claude-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 12px;
  color: #d97757;
  background: rgba(217, 119, 87, 0.12);
  padding: 4px 9px;
  border-radius: 5px;
  margin-bottom: 16px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.project-link .icon { transition: transform 0.15s ease; }

.project-link:hover .icon { transform: translateX(3px); }

/* About / Contact */

.about-text {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 620px;
  margin: 0 0 24px;
}

.inline-link {
  color: var(--accent);
  border-bottom: 1px solid transparent;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-elevated);
  transition: border-color 0.15s ease;
}

.contact-link:hover { border-color: #3a4048; }

.contact-link .icon { color: var(--accent); }

/* Gmail / Outlook brand marks carry their own fill, so they only need a
   slightly larger box than the line icons. */
.contact-link .brand-icon {
  width: 18px;
  height: 18px;
}

.inline-link:hover { border-bottom-color: var(--accent); }

/* About — long-form, split into bordered blocks so it stays readable */

.about-intro { max-width: 760px; }

.about-intro p {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

.about-intro strong { color: var(--text); font-weight: 600; }

.about-block {
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.about-block-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.about-block-head h3 {
  margin: 0;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.about-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.about-icon svg, .about-icon .ic { width: 18px; height: 18px; }

.about-icon-sm { width: 28px; height: 28px; border-radius: 8px; }

.about-icon-sm svg, .about-icon-sm .ic { width: 15px; height: 15px; }

.about-block p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.about-block p:last-child { margin-bottom: 0; }

.about-block a { color: var(--accent); }

.about-block a:hover { text-decoration: underline; }

.about-subhead {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.about-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px 22px;
  margin: 4px 0 16px;
  padding: 0;
  list-style: none;
}

.about-stack li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.about-stack svg, .about-stack .ic {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--accent);
}

.about-stack strong { color: var(--text); font-weight: 600; }

.about-block-note {
  margin-top: 4px !important;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 18px;
  margin-top: 18px;
}

.about-grid .about-block { margin-top: 0; }

.about-signoff {
  margin: 18px 0 0;
  padding: 22px 24px;
  border: 1px solid rgba(91, 140, 255, 0.3);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

.about-signoff strong { color: var(--accent); }

.about-signoff-end { display: block; margin-top: 4px; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 32px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Studio identity: company in the reading font, trademark as a small chip. */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-company {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.footer-tm {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.footer-legal strong {
  color: var(--text);
  font-weight: 600;
}

.footer-note {
  flex-basis: 100%;
  font-size: 11.5px;
  opacity: 0.8;
}

.footer-sep { opacity: 0.4; }

/* ==========================================================================
   Collection — private Hugging Face bucket viewer
   ========================================================================== */

.col-hero { padding: 72px 24px 40px; }

.col-hero h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.col-hero .hero-sub { margin: 0; }

.col-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(91, 140, 255, 0.25);
}

/* Pitch line under the hero — kept narrow so it stays readable on the
   full-bleed collection layout. */
.col-pitch {
  max-width: 680px;
  margin: 18px 0 0;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.col-body {
  padding: 40px 24px 80px;
  border-top: 1px solid var(--border);
}

/* Toolbar */

.col-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.col-search {
  position: relative;
  flex: 1 1 260px;
}

.col-search .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.col-search input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.col-search input::placeholder { color: #6b7280; }

.col-search input:focus { border-color: var(--accent); }

.col-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.col-sort select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.col-sort select:focus { border-color: var(--accent); }

.col-view {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.col-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 0;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.col-view-btn + .col-view-btn { border-left: 1px solid var(--border); }

.col-view-btn:hover { color: var(--text); }

.col-view-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--text);
}

/* Tabs: Packs | All images */

.col-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.col-tab {
  padding: 10px 16px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.col-tab:hover { color: var(--text); }

.col-tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.col-tab-count {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  opacity: 0.65;
}

.col-packgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 22px;
}

.col-crumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.col-crumb-back {
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.col-crumb strong { color: var(--text); }

.col-crumb-back:hover { border-color: #333a44; }

.col-packlist[hidden],
.col-toolbar[hidden],
.col-chips[hidden],
.col-packs[hidden] { display: none; }

.col-packcard {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.col-packcard:hover { border-color: #333a44; transform: translateY(-2px); }

.col-packcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pack cover: images crossfade with a slow zoom (driven by collection.js) */

.col-packcover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f1216;
}

.col-packcover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(8, 10, 13, 0.55), transparent 45%);
}

.col-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  filter: blur(14px) brightness(1.5) saturate(1.3);
  transform: scale(1.16);
  transition: opacity 0.9s ease, filter 1s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* aura in: the new image condenses out of a bright haze into focus */
.col-slide.is-active {
  opacity: 1;
  filter: blur(0) brightness(1) saturate(1);
  transform: scale(1.03);
}

/* aura out: the old image dissolves into the glow */
.col-slide.is-leaving {
  opacity: 0;
  filter: blur(10px) brightness(1.4) saturate(1.2);
  transform: scale(1.08);
}

.col-packcard:hover .col-slide.is-active { transform: scale(1.07); }

/* a soft light bloom + rim glow rides every change */
.col-packcover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 55%, rgba(190, 215, 255, 0.55), rgba(120, 140, 255, 0.18) 45%, transparent 70%);
  mix-blend-mode: screen;
}

.col-packcover.is-pulse::before { animation: col-aura 1.1s ease-out; }

.col-packcover.is-pulse { animation: col-rim 1.1s ease-out; }

@keyframes col-aura {
  0% { opacity: 0; transform: scale(0.7); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.35); }
}

@keyframes col-rim {
  0% { box-shadow: inset 0 0 0 rgba(150, 175, 255, 0); }
  35% { box-shadow: inset 0 0 38px rgba(150, 175, 255, 0.45); }
  100% { box-shadow: inset 0 0 0 rgba(150, 175, 255, 0); }
}

.col-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.col-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.3s ease, background 0.3s ease;
}

.col-dots i.is-active {
  width: 16px;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .col-slide { transition: none; transform: none; filter: none; }
  .col-slide.is-active,
  .col-packcard:hover .col-slide.is-active { transform: none; filter: none; }
  .col-packcover.is-pulse,
  .col-packcover.is-pulse::before { animation: none; }
}

.col-packinfo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
}

.col-packname { font-size: 16px; font-weight: 600; }

.col-packmeta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Packs tab tree: groups nest to any depth */

.col-packgroup { display: flex; flex-direction: column; gap: 22px; }

.col-packgroup .col-packgroup {
  margin: 12px 0 0 clamp(8px, 2vw, 20px);
  padding-left: clamp(10px, 2vw, 20px);
  border-left: 2px solid var(--border);
}

.col-packgroup-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.col-packgroup-head h3 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }

.col-packgroup-head span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Folder chips */

.col-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.col-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.col-chip:hover { border-color: #333a44; color: var(--text); }

.col-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.col-chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.65;
}

.col-stats {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Packs — every bucket folder is rendered as its own section */

.col-packs {
  display: flex;
  flex-direction: column;
  gap: 54px;
}

.col-pack-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.col-pack-title {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.col-pack-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Anime title (h1) → character (h2) groups */

.col-title { margin: 0; }
.col-title-head, .col-char-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  cursor: pointer;
  list-style: none;
}
.col-title-head::-webkit-details-marker, .col-char-head::-webkit-details-marker { display: none; }
.col-title-head::before, .col-char-head::before {
  content: "▾";
  color: var(--text-muted);
  font-size: 14px;
  transition: transform 0.15s;
}
.col-title:not([open]) > .col-title-head::before,
.col-char:not([open]) > .col-char-head::before { transform: rotate(-90deg); }
.col-title-head {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.col-title-head h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); letter-spacing: -0.02em; }
.col-char { margin: 0 0 34px; }
.col-char-head { margin: 0 0 14px; }
.col-char-head h2 { margin: 0; font-size: 19px; }
.col-group-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.col-watch {
  margin-left: auto;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s, border-color 0.15s;
}
.col-watch:hover, .col-watch:focus-visible { background: rgba(247, 140, 37, 0.18); border-color: #f78c25; }
.lb-watch { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.lb-watch[hidden] { display: none; }

.col-jump {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
  margin-bottom: -24px;
  background: var(--bg, #0b0d10);
}
.col-jump-link {
  flex: none;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.col-jump-link span { margin-left: 4px; font-family: var(--font-mono); font-size: 11px; opacity: 0.65; }
.col-jump-link:hover { border-color: currentColor; }

/* Grid */

.col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 24px;
  align-items: start;
}

/* Certificates flow — numbered nodes on a spine joined by arrows, cards zig-zag. */
.cert-flow {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 980px;
  position: relative;
}
.cert-flow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 20px;
  bottom: 20px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(var(--accent), var(--border));
  opacity: 0.55;
}
.cert-step {
  position: relative;
  width: 50%;
  padding: 0 52px 64px 0;
  box-sizing: border-box;
}
.cert-step:nth-child(even) { margin-left: 50%; padding: 0 0 64px 52px; }
.cert-step:last-child { padding-bottom: 0; }
.cert-step .col-card { width: 100%; }
.cert-node {
  position: absolute;
  top: 8px;
  right: -22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
  color: var(--accent);
  font: 500 14px var(--font-mono);
  box-shadow: 0 0 0 5px var(--accent-soft), 0 0 18px var(--accent-soft);
  z-index: 1;
}
.cert-step:nth-child(even) .cert-node { right: auto; left: -22px; }
/* Arrow from this step's node to the next one's (a diagonal hop across the spine). */
.cert-arrow {
  position: absolute;
  right: -9px;
  width: 18px;
  height: 18px;
  border-right: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(45deg);
  z-index: 1;
  top: calc(100% - 40px);
  background: var(--bg);
}
.cert-step:nth-child(even) .cert-arrow { right: auto; left: -9px; }
.cert-step:last-child .cert-arrow { display: none; }

@media (max-width: 720px) {
  .cert-flow::before { left: 22px; }
  .cert-step,
  .cert-step:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 56px 64px; }
  .cert-node,
  .cert-step:nth-child(even) .cert-node { left: 0; right: auto; }
  .cert-arrow,
  .cert-step:nth-child(even) .cert-arrow { left: 13px; right: auto; }
}

/* Landscape view — wide 16:9 cards; the image is letterboxed, never cropped. */
.col-packs.is-landscape .col-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr));
}

.col-packs.is-landscape .col-card-media {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-packs.is-landscape .col-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.col-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color 0.2s ease, transform 0.25s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}

.col-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, #333a44);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Entrance: rise + un-tilt + fade, staggered by --d; JS adds .rv then .in. */
.col-card.rv:not(.in) {
  opacity: 0;
  transform: perspective(900px) translateY(36px) rotateX(10deg) scale(0.94);
}
.col-card.rv {
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0ms),
              transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0ms),
              border-color 0.2s ease, box-shadow 0.3s ease;
}
.col-card.rv.in:hover { transition-delay: 0ms; transition-duration: 0.7s, 0.25s, 0.2s, 0.3s; }

/* Cursor-following glare. */
.col-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 60%);
  transition: opacity 0.3s ease;
}
.col-card:hover::after { opacity: 1; }

.col-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The media box keeps the image's own proportions — nothing is cropped or
   squared off, so a full wallpaper is always visible. */
.col-card-media {
  position: relative;
  display: block;
  background: #0e1116;
  overflow: hidden;
}

.col-card-media {
  min-height: 160px;
  background: #0e1116;
}

.col-card-media.has-ratio {
  min-height: 0;
  aspect-ratio: var(--ar);
  background-size: cover;
  background-position: center;
}

.col-card.is-loaded .col-card-media,
.col-card.is-broken .col-card-media {
  min-height: 0;
}

.col-card-media img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.12s ease-out;
  -webkit-user-drag: none;
  user-select: none;
}

.col-card.is-loaded .col-card-media img { opacity: 1; }

/* Skeleton: a quiet tint over the card's own blurred preview, with a soft
   shimmer band moving across it (transform only — GPU-friendly, no layout).
   It fades out when the image is decoded, and is dropped for a failed card. */
.col-card-media { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.035); }

.col-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.09) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: col-sweep 1.5s ease-in-out infinite;
  will-change: transform;
  transition: opacity 0.35s ease-out, visibility 0s;
}

.col-card.is-loaded .col-card-media::before,
.col-card.is-broken .col-card-media::before {
  opacity: 0;
  visibility: hidden;
  animation-play-state: paused;
  will-change: auto;
  transition: opacity 0.35s ease-out, visibility 0s 0.35s;
}

.col-card-media img {
  transform: scale(1.06);
  filter: blur(10px) saturate(0.8);
  transition: opacity 0.5s ease-out, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s ease-out;
}

.col-card-media img { clip-path: inset(0 0 100% 0); }

.col-card.is-loaded .col-card-media img {
  transform: none;
  filter: none;
  clip-path: inset(0);
  transition: opacity 0.5s ease-out, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
              filter 0.7s ease-out, clip-path 0.8s cubic-bezier(0.65, 0, 0.2, 1);
}

.col-card:hover .col-card-media img { transform: scale(1.04); transition-duration: 0.5s; }

@keyframes col-sweep {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .col-card-media::before { animation: none; transform: none; background: rgba(255, 255, 255, 0.05); }
  .col-card-media img { transform: none; filter: none; clip-path: none; transition: opacity 0.12s ease-out; }
  .col-card, .col-card.rv:not(.in) { transform: none; opacity: 1; transition: none; }
}

.col-card.is-broken .col-card-media::after {
  content: "Preview unavailable";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}

.col-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: linear-gradient(to top, rgba(5, 7, 10, 0.72), rgba(5, 7, 10, 0.25));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.col-card:hover .col-card-overlay,
.col-card:focus-visible .col-card-overlay { opacity: 1; }

/* Non-previewable files (e.g. .pptx) are listed but cannot be opened. */

.col-card.is-doc { cursor: default; }

.col-card.is-doc:hover {
  transform: none;
  border-color: var(--border);
}

.col-doc-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 170px;
  background: repeating-linear-gradient(45deg, #10131a, #10131a 10px, #0d1016 10px, #0d1016 20px);
}

.col-doc-ext {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.col-doc-note {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.75;
}

.col-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.col-card-name {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-card-size {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* States */

.col-state {
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.col-state-title {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.col-state-detail {
  margin: 8px auto 0;
  max-width: 520px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.col-state-loading .col-state-title { color: var(--text-muted); }

.col-state-loading {
  border-style: solid;
  animation: col-pulse 1.4s ease-in-out infinite;
}

@keyframes col-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.col-state-error {
  border-style: solid;
  border-color: rgba(217, 119, 87, 0.4);
  background: rgba(217, 119, 87, 0.06);
}

.col-state-error .col-state-title { color: #e89a7c; }

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 22px;
}

.lightbox[hidden] { display: none; }

body.lb-open { overflow: hidden; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 9, 0.88);
  backdrop-filter: blur(6px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(1200px, 100%);
  height: 100%;
}

.lb-viewport {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}

.lb-stage {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-stage { overflow: hidden; }
.lb-stage img.lb-zoomed { cursor: grab; }
.lb-stage img.lb-panning { cursor: grabbing; }
.lb-stage img { touch-action: none; will-change: transform; }

.lb-zoom {
  position: absolute;
  top: 0;
  right: 52px;
  z-index: 2;
  display: inline-flex;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(18, 21, 26, 0.78);
  overflow: hidden;
}
.lb-zoom button {
  min-width: 40px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.lb-zoom button:hover { background: var(--bg-elevated); }
.lb-zoom .lb-zoom-level { font-size: 13px; min-width: 56px; }

.lb-stage img.is-preview { filter: blur(6px); }
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  -webkit-user-drag: none;
  user-select: none;
}

.lb-nav {
  align-self: center;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(18, 21, 26, 0.78);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lb-nav:hover { border-color: #3a4048; background: var(--bg-elevated); }

.lb-nav .icon { width: 20px; height: 20px; }

.lb-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(18, 21, 26, 0.78);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lb-close:hover { border-color: #3a4048; background: var(--bg-elevated); }

.lb-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(18, 21, 26, 0.92);
}

.lb-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lb-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.lb-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lb-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.lb-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.lb-download:hover {
  border-color: var(--accent);
}

.lb-download:disabled {
  opacity: 0.55;
  cursor: progress;
}

.lb-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lb-share:hover {
  background: rgba(91, 140, 255, 0.2);
  border-color: #7aa2ff;
}

.lb-share:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lb-share:disabled {
  opacity: 0.6;
  cursor: progress;
}

.lb-infobtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lb-infobtn:hover,
.lb-infobtn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.lb-infobtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lb-details {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(18, 21, 26, 0.92);
}

.lb-details[hidden] { display: none; }
.lb-details dt { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.lb-details dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }

/* Transient confirmation: "link copied", share errors. Sits above the lightbox. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.18s ease;
}

.toast-ok { border-color: rgba(91, 140, 255, 0.55); }

.toast-warn {
  border-color: #e89a7c;
  color: #f3c4ae;
  word-break: break-all;
  /* The clipboard was blocked, so the URL itself has to be selectable. */
  user-select: all;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}

/* ==========================================================================
   Presentations — .pptx decks rendered in the browser
   ========================================================================== */

.pr-hero { padding: 72px 24px 40px; }

.pr-hero h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.pr-hero .hero-sub { margin: 0; }

.pr-body {
  padding: 40px 24px 80px;
  border-top: 1px solid var(--border);
}

.pr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.pr-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pr-card:hover { border-color: #333a44; transform: translateY(-2px); }

.pr-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pr-card-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 28% 18%, rgba(91, 140, 255, 0.2), transparent 62%),
    #0e1116;
}

.pr-card-ext {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.pr-card-open {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  background: rgba(5, 7, 10, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pr-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 14px 16px 16px;
}

.pr-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pr-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.pr-note {
  margin: 34px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.pr-note strong { color: var(--text); font-weight: 600; }

.pr-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pr-note a:hover { color: #8fb0ff; }

/* Deck viewer */

body.deck-open { overflow: hidden; }

.deck-viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  padding: 0;
}

.deck-viewer[hidden] { display: none; }

.deck-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.9);
  backdrop-filter: blur(6px);
}

.deck-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg);
}

.deck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.deck-heading { min-width: 0; }

.deck-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.deck-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.deck-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.deck-download:hover {
  background: rgba(91, 140, 255, 0.2);
  border-color: #7aa2ff;
}

/* Scoped to the anchor: body.deck-open (scroll lock) must not pick this up. */
a.deck-open {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a.deck-open:hover { border-color: #3a4048; color: var(--text); }

.deck-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.deck-close:hover { border-color: #3a4048; }

.deck-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #08090c;
}

.deck-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0e1116;
}

.deck-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  background: #08090c;
}

/* `display: flex` above would otherwise override the default hidden state. */
.deck-state[hidden] { display: none; }

.deck-state-title { margin: 0; color: var(--text); font-size: 15px; }

.deck-state-detail { margin: 0; font-size: 13px; max-width: 460px; }

.deck-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.deck-hint { opacity: 0.8; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hero { padding: 88px 24px 72px; }
  .col-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 10px;
  }
  .site-nav {
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { font-size: 13px; white-space: nowrap; }
  .hero { padding: 64px 24px 56px; }
  .hero-actions { flex-wrap: wrap; }
  .projects, .about, .contact { padding: 48px 24px; }
  .col-hero, .pr-hero { padding: 52px 24px 32px; }
  .col-body, .pr-body { padding: 32px 24px 64px; }
  .col-packs { gap: 40px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .project-grid { grid-template-columns: 1fr; }
  .col-grid { grid-template-columns: 1fr; gap: 18px; }
  .pr-grid { grid-template-columns: 1fr; }
  .col-sort { width: 100%; justify-content: space-between; }
  .col-sort select { flex: 1; }
  .footer-inner { flex-wrap: wrap; }
  .lightbox { padding: 12px; }
  .lb-nav { width: 36px; height: 36px; }
  .lb-close { width: 34px; height: 34px; }
  .lb-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .lb-actions { flex-wrap: wrap; gap: 10px; }
  .lb-share { padding: 7px 11px; font-size: 12px; }
  .about-block { padding: 18px; }
  .about-signoff { padding: 18px; }
  .deck-bar { padding: 12px 14px; }
  .deck-name { font-size: 13.5px; }
  .deck-actions { gap: 8px; }
  .deck-download,
  a.deck-open { padding: 6px 9px; font-size: 11.5px; }
  .deck-foot { padding: 8px 14px; }
  .deck-hint { display: none; }
}

@media (max-width: 480px) {
  /* Title on its own row, actions underneath — otherwise the deck name is
     squeezed to a few characters between the buttons. */
  .deck-bar { flex-wrap: wrap; row-gap: 10px; }
  .deck-heading { width: 100%; }
  .deck-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 560px) {
  /* Keep the nav on ONE line; it scrolls sideways when it does not fit. */
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 13px; }
  .icon-link { gap: 5px; }
}

@media (max-width: 360px) {
  :root { --gutter: 14px; }
}

/* Short landscape phones: the lightbox must not eat the whole viewport. */
@media (max-height: 480px) and (orientation: landscape) {
  .lightbox { padding: 8px; }
  .lb-bar { gap: 6px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 30px; }
  .site-nav { gap: 14px; }
  .contact-link { width: 100%; }
  .col-pack-title { font-size: 17px; }
}

/* Skills page */
.sk-heading { margin: 0 0 18px; font-size: clamp(20px, 3vw, 26px); letter-spacing: -0.01em; }
.sk-heading-gap { margin-top: 48px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.sk-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); transition: border-color 0.15s ease; }
.sk-card:hover { border-color: #333a44; }
.sk-name { align-self: flex-start; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.sk-title { margin: 0; font-size: 18px; line-height: 1.3; }
.sk-desc { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.sk-label { margin-top: 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sk-chips li { padding: 3px 9px; border-radius: 6px; background: #0e1116; border: 1px solid var(--border); font-size: 12px; color: var(--text); }
.sk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sk-copy { padding: 7px 14px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease; }
.sk-copy:hover:not(:disabled) { border-color: #4a5463; }
.sk-copy.is-done { color: #6fcf97; border-color: #6fcf97; }
.sk-drag-hint { font-size: 11px; color: var(--text-muted); }
.sk-card[draggable="true"] { cursor: grab; }
.sk-meta { margin-top: auto; padding-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.sk-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.sk-steps li { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.sk-step-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-bottom: 10px; border-radius: 50%; background: rgba(91, 140, 255, 0.15); color: var(--accent); font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.sk-steps h3 { margin: 0 0 6px; font-size: 16px; }
.sk-steps p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.sk-asks { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sk-asks li { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 14px 18px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg-elevated); font-size: 14px; }
.sk-asks strong { font-weight: 600; }
.sk-asks span { color: var(--text-muted); }
@media (max-width: 560px) { .sk-grid { grid-template-columns: 1fr; } }

/* Icons are separate files in assets/icons/, tinted via mask. */
.ic-arrow-right{-webkit-mask-image:url(../assets/icons/navigation/arrow-right.svg);mask-image:url(../assets/icons/navigation/arrow-right.svg)}
.ic-bar-chart-thin{-webkit-mask-image:url(../assets/icons/features/bar-chart-thin.svg);mask-image:url(../assets/icons/features/bar-chart-thin.svg)}
.ic-checklist{-webkit-mask-image:url(../assets/icons/status/checklist.svg);mask-image:url(../assets/icons/status/checklist.svg)}
.ic-chevron-left{-webkit-mask-image:url(../assets/icons/navigation/chevron-left.svg);mask-image:url(../assets/icons/navigation/chevron-left.svg)}
.ic-chevron-right{-webkit-mask-image:url(../assets/icons/navigation/chevron-right.svg);mask-image:url(../assets/icons/navigation/chevron-right.svg)}
.ic-clock{-webkit-mask-image:url(../assets/icons/status/clock.svg);mask-image:url(../assets/icons/status/clock.svg)}
.ic-close{-webkit-mask-image:url(../assets/icons/actions/close.svg);mask-image:url(../assets/icons/actions/close.svg)}
.ic-code-thin{-webkit-mask-image:url(../assets/icons/dev/code-thin.svg);mask-image:url(../assets/icons/dev/code-thin.svg)}
.ic-database-thin{-webkit-mask-image:url(../assets/icons/dev/database-thin.svg);mask-image:url(../assets/icons/dev/database-thin.svg)}
.ic-download{-webkit-mask-image:url(../assets/icons/actions/download.svg);mask-image:url(../assets/icons/actions/download.svg)}
.ic-download-tray{-webkit-mask-image:url(../assets/icons/actions/download-tray.svg);mask-image:url(../assets/icons/actions/download-tray.svg)}
.ic-git-branch-thin{-webkit-mask-image:url(../assets/icons/dev/git-branch-thin.svg);mask-image:url(../assets/icons/dev/git-branch-thin.svg)}
.ic-github{-webkit-mask-image:url(../assets/icons/brands/github.svg);mask-image:url(../assets/icons/brands/github.svg)}
.ic-globe-thin{-webkit-mask-image:url(../assets/icons/features/globe-thin.svg);mask-image:url(../assets/icons/features/globe-thin.svg)}
.ic-grid{-webkit-mask-image:url(../assets/icons/navigation/grid.svg);mask-image:url(../assets/icons/navigation/grid.svg)}
.ic-heart-thin{-webkit-mask-image:url(../assets/icons/features/heart-thin.svg);mask-image:url(../assets/icons/features/heart-thin.svg)}
.ic-image-thin{-webkit-mask-image:url(../assets/icons/media/image-thin.svg);mask-image:url(../assets/icons/media/image-thin.svg)}
.ic-info{-webkit-mask-image:url(../assets/icons/status/info.svg);mask-image:url(../assets/icons/status/info.svg)}
.ic-landscape{-webkit-mask-image:url(../assets/icons/media/landscape.svg);mask-image:url(../assets/icons/media/landscape.svg)}
.ic-logos{-webkit-mask-image:url(../assets/icons/navigation/logos.svg);mask-image:url(../assets/icons/navigation/logos.svg)}
.ic-layers-thin{-webkit-mask-image:url(../assets/icons/dev/layers-thin.svg);mask-image:url(../assets/icons/dev/layers-thin.svg)}
.ic-linkedin{-webkit-mask-image:url(../assets/icons/brands/linkedin.svg);mask-image:url(../assets/icons/brands/linkedin.svg)}
.ic-lock{-webkit-mask-image:url(../assets/icons/status/lock.svg);mask-image:url(../assets/icons/status/lock.svg)}
.ic-mic{-webkit-mask-image:url(../assets/icons/media/mic.svg);mask-image:url(../assets/icons/media/mic.svg)}
.ic-monitor{-webkit-mask-image:url(../assets/icons/features/monitor.svg);mask-image:url(../assets/icons/features/monitor.svg)}
.ic-monitor-thin{-webkit-mask-image:url(../assets/icons/features/monitor-thin.svg);mask-image:url(../assets/icons/features/monitor-thin.svg)}
.ic-plus{-webkit-mask-image:url(../assets/icons/actions/plus.svg);mask-image:url(../assets/icons/actions/plus.svg)}
.ic-rocket-thin{-webkit-mask-image:url(../assets/icons/features/rocket-thin.svg);mask-image:url(../assets/icons/features/rocket-thin.svg)}
.ic-search{-webkit-mask-image:url(../assets/icons/actions/search.svg);mask-image:url(../assets/icons/actions/search.svg)}
.ic-search-thin{-webkit-mask-image:url(../assets/icons/actions/search-thin.svg);mask-image:url(../assets/icons/actions/search-thin.svg)}
.ic-share{-webkit-mask-image:url(../assets/icons/actions/share.svg);mask-image:url(../assets/icons/actions/share.svg)}
.ic-ai{-webkit-mask-image:url(../assets/icons/features/ai.svg);mask-image:url(../assets/icons/features/ai.svg)}
.ic-sparkles-thin{-webkit-mask-image:url(../assets/icons/features/sparkles-thin.svg);mask-image:url(../assets/icons/features/sparkles-thin.svg)}
.ic-terminal-thin{-webkit-mask-image:url(../assets/icons/dev/terminal-thin.svg);mask-image:url(../assets/icons/dev/terminal-thin.svg)}
.ic-x{-webkit-mask-image:url(../assets/icons/actions/x.svg);mask-image:url(../assets/icons/actions/x.svg)}
.ic-award{-webkit-mask-image:url(../assets/icons/navigation/award.svg);mask-image:url(../assets/icons/navigation/award.svg)}
.ic-mail{-webkit-mask-image:url(../assets/icons/navigation/mail.svg);mask-image:url(../assets/icons/navigation/mail.svg)}
.ic-music{-webkit-mask-image:url(../assets/icons/navigation/music.svg);mask-image:url(../assets/icons/navigation/music.svg)}
.ic-presentation{-webkit-mask-image:url(../assets/icons/navigation/presentation.svg);mask-image:url(../assets/icons/navigation/presentation.svg)}
.ic-user{-webkit-mask-image:url(../assets/icons/navigation/user.svg);mask-image:url(../assets/icons/navigation/user.svg)}

/* Nav links: icon + label */
.site-nav > a.nav-link { display: inline-flex; align-items: center; gap: 6px; }
.site-nav .nav-ic { width: 15px; height: 15px; opacity: .8; }
.site-nav > a.nav-link:hover .nav-ic, .site-nav > a.nav-link[aria-current="page"] .nav-ic { opacity: 1; color: var(--accent); }
.site-nav > a.nav-link { white-space: nowrap; }
.site-nav > a, .site-nav .nav-social { flex-shrink: 0; }
/* Two rows at every width: brand on top, nav tabs below. */
.header-inner { height: auto; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; padding-block: 12px 14px; }
.brand { margin-right: 0; }
.site-nav { width: 100%; gap: 22px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 8px; }
.site-nav::-webkit-scrollbar { display: none; }
