:root {
  color-scheme: dark;
  --bg: #06080b;
  --bg-2: #090c10;
  --panel: transparent;
  --panel-2: transparent;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f6f3ec;
  --muted: rgba(246, 243, 236, 0.66);
  --soft: rgba(246, 243, 236, 0.5);
  --accent: #f6f3ec;
  --accent-2: rgba(246, 243, 236, 0.82);
  --accent-3: #e7d0a4;
  --shadow: none;
  --radius: 0;
  --radius-lg: 0;
  --shell: min(1240px, calc(100% - 2rem));
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, #0b0e13 0%, #090c10 52%, #06080b 100%);
  font: 400 15px/1.65 var(--mono);
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body.home-page {
  position: relative;
  --home-bg-fade: 0;
  --home-bg-shift: 0;
  --muted: rgba(246, 243, 236, 0.82);
  --soft: rgba(246, 243, 236, 0.7);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 44px, 100% 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.04) 18%, rgba(0, 0, 0, 0.04) 82%, rgba(0, 0, 0, 0.34));
  opacity: 0.34;
}

body::after {
  content: "";
  position: fixed;
  right: -8rem;
  top: 7rem;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent 66%);
  filter: blur(6px);
  pointer-events: none;
}

.home-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform, opacity;
  background:
    linear-gradient(180deg, rgba(6, 8, 11, 0.04) 0%, rgba(6, 8, 11, 0.3) 48%, rgba(6, 8, 11, 0.78) 100%),
    url("./25no1_tokushu_EN.png") center top / cover no-repeat;
  opacity: calc(0.92 - (var(--home-bg-fade) * 0.2));
  transform: translate3d(0, calc(var(--home-bg-shift) * -1px), 0) scale(1.05);
}

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

a:hover,
a:focus-visible {
  color: var(--accent-3);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(142, 93, 20, 0.18);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 8, 11, 0.96);
  color: var(--text);
  transform: translateY(-180%);
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 8, 11, 0.76);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1.4rem;
}

.nav-links a {
  color: var(--accent);
  opacity: 0.78;
  transition: opacity 120ms ease, color 120ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  opacity: 1;
  color: var(--accent);
}

main {
  position: relative;
  z-index: 1;
  padding: 2.4rem 0 3rem;
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 1rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  justify-items: center;
}

.hero-copy,
.page-title-block .shell,
.section-panel,
.card,
.form-card,
.legal-card,
.detail-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.hero-copy {
  width: min(100%, 58rem);
  padding: clamp(1.35rem, 3vw, 2rem);
  display: grid;
  justify-items: center;
  text-align: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-mark {
  width: min(100%, 28rem);
  height: auto;
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1,
.page-title {
  margin: 0;
  font-size: clamp(2.2rem, 5.8vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  max-width: 12ch;
  margin-inline: auto;
}

.lede {
  margin: 1rem 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-inline: auto;
}

.hero-meta {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

.hero-meta p {
  color: var(--muted);
  max-width: 70ch;
}

.cta-row,
.project-links,
.link-list,
.inline-links,
.legal-links,
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-links {
  justify-content: center;
}

.btn,
.link-list a,
.project-links a,
.hero-links a,
.hero-links .copy-email,
.footer-grid .copy-email,
.read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn:hover,
.btn:focus-visible,
.link-list a:hover,
.link-list a:focus-visible,
.project-links a:hover,
.project-links a:focus-visible,
.hero-links a:hover,
.hero-links a:focus-visible,
.hero-links .copy-email:hover,
.hero-links .copy-email:focus-visible,
.footer-grid .copy-email:hover,
.footer-grid .copy-email:focus-visible,
.read-more:hover,
.read-more:focus-visible {
  transform: translateY(-1px);
  color: var(--accent);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.btn.primary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #f6f3ec;
}

.btn.primary:hover,
.btn.primary:focus-visible {
  color: #f6f3ec;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.18);
}

.section {
  padding: 0 0 1.9rem;
}

.page-title-block {
  padding: 0 0 1rem;
}

.page-title-block .lede {
  margin-top: 0.9rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}

.section-head-centered {
  justify-content: center;
  text-align: center;
}

.section-head-centered > div {
  width: 100%;
}

.section-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-note {
  margin: 0;
  color: var(--muted);
}

.section-panel {
  padding: 1rem;
}

.page-title-block .shell {
  padding: clamp(1.1rem, 2.6vw, 1.7rem);
}

.card-grid,
.archive-list,
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.news-year-filter {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.news-year-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.news-year-buttons .chip {
  display: inline-flex;
  align-items: center;
  min-width: 4.2rem;
  justify-content: center;
  border-radius: 999px;
}

.archive-empty {
  grid-column: 1 / -1;
  padding: 0.9rem 0.15rem 0.25rem;
  color: var(--muted);
}

.card,
.project-card,
.news-card,
.publication-card,
.researcher-card,
.role-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  padding: 1.05rem;
}

.card-media {
  margin-bottom: 0.95rem;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.card-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  transition: transform 180ms ease, filter 180ms ease;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
}

.card h3 {
  margin: 0.15rem 0 0.65rem;
  font-size: 1.15rem;
  line-height: 1.25;
}

.card p {
  color: var(--muted);
}

.news-card-link {
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.news-card-link:hover,
.news-card-link:focus-visible {
  color: inherit;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px) scale(1.01);
}

.news-card-link:hover h3,
.news-card-link:focus-visible h3 {
  color: inherit;
}

.news-card-link:hover .card-media,
.news-card-link:focus-visible .card-media {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.news-card-link:hover .card-media img,
.news-card-link:focus-visible .card-media img {
  transform: scale(1.035);
  filter: brightness(1.04);
}

.project-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.28rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.tag-list li {
  padding: 0.42rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font-size: 0.82rem;
}

.link-list,
.project-links {
  margin-top: 1rem;
}

.news-card .eyebrow,
.card .eyebrow {
  font-size: 0.78rem;
}

.news-card h3,
.publication-card h3 {
  max-width: 24ch;
}

.featured {
  padding: 1.25rem 1.35rem 1.2rem;
  margin-bottom: 1rem;
}

.section-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.6rem;
}

.featured h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  line-height: 1.2;
  margin-bottom: 0.55rem;
}

.featured p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 92ch;
}

.featured-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.read-more {
  color: var(--text);
}

.filter-bar {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.search-field,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(246, 243, 236, 0.46);
}

.search-field::placeholder {
  color: rgba(246, 243, 236, 0.46);
}

.search-field:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(231, 208, 164, 0.22);
  outline-offset: 2px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.chip.is-active,
.chip:hover,
.chip:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
}

.form-card,
.legal-card,
.detail-panel {
  padding: clamp(1.1rem, 2.6vw, 1.7rem);
}

.careers-panel {
  display: grid;
  gap: 1rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.careers-form {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-weight: 700;
  color: var(--text);
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field-help {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.detail-panel h3 {
  margin: 0 0 0.75rem;
}

.detail-panel p {
  margin: 0;
  color: var(--muted);
}

.detail-panel + .detail-panel {
  margin-top: 1rem;
}

.legal-card h2,
.legal-card h3 {
  margin-top: 1.4rem;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
}

.legal-card ul {
  padding-left: 1.2rem;
}

.footer {
  margin-top: 2rem;
  padding: 1.4rem 0 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 0.88rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  align-items: flex-start;
}

.footer-grid p,
.footer-grid a {
  color: rgba(246, 243, 236, 0.76);
}

.footer-grid a:hover,
.footer-grid a:focus-visible {
  color: rgba(255, 255, 255, 0.96);
}

.footer-brand {
  display: grid;
  gap: 0.45rem;
  max-width: 34rem;
}

.footer-brand strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
  justify-items: end;
  max-width: 30rem;
}

.footer-links .inline-links {
  justify-content: flex-end;
}

.footer .inline-links {
  gap: 0.45rem 1rem;
}

.footer .inline-links a {
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 0.08rem;
}

.footer .inline-links a:hover,
.footer .inline-links a:focus-visible {
  border-bottom-color: rgba(255, 255, 255, 0.38);
}

.footer-brand p,
.footer-links p {
  line-height: 1.8;
}

.footer-links p {
  max-width: 28rem;
  text-align: right;
}

.footer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem 0.7rem;
}

.footer-line .footer-brand {
  display: inline;
  max-width: none;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-line a,
.footer-line span {
  color: rgba(246, 243, 236, 0.76);
}

.footer-line a:hover,
.footer-line a:focus-visible {
  color: rgba(255, 255, 255, 0.96);
}

.footer-separator {
  user-select: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .card,
  .project-card,
  .news-card,
  .publication-card,
  .researcher-card,
  .role-card {
    grid-column: span 6;
  }

  .footer-grid {
    flex-direction: column;
  }

  .footer-links {
    justify-items: start;
  }

  .footer-links .inline-links {
    justify-content: flex-start;
  }

  .footer-links p {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100%, calc(100% - 1.2rem));
  }

  main {
    padding-top: 2rem;
  }

  .hero {
    padding-top: 0.6rem;
  }

  .nav {
    align-items: start;
    flex-direction: column;
    padding: 0.8rem 0;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 0.9rem;
  }

  .hero h1,
  .page-title {
    max-width: 100%;
  }

  .hero-copy {
    width: 100%;
  }

  .card-grid,
  .archive-list,
  .project-grid,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .project-card,
  .news-card,
  .publication-card,
  .researcher-card,
  .role-card {
    grid-column: 1 / -1;
  }

  .hero-links,
  .cta-row,
  .project-links,
  .link-list,
  .inline-links,
  .legal-links {
    width: 100%;
  }

  .hero-links a,
  .hero-links .copy-email {
    width: 100%;
  }

  .featured {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  .footer-grid {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip-link,
  .btn,
  .link-list a,
  .project-links a,
  .hero-links a,
  .hero-links .copy-email,
  .footer-grid .copy-email,
  .read-more,
  .chip {
    transition: none;
  }
}
