/* ========================================
   シマワキ ユウ 実験スタジオ — Stylesheet
   ======================================== */

/* === DESIGN TOKENS === */
:root {
  --bg: #1a1a18;
  --paper: #f5f0e8;
  --ink: #1a1a18;
  --accent: #e85d3a;
  --accent2: #3a8ee8;
  --green: #4a9e6a;
  --muted: #8a8578;
  --grid: rgba(138, 133, 120, 0.15);
  --radius: 0px;
  --transition-base: 0.3s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--paper);
  font-family: 'DM Mono', 'Zen Kaku Gothic New', monospace;
  overflow-x: hidden;
  cursor: crosshair;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* === NOISE OVERLAY === */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* === GRID BACKGROUND === */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  opacity: 0.5;
}

/* === FLOATING PARTICLES === */
.particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.particle:nth-child(1) {
  width: 4px;
  height: 4px;
  background: var(--accent);
  top: 20%;
  left: 15%;
  animation: float1 8s ease-in-out infinite;
}

.particle:nth-child(2) {
  width: 6px;
  height: 6px;
  background: var(--accent2);
  top: 60%;
  left: 80%;
  animation: float2 12s ease-in-out infinite;
}

.particle:nth-child(3) {
  width: 3px;
  height: 3px;
  background: var(--green);
  top: 40%;
  left: 50%;
  animation: float3 10s ease-in-out infinite;
}

.particle:nth-child(4) {
  width: 5px;
  height: 5px;
  background: var(--accent);
  top: 80%;
  left: 25%;
  animation: float1 15s ease-in-out infinite reverse;
}

.particle:nth-child(5) {
  width: 4px;
  height: 4px;
  background: var(--paper);
  top: 10%;
  left: 70%;
  animation: float2 9s ease-in-out infinite;
  opacity: 0.3;
}

.particle:nth-child(6) {
  width: 3px;
  height: 3px;
  background: var(--accent2);
  top: 70%;
  left: 40%;
  animation: float3 11s ease-in-out infinite;
  opacity: 0.5;
}

.particle:nth-child(7) {
  width: 5px;
  height: 5px;
  background: var(--green);
  top: 30%;
  left: 90%;
  animation: float1 13s ease-in-out infinite;
  opacity: 0.4;
}

@keyframes float1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }

  50% {
    transform: translate(30px, -40px) scale(1.5);
    opacity: 1;
  }
}

@keyframes float2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }

  50% {
    transform: translate(-20px, 30px) scale(2);
    opacity: 0.8;
  }
}

@keyframes float3 {

  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.5;
  }

  33% {
    transform: translate(40px, 20px);
    opacity: 1;
  }

  66% {
    transform: translate(-30px, 40px);
    opacity: 0.3;
  }
}

/* === NAV === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 8vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s ease;
  background: transparent;
}

.nav.scrolled {
  background: rgba(26, 26, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 8vw;
  border-bottom: 1px solid rgba(138, 133, 120, 0.1);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--paper);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--paper);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) {
  top: 0;
}

.nav-toggle span:nth-child(2) {
  top: 9px;
}

.nav-toggle span:nth-child(3) {
  top: 18px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 8vw;
  z-index: 2;
}

.lab-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 14px;
  margin-bottom: 40px;
  animation: flicker 3s ease-in-out infinite;
  width: fit-content;
}

@keyframes flicker {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  92% {
    opacity: 1;
  }

  94% {
    opacity: 0.4;
  }

  96% {
    opacity: 1;
  }
}

.hero h1 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.1;
  margin-bottom: 30px;
  letter-spacing: -2px;
}

.hero h1 .line1 {
  display: block;
}

.hero h1 .line2 {
  display: block;
  color: var(--accent);
  font-family: 'Caveat', cursive;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 2px;
  transform: rotate(-2deg);
  margin-top: 10px;
}

.hero-sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 500px;
  line-height: 2;
  margin-top: 20px;
}

.hero-sub .blink {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 8vw;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 3px;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-hint::before {
  content: '↓';
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* === SECTION COMMON === */
section {
  position: relative;
  z-index: 2;
  padding: 100px 8vw;
}

.section-label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 50px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(138, 133, 120, 0.2);
}

/* === QUESTIONS SECTION === */
.questions-section {
  background: rgba(245, 240, 232, 0.03);
}

.question-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.question-item {
  padding: 35px 0;
  border-bottom: 1px solid rgba(138, 133, 120, 0.15);
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
}

.question-item:first-child {
  border-top: 1px solid rgba(138, 133, 120, 0.15);
}

.question-item:hover {
  padding-left: 20px;
  background: rgba(232, 93, 58, 0.03);
}

.question-item:hover .q-number {
  color: var(--accent);
}

.q-number {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  font-family: 'DM Mono', monospace;
  transition: color 0.3s;
}

.q-text {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  line-height: 1.7;
  color: var(--paper);
}

.q-emotion {
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: var(--accent);
  margin-top: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.question-item:hover .q-emotion {
  opacity: 1;
  transform: translateY(0);
}

/* === EXPERIMENT LOG === */
.log-section {
  background: var(--bg);
}

.log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.log-card {
  background: rgba(245, 240, 232, 0.04);
  border: 1px solid rgba(138, 133, 120, 0.15);
  padding: 30px;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.log-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s ease;
}

.log-card:hover::before {
  transform: scaleY(1);
}

.log-card:hover {
  background: rgba(245, 240, 232, 0.07);
  transform: translateY(-3px);
}

.log-date {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.log-tag {
  display: inline-block;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 15px;
  margin-right: 6px;
  font-family: 'DM Mono', monospace;
}

.tag-ai {
  background: rgba(58, 142, 232, 0.15);
  color: var(--accent2);
}

.tag-video {
  background: rgba(232, 93, 58, 0.15);
  color: var(--accent);
}

.tag-life {
  background: rgba(74, 158, 106, 0.15);
  color: var(--green);
}

.tag-web {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.log-title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.log-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}

.log-status {
  margin-top: 18px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
}

.status-progress {
  color: var(--accent);
}

.status-done {
  color: var(--green);
}

.status-idea {
  color: var(--accent2);
}

/* === NOW DOING === */
.now-bar {
  position: relative;
  z-index: 2;
  padding: 30px 8vw;
  background: rgba(232, 93, 58, 0.06);
  border-top: 1px solid rgba(232, 93, 58, 0.2);
  border-bottom: 1px solid rgba(232, 93, 58, 0.2);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.now-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 93, 58, 0.4);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(232, 93, 58, 0);
  }
}

.now-label {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
  flex-shrink: 0;
}

.now-text {
  font-size: 14px;
  color: var(--paper);
}

/* === ABOUT === */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 2.2;
  color: rgba(245, 240, 232, 0.75);
}

.about-text p {
  margin-bottom: 25px;
}

.about-text strong {
  color: var(--paper);
  font-weight: 700;
}

.about-right {
  position: relative;
}

.sketch-box {
  border: 1px solid rgba(138, 133, 120, 0.2);
  padding: 40px;
  position: relative;
  background: rgba(245, 240, 232, 0.02);
}

.sketch-box::after {
  content: '📐 blueprint';
  position: absolute;
  bottom: -25px;
  right: 0;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
}

.skill-tag {
  display: inline-block;
  font-size: 12px;
  padding: 6px 14px;
  margin: 4px;
  border: 1px solid rgba(138, 133, 120, 0.25);
  color: var(--muted);
  transition: all 0.3s;
  font-family: 'DM Mono', monospace;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(var(--r, 0deg));
}

.skill-tag:nth-child(odd):hover {
  --r: 2deg;
}

.skill-tag:nth-child(even):hover {
  --r: -2deg;
}

/* === CTA === */
.cta-section {
  text-align: center;
  padding: 120px 8vw;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(232, 93, 58, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-section h2 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 20px;
  line-height: 1.5;
}

.cta-section .cta-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
  max-width: 500px;
  margin: 0 auto 40px;
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  border: 2px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  letter-spacing: 2px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transition: left 0.4s ease;
  z-index: 0;
}

.cta-button:hover::before {
  left: 0;
}

.cta-button:hover {
  color: var(--bg);
}

.cta-button span {
  position: relative;
  z-index: 1;
}

/* === FOOTER === */
footer {
  position: relative;
  z-index: 2;
  padding: 40px 8vw;
  border-top: 1px solid rgba(138, 133, 120, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 11px;
  color: var(--muted);
}

/* === ANIMATIONS ON SCROLL === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for cards */
.log-card.reveal:nth-child(1) {
  transition-delay: 0s;
}

.log-card.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.log-card.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.log-card.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* === EASTER EGG: EXPLOSION === */
.explosion {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 9998;
  pointer-events: none;
  animation: explode 0.8s ease-out forwards;
}

@keyframes explode {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(80);
    opacity: 0;
  }
}

/* === SCROLL PROGRESS BAR === */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 200;
  transition: width 0.05s linear;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .about-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .log-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 60px 6vw;
  }

  .hero {
    padding: 40px 6vw;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(26, 26, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: right 0.4s ease;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 14px;
    letter-spacing: 4px;
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .now-bar {
    padding: 20px 6vw;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 30px 5vw;
  }

  section {
    padding: 50px 5vw;
  }

  .nav {
    padding: 16px 5vw;
  }

  .cta-button {
    padding: 14px 30px;
    font-size: 12px;
  }
}