/* ===== RESET & ROOT ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:       #080808;
  --black-2:     #111111;
  --black-3:     #1a1a1a;
  --white:       #f5f5f0;
  --gray-dim:    #555555;
  --gray-mid:    #888888;
  --accent:      #c8f060;   /* 鮮やかな黄緑 - signature color */
  --accent-dim:  rgba(200, 240, 96, 0.15);
  --font-display:'Bebas Neue', sans-serif;
  --font-body:   'Syne', sans-serif;
  --font-mono:   'Space Mono', monospace;
  --ease-expo:   cubic-bezier(0.19, 1, 0.22, 1);
  --ease-back:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
}

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
  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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-back), height 0.3s var(--ease-back), background 0.3s;
  mix-blend-mode: difference;
}
.cursor-follower {
  width: 32px; height: 32px;
  border: 1px solid rgba(200,240,96,0.5);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.12s ease;
}
body.cursor-hover .cursor { width: 48px; height: 48px; }
body.cursor-hover .cursor-follower { opacity: 0; }

/* ===== LOADER ===== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 60px;
  transition: opacity 0.8s var(--ease-expo), visibility 0.8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  transition: width 1.2s var(--ease-expo);
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  mix-blend-mode: difference;
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  color: var(--white);
}
.nav__logo-dot { color: var(--accent); }
.nav__links { display: flex; gap: 40px; }
.nav__link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-mid);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: color 0.3s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-expo);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after { width: 100%; }
.nav__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.nav__status-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}
.hero__content { max-width: 1200px; margin: 0 auto; width: 100%; position: relative; z-index: 2; }
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 1.5s var(--ease-expo) forwards;
}
.hero__eyebrow-line {
  display: block;
  width: 40px; height: 1px;
  background: var(--accent);
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 14rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin-bottom: 48px;
}
.hero__title-line {
  display: block;
  overflow: hidden;
}
.hero__title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  animation: slideUp 1s var(--ease-expo) forwards;
}
.hero__title-line[data-line="1"] .hero__title-word { animation-delay: 1.6s; }
.hero__title-line[data-line="2"] .hero__title-word { animation-delay: 1.75s; }
.hero__title-line[data-line="3"] .hero__title-word { animation-delay: 1.9s; }

.hero__title-word--outline {
  -webkit-text-stroke: 2px var(--white);
  color: transparent;
}
.hero__lead {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--gray-mid);
  line-height: 1.8;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 0.8s 2.1s var(--ease-expo) forwards;
}
.hero__meta {
  position: absolute;
  right: 48px; bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 2.3s var(--ease-expo) forwards;
}
.hero__meta-item { text-align: right; }
.hero__meta-num {
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  letter-spacing: 0.05em;
}
.hero__meta-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.hero__scroll-hint {
  position: absolute;
  left: 48px; bottom: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gray-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0;
  animation: fadeUp 0.8s 2.5s var(--ease-expo) forwards;
}
.hero__scroll-bar {
  width: 60px; height: 1px;
  background: var(--black-3);
  position: relative;
  overflow: hidden;
}
.hero__scroll-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollBar 2s 3s ease-in-out infinite;
}
@keyframes scrollBar {
  0%   { left: -100%; }
  50%  { left: 0%; }
  100% { left: 100%; }
}

/* ===== MARQUEE ===== */
.marquee-section {
  border-top: 1px solid var(--black-3);
  border-bottom: 1px solid var(--black-3);
  padding: 20px 0;
  overflow: hidden;
  background: var(--black-2);
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.marquee-track span { padding-right: 0; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== WORKS ===== */
.works {
  padding: 160px 48px;
  max-width: 1400px;
  margin: 0 auto;
}
.works__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 80px;
}
.works__header-desc {
  font-size: 0.9rem;
  color: var(--gray-mid);
  line-height: 1.8;
  text-align: right;
  font-weight: 400;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.section-title em {
  font-style: normal;
  -webkit-text-stroke: 2px var(--white);
  color: transparent;
}

/* Works List */
.works__list { border-top: 1px solid var(--black-3); }

.project-row {
  display: grid;
  grid-template-columns: 80px 1fr 320px 60px;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--black-3);
  cursor: none;
  position: relative;
  transition: background 0.4s var(--ease-expo);
}
.project-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-dim);
  opacity: 0;
  transition: opacity 0.4s var(--ease-expo);
}
.project-row:hover::before { opacity: 1; }
.project-row--locked { opacity: 0.35; cursor: default; pointer-events: none; }

.project-row__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gray-dim);
  letter-spacing: 0.1em;
}
.project-row__tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 12px;
}
.project-row__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  transition: color 0.3s;
}
.project-row:hover .project-row__title { color: var(--accent); }

.project-row__preview {
  height: 160px;
  overflow: hidden;
  border-radius: 4px;
}
.project-row__preview-inner {
  height: 100%;
  transform: translateY(0);
  transition: transform 0.6s var(--ease-expo);
}

.project-preview-card {
  width: 100%; height: 100%;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.project-preview-card--01 {
  background: linear-gradient(135deg, #0d1a0d 0%, #0a1a10 100%);
  border: 1px solid rgba(200,240,96,0.15);
}
.project-preview-card--02 {
  background: linear-gradient(135deg, #0a0a1a 0%, #0d0d20 100%);
  border: 1px solid rgba(100,120,255,0.2);
}
.project-preview-card--03 {
  background: var(--black-3);
  border: 1px solid var(--black-3);
}

.ppc__grid {
  position: absolute;
  inset: 20px 20px 50px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.ppc__bar {
  flex: 1;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  opacity: 0.7;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.8s var(--ease-back);
}
.project-row:hover .ppc__bar { transform: scaleY(1); }
.project-row:hover .ppc__bar:nth-child(1) { transition-delay: 0.0s; }
.project-row:hover .ppc__bar:nth-child(2) { transition-delay: 0.05s; }
.project-row:hover .ppc__bar:nth-child(3) { transition-delay: 0.1s; }
.project-row:hover .ppc__bar:nth-child(4) { transition-delay: 0.15s; }
.project-row:hover .ppc__bar:nth-child(5) { transition-delay: 0.2s; }
.project-row:hover .ppc__bar:nth-child(6) { transition-delay: 0.25s; }

.ppc__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}
.ppc__code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 2;
  color: var(--gray-mid);
}
.ppc__code-kw { color: #7b9eff; font-weight: 700; }
.ppc__code-comment { color: var(--gray-dim); }
.ppc__locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  color: var(--gray-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.project-row__arrow {
  display: flex;
  justify-content: flex-end;
  color: var(--gray-dim);
  transition: transform 0.4s var(--ease-expo), color 0.3s;
}
.project-row:hover .project-row__arrow { transform: translateX(8px); color: var(--accent); }
.project-row__arrow--dim { color: var(--black-3); }

/* ===== ABOUT ===== */
.about {
  padding: 160px 48px;
  border-top: 1px solid var(--black-3);
}
.about__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}
.about__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
}
.about__title em {
  font-style: normal;
  -webkit-text-stroke: 2px var(--white);
  color: transparent;
}
.about__body {
  color: var(--gray-mid);
  line-height: 2;
  font-size: 0.95rem;
  margin-bottom: 48px;
  font-weight: 400;
}
.about__skills { display: flex; flex-direction: column; gap: 24px; margin-bottom: 56px; }
.about__skill-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 6px;
}
.about__skill-items {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-mid);
}
.about__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--black);
  background: var(--accent);
  padding: 16px 32px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: transform 0.4s var(--ease-back), box-shadow 0.4s;
}
.about__cta:hover { transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--white); }

/* ===== TERMINAL ===== */
.about__terminal {
  background: var(--black-2);
  border: 1px solid var(--black-3);
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 120px;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--black-3);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.terminal__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.terminal__dot--red    { background: #ff5f56; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green  { background: #27c93f; }
.terminal__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gray-dim);
  margin-left: auto;
  margin-right: auto;
}
.terminal__body {
  padding: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 2;
  min-height: 240px;
}
.terminal__prompt { color: var(--accent); margin-right: 12px; }
.terminal__cmd    { color: var(--white); }
.terminal__output { color: var(--gray-mid); padding-left: 20px; }
.terminal__output--accent { color: var(--accent); }
.terminal__line--hidden,
.terminal__output--hidden { opacity: 0; transition: opacity 0.3s; }
.terminal__line--hidden.visible,
.terminal__output--hidden.visible { opacity: 1; }
.terminal__blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--black-3);
  padding: 40px 48px;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}
.footer__logo span { color: var(--accent); }
.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gray-dim);
  letter-spacing: 0.1em;
}
.footer__links { display: flex; gap: 32px; }
.footer__links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gray-dim);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.3s;
}
.footer__links a:hover { color: var(--accent); }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  visibility: hidden;
  pointer-events: none;
}
.modal.is-active { visibility: visible; pointer-events: auto; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  transition: opacity 0.6s var(--ease-expo);
  backdrop-filter: blur(4px);
}
.modal.is-active .modal__overlay { opacity: 1; }
.modal__panel {
  position: absolute;
  right: 0; top: 0;
  width: min(640px, 100%);
  height: 100%;
  background: var(--black);
  border-left: 1px solid var(--black-3);
  padding: 80px 56px;
  transform: translateX(100%);
  transition: transform 0.8s var(--ease-expo);
  overflow-y: auto;
}
.modal.is-active .modal__panel { transform: translateX(0); }
.modal__close {
  position: sticky;
  top: 0;
  float: right;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black-2);
  border: 1px solid var(--black-3);
  border-radius: 50%;
  color: var(--white);
  cursor: none;
  margin-bottom: 48px;
  transition: background 0.3s, color 0.3s;
}
.modal__close:hover { background: var(--accent); color: var(--black); }
.modal__body h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin-bottom: 48px;
  clear: both;
}
.modal__body h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin: 40px 0 16px;
}
.modal__body p {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--gray-mid);
  font-weight: 400;
}
.modal__body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal__body li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-mid);
  padding-left: 20px;
  position: relative;
}
.modal__body li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(110%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .project-row { grid-template-columns: 60px 1fr 200px 40px; gap: 24px; }
  .about__inner { grid-template-columns: 1fr; gap: 60px; }
  .hero__meta { position: static; flex-direction: row; margin-top: 60px; }
  .hero__meta-item { text-align: left; }
}
@media (max-width: 768px) {
  .nav { padding: 20px 24px; }
  .nav__status { display: none; }
  .hero { padding: 120px 24px 60px; }
  .works { padding: 80px 24px; }
  .project-row { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
  .project-row__num { display: none; }
  .project-row__preview { height: 120px; }
  .project-row__arrow { display: none; }
  .about { padding: 80px 24px; }
  .works__header { flex-direction: column; align-items: flex-start; gap: 24px; }
  .works__header-desc { text-align: left; }
  .footer { padding: 32px 24px; }
  .footer__inner { flex-direction: column; gap: 24px; text-align: center; }
}
