:root {
  --bg: #0b0d10;
  --bg-elevated: #12151a;
  --border: #22262d;
  --text: #e8eaed;
  --text-muted: #9aa1ab;
  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --radius: 10px;
  --max-width: 1080px;
  --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; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}

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

.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: var(--accent-soft);
  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[aria-current="page"] { color: var(--text); }

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

/* Icons */

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

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

/* Hero */

.hero {
  padding: 110px 24px 90px;
  max-width: 760px;
}

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

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  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: var(--text);
  color: var(--bg);
}

.btn-primary:hover { opacity: 0.88; }

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

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

/* Section headings */

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

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

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

/* Activity */

.activity-chart {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
}

.activity-chart img {
  max-width: 100%;
  height: auto;
}

.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;
}

.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); }

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

/* Footer */

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

.footer-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.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);
}

.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); }

/* 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);
}

/* Grid */

.col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.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;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

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

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

.col-card-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #0e1116;
  overflow: hidden;
}

.col-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  transition: transform 0.35s ease;
}

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

.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;
  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 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-lock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: not-allowed;
}

.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-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
}

.lb-download:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.lb-soon {
  padding: 3px 7px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 640px) {
  .col-hero { padding: 52px 24px 32px; }
  .col-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .lightbox { padding: 12px; }
  .lb-nav { width: 36px; height: 36px; }
  .lb-close { width: 34px; height: 34px; }
}
