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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'DM Sans', 'Zen Kaku Gothic New', system-ui, sans-serif;
  color: #0e1a1f;
  background: #ffffff;
  line-height: 1.7;
}

a { color: inherit; }
a:hover { color: #087a8c; }

:focus-visible { outline: 2px solid #087a8c; outline-offset: 3px; }

.jp { font-family: 'Zen Kaku Gothic New', sans-serif; }

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }

.side {
  flex: 0 0 clamp(320px, 36vw, 480px);
  background: #062a33;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 860px;
  padding: 80px 64px 56px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* ===== Sidebar: photo (link to home) ===== */
.hero {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 48px 36px;
  text-decoration: none;
  color: #ffffff;
}
.hero:hover { color: #ffffff; }

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 42, 51, 0) 45%, rgba(6, 42, 51, 0.55) 75%, #062a33 100%);
}

.hero-name,
.hero-kana { position: relative; z-index: 1; }

.hero-name {
  font-size: 52px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.hero-kana {
  margin-top: 14px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 14px;
  color: #d9f7fc;
  letter-spacing: 0.3em;
}

/* ===== Sidebar: menu ===== */
.nav {
  display: flex;
  flex-direction: column;
  padding: 24px 48px 40px;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #1d4a54;
  color: #a9cfd6;
  text-decoration: none;
}
.nav a:hover { color: #ffffff; }
.nav a[aria-current="page"] { color: #ffffff; }
.nav a[aria-current="page"]::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #13d5f2;
}

/* ===== Headings & text ===== */
.lead-label {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: #087a8c;
}

.lead {
  margin: 0;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
}

.muted { color: #5b6b70; }

.intro { display: flex; flex-direction: column; gap: 16px; }
.intro p { margin: 0; font-size: 14px; line-height: 2; }

.section { display: flex; flex-direction: column; gap: 20px; }

.section-title {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #0e1a1f;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.page-title {
  margin: 0;
  font-size: 40px;
  line-height: 1.25;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.sub-title {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #087a8c;
}

/* ===== News (open/close with <details>) ===== */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list > li { border-bottom: 1px solid #e3eaec; }

.news-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 32px;
  padding: 18px 0;
}
.news-list summary::-webkit-details-marker { display: none; }
.news-list summary:hover .title { color: #087a8c; }

.date {
  flex: none;
  width: 104px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #087a8c;
}

.title {
  flex: 1 1 260px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 15px;
}

.mark {
  flex: none;
  width: 20px;
  text-align: center;
  font-size: 18px;
  color: #087a8c;
}
.mark::after { content: "+"; }
details[open] > summary .mark::after { content: "\2212"; }

.news-body {
  padding: 0 0 22px 136px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 14px;
  line-height: 1.9;
  color: #34474d;
}
.news-body p { margin: 0 0 8px; }

/* "過去のお知らせ" toggle */
.more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
  margin-top: 24px;
  padding: 12px 22px;
  border: 1px solid #0e1a1f;
  border-radius: 999px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 13px;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary:hover { background: #f2f7f8; }
.more .when-open { display: none; }
.more[open] .when-open { display: inline; }
.more[open] .when-closed { display: none; }
.more > .news-list { margin-top: 16px; border-top: 1px solid #e3eaec; }

/* ===== Lists for CV / achievements ===== */
.rows { margin: 0; }
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  padding: 16px 0;
  border-bottom: 1px solid #e3eaec;
}
.row dt {
  flex: none;
  width: 104px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #087a8c;
}
.row dd {
  flex: 1 1 260px;
  margin: 0;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 15px;
}

.pubs { margin: 0; padding: 0; list-style: none; }
.pubs li {
  padding: 16px 0;
  border-bottom: 1px solid #e3eaec;
  font-size: 15px;
  line-height: 1.8;
}
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border: 1px solid #087a8c;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #087a8c;
  vertical-align: 2px;
}

/* ===== Tools ===== */
.tool {
  padding: 28px 0;
  border-bottom: 1px solid #e3eaec;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool h2 { margin: 0; font-size: 22px; font-weight: 400; }
.tool p { margin: 0; font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 15px; }
.tool .link { font-size: 14px; }

/* ===== Footer ===== */
.footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #5b6b70;
}

/* ===== Small screens ===== */
@media (max-width: 860px), (max-height: 560px) {
  .layout { flex-direction: column; }
  .side { position: static; height: auto; flex: none; }
  .hero { flex: none; height: 320px; padding: 0 24px 24px; }
  .hero-name { font-size: 40px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 0 24px; padding: 8px 24px 16px; }
  .nav a { border-bottom: none; gap: 8px; }
  .main { padding: 48px 24px 40px; gap: 48px; }
  .news-body { padding-left: 0; }
  .page-title { font-size: 32px; }
}

/* News item without body (not clickable) */
.news-static {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 32px;
  padding: 18px 0;
}

.tool-body p { margin: 0 0 8px; font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 15px; }

.row dt { width: 144px; }
.tool-image { display: block; max-width: 100%; height: auto; border: 1px solid #e3eaec; border-radius: 8px; }
.footer a { color: #087a8c; }
@media (max-width: 860px) { .row dt { width: auto; } }

/* CV: portrait + name */
.profile-card { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 40px; }
.portrait { width: 320px; max-width: 100%; height: auto; }
.profile-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.profile-text p { margin: 0; font-size: 14px; line-height: 1.8; }
.profile-text .profile-name { font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 26px; font-weight: 400; letter-spacing: 0.12em; line-height: 1.4; }
.profile-text .profile-name-en { font-size: 14px; letter-spacing: 0.12em; color: #087a8c; margin-bottom: 8px; }
@media (max-width: 860px) { .portrait { width: 260px; } }
.tool-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.profile-text .profile-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; }
.profile-links a { color: #087a8c; font-size: 14px; letter-spacing: 0.04em; padding: 10px 0; }
.interests { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
