/* ============================================================
   Yuhi Sekiguchi Official Site — Shared Styles
   Design: Cinematic Dark + Racing Accents
   ============================================================ */

:root {
  --bg: #050505;
  --bg-alt: #0d0d0d;
  --bg-card: #111111;
  --accent: #E60012;
  --accent-hover: #ff1525;
  --accent-glow: rgba(230, 0, 18, 0.5);
  --text: #ffffff;
  --text-muted: #9a9a9a;
  --text-dim: #5a5a5a;
  --border: rgba(255, 255, 255, 0.08);
  --maxw: 1400px;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
.mono { font-family: 'JetBrains Mono', monospace; }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  padding: 0 clamp(20px, 4vw, 56px);
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(to bottom, rgba(5,5,5,0.96), rgba(5,5,5,0.35));
  backdrop-filter: blur(12px);
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled { background: rgba(5,5,5,0.96); border-bottom: 1px solid var(--border); }
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px; letter-spacing: 0.16em;
}
.nav-logo .dot { color: var(--accent); }
.nav-logo .badge {
  background: var(--accent); color: #fff;
  padding: 3px 9px; font-size: 12px; font-weight: 700;
  font-family: 'Inter', sans-serif; letter-spacing: 0.1em;
}
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  position: relative; padding: 8px 0;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
  transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(.22,1,.36,1);
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2px; background: #fff; transition: 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  border: 2px solid var(--accent);
  position: relative; overflow: hidden; z-index: 1;
  transition: color 0.3s;
  cursor: pointer; background: transparent; color: #fff;
}
.btn::before {
  content: ''; position: absolute; inset: 0; left: -100%;
  background: var(--accent); transition: left 0.4s cubic-bezier(.22,1,.36,1); z-index: -1;
}
.btn:hover::before { left: 0; }
.btn-solid { background: var(--accent); border-color: var(--accent); }
.btn-solid::before { background: var(--accent-hover); }

/* ===== SECTION HELPERS ===== */
.section-tag {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.section-tag::before { content: ''; width: 32px; height: 2px; background: var(--accent); }

/* ===== HERO (home) ===== */
.hero { position: relative; height: 100vh; min-height: 720px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05);
  filter: grayscale(0.35) brightness(0.5) contrast(1.15);
  animation: heroZoom 22s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform: scale(1.05); } to { transform: scale(1.16); } }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 70%),
    linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,0.15) 35%, rgba(0,0,0,0.2) 65%, var(--bg) 100%),
    linear-gradient(to right, rgba(0,0,0,0.45), rgba(0,0,0,0));
}
.hero-content {
  position: relative; z-index: 2; height: 100%;
  padding: 0 clamp(20px, 4vw, 56px) clamp(70px, 12vh, 120px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  background: rgba(230,0,18,0.15); border: 1px solid var(--accent);
  padding: 8px 14px; width: fit-content; margin-bottom: 26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent);
}
.hero-eyebrow::before {
  content: ''; width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow); animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px; font-weight: 300; color: var(--text-muted);
  letter-spacing: 0.5em; margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(72px, 13vw, 200px); line-height: 0.85;
  letter-spacing: 0.005em; margin-bottom: 32px;
}
.hero h1 .accent { text-shadow: 0 0 60px rgba(230,0,18,0.25); }
.hero-sub {
  display: flex; flex-wrap: wrap; align-items: stretch;
  border-top: 2px solid var(--accent); padding-top: 18px; max-width: 640px;
}
.hero-sub div {
  padding-right: 24px; margin-right: 24px;
  border-right: 1px solid rgba(255,255,255,0.15);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted);
}
.hero-sub div:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.hero-sub strong {
  display: block; font-family: 'Bebas Neue', sans-serif;
  color: #fff; font-size: 22px; margin-top: 4px; letter-spacing: 0.08em; font-weight: 400;
}
.hero-number {
  position: absolute; bottom: 80px; right: 40px; z-index: 1;
  font-family: 'Anton', sans-serif;
  font-size: clamp(160px, 24vw, 380px); line-height: 0.78;
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,0.08);
  pointer-events: none; user-select: none;
}
.scroll-cue {
  position: absolute; bottom: 40px; right: clamp(20px,4vw,56px); z-index: 3;
  display: flex; align-items: center; gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--text-muted);
}
.scroll-cue::after {
  content: ''; width: 50px; height: 1px;
  background: linear-gradient(to right, var(--text-muted), transparent);
}

/* ===== TICKER ===== */
.ticker {
  background: var(--accent); color: #fff; padding: 15px 0; overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.15); border-bottom: 1px solid rgba(255,255,255,0.15);
  position: relative; z-index: 5;
}
.ticker-inner {
  display: flex; gap: 56px; white-space: nowrap; width: max-content;
  animation: scroll 45s linear infinite;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; letter-spacing: 0.15em; text-transform: uppercase; align-items: center;
}
.ticker:hover .ticker-inner { animation-play-state: paused; }
.ticker-inner span { display: inline-flex; align-items: center; gap: 56px; }
.ticker-inner span::after { content: '◆'; color: rgba(255,255,255,0.45); font-size: 10px; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== ABOUT (home preview) ===== */
.about { padding: clamp(80px,12vh,160px) clamp(20px,4vw,56px); background: var(--bg-alt); position: relative; overflow: hidden; }
.about::before {
  content: 'PROFILE'; position: absolute; top: 60px; right: -30px;
  font-family: 'Anton', sans-serif; font-size: clamp(120px, 22vw, 300px); line-height: 1;
  color: rgba(255,255,255,0.018); letter-spacing: 0.02em; white-space: nowrap; pointer-events: none;
}
.about-inner {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: center;
  position: relative; z-index: 2;
}
.framed-img { position: relative; aspect-ratio: 3/4; }
.about .framed-img { aspect-ratio: 4 / 5; } /* home: looser crop for the 2026 candid portrait */
.framed-img::before {
  content: ''; position: absolute; top: -16px; left: -16px; width: 100%; height: 100%;
  border: 2px solid var(--accent); z-index: 0; transition: all 0.4s;
}
.framed-img:hover::before { top: -22px; left: -22px; }
.framed-img .img { position: relative; z-index: 1; width: 100%; height: 100%; overflow: hidden; background: #1a1a1a; }
.framed-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.25) contrast(1.05); }
.about h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px,6.5vw,96px); line-height: 0.95; letter-spacing: 0.005em; margin-bottom: 36px;
}
.about p { color: #b0b0b0; font-size: 16px; line-height: 1.95; font-weight: 300; margin-bottom: 20px; max-width: 600px; }
.specs-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; margin-top: 40px; background: var(--border); border: 1px solid var(--border); }
.spec-item { background: var(--bg-alt); padding: 22px 24px; }
.spec-item .key { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.spec-item .val { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 0.05em; }
.spec-item .val.red { color: var(--accent); }

/* ===== GALLERY PREVIEW (home) ===== */
.gallery-section { padding: clamp(80px,12vh,140px) clamp(20px,4vw,56px); background: var(--bg); }
.section-header { max-width: var(--maxw); margin: 0 auto 60px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-header h2 { font-family: 'Bebas Neue', sans-serif; font-size: clamp(52px,6.5vw,96px); line-height: 0.95; letter-spacing: 0.005em; }
.gallery-link { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; border-bottom: 2px solid var(--accent); padding-bottom: 6px; transition: padding-right 0.3s; white-space: nowrap; }
.gallery-link:hover { padding-right: 12px; }

.preview-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(6,1fr); grid-auto-rows: 220px; gap: 10px; }
.tile { overflow: hidden; background: #1a1a1a; position: relative; cursor: pointer; }
.tile img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.15) brightness(0.95); transition: all 0.6s cubic-bezier(.22,1,.36,1); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85)); opacity: 0; transition: opacity 0.4s; }
.tile:hover img { transform: scale(1.06); filter: grayscale(0) brightness(1); }
.tile:hover::after { opacity: 1; }
.tile-tag { position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff; padding: 4px 10px; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.15em; z-index: 2; }
.tile-meta { position: absolute; bottom: 16px; left: 16px; z-index: 2; font-family: 'Bebas Neue', sans-serif; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; opacity: 0; transform: translateY(8px); transition: all 0.4s; }
.tile:hover .tile-meta { opacity: 1; transform: translateY(0); }
.tile.s2x2 { grid-column: span 3; grid-row: span 2; }
.tile.s2x1 { grid-column: span 2; }
.tile.s1x2 { grid-row: span 2; }

/* ===== SPONSORS ===== */
.sponsors { padding: clamp(70px,12vh,140px) clamp(20px,4vw,56px); background: var(--bg-alt); border-top: 1px solid var(--border); }
.sponsors-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.sponsors .section-tag { justify-content: center; }
.sponsors-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(40px,6vw,80px); line-height: 0.95; letter-spacing: 0.01em; margin-bottom: 50px; }
.sponsor-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; background: transparent; border: 0; }
.sponsor { background: var(--bg-alt); display: flex; align-items: center; justify-content: center; padding: 32px 24px; min-height: 116px; box-shadow: 0 0 0 1px var(--border); }
.sponsor img { max-height: var(--lh, 48px); max-width: 100%; width: auto; object-fit: contain; opacity: 0.8; transition: opacity 0.3s, transform 0.3s; }
.sp-h30 { --lh: 30px; } .sp-h33 { --lh: 33px; } .sp-h36 { --lh: 36px; } .sp-h38 { --lh: 38px; } .sp-h41 { --lh: 41px; } .sp-h54 { --lh: 54px; } .sp-h60 { --lh: 60px; }
.sponsor:hover img { opacity: 1; transform: scale(1.05); }
@media (max-width: 900px) { .sponsor-grid { grid-template-columns: repeat(3, 1fr); } .sponsor { padding: 24px 16px; min-height: 100px; } }
@media (max-width: 560px) { .sponsor-grid { grid-template-columns: repeat(2, 1fr); } .sponsor img { max-height: calc(var(--lh, 48px) * 0.82); } }

/* ===== PAGE HEADER (sub pages) ===== */
.page-header { position: relative; padding: calc(var(--nav-h) + 80px) clamp(20px,4vw,56px) 80px; overflow: hidden; border-bottom: 1px solid var(--border); }
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--ph-bg, none);
  background-size: cover; background-position: center; opacity: 0.20;
  filter: grayscale(0.5);
}
.page-header::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,5,0.4), var(--bg));
}
.page-header-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; }
.page-header h1 { font-family: 'Bebas Neue', sans-serif; font-size: clamp(60px,9vw,140px); line-height: 0.9; letter-spacing: 0.01em; }
.page-header .jp { font-family: 'Noto Sans JP', sans-serif; font-size: 15px; font-weight: 300; color: var(--text-muted); letter-spacing: 0.4em; margin-top: 12px; }

/* ===== PROFILE PAGE ===== */
.profile-intro { padding: clamp(70px,10vh,120px) clamp(20px,4vw,56px); background: var(--bg-alt); }
.profile-intro-inner { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.3fr; gap: 70px; align-items: start; }
.profile-bio p { color: #c0c0c0; font-size: 16px; line-height: 2; font-weight: 300; margin-bottom: 22px; }
.profile-bio p.lead { font-size: 20px; color: #fff; font-weight: 400; line-height: 1.8; }
.datasheet { background: var(--bg); border: 1px solid var(--border); }
.datasheet-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.datasheet-row:last-child { border-bottom: none; }
.datasheet-row .k { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.datasheet-row .v { font-size: 15px; color: #fff; font-weight: 500; text-align: right; }

/* ===== CAREER TIMELINE ===== */
.career { padding: clamp(70px,10vh,120px) clamp(20px,4vw,56px); background: var(--bg); }
.career-inner { max-width: 1100px; margin: 0 auto; }
.timeline { position: relative; margin-top: 50px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--accent), rgba(230,0,18,0.1)); }
.tl-item { position: relative; padding: 0 0 40px 40px; }
.tl-item::before { content: ''; position: absolute; left: -7px; top: 4px; width: 16px; height: 16px; background: var(--bg); border: 2px solid var(--accent); border-radius: 50%; }
.tl-item:hover::before { background: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }
.tl-year { font-family: 'Bebas Neue', sans-serif; font-size: 30px; letter-spacing: 0.05em; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.tl-body { color: #c8c8c8; font-size: 15px; font-weight: 300; line-height: 1.7; }
.tl-body strong { color: #fff; font-weight: 600; }

/* ===== ROOTS (profile / karting) ===== */
.roots { padding: clamp(70px,10vh,120px) clamp(20px,4vw,56px); background: var(--bg-alt); border-top: 1px solid var(--border); }
.roots-inner { max-width: var(--maxw); margin: 0 auto; }
.roots-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(40px,6vw,80px); line-height: 0.95; letter-spacing: 0.01em; }
.roots-lead { color: #b0b0b0; font-size: 16px; font-weight: 300; line-height: 1.9; max-width: 680px; margin-top: 18px; }
.roots-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.roots-ph { position: relative; overflow: hidden; background: #1a1a1a; cursor: pointer; aspect-ratio: 3/2; }
.roots-ph img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2) brightness(0.9); transition: transform 0.6s cubic-bezier(.22,1,.36,1), filter 0.6s cubic-bezier(.22,1,.36,1); }
.roots-ph::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,0.85)); pointer-events: none; }
.roots-ph:hover img { transform: scale(1.05); filter: grayscale(0) brightness(1); }
.roots-ph figcaption { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; color: #fff; font-family: 'Noto Sans JP', sans-serif; font-size: 14px; font-weight: 500; letter-spacing: 0.02em; pointer-events: none; }
.roots-ph figcaption .ry { display: block; font-family: 'Bebas Neue', sans-serif; font-size: 13px; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 3px; }

/* ===== GALLERY PAGE ===== */
.gallery-controls { max-width: var(--maxw); margin: 0 auto; padding: 40px clamp(20px,4vw,56px) 0; display: flex; flex-wrap: wrap; gap: 10px; }
.filter-btn {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.15em;
  padding: 9px 18px; border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.25s; text-transform: uppercase;
}
.filter-btn:hover { border-color: var(--accent); color: #fff; }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-btn .n { opacity: 0.5; margin-left: 6px; font-size: 0.85em; }

.gallery-subcontrols { padding-top: 12px; gap: 8px; }
.gallery-subcontrols .filter-btn { font-size: 11px; padding: 7px 13px; color: var(--text-dim); border-color: rgba(255,255,255,0.07); }
.gallery-subcontrols .filter-btn:hover { color: #fff; border-color: var(--accent); }
.gallery-subcontrols .filter-btn.active { background: transparent; color: #fff; border-color: var(--accent); }
.gallery-count { max-width: var(--maxw); margin: 16px auto 0; padding: 0 clamp(20px,4vw,56px); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.15em; color: var(--text-dim); }

.masonry { max-width: var(--maxw); margin: 0 auto; padding: 40px clamp(20px,4vw,56px) 120px; columns: 4; column-gap: 12px; }
.masonry .ph { break-inside: avoid; margin-bottom: 12px; position: relative; background: #1a1a1a; overflow: hidden; cursor: pointer; }
.masonry .ph img { width: 100%; height: auto; display: block; filter: grayscale(0.12) brightness(0.96); transition: transform 0.5s cubic-bezier(.22,1,.36,1), filter 0.5s cubic-bezier(.22,1,.36,1); }
.masonry .ph img.loaded { opacity: 1; }
.masonry .ph::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.7)); opacity: 0; transition: opacity 0.35s; }
.masonry .ph:hover img { transform: scale(1.05); filter: grayscale(0) brightness(1); }
.masonry .ph:hover::after { opacity: 1; }
.masonry .ph .ph-meta { position: absolute; bottom: 10px; left: 12px; z-index: 2; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; color: #fff; opacity: 0; transition: opacity 0.35s; }
.masonry .ph:hover .ph-meta { opacity: 0.9; }

.load-more-wrap { text-align: center; padding: 0 0 100px; }
.gallery-empty { text-align: center; color: var(--text-dim); padding: 80px 20px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.1em; }

/* ===== LIGHTBOX ===== */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.96); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 80px rgba(0,0,0,0.6); }
.lb-close, .lb-prev, .lb-next { position: absolute; background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: #fff; cursor: pointer; transition: all 0.25s; display: flex; align-items: center; justify-content: center; }
.lb-close { top: 24px; right: 24px; width: 48px; height: 48px; font-size: 22px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 26px; }
.lb-prev { left: 24px; } .lb-next { right: 24px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--accent); border-color: var(--accent); }
.lb-counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.2em; color: var(--text-muted); }

/* ===== CONTACT PAGE ===== */
.contact-section { padding: clamp(60px,9vh,110px) clamp(20px,4vw,56px) clamp(70px,10vh,120px); background: var(--bg-alt); }
.contact-inner { max-width: 1000px; margin: 0 auto; }
.contact-lead { color: #c0c0c0; font-size: 17px; font-weight: 300; line-height: 1.95; max-width: 720px; margin-bottom: 50px; }
.contact-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.contact-card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); padding: 32px 28px; transition: border-color .3s, transform .3s; cursor: pointer; color: inherit; text-decoration: none; }
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.cc-tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .2em; color: var(--accent); margin-bottom: 18px; }
.cc-title { font-family: 'Noto Sans JP', sans-serif; font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.cc-desc { color: var(--text-muted); font-size: 13px; font-weight: 300; line-height: 1.75; flex: 1; margin-bottom: 24px; }
.cc-action { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .12em; color: #fff; transition: color .3s; }
.contact-card:hover .cc-action { color: var(--accent); }
.contact-direct, .contact-sns { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--border); }
.cd-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--text-dim); min-width: 64px; }
.cd-email { font-family: 'Bebas Neue', sans-serif; font-size: clamp(24px,4vw,34px); letter-spacing: .04em; transition: color .3s; }
.cd-email:hover { color: var(--accent); }
.contact-sns a { font-size: 14px; color: #ccc; border-bottom: 1px solid transparent; padding-bottom: 2px; transition: .25s; }
.contact-sns a:hover { color: var(--accent); border-color: var(--accent); }
.cd-reveal { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: .06em; color: #fff; background: transparent; border: 1px solid var(--border); padding: 12px 22px; cursor: pointer; transition: .25s; }
.cd-reveal:hover { border-color: var(--accent); color: var(--accent); }
.cd-emailwrap { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cd-copy { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; color: var(--text-dim); background: transparent; border: 1px solid var(--border); padding: 7px 12px; cursor: pointer; transition: .25s; }
.cd-copy:hover { border-color: var(--accent); color: var(--accent); }
.cd-note { color: var(--text-muted); font-size: 13px; font-weight: 300; line-height: 1.7; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ===== FOOTER ===== */
.footer { padding: clamp(70px,10vh,100px) clamp(20px,4vw,56px) 40px; background: var(--bg-alt); border-top: 1px solid var(--border); position: relative; }
.footer::before { content: ''; position: absolute; top: -2px; left: 0; width: 200px; height: 4px; background: var(--accent); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; }
.footer-brand .logo { display: flex; align-items: center; gap: 12px; font-family: 'Bebas Neue', sans-serif; font-size: 32px; letter-spacing: 0.18em; margin-bottom: 18px; }
.footer-brand .logo .dot { color: var(--accent); }
.footer-brand .logo .badge { background: var(--accent); color: #fff; padding: 3px 9px; font-size: 13px; font-weight: 700; font-family: 'Inter', sans-serif; }
.footer-brand p { color: #888; font-size: 13px; font-weight: 300; max-width: 380px; line-height: 1.7; }
.footer-col h4 { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; font-weight: 700; }
.footer-col li { margin-bottom: 10px; font-size: 14px; font-weight: 300; color: #ccc; }
.footer-col a { transition: color 0.3s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: var(--maxw); margin: 60px auto 0; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #555; letter-spacing: 0.2em; text-transform: uppercase; }

/* ===== REVEAL ON SCROLL ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(.22,1,.36,1), transform 0.8s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .masonry { columns: 3; }
}
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: var(--nav-h); right: 0; bottom: 0; width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-alt); border-left: 1px solid var(--border);
    padding: 24px; transform: translateX(100%); transition: transform 0.35s cubic-bezier(.22,1,.36,1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { width: 100%; padding: 18px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
  .nav-links a::after { display: none; }
  .nav-toggle { display: flex; }
  .about-inner, .profile-intro-inner { grid-template-columns: 1fr; gap: 40px; }
  .about::before { font-size: 110px; top: 30px; }
  .framed-img { max-width: 360px; }
  .framed-img::before { display: none; }
  .specs-grid { grid-template-columns: 1fr 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .preview-grid { grid-template-columns: repeat(2,1fr); grid-auto-rows: 170px; gap: 6px; }
  .tile.s2x2 { grid-column: span 2; grid-row: span 2; }
  .tile.s2x1 { grid-column: span 2; }
  .tile.s1x2 { grid-row: span 1; }
  .preview-grid .tile:last-child { grid-column: span 2; }
  .masonry { columns: 2; column-gap: 6px; padding-bottom: 80px; }
  .masonry .ph { margin-bottom: 6px; }
  .roots-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .hero-number { font-size: 130px; right: 14px; bottom: 100px; }
  .scroll-cue { display: none; }
  .lb-prev, .lb-next { width: 44px; height: 44px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
}
@media (max-width: 560px) {
  .ticker-inner { font-size: 14px; }
  .hero-sub div { padding-right: 16px; margin-right: 16px; }
  .roots-grid { grid-template-columns: 1fr; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
  .ticker-inner { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ===== RACE BOARD (home) ===== */
.raceboard { background: var(--bg); border-bottom: 1px solid var(--border); padding: clamp(30px,5vh,52px) clamp(20px,4vw,56px); }
.rb-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; align-items: center; }
.rb-tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .25em; color: var(--accent); margin-bottom: 10px; }
.rb-name { font-family: 'Bebas Neue', sans-serif; font-size: clamp(36px,5vw,58px); line-height: .95; letter-spacing: .02em; }
.rb-meta { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #999; margin-top: 8px; letter-spacing: .05em; }
.rb-count { text-align: right; }
.rb-d { display: block; font-family: 'Bebas Neue', sans-serif; font-size: clamp(44px,6vw,74px); line-height: .9; color: #fff; }
.rb-cl { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .25em; color: var(--text-dim); }
.rb-results { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.rb-chip { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #bbb; background: #101010; border: 1px solid var(--border); padding: 8px 12px; white-space: nowrap; }
.rb-chip strong { color: #fff; margin-left: 6px; }
.rb-chip .pod { color: var(--accent); margin-left: 8px; }
.rb-chip.up { border-style: dashed; color: #666; background: transparent; }
@media (max-width: 700px) {
  .raceboard { padding-left: 16px; padding-right: 16px; }
  .rb-inner { gap: 10px 18px; }
  .rb-chip { font-size: 11px; padding: 7px 10px; }
}

/* ===== STATS BAND (profile) ===== */
.stats-band { background: var(--bg-alt); padding: 0 clamp(20px,4vw,56px) clamp(60px,9vh,100px); }
.stats-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.stat-cell { background: #0c0c0c; text-align: center; padding: 28px 12px; }
.stat-val { font-family: 'Bebas Neue', sans-serif; font-size: clamp(36px,4.5vw,54px); line-height: 1; }
.stat-val.red { color: var(--accent); }
.stat-key { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .2em; color: #888; margin-top: 10px; }
@media (max-width: 560px) { .stat-cell { padding: 18px 6px; } .stat-key { letter-spacing: .12em; } }

/* ===== HIGHLIGHTS (gallery) ===== */
.hl-section { padding: clamp(34px,6vh,60px) 0 0; background: var(--bg); }
.hl-head { padding: 0 clamp(20px,4vw,56px); margin: 0 auto 16px; }
.hl-strip { display: flex; gap: 10px; overflow-x: auto; padding: 0 clamp(20px,4vw,56px) 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.hl-ph { flex: 0 0 auto; height: 180px; margin: 0; position: relative; cursor: pointer; scroll-snap-align: start; overflow: hidden; background: #111; }
.hl-ph img { height: 100%; width: auto; display: block; transition: transform .4s; }
.hl-ph:hover img { transform: scale(1.04); }
.hl-ph .ht { position: absolute; left: 8px; bottom: 8px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .18em; color: #fff; background: rgba(5,5,5,.6); padding: 3px 8px; pointer-events: none; }
@media (max-width: 700px) { .hl-ph { height: 130px; } }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto !important; }
  .ticker-inner { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
