@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;700&family=Space+Mono&display=swap');

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

:root {
  --bg: #dde3e8;
  --ink: #1c1c1e;
  --muted: #7a8a8e;
  --accent: #2b5f8e;
  --accent2: #4a7c6f;
  --card-bg: #eee9df;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Serif JP', serif;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ── noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}

/* ── header ── */
header {
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Space Mono', monospace;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

nav a {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  margin-left: 2rem;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

/* ── hero ── */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 4rem 3rem;
  position: relative;
}

.hero-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 12ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  display: inline-block;
  transform: rotate(-1.5deg);
}

.hero h1 .cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent);
  margin-left: 0.1em;
  vertical-align: middle;
  animation: blink 1.1s step-start infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-sub {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--muted);
  max-width: 38ch;
  font-weight: 300;
}

/* floating deco */
.deco {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9rem;
  opacity: 0.07;
  user-select: none;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(-50%) rotate(-3deg); }
  50%       { transform: translateY(-54%) rotate(3deg); }
}

/* ── section ── */
.section {
  padding: 5rem 3rem;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
}

/* ── project grid ── */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid rgba(26,22,18,0.1);
  padding: 2rem;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.project-card:nth-child(odd) {
  transform: rotate(0.4deg);
}

.project-card:nth-child(even) {
  transform: rotate(-0.3deg);
}

.project-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 6px 8px 0 rgba(26,22,18,0.08);
}

.project-card .tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 300;
}

.project-card .num {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: rgba(26,22,18,0.15);
}

/* placeholder state */
.project-card.placeholder h3,
.project-card.placeholder p {
  background: rgba(26,22,18,0.07);
  border-radius: 2px;
  color: transparent;
  user-select: none;
}

.project-card.placeholder h3 {
  width: 70%;
}

.project-card.placeholder p {
  width: 90%;
}

/* ── about strip ── */
.about-strip {
  border-top: 1px solid rgba(26,22,18,0.1);
  border-bottom: 1px solid rgba(26,22,18,0.1);
  padding: 3rem;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-strip .big-char {
  font-size: 5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
  flex-shrink: 0;
}

.about-strip p {
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 50ch;
}

.about-strip p strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── responsive ── */
@media (max-width: 640px) {
  header, .hero, .section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .about-strip {
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 1.5rem;
  }

  .deco {
    display: none;
  }

  nav { display: none; }
}
