/* ========================================
   UsefulInfoApp Portfolio
   Aesthetic: Editorial Dark Gallery
   ======================================== */

/* --- Tokens --- */
:root {
  /* Surfaces */
  --bg-0: #08080a;
  --bg-1: #111114;
  --bg-2: #1a1a1f;
  --bg-3: #222228;

  /* Text */
  --fg-0: #f5f3ef;
  --fg-1: #b8b5ae;
  --fg-2: #7a776f;

  /* Accent — warm amber */
  --accent: #d4a033;
  --accent-muted: rgba(212, 160, 51, 0.15);
  --accent-glow: rgba(212, 160, 51, 0.08);

  /* Category colors */
  --c-travel: #34d399;
  --c-finance: #60a5fa;
  --c-ai: #c084fc;
  --c-entertainment: #fb923c;
  --c-crypto: #facc15;
  --c-community: #f472b6;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadows */
  --shadow-card: 0 2px 20px rgba(0,0,0,0.4);
  --shadow-modal: 0 40px 100px rgba(0,0,0,0.7);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.4s;
  --dur-fast: 0.2s;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Noto Sans KR', 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Light theme */
[data-theme="light"] {
  --bg-0: #f4f2ed;
  --bg-1: #eae7e0;
  --bg-2: #ddd9d0;
  --bg-3: #d0ccc3;
  --fg-0: #1a1815;
  --fg-1: #5c5850;
  --fg-2: #8a857c;
  --accent: #b8871a;
  --accent-muted: rgba(184, 135, 26, 0.12);
  --accent-glow: rgba(184, 135, 26, 0.06);
  --border: rgba(0, 0, 0, 0.07);
  --border-hover: rgba(0, 0, 0, 0.14);
  --shadow-card: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-modal: 0 40px 100px rgba(0,0,0,0.2);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--fg-0);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* --- Grain Overlay --- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

[data-theme="light"] .grain { opacity: 0.04; }

/* --- Cursor Glow --- */
.cursor-glow {
  position: fixed; width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 0;
  transition: opacity 0.3s;
  opacity: 0;
}
.cursor-glow.active { opacity: 1; }

/* --- Skip Link --- */
.skip-link {
  position: absolute; top: -100%; left: 20px;
  padding: 12px 24px; background: var(--accent); color: var(--bg-0);
  border-radius: var(--r-md); font-weight: 600; font-size: 14px;
  z-index: 10000; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ===== HEADER ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: background var(--dur);
}
[data-theme="light"] .header {
  background: rgba(244, 242, 237, 0.8);
}

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

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.logo-mark {
  color: var(--accent); font-size: 20px;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.logo-accent { color: var(--accent); }

.header-nav {
  display: flex; align-items: center; gap: 6px;
}

.nav-link {
  padding: 7px 16px; border-radius: var(--r-sm);
  font-family: var(--font-display); font-size: 14px; font-weight: 500;
  color: var(--fg-2); letter-spacing: 0.01em;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-link:hover { color: var(--fg-0); background: var(--border); }

/* Theme toggle — custom track/thumb */
.theme-toggle {
  position: relative; width: 52px; height: 28px;
  border-radius: 14px; padding: 0;
  background: var(--bg-3); border: 1px solid var(--border);
  transition: background var(--dur-fast);
}
.theme-toggle:hover { border-color: var(--border-hover); }

.toggle-track {
  position: relative; display: flex; align-items: center;
  width: 100%; height: 100%; padding: 0 6px;
  justify-content: space-between; pointer-events: none;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent);
  transition: transform 0.3s var(--ease-spring);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
[data-theme="light"] .toggle-thumb { transform: translateX(24px); }

.toggle-icon {
  color: var(--fg-2); flex-shrink: 0;
  transition: color var(--dur-fast);
}
.icon-sun { order: -1; }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 800px;
}

.hero-eyebrow {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent); text-transform: uppercase;
  letter-spacing: 0.15em; margin-bottom: 28px;
}
.eyebrow-line {
  width: 40px; height: 1px; background: var(--accent);
  opacity: 0.4;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7.5vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.title-line { display: block; }

.hero-desc {
  font-size: 17px; color: var(--fg-1);
  line-height: 1.7; margin-bottom: 48px;
  max-width: 520px;
}

.hero-metrics {
  display: flex; gap: 48px;
}
.metric {
  display: flex; flex-direction: column;
}
.metric-value {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg-0);
}
.metric-label {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.hero-gradient {
  position: absolute; top: -30%; right: -20%;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none; z-index: 1;
  filter: blur(40px);
}

/* ===== LIVE TICKER ===== */
.live-ticker {
  display: flex; align-items: center;
  height: 38px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  overflow: hidden;
  user-select: none;
}

.ticker-label {
  display: flex; align-items: center; gap: 7px;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.15em;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  height: 100%;
}

.ticker-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
  animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34,197,94,0.7); }
  50% { opacity: 0.5; box-shadow: 0 0 2px rgba(34,197,94,0.3); }
}

.ticker-mask {
  flex: 1; overflow: hidden;
  height: 100%; display: flex; align-items: center;
}

.ticker-track {
  display: flex; align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 36s linear infinite;
  will-change: transform;
}

.ticker-track:hover { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 32px;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-1);
  letter-spacing: 0.02em;
}

.ticker-item-dot {
  width: 5px; height: 5px; border-radius: 50%;
  flex-shrink: 0;
}

.ticker-item-dot.dot-green { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,0.5); }
.ticker-item-dot.dot-amber { background: var(--accent); box-shadow: 0 0 4px rgba(212,160,51,0.4); }
.ticker-item-dot.dot-blue  { background: #60a5fa; box-shadow: 0 0 4px rgba(96,165,250,0.4); }

.ticker-item-name {
  color: var(--fg-0); font-weight: 500;
}

.ticker-sep {
  padding: 0 8px;
  color: var(--fg-2); opacity: 0.3;
  font-size: 14px;
}

[data-theme="light"] .live-ticker {
  background: var(--bg-1);
}
[data-theme="light"] .ticker-item { color: var(--fg-1); }
[data-theme="light"] .ticker-item-name { color: var(--fg-0); }

/* ===== CARD LIVE STATUS ===== */
.card-live-status {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px; color: var(--fg-2);
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.s-green {
  background: #22c55e;
  animation: live-pulse 2s ease-in-out infinite;
}
.status-dot.s-amber { background: var(--accent); }
.status-dot.s-blue  { background: #60a5fa; }

.status-text { color: var(--fg-2); }
.status-text.s-highlight { color: var(--accent); }

/* ===== PROJECTS ===== */
.projects-section { padding: 0 0 120px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 40px; gap: 20px; flex-wrap: wrap;
}

.section-label {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.filter-bar {
  display: flex; gap: 4px; flex-wrap: wrap;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: var(--fg-2);
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all var(--dur-fast);
}
.filter-chip:hover {
  color: var(--fg-1); border-color: var(--border);
}
.filter-chip.active {
  color: var(--bg-0); background: var(--accent);
  border-color: var(--accent);
}

/* --- Bento Grid --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* All cards equal width — featured/wide only affect image height */
.card--featured { grid-column: span 1; }
.card--wide { grid-column: span 1; }

/* --- Card --- */
.card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out),
              border-color var(--dur-fast),
              box-shadow var(--dur);
  /* scroll animation initial state */
  opacity: 0;
  transform: translateY(40px);
}
.card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out),
              border-color var(--dur-fast),
              box-shadow var(--dur);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-6px);
}
.card.visible:hover {
  transform: translateY(-6px);
}
.card.hidden { display: none; }
.card.filter-exit {
  opacity: 0; transform: scale(0.96);
}

.card-link { display: block; }

.card-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-2);
}
.card--featured .card-visual,
.card--wide .card-visual {
  aspect-ratio: 16 / 10;
}

.card-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.6s;
}
.card:hover .card-visual img {
  transform: scale(1.04);
}

/* Hover shine sweep */
.card-shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.04) 45%, transparent 60%);
  background-size: 200% 100%;
  background-position: 200% 0;
  transition: background-position 0.8s var(--ease-out);
}
.card:hover .card-shine {
  background-position: -100% 0;
}

.card-info {
  padding: 20px 22px 18px;
  display: flex; flex-direction: column; gap: 12px;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-2);
  letter-spacing: 0.05em;
  opacity: 0.5;
}

.card-text { display: flex; flex-direction: column; gap: 6px; }

.card-tag-row {
  display: flex; align-items: center; gap: 10px;
}
.card-tag {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
}
.color-travel { color: var(--c-travel); background: rgba(52,211,153,0.12); }
.color-finance { color: var(--c-finance); background: rgba(96,165,250,0.12); }
.color-ai { color: var(--c-ai); background: rgba(192,132,252,0.12); }
.color-entertainment { color: var(--c-entertainment); background: rgba(251,146,60,0.12); }
.color-crypto { color: var(--c-crypto); background: rgba(250,204,21,0.12); }
.color-community { color: var(--c-community); background: rgba(244,114,182,0.12); }

[data-theme="light"] .color-travel { color: #059669; background: rgba(5,150,105,0.1); }
[data-theme="light"] .color-finance { color: #2563eb; background: rgba(37,99,235,0.1); }
[data-theme="light"] .color-ai { color: #7c3aed; background: rgba(124,58,237,0.1); }
[data-theme="light"] .color-entertainment { color: #ea580c; background: rgba(234,88,12,0.1); }
[data-theme="light"] .color-crypto { color: #b45309; background: rgba(180,83,9,0.1); }
[data-theme="light"] .color-community { color: #db2777; background: rgba(219,39,119,0.1); }

.card-domain {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--fg-2);
  opacity: 0.6;
}

.card-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card-desc {
  font-size: 13px; color: var(--fg-1);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 4px;
}

.btn-info {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid transparent;
  transition: all var(--dur-fast);
}
.btn-info:hover {
  background: var(--accent);
  color: var(--bg-0);
  border-color: var(--accent);
}

.card-badges { display: flex; gap: 5px; }
.badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  color: var(--fg-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
}

/* ===== CARD CAROUSEL ===== */
.card-slides {
  position: absolute; inset: 0;
}

.card-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.75s ease;
  pointer-events: none;
}

.card-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.card-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.6s;
  display: block;
}

.card:hover .card-slide.active img {
  transform: scale(1.04);
}

/* Slide feature label */
.slide-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 12px 9px;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.04em;
  line-height: 1.4;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

[data-theme="light"] .slide-label {
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
}

/* Dot indicators */
.slide-dots {
  position: absolute;
  top: 10px; right: 10px;
  display: flex; gap: 5px;
  z-index: 4;
  pointer-events: none;
}

.slide-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.3s, transform 0.3s;
  flex-shrink: 0;
}

.slide-dot.active {
  background: rgba(255,255,255,0.92);
  transform: scale(1.4);
}

/* Progress bar */
.slide-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.7;
  z-index: 4;
  transform-origin: left;
  transition: none;
}

/* ===== ABOUT ===== */
.about {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  position: sticky; top: 100px;
}
.about-heading em {
  font-style: italic;
  color: var(--accent);
}

.about-text {
  font-size: 16px; color: var(--fg-1);
  line-height: 1.8;
  margin-bottom: 40px;
}

.about-domains {
  display: flex; gap: 16px;
}

.domain-block {
  flex: 1;
  padding: 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color var(--dur-fast);
}
.domain-block:hover { border-color: var(--border-hover); }

.domain-url {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  color: var(--fg-0);
}
.domain-label {
  font-size: 13px; color: var(--fg-2);
}
.domain-count {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== FOOTER ===== */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--fg-2);
}

.footer-left {
  display: flex; align-items: center; gap: 16px;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 600; color: var(--fg-1);
}

.footer-right {
  display: flex; gap: 24px;
}
.footer-right a {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--fg-2);
  transition: color var(--dur-fast);
}
.footer-right a:hover { color: var(--accent); }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: all var(--dur) var(--ease-out);
}
.modal-backdrop.active {
  opacity: 1; visibility: visible;
}

.modal {
  position: relative;
  width: 100%; max-width: 880px; max-height: 92vh;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden; overflow-y: auto;
  transform: translateY(30px) scale(0.96);
  transition: transform var(--dur) var(--ease-out);
  box-shadow: var(--shadow-modal);
}
.modal-backdrop.active .modal {
  transform: translateY(0) scale(1);
}

/* Custom scrollbar for modal */
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

.modal-chrome {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: rgba(17,17,20,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .modal-chrome {
  background: rgba(234,231,224,0.85);
}

.modal-number {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--fg-2);
  letter-spacing: 0.08em;
}

.modal-close {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: var(--fg-2);
  transition: all var(--dur-fast);
}
.modal-close kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--border);
}
.modal-close:hover { color: var(--fg-0); background: var(--border); }

.modal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-visual {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.modal-screenshot {
  width: 100%; height: 100%; object-fit: cover;
}

.modal-content {
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
}

.modal-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 4px;
  width: fit-content;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.modal-desc {
  font-size: 14px; color: var(--fg-1);
  line-height: 1.7;
}

.modal-features h4 {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.modal-features ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.modal-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--fg-1); line-height: 1.5;
}
.modal-features li::before {
  content: ''; width: 5px; height: 5px;
  background: var(--accent); border-radius: 50%;
  flex-shrink: 0; margin-top: 7px;
}

.modal-tech {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.modal-tech .badge {
  padding: 5px 10px; font-size: 11px;
}

.modal-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; margin-top: 8px;
  background: var(--accent); color: var(--bg-0);
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  width: fit-content;
  transition: all var(--dur-fast);
  box-shadow: 0 4px 16px rgba(212,160,51,0.25);
}
.modal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,160,51,0.35);
}

/* ===== ANIMATE ON SCROLL ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-animate].animated {
  opacity: 1; transform: translateY(0);
}

/* ===== FOCUS STATES ===== */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-layout {
    grid-template-columns: 1fr;
  }
  .modal-visual {
    aspect-ratio: 16 / 9;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-heading { position: static; }
}

/* Mobile */
@media (max-width: 640px) {
  .ticker-label { padding: 0 12px; font-size: 9px; }
  .ticker-item { padding: 0 20px; font-size: 10px; }

  .hero {
    padding: 130px 0 70px;
  }
  .hero-title {
    font-size: clamp(36px, 10vw, 52px);
  }
  .hero-desc br { display: none; }
  .hero-metrics { gap: 28px; }
  .metric-value { font-size: 28px; }

  .bento-grid {
    grid-template-columns: 1fr;
  }
  .section-header {
    flex-direction: column; align-items: flex-start;
  }

  .about-domains { flex-direction: column; }

  .footer-inner {
    flex-direction: column; gap: 12px; text-align: center;
  }
  .footer-left { flex-direction: column; gap: 4px; }

  .modal {
    max-height: 96vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    align-self: flex-end;
  }
  .modal-content { padding: 24px 20px; }
  .modal-title { font-size: 22px; }

  .cursor-glow { display: none; }

  .nav-link { padding: 7px 10px; font-size: 13px; }
  .header-nav { gap: 2px; }
}

@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .card-info { padding: 16px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .card, [data-animate] { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}

/* ===== PRINT ===== */
@media print {
  .header, .filter-bar, .theme-toggle, .modal-backdrop, .grain, .cursor-glow { display: none; }
  .hero { padding-top: 20px; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; opacity: 1; transform: none; }
}

/* ===== IMAGE ERROR FALLBACK ===== */
.card-visual--error {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-2);
}
.card-visual--error svg { opacity: 0.3; }
.card-visual--error span {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-2); opacity: 0.5;
}
