:root {
  --night: #0b1020;
  --night-soft: #131b2e;
  --ink: #172033;
  --text: #3f4858;
  --muted: #737b89;
  --line: #dfe3e9;
  --paper: #f7f8fa;
  --white: #ffffff;
  --blue: #6577ba;
  --wrap: min(1120px, calc(100% - 48px));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 8px 12px; background: white; color: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 68px;
  padding-inline: max(24px, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,.12);
  transition: background .25s, color .25s, border-color .25s;
}
.header.scrolled { background: rgba(255,255,255,.95); color: var(--ink); border-color: var(--line); backdrop-filter: blur(12px); }
.site-name { font-weight: 600; letter-spacing: .02em; }
.navigation { display: flex; gap: 30px; align-items: center; }
.navigation a { font-size: .88rem; color: inherit; opacity: .78; }
.navigation a:hover, .navigation a:focus-visible { opacity: 1; }
.menu { display: none; padding: 8px; border: 0; background: none; color: inherit; }
.menu span { display: block; width: 23px; height: 1px; margin: 5px; background: currentColor; }
.menu b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero { position: relative; min-height: 72svh; background: var(--night); color: white; overflow: hidden; display: flex; align-items: flex-end; }
.nightscape { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,16,32,.4), transparent 65%); }
.hero-inner { position: relative; z-index: 2; padding-bottom: clamp(64px, 9vw, 100px); }
.hero h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.5rem); font-weight: 400; line-height: 1.02; letter-spacing: -.055em; }
.hero p { margin: 24px 0 0; color: rgba(255,255,255,.7); font-size: 1rem; letter-spacing: .04em; }
.section { padding: clamp(80px, 10vw, 130px) 0; }
.section h2 { margin: 0; font-size: clamp(2rem, 3.8vw, 3.4rem); line-height: 1.25; font-weight: 500; letter-spacing: -.04em; }
.lead { margin-top: 0; color: var(--ink); font-size: 1.18rem; line-height: 1.8; }
.plain-link { display: inline-block; margin-top: 22px; padding-bottom: 3px; border-bottom: 1px solid currentColor; font-size: .9rem; }
.plain-link:hover { color: var(--blue); }
.research { background: var(--white); }
.split-heading { display: grid; grid-template-columns: 1fr 1.45fr; gap: 80px; }
.split-heading > div { max-width: 610px; }
.split-heading p:not(.lead) { color: var(--text); }
.topics { margin-top: 72px; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.topics article { padding: 30px 28px; border-right: 1px solid var(--line); }
.topics article:first-child { padding-left: 0; }
.topics article:last-child { border-right: 0; }
.topics h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; }
.topics p { margin: 0; color: var(--muted); font-size: .9rem; }
.photography { background: var(--paper); }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 48px; }
.section-head p { margin: 0 0 5px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; }
.photo-card { display: grid; grid-template-columns: 42% 1fr; grid-template-rows: 1fr auto; min-height: 260px; background: white; border: 1px solid var(--line); }
.photo-card.large { grid-row: 1 / 3; display: block; }
.sample { grid-row: 1 / 3; min-height: 260px; background: var(--night-soft); overflow: hidden; image-rendering: pixelated; transition: filter .25s; }
.photo-card:hover .sample { filter: brightness(1.15); }
.sample-landscape { min-height: 560px; background: radial-gradient(circle at 24% 18%, white 0 1px, transparent 2px), radial-gradient(circle at 72% 28%, white 0 1px, transparent 2px), linear-gradient(145deg, transparent 0 48%, rgba(101,119,186,.45) 49% 57%, transparent 58%), linear-gradient(#111b35 0 63%, #0b1020 64%); background-size: 45px 45px, 62px 62px, auto, auto; }
.sample-landscape::after { content: ""; display: block; height: 42%; margin-top: 58%; background: linear-gradient(135deg, transparent 0 28%, #080d19 29% 58%, transparent 59%), #111827; }
.sample-m42 { background: radial-gradient(circle at center, #efe1bf 0 2px, #995f7c 3px 18px, #596aa7 36px, transparent 90px), #0b1020; }
.sample-m45 { background: radial-gradient(circle at 40% 40%, white 0 2px, #6577ba 3px, transparent 18px), radial-gradient(circle at 63% 34%, white 0 2px, #6577ba 3px, transparent 17px), radial-gradient(circle at 54% 63%, white 0 2px, #6577ba 3px, transparent 18px), #0b1020; }
.photo-card h3 { align-self: end; margin: 0; padding: 28px 24px 0; font-size: 1.05rem; font-weight: 500; }
.photo-card p { margin: 0; padding: 4px 24px 28px; color: var(--muted); font-size: .86rem; }
.photo-card.large h3 { padding-top: 22px; }
.more { text-align: right; }
.about { color: #ffffff; background: black; }
.about-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: 80px; }
.about-text { max-width: 640px; }
.about-text p:not(.lead) { color: #ffffff; }
.news { background: var(--night-soft); color: white; }
.news-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: 80px; }
.news-list { border-top: 1px solid rgba(255,255,255,.18); }
.news-list > a:not(.plain-link) { display: grid; grid-template-columns: 120px 1fr; gap: 22px; padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.news-list time { color: rgba(255,255,255,.55); font-size: .82rem; }
.news-list span { font-size: .93rem; }
.news .plain-link { border-color: rgba(255,255,255,.65); }
.footer { padding: 34px 0; background: var(--night); color: rgba(255,255,255,.62); }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; font-size: .78rem; }
.footer-inner p { margin: 0; }
.footer-inner p:last-child { text-align: right; }
.footer-inner a { color: white; }
@media (max-width: 820px) {
  :root { --wrap: min(100% - 34px, 680px); }
  .header { padding-inline: 17px; }
  .menu { display: block; z-index: 2; }
  .navigation { position: fixed; inset: 0; padding: 90px 28px; background: var(--night); color: white; flex-direction: column; align-items: flex-start; gap: 20px; transform: translateX(100%); transition: transform .25s; }
  .navigation.open { transform: none; }
  .navigation a { font-size: 1rem; }
  .split-heading, .about-grid, .news-grid { grid-template-columns: 1fr; gap: 34px; }
  .topics { grid-template-columns: 1fr; }
  .topics article, .topics article:first-child { padding: 23px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .topics article:last-child { border-bottom: 0; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-card.large { grid-column: 1 / 3; grid-row: auto; }
  .photo-card:not(.large) { display: block; }
  .sample { min-height: 250px; }
  .footer-inner { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner p:last-child { text-align: left; }
}
@media (max-width: 520px) {
  :root { --wrap: calc(100% - 28px); }
  .hero { min-height: 64svh; }
  .hero h1 { font-size: clamp(3.2rem, 15vw, 4.4rem); }
  .section { padding: 72px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 12px; }
  .photo-grid { display: block; }
  .photo-card { display: block; margin-bottom: 12px; }
  .sample, .sample-landscape { min-height: 310px; }
  .news-list > a:not(.plain-link) { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Interior pages — the same restrained palette and typography as Home. */
.header.scrolled { background: #fff; backdrop-filter: none; }
.navigation { gap: clamp(16px, 2.1vw, 30px); }
.navigation a[aria-current="page"] { opacity: 1; border-bottom: 1px solid currentColor; }
.inner-hero { min-height: 330px; min-height: clamp(330px, 45svh, 470px); }
.inner-hero .hero-inner { padding-top: 112px; padding-bottom: 60px; }
.inner-hero h1 { font-size: clamp(2.7rem, 5.8vw, 4.8rem); letter-spacing: -.045em; }
.inner-hero p { margin-top: 15px; }
.eyebrow { display: block; color: #aeb8cd; font-size: .76rem; letter-spacing: .14em; margin-bottom: 16px; }
.sub-section { padding: clamp(60px, 8vw, 104px) 0; scroll-margin-top: 68px; }
.paper { background: var(--paper); }
.editorial { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 2fr); gap: clamp(32px, 7vw, 88px); }
.editorial-heading h2, .sub-section .section-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.035em; }
.editorial-heading p { color: var(--muted); font-size: .8rem; margin: 12px 0 0; }
.editorial-body > p:first-child { margin-top: 0; }
.editorial-body > p { color: var(--text); }
.editorial-body > p.lead { color: var(--ink); }
.jump { border-bottom: 1px solid var(--line); background: #fff; }
.jump .wrap { display: flex; gap: 14px 32px; flex-wrap: wrap; padding-block: 18px; }
.jump a { color: var(--text); font-size: .86rem; }
.jump a:hover, .small-link:hover { color: var(--blue); }
.entry-list { border-top: 1px solid var(--line); }
.entry { padding: 25px 0; border-bottom: 1px solid var(--line); }
.entry h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.65; margin: 0 0 9px; overflow-wrap: anywhere; }
.entry p { margin: 4px 0; font-size: .86rem; }
.authors { color: var(--text); }
.venue { color: var(--muted); }
.small-link { display: inline-block; margin-top: 9px; font-size: .8rem; border-bottom: 1px solid currentColor; }
.fact-list { margin: 0; border-top: 1px solid var(--line); }
.fact-list div { display: grid; grid-template-columns: 1fr 1.5fr; gap: 18px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.fact-list dt { font-weight: 600; font-size: .93rem; }
.fact-list dd { margin: 0; color: var(--text); font-size: .93rem; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter button, .copy-button { font: inherit; font-size: .85rem; background: white; color: var(--ink); padding: 8px 16px; border: 1px solid var(--line); cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--night-soft); color: white; border-color: var(--night-soft); }
.preview-note { font-size: .83rem; color: var(--muted); margin: 18px 0 24px; }
.work-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px 18px; }
.work-card[hidden] { display: none; }
.work-image { position: relative; width: 100%; aspect-ratio: 4/3; display: block; border: 0; padding: 0; overflow: hidden; color: #b4bed2; background: var(--night-soft); cursor: zoom-in; }
.work-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.work-image:not(.missing) .image-empty { display: none; }
.work-image.missing img { display: none; }
.work-image.missing { cursor: default; }
.image-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; }
.work-image:not(.missing):hover img { transform: scale(1.035); }
.work-caption { padding-top: 12px; }
.work-caption h3 { margin: 0; font-size: .97rem; font-weight: 500; }
.work-caption p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px 18px; }
.gallery-empty { display: grid; place-items: center; aspect-ratio: 4/3; background: var(--paper); border: 1px solid var(--line); color: var(--muted); font-size: .85rem; letter-spacing: .1em; }
.gallery-slot p { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }
.contact-panel { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 32px; }
.contact-panel .eyebrow { color: var(--muted); margin-bottom: 8px; }
.email-link { display: inline-block; font-size: clamp(1rem, 2.8vw, 1.55rem); overflow-wrap: anywhere; border-bottom: 1px solid currentColor; }
.copy-button { display: block; margin-top: 20px; }
.copy-status { display: block; color: var(--muted); font-size: .85rem; margin-top: 8px; }
.archive-list { border-top: 1px solid var(--line); }
.archive-list article { display: grid; grid-template-columns: 105px 1fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.archive-list time { color: var(--muted); font-size: .83rem; padding-top: 3px; }
.archive-list p { margin: 0; font-size: .93rem; }
.photo-dialog { width: min(94vw, 1000px); max-height: 90vh; padding: 42px 18px 18px; border: 1px solid #33405a; background: var(--night); color: white; }
.photo-dialog::backdrop { background: rgba(0,0,0,.85); }
.photo-dialog img { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; object-fit: contain; }
.photo-dialog button { position: absolute; right: 10px; top: 5px; color: white; background: transparent; border: none; font-size: 1.8rem; cursor: pointer; }
.photo-dialog p { margin: 10px 0 0; text-align: center; font-size: .85rem; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
@media (max-width: 900px) {
  .header { padding-inline: 17px; }
  .menu { display: block; z-index: 2; }
  .navigation { position: fixed; inset: 0; padding: 90px 28px 30px; background: var(--night); color: white; flex-direction: column; align-items: flex-start; gap: 20px; transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s; overflow-y: auto; }
  .navigation.open { transform: none; visibility: visible; }
  .header.menu-open { color: white; background: var(--night); }
  body.menu-open { overflow: hidden; }
  .navigation a { font-size: 1rem; }
  .editorial { grid-template-columns: 1fr; gap: 28px; }
  .work-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .inner-hero { min-height: 310px; }
  .inner-hero .hero-inner { padding-bottom: 42px; }
  .inner-hero h1 { font-size: clamp(2.4rem, 10vw, 3.2rem); }
  .work-grid, .gallery-grid { gap: 18px 10px; }
  .work-caption h3 { font-size: .88rem; }
  .archive-list article { grid-template-columns: 1fr; gap: 4px; }
  .fact-list div { grid-template-columns: 1fr; gap: 4px; }
}

/* Actual astrophotography images */
.photo-card img.sample {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
}

.photo-card.large img.sample {
    height: 560px;
}

/* Tablet */
@media (max-width: 900px) {
    .photo-card img.sample {
        height: 250px;
    }

    .photo-card.large img.sample {
        height: 420px;
    }
}

/* Smartphone */
@media (max-width: 520px) {
    .photo-card img.sample,
    .photo-card.large img.sample {
        height: 310px;
    }
}
/* PC表示時の天体写真カード */
@media (min-width: 821px) {
    .photo-card:not(.large) {
        grid-template-columns: 65% 1fr;
    }

    .photo-card:not(.large) img.sample {
        object-fit: contain;
        background: #ffffff;
    }

    .photo-card:not(.large) h3 {
        padding: 16px;
        align-self: center;
    }

    .photo-card:not(.large) p:empty {
        display: none;
    }
}