/* ==========================================================================
   kaymizu portfolio site — base stylesheet
   Design tokens: Paper White base / Pop Pink・Signal Cyan・Alert Yellow accents
   Display: Space Grotesk / Body: Noto Sans JP / Utility: JetBrains Mono
   ========================================================================== */

:root {
  /* Color tokens */
  --paper: #ffffff;
  --ink: #14141a;
  --ink-soft: #55555f;
  --static-gray: #f4f4f2;
  --line: #e4e4e0;

  --pop-pink: #ff3d7f;
  --pop-pink-ink: #7a0030;
  --signal-cyan: #00c2e0;
  --signal-cyan-ink: #004a56;
  --alert-yellow: #ffd400;
  --alert-yellow-ink: #4a3900;

  /* Type tokens */
  --font-display: "Space Grotesk", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Layout tokens */
  --max-width: 1120px;
  --radius: 6px;
  --gap: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .br-sp { display:none; }
}

/* --------------------------------------------------------------------
   Header / Nav
   -------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--pop-pink);
  transition: width 0.2s ease;
}

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

.nav-toggle {
  display: none;
}

@media (max-width: 720px) {
  /* シンプルなハンバーガーメニュー:ヘッダー直下に、半透明の背景でドロップダウン表示する */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.is-open {
    max-height: 400px;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a {
    padding: 16px 24px;
    font-size: 16px;
    border-top: 1px solid var(--line);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a.is-active {
    color: var(--pop-pink-ink);
    background: #ffe6ee;
  }

  .nav-toggle {
    position: relative;
    z-index: 210;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .nav-toggle.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* --------------------------------------------------------------------
   Marquee — signature element
   A scrolling band of the artist's own titles / hashtags, echoing the
   "information overload" theme of the work. Reused as a section divider.
   -------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  padding: 14px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
}

.marquee-content span {
  margin: 0 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--paper);
  white-space: nowrap;
}

.marquee-content .accent {
  color: var(--alert-yellow);
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
  .marquee-content[aria-hidden="true"] {
    display: none;
  }
}

/* --------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------- */
.hero {
  padding: 72px 0 48px;
  position: relative;
  overflow: hidden;
}

/* 水玉模様(ビジーにならないよう、ヒーロー右上のみ・淡い色でうっすらと) */
.hero::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -60px;
  width: 420px;
  height: 420px;
  background-image: radial-gradient(var(--pop-pink) 2px, transparent 2px);
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* 水玉模様(左下・signal-cyan) */
.hero::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 360px;
  height: 360px;
  background-image: radial-gradient(var(--signal-cyan) 2px, transparent 2px);
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--pop-pink-ink);
  background: #ffe6ee;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 12px;
}

.hero .sub {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0 0 32px;
  background-color: rgba( 255, 255, 255, 0.5 );
}

/* Collage of representative works — deliberately imperfect grid,
   evoking a feed / wall of stimuli rather than a tidy showcase grid. */
.collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.collage-item {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  position: relative;
  transition: transform 0.2s ease;
}

.collage-item:hover {
  transform: translateY(-4px) rotate(0deg) !important;
}

.collage-item:nth-child(1) { transform: rotate(-2deg); background: #ff3d7f; }
.collage-item:nth-child(2) { transform: rotate(1.5deg); background: #00c2e0; margin-top: 24px; }
.collage-item:nth-child(3) { transform: rotate(-1deg); background: #ffd400; }
.collage-item:nth-child(4) { transform: rotate(2deg); background: #39FF14; margin-top: 12px; }

.collage-item img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  border-radius: 4px;
}

.collage-item .label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .collage {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------- */
.section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}

.section-head .more {
  font-size: 14px;
  font-weight: 500;
  color: var(--pop-pink-ink);
  border-bottom: 1px solid var(--pop-pink);
}

/* --------------------------------------------------------------------
   Work cards (shared by top page pickup + gallery)
   -------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}

@media (max-width: 640px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.work-card {
  cursor: pointer;
}

/* --------------------------------------------------------------------
   作品モーダル(カードタップで拡大表示)
   -------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20, 20, 26, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.is-open {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal-content {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
}

.modal-content img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--static-gray);
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 16px;
}

.modal-title {
  font-weight: 500;
  font-size: 16px;
  margin: 0 0 4px;
}

.modal-title-ja {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.modal-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--static-gray);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

.modal-close:hover {
  background: var(--pop-pink);
  color: var(--paper);
}

.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(20, 20, 26, 0.1);
}

.work-card .thumb {
  aspect-ratio: 1;
  background: var(--static-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  position: relative;
}

.work-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .thumb img {
  transform: scale(1.08);
}

.work-card .body {
  padding: 14px 16px 18px;
}

.work-card .title {
  font-weight: 500;
  font-size: 15px;
  margin: 0 0 4px;
}

.work-card .title-ja {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.work-card .meta-list {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}

.work-card .meta-line {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 3px;
  overflow-wrap: break-word;
}

.work-card .meta-line:last-child {
  margin-bottom: 0;
}

.work-card .meta-label {
  color: var(--ink-soft);
  margin-right: 2px;
}

@media (max-width: 640px) {
  .work-card .meta-line {
    font-size: 11px;
  }
}

.work-card .tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.tag.pink { color: var(--pop-pink-ink); background: #ffe6ee; }
.tag.cyan { color: var(--signal-cyan-ink); background: #e0f7fc; }
.tag.yellow { color: var(--alert-yellow-ink); background: #fff8d9; }

/* --------------------------------------------------------------------
   Filter bar (gallery page)
   -------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  color: var(--ink);
}

.filter-btn {
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--ink);
}

.filter-btn.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* --------------------------------------------------------------------
   News list
   -------------------------------------------------------------------- */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.2s ease;
}

a.news-item {
  display: flex;
}

a.news-item:hover {
  padding-left: 8px;
}

a.news-item:hover .headline {
  color: var(--pop-pink-ink);
}

.news-item .date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  min-width: 90px;
}

.news-item .tag {
  margin-right: 12px;
}

.news-item .headline {
  font-weight: 500;
  font-size: 15px;
}

/* --------------------------------------------------------------------
   Profile / timeline
   -------------------------------------------------------------------- */
.profile-intro {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.profile-photo {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--static-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sns-list img {
  width: 22px;
  height: 22px;
}

@media (max-width: 640px) {
  .profile-intro {
    grid-template-columns: 1fr;
  }
  .profile-photo {
    width: 140px;
  }
}

.timeline {
  border-left: 2px solid var(--line);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pop-pink);
}

.timeline-item .date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

/* --------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}

@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.sns-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.sns-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
}

.sns-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal-cyan);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--paper);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--signal-cyan);
  outline-offset: 1px;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field .error {
  color: var(--pop-pink);
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

.field.has-error .error {
  display: block;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--pop-pink);
}

.submit-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--pop-pink);
}

.form-note {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 10px;
}

.form-status {
  font-size: 14px;
  margin-top: 16px;
  display: none;
}

.form-status.success {
  color: var(--signal-cyan-ink);
  display: block;
}

.form-status.error {
  color: var(--pop-pink-ink);
  display: block;
}

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  margin-top: 40px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.footer-sns {
  display: flex;
  gap: 16px;
}

.sns-icon {
  width: 22px;
  height: 22px;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-sns a:hover .sns-icon,
.sns-list a:hover img {
  transform: translateY(-2px);
  opacity: 0.8;
}

@media (max-width: 640px) {
  .site-footer .wrap {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal-cyan);
  outline-offset: 2px;
}
