:root {
  --night: #071120;
  --night-2: #0c1d38;
  --paper: #f4f2ec;
  --ink: #101623;
  --text-on-dark: #eef3fb;
  --muted-on-dark: #9db1cc;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --pink: #f472b6;
  --amber: #fbbf24;
  --spring: cubic-bezier(0.34, 1.35, 0.64, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text-on-dark);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 1.85;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; justify-content: space-between;
  padding: 16px min(5vw, 56px);
  background: rgba(7,17,32,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand { font-family: "Archivo", sans-serif; font-weight: 900; font-size: 22px; letter-spacing: 0.14em; color: #fff; text-decoration: none; }
.brand span { font-family: "Noto Sans JP", sans-serif; font-size: 12px; font-weight: 700; color: var(--muted-on-dark); margin-left: 8px; letter-spacing: 0.3em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-header nav a { color: var(--text-on-dark); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.site-header nav a:hover { color: var(--cyan); }

#bg-particles { position: fixed; inset: 0; z-index: 0; display: block; pointer-events: none; }
main, .site-footer { position: relative; z-index: 1; }
.hero { position: relative; padding: 150px min(5vw, 56px) 0; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(7,17,32,0.78) 0%, rgba(7,17,32,0.45) 42%, rgba(7,17,32,0) 72%), linear-gradient(180deg, rgba(7,17,32,0.35) 0%, rgba(7,17,32,0) 30%, rgba(7,17,32,0) 72%, rgba(7,17,32,0.55) 100%); }

.hero-spot { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 38%), rgba(251, 191, 36, 0.13), rgba(56, 189, 248, 0.05) 55%, transparent 72%); }
.hero-dot { position: absolute; left: 0; top: 0; z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: #FBBF24; box-shadow: 0 0 14px 4px rgba(251, 191, 36, 0.55), 0 0 42px 12px rgba(251, 191, 36, 0.18); pointer-events: none; opacity: 0; transition: opacity 0.5s ease; will-change: transform; }
.hero-dot.on { opacity: 1; }
.hero-inner { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; }
.hero-byline {
  font-size: 15px; font-weight: 700; letter-spacing: 0.12em; color: var(--cyan);
  margin: 0 0 20px; animation: rise 1.1s var(--spring) both;
}
.hero h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1.4; font-weight: 900; margin: 0 0 22px; animation: rise 1.1s var(--spring) 0.15s both; }
.hero-lead { max-width: 40em; color: var(--text-on-dark); margin: 0 0 30px; animation: rise 1.1s var(--spring) 0.3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 64px; animation: rise 1.1s var(--spring) 0.45s both; }
.btn { display: inline-block; padding: 13px 30px; border-radius: 999px; background: var(--cyan); color: #04263b; font-weight: 900; text-decoration: none; transition: transform 0.35s var(--spring), background 0.2s; }
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn-ghost { background: transparent; color: var(--text-on-dark); box-shadow: inset 0 0 0 2px rgba(238,243,251,0.6); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--cyan); color: var(--cyan); }

.hero-stats { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 28px 0 44px; border-top: 1px solid rgba(238,243,251,0.25); }
.hero-stats strong { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; line-height: 1.2; display: block; }
.hero-stats strong small { font-size: 0.55em; margin-left: 2px; }
.hero-stats span { color: var(--muted-on-dark); font-size: 13px; }

.marquee { background: var(--cyan); color: #04263b; overflow: hidden; padding: 10px 0; transform: rotate(-1.2deg) scale(1.02); }
.marquee-track { display: flex; gap: 28px; white-space: nowrap; font-family: "Archivo", sans-serif; font-weight: 700; letter-spacing: 0.06em; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track i { font-style: normal; font-size: 10px; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { max-width: 1200px; margin: 0 auto; padding: 110px min(5vw, 56px) 30px; }
.big-h { font-family: "Archivo", "Noto Sans JP", sans-serif; font-size: clamp(40px, 7vw, 76px); font-weight: 900; line-height: 1.1; margin: 0 0 34px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.profile-lead { font-size: 18px; margin: 0; }
.media-line { margin: 22px 0 0; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; color: var(--amber); }
.skills { list-style: none; margin: 0; padding: 0; }
.skills li { padding: 22px 0; border-top: 1px solid rgba(238,243,251,0.2); }
.skills li:last-child { border-bottom: 1px solid rgba(238,243,251,0.2); }
.skills h3 { margin: 0 0 6px; font-size: 20px; }
.skills p { margin: 0; color: var(--muted-on-dark); font-size: 15px; }

.work { display: grid; grid-template-columns: 1.35fr 1fr; gap: 44px; align-items: center; padding: 44px 0; }
.work-flip .work-media { order: 2; }
.work-media { overflow: hidden; border-radius: 14px; display: block; }
.work-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.8s var(--spring); }
.work-media:hover img { transform: scale(1.05); }
.work-body h3 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; margin: 0 0 12px; line-height: 1.35; }
.work-body p { margin: 0 0 12px; color: var(--muted-on-dark); }
.work-body.only { grid-column: 1 / -1; max-width: 46em; }
.work-tag { font-family: "Archivo", sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; margin: 0 0 10px; }
.tag-cyan { color: var(--cyan); }
.tag-pink { color: var(--pink); }
.tag-amber { color: var(--amber); }
.tag-violet { color: var(--violet); }
.text-link { font-weight: 900; text-decoration: none; border-bottom: 2px solid currentColor; }
.dim { color: var(--muted-on-dark); font-size: 14px; }

.section-light { background: var(--paper); color: var(--ink); border-radius: 24px; margin-top: 90px; padding-bottom: 70px; }
.section-light .section-lead { max-width: 46em; }
.writing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 34px; }
.post a { color: var(--ink); text-decoration: none; display: block; }
.post img { border-radius: 12px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform 0.8s var(--spring); }
.post a:hover img { transform: translateY(-6px); }
.post h3 { font-size: 18px; margin: 14px 0 6px; line-height: 1.5; }
.post p { margin: 0; font-size: 14px; color: #4a5468; }
.section-light .text-link { color: #0369a1; }
.more { margin-top: 30px; }

.car-big { font-family: "Archivo", sans-serif; font-weight: 900; font-size: clamp(52px, 11vw, 150px); line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(238,243,251,0.5); margin: 0 0 10px; }
#carlife .section-lead { color: var(--muted-on-dark); max-width: 44em; }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid rgba(238,243,251,0.2); }
.link-list li:last-child { border-bottom: 1px solid rgba(238,243,251,0.2); }
.link-list a { display: flex; gap: 22px; align-items: baseline; padding: 20px 6px; color: var(--text-on-dark); text-decoration: none; font-size: 19px; font-weight: 700; transition: padding-left 0.35s var(--spring), color 0.2s; }
.link-list a span { font-family: "Archivo", sans-serif; font-size: 13px; letter-spacing: 0.14em; color: var(--cyan); min-width: 64px; }
.link-list a:hover { padding-left: 18px; color: var(--cyan); }
.note-small { color: var(--muted-on-dark); font-size: 14px; margin-top: 22px; }

.site-footer { text-align: center; padding: 90px 20px 44px; }
.footer-name { font-family: "Archivo", sans-serif; font-weight: 900; font-size: 26px; letter-spacing: 0.14em; line-height: 1; margin: 0 0 10px; color: var(--text-on-dark); }
.site-footer p { color: var(--muted-on-dark); font-size: 13px; }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s ease, transform 0.9s var(--spring); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 480px) {
  .hero h1 { font-size: 29px; }
}
@media (max-width: 900px) {
  .hero::before { background: linear-gradient(180deg, rgba(7,17,32,0.62) 0%, rgba(7,17,32,0.38) 55%, rgba(7,17,32,0.66) 100%); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .work { grid-template-columns: 1fr; gap: 22px; }
  .work-flip .work-media { order: 0; }
  .writing-grid { grid-template-columns: 1fr; }
  .section { padding-top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-spot, .hero-dot, #bg-particles { display: none; }
  .hero-byline, .hero h1, .hero-lead, .hero-cta, .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
