/* ──────────────────────────────────────────────────────────
   Yu Iwase Portfolio — 新案1: Bio-Spectrogram & Technical Blueprint
   世界観: 走査型共焦点レーザー顕微鏡・生体分光スペクトログラム × 工学仕様書
   カラー: 生命蛍光パレット（Bio-Teal, Cyan, Starlight Gold, Midnight Navy）
   特徴: 走査波形オシロスコープ、対物レンズマウント幾何学、工学テレメトリ、自然な角丸
────────────────────────────────────────────────────────── */

:root {
  --c-bg: #ffffff;
  --c-bg-pure: #ffffff;
  --c-bg-subtle: #f4f9f8;
  --c-bg-card: #ffffff;

  --c-text-main: #141d2f;
  --c-text-sub: #3e5066;
  --c-text-muted: #6b7f96;

  /* Bio-Luminescence Spectral Colors */
  --c-teal: #0d9488;
  --c-teal-bright: #2dd4bf;
  --c-teal-dark: #0f766e;
  --c-teal-soft: rgba(13, 148, 136, 0.08);
  --c-line-teal: rgba(13, 148, 136, 0.25);

  --c-cyan: #0284c7;
  --c-cyan-bright: #38bdf8;
  --c-cyan-soft: rgba(2, 132, 199, 0.08);

  --c-gold: #d4af37;
  --c-gold-bright: #f1cf68;
  --c-navy: #141d2f;

  --shadow-subtle: 0 2px 10px rgba(20, 29, 47, 0.04);
  --shadow-card: 0 4px 20px -2px rgba(20, 29, 47, 0.05), 0 2px 6px -1px rgba(13, 148, 136, 0.06);
  --shadow-card-hover: 0 14px 32px -4px rgba(20, 29, 47, 0.09), 0 6px 18px -2px rgba(13, 148, 136, 0.16);

  --font-mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-gothic: "Zen Kaku Gothic New", "Inter", "Hiragino Sans", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Roboto Mono", monospace;

  /* Natural & Sophisticated Border Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--c-bg);
  color: var(--c-text-main);
}

body {
  font-family: var(--font-gothic);
  line-height: 1.75;
  background: #ffffff;
  color: var(--c-text-main);
  overflow-x: hidden;
  position: relative;
}

/* ──────────────────────────────────────────────────────────
   WellV-Style Animated Sparkle Background
────────────────────────────────────────────────────────── */
.sparkle-canvas-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.wellv-sparkle-grid {
  position: absolute;
  inset: -100px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 1rem;
  opacity: 0.08;
}

.sparkle-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sparkle-star {
  width: 5rem;
  height: 5rem;
  color: #748dae;
  fill: currentColor;
  animation: wellvSparkle 12s ease-in-out infinite;
}

@keyframes wellvSparkle {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 0.48; }
}

/* ──────────────────────────────────────────────────────────
   Design Switcher Floating Header
────────────────────────────────────────────────────────── */
.design-switcher-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(20, 29, 47, 0.08);
  font-size: 0.8125rem;
  padding: 0.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.switcher-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-teal-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.switcher-options {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.switch-pill {
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  color: var(--c-text-sub);
  border: 1px solid rgba(20, 29, 47, 0.12);
  font-weight: 500;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  background: #ffffff;
}

.switch-pill:hover {
  color: var(--c-teal-dark);
  border-color: var(--c-teal);
  background: var(--c-teal-soft);
}

.switch-pill.active {
  background: var(--c-navy);
  color: #ffffff;
  border-color: var(--c-teal);
  font-weight: 600;
}

/* ──────────────────────────────────────────────────────────
   Site Global Header
────────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--c-line-teal);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-w: 1200px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-mincho);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--c-text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-star {
  color: var(--c-teal);
  font-size: 0.85rem;
}

.brand-sub {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--c-teal-dark);
  margin-top: 0.1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-text-sub);
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--c-teal);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--c-line-teal);
  background: #ffffff;
  color: var(--c-text-main);
  font-family: var(--font-gothic);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: var(--c-teal-soft);
  border-color: var(--c-teal);
  color: var(--c-teal-dark);
}

/* ──────────────────────────────────────────────────────────
   Hero Section: Bio-Spectrogram & Technical Blueprint
────────────────────────────────────────────────────────── */
.spec-hero-sec {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.75rem 4rem;
}

/* 走査オシロスコープ波形 & 工学グリッド背景SVG */
.spec-backdrop-svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.spec-wave-line {
  stroke: var(--c-teal);
  stroke-width: 2;
  fill: none;
  opacity: 0.65;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: specWaveScan 6s linear infinite;
}

@keyframes specWaveScan {
  0% { stroke-dashoffset: 800; opacity: 0.35; }
  50% { opacity: 0.85; }
  100% { stroke-dashoffset: 0; opacity: 0.35; }
}

.spec-laser-sweep {
  transform-origin: 600px 300px;
  animation: specLaserRotate 16s linear infinite;
}

@keyframes specLaserRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hero Grid Layout */
.spec-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: flex-start;
}

.spec-status-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: var(--c-teal-soft);
  border: 1px solid var(--c-line-teal);
  border-radius: var(--radius-xs);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-teal-dark);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.status-beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-teal);
  box-shadow: 0 0 8px var(--c-teal-bright);
  animation: beaconBlink 2s ease-in-out infinite alternate;
}

@keyframes beaconBlink {
  0% { opacity: 0.4; }
  100% { opacity: 1; transform: scale(1.2); }
}

.spec-hero-title {
  font-family: var(--font-mincho);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1.38;
  color: var(--c-text-main);
  margin-bottom: 1.5rem;
}

.spec-hero-title .initial-accent {
  color: var(--c-teal);
  font-weight: 800;
  position: relative;
}

.spec-lead-text {
  font-size: 0.95rem;
  color: var(--c-text-sub);
  line-height: 1.85;
  margin-bottom: 2rem;
}

.spec-dropcap {
  float: left;
  font-family: var(--font-mincho);
  font-size: 3.2rem;
  line-height: 0.85;
  padding-top: 4px;
  padding-right: 10px;
  padding-bottom: 2px;
  color: var(--c-teal);
  font-weight: 700;
}

.spec-tech-specs-box {
  background: #ffffff;
  border: 1px solid var(--c-line-teal);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-subtle);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  font-size: 0.8rem;
  border-bottom: 1px dashed rgba(13, 148, 136, 0.15);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-key {
  font-family: var(--font-mono);
  color: var(--c-teal-dark);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
}

.spec-val {
  color: var(--c-text-main);
  font-weight: 500;
  text-align: right;
}

/* CTA Buttons: 自然で洗練された角丸 (6px) */
.spec-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-spec-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.85rem;
  border-radius: var(--radius-sm);
  background: var(--c-navy);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid var(--c-teal);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.22);
  transition: all 0.25s ease;
}

.btn-spec-primary:hover {
  background: var(--c-teal-dark);
  border-color: var(--c-teal-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
  color: #ffffff;
}

.btn-spec-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.85rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--c-teal-dark);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid var(--c-line-teal);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.btn-spec-outline:hover {
  background: var(--c-teal-soft);
  border-color: var(--c-teal);
  transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────
   Right Column: Objective Lens Turret & Photo Stage
────────────────────────────────────────────────────────── */
.spec-stage-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

/* 対物レンズマウント幾何学リング（回転アニメーション） */
.spec-turret-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 540px;
  height: 540px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.turret-gear-outer {
  transform-origin: 270px 270px;
  animation: turretClockwise 60s linear infinite;
}

.turret-gear-inner {
  transform-origin: 270px 270px;
  animation: turretCounter 42s linear infinite;
}

@keyframes turretClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes turretCounter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Photo Viewport */
.spec-photo-frame {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--c-line-teal);
  box-shadow: var(--shadow-card);
  background: #ffffff;
  aspect-ratio: 4 / 4.7;
}

.spec-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 工学ノギス目盛り（Vernier Caliper Scale）オーバーレイ */
.spec-caliper-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(180deg, transparent 0%, rgba(20, 29, 47, 0.92) 100%);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
}

.spec-caliper-strip span {
  color: var(--c-teal-bright);
}

/* コーナーブラケット（4隅のL字照準線） */
.spec-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--c-teal);
  z-index: 4;
  pointer-events: none;
}
.spec-corner.tl { top: -6px; left: -6px; border-right: none; border-bottom: none; }
.spec-corner.tr { top: -6px; right: -6px; border-left: none; border-bottom: none; }
.spec-corner.bl { bottom: -6px; left: -6px; border-right: none; border-top: none; }
.spec-corner.br { bottom: -6px; right: -6px; border-left: none; border-top: none; }

/* ──────────────────────────────────────────────────────────
   Sections Common Layout
────────────────────────────────────────────────────────── */
.spec-sec-block {
  max-width: 1200px;
  margin: 0 auto 5rem;
  padding: 0 1.75rem;
  position: relative;
  z-index: 10;
}

.spec-sec-head {
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--c-line-teal);
  padding-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.spec-sec-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-teal-dark);
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
}

.spec-sec-title {
  font-family: var(--font-mincho);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--c-text-main);
}

.spec-sec-title .initial-accent {
  color: var(--c-teal);
}

/* ──────────────────────────────────────────────────────────
   Products & Research Cards (Square with Natural Radius 6px)
────────────────────────────────────────────────────────── */
.spec-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.spec-card {
  background: #ffffff;
  border: 1px solid var(--c-line-teal);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.spec-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--c-teal);
}

.spec-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-bg-subtle);
}

.spec-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.spec-card:hover .spec-card-media img {
  transform: scale(1.04);
}

.spec-card-tag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.35rem 0.85rem;
  border-bottom-right-radius: var(--radius-xs);
  background: var(--c-navy);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-right: 1px solid var(--c-teal);
  border-bottom: 1px solid var(--c-teal);
}

.spec-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.spec-card-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--c-teal-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.spec-card-title {
  font-family: var(--font-mincho);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-text-main);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.spec-card-desc {
  font-size: 0.875rem;
  color: var(--c-text-sub);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}

.spec-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.spec-chip {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  background: var(--c-teal-soft);
  border: 1px solid var(--c-line-teal);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-teal-dark);
  font-weight: 500;
}

/* ──────────────────────────────────────────────────────────
   Timeline Section: 生体波形パルストラック
────────────────────────────────────────────────────────── */
.spec-timeline-axis {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 2.5rem;
  border-left: 2px solid var(--c-line-teal);
}

.spec-timeline-pulse {
  position: absolute;
  top: 0;
  left: -2px;
  width: 2px;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, var(--c-teal-bright) 50%, #ffffff 100%);
  box-shadow: 0 0 10px var(--c-teal-bright);
  animation: specPulseFlow 6s linear infinite;
}

@keyframes specPulseFlow {
  0% { top: 0%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.spec-timeline-item {
  position: relative;
  margin-bottom: 2.75rem;
  background: #ffffff;
  border: 1px solid var(--c-line-teal);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s ease;
}

.spec-timeline-item:hover {
  transform: translateX(4px);
  border-color: var(--c-teal);
  box-shadow: var(--shadow-card);
}

.spec-timeline-node {
  position: absolute;
  left: -3.25rem;
  top: 1.5rem;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  background: var(--c-navy);
  border: 2px solid var(--c-teal-bright);
  color: var(--c-teal-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.4);
}

.spec-timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-teal-dark);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.spec-timeline-title {
  font-family: var(--font-mincho);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-text-main);
  margin-bottom: 0.65rem;
}

.spec-timeline-desc {
  font-size: 0.875rem;
  color: var(--c-text-sub);
  line-height: 1.75;
  margin-bottom: 0.85rem;
}

/* ──────────────────────────────────────────────────────────
   Gallery & Honors
────────────────────────────────────────────────────────── */
.spec-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.spec-gallery-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--c-line-teal);
  cursor: pointer;
}

.spec-gallery-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.spec-gallery-cell:hover img {
  transform: scale(1.06);
}

.spec-gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 29, 47, 0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.85rem;
  color: #ffffff;
}

.spec-g-title {
  font-size: 0.82rem;
  font-weight: 700;
}

.spec-g-sub {
  font-size: 0.72rem;
  color: var(--c-teal-bright);
  font-family: var(--font-mono);
}

/* ──────────────────────────────────────────────────────────
   Footer
────────────────────────────────────────────────────────── */
.spec-footer {
  border-top: 1px solid var(--c-line-teal);
  padding: 3rem 1.75rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

@media (max-width: 900px) {
  .spec-hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .spec-grid-3 {
    grid-template-columns: 1fr;
  }
  .spec-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
