/*
 * Portfolio — 見た目トークンとセクション順で整理
 * 1. :root   2. reset/base   3. layout   4. header/nav
 * 5. hero    6. buttons      7. sections / themes   8. blocks
 * 9. reveal  10. a11y media 11. mobile nav + grids 12. LP/HP 実績ページ
 */
:root {
  --hero-blue-0: #e6f4ff;
  --hero-blue-3: #1d8bff;
  --hero-blue-4: #0b5bff;
  --hero-blue-5: #7f39fb;
  --hero-blue-6: #3700b3;

  --accent-grad-muted: linear-gradient(180deg, #e8f0ff 0%, #f2edff 100%);
  --accent-grad-line: linear-gradient(180deg, var(--hero-blue-4), var(--hero-blue-5));
  --accent-grad-line-h: linear-gradient(90deg, var(--hero-blue-3), var(--hero-blue-5));
  --accent-grad-line-h-light: linear-gradient(90deg, #93c5fd, #e9d5ff);
  --accent-grad-btn: linear-gradient(135deg, var(--hero-blue-4) 0%, var(--hero-blue-5) 100%);
  --accent-grad-thumb: linear-gradient(135deg, #cfe8ff 0%, #ddd5ff 100%);
  --accent-border: rgba(127, 57, 251, 0.14);
  --accent-border-strong: rgba(11, 91, 255, 0.22);
  --accent-glow: rgba(55, 0, 179, 0.07);

  --bg: #fafafa;
  --card: #ffffff;
  --border: #e5e5e5;
  --text: #0a0a0a;
  --text-muted: #737373;

  /* 白背景セクション（About / Experience / Contact）のインク */
  --ink-on-white: #111827;
  --ink-on-white-muted: #4b5563;
  --border-on-white: #d1d5db;
  --placeholder-on-white: #9ca3af;

  --concrete-mid: #656565;
  --concrete-dark: #525252;
  --concrete-light: #767676;
  --concrete-bg-image:
    linear-gradient(168deg, rgba(255, 255, 255, 0.06) 0%, transparent 38%),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.06) 0%,
      transparent 22%,
      transparent 78%,
      rgba(0, 0, 0, 0.05) 100%
    ),
    linear-gradient(180deg, var(--concrete-light) 0%, var(--concrete-mid) 42%, var(--concrete-dark) 100%),
    repeating-linear-gradient(
      -11deg,
      transparent 0,
      transparent 3px,
      rgba(0, 0, 0, 0.025) 3px,
      rgba(0, 0, 0, 0.025) 4px
    );

  --concrete-footer-light: #e4e4e4;
  --concrete-footer-mid: #d8d8d8;
  --concrete-footer-dark: #cecece;
  --concrete-footer-bg-image:
    linear-gradient(168deg, rgba(255, 255, 255, 0.45) 0%, transparent 42%),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.04) 0%,
      transparent 20%,
      transparent 80%,
      rgba(0, 0, 0, 0.035) 100%
    ),
    linear-gradient(
      180deg,
      var(--concrete-footer-light) 0%,
      var(--concrete-footer-mid) 42%,
      var(--concrete-footer-dark) 100%
    ),
    repeating-linear-gradient(
      -11deg,
      transparent 0,
      transparent 3px,
      rgba(0, 0, 0, 0.025) 3px,
      rgba(0, 0, 0, 0.025) 4px
    );

  /* モーション・モバイルナビ（数値の単一ソース） */
  --reveal-duration: 2.5s;
  --reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-nav-overlay: 130;
  --z-nav-chrome: 140;
  --overlay-scrim: rgba(15, 15, 18, 0.52);
  /* モバイル全画面メニュー開閉（opacity は display 切替の代わり） */
  --nav-menu-duration: 0.6s;
  --nav-menu-stagger: 0.08s;
  --nav-menu-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-menu-end: calc(var(--nav-menu-stagger) + var(--nav-menu-duration));
}

html {
  font-size: 112.5%;
}

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

body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

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

body {
  min-height: 100vh;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(720px, 100% - 48px);
  margin-inline: auto;
}

.container-wide {
  width: min(1080px, 100% - 48px);
  margin-inline: auto;
}

.container-narrow {
  width: min(560px, 100% - 48px);
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--concrete-mid);
  background-image: var(--concrete-bg-image);
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.12);
}

.header .logo,
.header .nav-links a {
  color: rgba(255, 255, 255, 0.92);
}

.header .nav-links a:hover {
  color: #fff;
}

.nav {
  position: relative;
  width: min(960px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
}

.logo {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  z-index: 2;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.nav-toggle-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1px;
  transition: transform 0.28s ease, top 0.28s ease, background 0.2s ease;
}

.nav-toggle-line:nth-child(1) {
  top: 16px;
}

.nav-toggle-line:nth-child(2) {
  top: 26px;
}

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

.nav-toggle.is-open .nav-toggle-line:nth-child(2) {
  top: 21px;
  transform: rotate(-45deg);
}

/* デスクトップ: ラッパーは無視して ul だけが flex 子になる */
.nav-mobile-overlay {
  display: contents;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--hero-blue-6) 0%, var(--hero-blue-5) 100%);
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  pointer-events: none;
}

.hero-blob-1 {
  width: 60vw;
  height: 60vw;
  max-width: 480px;
  max-height: 480px;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 55%);
}

.hero-blob-2 {
  width: 45vw;
  height: 45vw;
  max-width: 360px;
  max-height: 360px;
  top: 30%;
  right: -5%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 58%);
}

.hero-blob-3 {
  width: 50vw;
  height: 50vw;
  max-width: 400px;
  max-height: 400px;
  bottom: -10%;
  left: -15%;
  background: radial-gradient(circle at 30% 30%, rgba(11, 91, 255, 0.55), rgba(11, 91, 255, 0) 60%);
}

.hero-blob-4 {
  width: 35vw;
  height: 35vw;
  max-width: 280px;
  max-height: 280px;
  top: 50%;
  left: 20%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-catch {
  font-size: clamp(1.0625rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.6;
  max-width: 36em;
  margin-inline: auto;
}

.hero-name {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.35;
}

.hero-meta {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: #fff;
  margin-bottom: 32px;
  line-height: 1.7;
  max-width: 34em;
  margin-inline: auto;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* フッターと同系のコンクリート（変数・トーンを揃える） */
.btn-hero {
  border-radius: 999px;
  background-color: var(--concrete-footer-mid);
  background-image: var(--concrete-footer-bg-image);
  color: #424242;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: scale(1);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.35s ease,
    transform 0.5s ease;
}

.btn-hero:hover {
  filter: brightness(1.06);
  color: #424242;
  transform: scale(1.06);
}

.btn-hero:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.scroll-capsule {
  width: 28px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-arrow {
  font-size: 0.7rem;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.scroll-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
}

/* Sections */
.section {
  padding: 64px 0;
  background: linear-gradient(180deg, #f5f8ff 0%, #fafafa 40%, #fafafa 100%);
}

.section-first {
  padding-top: 72px;
}

#about.section,
#experience.section,
#contact.section {
  background: #ffffff;
}

#about .about-body,
#about .about-lead,
#about .about-certs-title {
  color: var(--ink-on-white);
}

#about .about-certs-list {
  color: var(--ink-on-white-muted);
}

#contact .contact-intro {
  color: var(--ink-on-white);
}

#contact .form-label {
  color: var(--ink-on-white-muted);
}

#contact .contact-form input,
#contact .contact-form textarea {
  border-color: var(--border-on-white);
  background: #fff;
  color: var(--ink-on-white);
}

#contact .contact-form input::placeholder,
#contact .contact-form textarea::placeholder {
  color: var(--placeholder-on-white);
}

#about .about-photo-placeholder {
  border-color: var(--border-on-white);
}

.section-title {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  width: fit-content;
  max-width: 100%;
  font-weight: 800;
  line-height: 1.3;
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(100%, 56px);
  height: 3px;
  border-radius: 2px;
  background: var(--accent-grad-line-h);
}

.section-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 40px;
  align-items: start;
}

/* 行の高さは本文側に合わせる。写真だけその中で縦中央 */
.about-photo {
  min-width: 0;
  align-self: center;
}

.about-photo-placeholder {
  aspect-ratio: 1;
  max-width: 280px;
  width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: stretch;
  overflow: hidden;
  background: linear-gradient(145deg, #e8f2ff 0%, #ede8ff 100%);
  border: 1px solid var(--accent-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

.about-photo-image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.about-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}

.about-body p + p {
  margin-top: 12px;
}

.about-lead {
  font-weight: 500;
  margin-bottom: 8px;
}

.about-certs {
  margin-top: 24px;
  padding-top: 20px;
  position: relative;
}

.about-certs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(220px, 100%);
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad-line-h);
}

.about-certs-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.about-certs-list {
  list-style: disc;
  padding-left: 1.25em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-certs-list li + li {
  margin-top: 6px;
}

/* Works / Core Skills — コンクリート質感 */
#works.section,
#skills.section {
  background-color: var(--concrete-mid);
  background-image: var(--concrete-bg-image);
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

#works .section-title,
#skills .section-title {
  color: rgba(255, 255, 255, 0.92);
}

#works .section-title::after,
#skills .section-title::after {
  background: var(--accent-grad-line-h-light);
}

#skills .section-lead {
  color: rgba(255, 255, 255, 0.78);
}

#works .works-note {
  color: rgba(255, 255, 255, 0.76);
}

/* Core Skills */
.core-skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.core-skill-col {
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid var(--accent-border);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.core-skill-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(11, 91, 255, 0.1);
}

.core-skill-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--accent-grad-muted);
  border: 1px solid var(--accent-border);
  color: var(--hero-blue-6);
}

.core-skill-head h3 {
  font-size: 1rem;
  font-weight: 700;
}

.core-skill-list {
  list-style: disc;
  padding-left: 1.25em;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
}

.core-skill-list li + li {
  margin-top: 6px;
}

/* Works / Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.project-card:hover {
  border-color: var(--accent-border-strong);
  box-shadow: 0 16px 40px rgba(55, 0, 179, 0.1), 0 0 0 1px rgba(127, 57, 251, 0.08);
}

.project-thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  background: var(--accent-grad-thumb);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--accent-border);
}

.project-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.project-thumb-web {
  background: linear-gradient(135deg, #b8d9ff 0%, #d4c4ff 100%);
}

.project-thumb-migration {
  background: linear-gradient(135deg, #a8c8ff 0%, #c8b8ff 100%);
}

.project-thumb-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
  line-height: 1.5;
}

.project-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: linear-gradient(135deg, rgba(230, 244, 255, 0.95), rgba(245, 240, 255, 0.95));
  border: 1px solid var(--accent-border);
  color: #4c1d95;
}

.project-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.project-desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.project-links {
  font-size: 0.85rem;
}

.project-links li + li {
  margin-top: 4px;
}

.project-links a {
  color: var(--hero-blue-4);
  text-decoration: none;
}

.project-links a:hover {
  color: var(--hero-blue-5);
}

.project-more {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--hero-blue-6);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(11, 91, 255, 0.12);
  display: inline-block;
  width: 100%;
  text-align: left;
}

.project-more:hover {
  color: var(--hero-blue-4);
}

.works-note {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Experience */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  max-width: 640px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent-grad-line);
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, var(--hero-blue-0));
  border: 3px solid var(--hero-blue-5);
  box-shadow: 0 0 0 2px var(--bg), 0 2px 8px rgba(127, 57, 251, 0.2);
}

#experience .section-lead {
  width: fit-content;
  max-width: 100%;
  font-weight: 600;
  background: var(--accent-grad-line-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@supports not (background-clip: text) {
  #experience .section-lead {
    color: var(--hero-blue-4);
    -webkit-text-fill-color: currentColor;
    background: none;
  }
}

.timeline-period {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  color: var(--hero-blue-6);
}

.timeline-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Contact */
.contact-intro {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 28px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--hero-blue-4);
  box-shadow: 0 0 0 3px rgba(11, 91, 255, 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  align-self: center;
  margin-top: 8px;
  padding: 12px 36px;
  border-radius: 999px;
  background: var(--accent-grad-btn);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(55, 0, 179, 0.25);
  transform: scale(1);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.35s ease,
    transform 0.5s ease;
  
}

.btn-submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(55, 0, 179, 0.32);
  transform: scale(1.06);
}

.btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  filter: none;
}

.contact-form-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.875rem;
  text-align: center;
  color: var(--hero-blue-4, #0b5bff);
}

.contact-form-status.is-error {
  color: #b00020;
}

/* Footer */
.footer {
  padding: 32px;
  text-align: center;
  font-size: 0.75rem;
  color: #424242;
  background-color: var(--concrete-footer-mid);
  background-image: var(--concrete-footer-bg-image);
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* Scroll reveal: フェード + 下から上へ（html.js 時のみ初期非表示） */
html.js .reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 3.5rem, 0);
  transition:
    opacity var(--reveal-duration) var(--reveal-ease),
    transform var(--reveal-duration) var(--reveal-ease);
  will-change: transform, opacity;
}

html.js .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* 入場方向（:not(.is-visible) で終了後の transform を .is-visible に任せる） */
html.js .reveal-on-scroll.reveal-from--left:not(.is-visible) {
  transform: translate3d(-3.25rem, 0, 0);
}

html.js .reveal-on-scroll.reveal-from--bottom:not(.is-visible) {
  transform: translate3d(0, 3.5rem, 0);
}

html.js .reveal-on-scroll.reveal-from--right:not(.is-visible) {
  transform: translate3d(3.25rem, 0, 0);
}

/* Works: 左→中→右の順に動き出す（.projects-grid 直下のカードのみ） */
.projects-grid > .project-card.reveal-on-scroll:nth-child(1) {
  transition-delay: 0s;
}

.projects-grid > .project-card.reveal-on-scroll:nth-child(2) {
  transition-delay: 0.5s;
}

.projects-grid > .project-card.reveal-on-scroll:nth-child(3) {
  transition-delay: 1s;
}

/* About: 見出し → 写真 → リード → 続きの段落 → 資格 */
#about .section-title.reveal-on-scroll {
  transition-delay: 0s;
}

#about .about-photo-placeholder.reveal-on-scroll {
  transition-delay: 0.35s;
}

#about .about-lead.reveal-on-scroll {
  transition-delay: 0.7s;
}

#about .about-body > p.reveal-on-scroll:not(.about-lead) {
  transition-delay: 1.05s;
}

#about .about-certs.reveal-on-scroll {
  transition-delay: 1.4s;
}

/* Core Skills: 左 → 右 */
#skills .core-skills > .core-skill-col.reveal-on-scroll:nth-child(1) {
  transition-delay: 0s;
}

#skills .core-skills > .core-skill-col.reveal-on-scroll:nth-child(2) {
  transition-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0s !important;
    will-change: auto;
  }

  .nav-mobile-overlay,
  .nav-mobile-overlay .nav-links {
    transition: none !important;
    transition-delay: 0s !important;
  }

  .nav-mobile-overlay .nav-links {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .nav {
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
    flex-wrap: nowrap;
    isolation: isolate;
  }

  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
    position: relative;
    z-index: var(--z-nav-chrome);
    pointer-events: auto;
  }

  .logo {
    order: 1;
    position: relative;
    z-index: 1;
    pointer-events: auto;
  }

  /* 全画面メニュー: display ではなく opacity / visibility。閉じるときはパネル先行→遅れてスクラム */
  .nav-mobile-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: var(--z-nav-overlay);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: max(88px, calc(16px + env(safe-area-inset-top, 0px) + 52px)) 0 24px;
    background: var(--overlay-scrim);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity var(--nav-menu-duration) var(--nav-menu-ease) var(--nav-menu-stagger),
      visibility 0s linear var(--nav-menu-end),
      -webkit-backdrop-filter var(--nav-menu-duration) ease var(--nav-menu-stagger),
      backdrop-filter var(--nav-menu-duration) ease var(--nav-menu-stagger);
  }

  .nav-mobile-overlay.nav-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity var(--nav-menu-duration) var(--nav-menu-ease),
      visibility 0s,
      -webkit-backdrop-filter var(--nav-menu-duration) ease,
      backdrop-filter var(--nav-menu-duration) ease;
  }

  .nav-mobile-overlay .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: var(--concrete-mid);
    background-image: var(--concrete-bg-image);
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-top: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 12px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(-14px) scale(0.985);
    opacity: 0;
    transform-origin: top center;
    transition-property: transform, opacity;
    transition-duration: var(--nav-menu-duration);
    transition-timing-function: var(--nav-menu-ease);
    transition-delay: 0s;
  }

  .nav-mobile-overlay.nav-open .nav-links {
    transform: translateY(0) scale(1);
    opacity: 1;
    transition-delay: var(--nav-menu-stagger);
  }

  .nav-mobile-overlay .nav-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  }

  .nav-mobile-overlay .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-mobile-overlay .nav-links a {
    display: block;
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .nav-mobile-overlay .nav-links a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .core-skills {
    grid-template-columns: 1fr;
  }

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

/* -------------------------------------------------------------------------- *
 * LP / HP 実績ページ（works-web-design.html）
 * body に .page-works-detail。:root / base はメインと共有。
 * -------------------------------------------------------------------------- */

body.page-works-detail {
  background: linear-gradient(180deg, #f5f8ff 0%, var(--bg) 38%, var(--bg) 100%);
}

.page-works-detail .detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--concrete-mid);
  background-image: var(--concrete-bg-image);
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.12);
}

.page-works-detail .detail-header__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-works-detail .detail-back {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-works-detail .detail-back:hover {
  color: #fff;
}

.page-works-detail .detail-back:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
  border-radius: 2px;
}

.page-works-detail .detail-brand {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.page-works-detail .detail-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.page-works-detail .detail-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.page-works-detail .detail-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-on-white);
  line-height: 1.35;
  margin-bottom: 14px;
  padding-bottom: 16px;
  position: relative;
}

.page-works-detail .detail-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-grad-line-h);
}

.page-works-detail .detail-lede {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-on-white-muted);
  margin-bottom: 40px;
}

.page-works-detail .work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--accent-border);
}

.page-works-detail .work-list__item {
  border-bottom: 1px solid var(--accent-border);
}

.page-works-detail .work-list__link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  padding: 22px 4px 22px 0;
  text-decoration: none;
  color: var(--ink-on-white);
  transform: scale(1);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.35s ease,
    transform 0.5s ease;
  border-radius: 8px;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}

.page-works-detail .work-list__link:hover {
  /* --accent-grad-line-h-light の左右反転 */
  background: linear-gradient(135deg, #a575fc, #9a5efc, #5f1fdb);
  box-shadow: 0 8px 32px var(--accent-glow);
  color: #fff;
  transform: scale(1.04);
}

.page-works-detail .work-list__link:focus-visible {
  outline: 2px solid var(--hero-blue-4);
  outline-offset: 2px;
}

.page-works-detail .work-list__name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  grid-column: 1;
  grid-row: 1;
}

.page-works-detail .work-list__host {
  font-size: 0.8rem;
  color: var(--text-muted);
  grid-column: 1;
  grid-row: 2;
  word-break: break-all;
}

/* .page-works-detail .work-list__host:hover {
  color: #fff;
} */


.page-works-detail .work-list__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent-grad-line-h-light);
  opacity: 0.85;
  transition: transform 0.2s ease, color 0.2s ease;
}

.page-works-detail {
  transform: translate(2px, -2px);
  color: var(--hero-blue-5);
}

.page-works-detail .detail-footnote {
  margin-top: 48px;
  margin-bottom: 96px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.page-works-detail .footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}

@media (max-width: 480px) {
  .page-works-detail .detail-main {
    padding-top: 40px;
  }

  .page-works-detail .work-list__link {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .page-works-detail .work-list__arrow {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    margin-top: 4px;
  }
}
