/* fuyuki-tokuda.github.io */

:root {
  --navy: #13304d;
  --navy-dark: #0c2136;
  --accent: #c8862c;
  --text: #1f2933;
  --muted: #5f6b77;
  --line: #dfe4e9;
  --bg-soft: #f4f6f8;
  --link: #1c5a9a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 15.5px;
  line-height: 1.85;
}
html[lang="en"] body { line-height: 1.7; }

a { color: var(--link); }
a:hover { color: #b0381e; }
img { max-width: 100%; height: auto; display: block; }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #3f86c9;
  outline-offset: 3px;
  border-radius: 2px;
}
.site-header a:focus-visible, .site-footer a:focus-visible, .hero a:focus-visible { outline-color: var(--accent); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.45; font-weight: 700; }
h2 {
  font-size: 1.3rem;
  margin: 2.4em 0 1em;
  padding-bottom: .45em;
  border-bottom: 1px solid var(--line);
  position: relative;
}
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 56px;
  height: 3px;
  background: var(--navy);
}
h3 { font-size: 1.05rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: .88rem; }

/* ---------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgba(10, 29, 49, .95);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 2px solid rgba(200, 134, 44, .85);
  transition: background-color .3s ease, border-color .3s ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--navy); }
}
/* home: the header floats over the photo, and turns frosted once the photo has scrolled away */
.site-header--home { position: fixed; left: 0; right: 0; }
.site-header--home.over-hero {
  background: linear-gradient(180deg, rgba(8, 20, 34, .5) 0%, rgba(8, 20, 34, .18) 100%);
  border-bottom-color: rgba(255, 255, 255, .16);
}
:target { scroll-margin-top: 96px; }
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding-top: 16px;
  padding-bottom: 14px;
}
.brand { color: #fff; text-decoration: none; display: block; }
.brand:hover { color: #fff; }
.brand-name {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
}
.brand-name small {
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .06em;
  margin-left: .8em;
  opacity: .75;
}
.brand-affil { display: block; font-size: .78rem; opacity: .8; letter-spacing: .02em; }

.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .93rem; }
.site-header nav a {
  color: #fff;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 3px;
}
.site-header nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.site-header nav a.current { background: rgba(255,255,255,.16); font-weight: 500; }
.site-header nav a.lang {
  margin-left: 10px;
  border: 1px solid rgba(255,255,255,.5);
  font-size: .85rem;
  padding: 3px 12px;
}

/* ---------- home hero */
.hero {
  position: relative;
  background: var(--navy-dark);
  color: #fff;
  overflow: hidden;
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(10,24,40,.88) 0%, rgba(10,24,40,.62) 45%, rgba(10,24,40,.1) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  min-height: calc(400px + var(--header-h, 84px));
  padding-top: calc(48px + var(--header-h, 84px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 48px;
}
.hero-text { max-width: 640px; }
.hero-text p { max-width: 520px; }
.hero h1 {
  font-size: 2rem;
  margin: 0 0 .5em;
  letter-spacing: .04em;
  padding-left: 16px;
  border-left: 4px solid var(--accent);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.hero p { font-size: 1rem; margin: 0; opacity: .92; }

/* ---------- home body */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 48px;
  padding-bottom: 20px;
}
.home-main h2:first-child, .home-main section:first-child h2 { margin-top: 1.6em; }
.home-side { padding-top: 40px; }

.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topics a {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 12px;
  background: var(--bg-soft);
  border-left: 3px solid var(--navy);
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}
.topics a:hover { background: #e8edf2; color: var(--text); }
.topic-title { font-weight: 500; line-height: 1.6; }
.topic-img { flex: 0 0 112px; }
.topic-img img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.topic-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.more { text-align: right; margin-top: .8em; font-size: .92rem; }

.tag {
  display: inline-block;
  align-self: flex-start;
  font-size: .75rem;
  font-weight: 500;
  color: var(--navy);
  background: #fff;
  border: 1px solid #b9c7d5;
  padding: 0 8px;
  border-radius: 2px;
  letter-spacing: .03em;
}

.news { list-style: none; margin: 0; padding: 0; }
.news li {
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: 0 1em;
  padding: .7em 0;
  border-bottom: 1px dashed var(--line);
}
.news time { color: var(--navy); font-weight: 500; font-variant-numeric: tabular-nums; }
.news p { margin: 0; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card h3 { margin: 0 0 .6em; font-size: .98rem; color: var(--navy); }
.card p:last-child { margin-bottom: 0; }

.profile-card { text-align: center; border-top: 3px solid var(--navy); }
.profile-card img { width: 140px; margin: 4px auto 12px; border: 1px solid var(--line); }
.profile-card p { margin: 0; }
.pc-name { font-size: 1.15rem; font-weight: 700; }
.pc-pos { color: var(--navy); font-weight: 500; }
.pc-affil { font-size: .82rem; color: var(--muted); line-height: 1.6; margin: .4em 0 .1em !important; }
.pc-lab { font-size: .9rem; font-weight: 500; margin: 0 !important; }
.pc-affil--sub { margin: .3em 0 .6em !important; }
.pc-mail { font-size: .85rem; word-break: break-all; }

.side-links { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.side-links li { padding: .3em 0; border-bottom: 1px solid var(--bg-soft); }
.side-links li:last-child { border: 0; }
.side-links a::before { content: "›"; margin-right: .5em; color: var(--accent); font-weight: 700; }

/* ---------- subpage title band */
.page-title {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 22px 0 26px;
}
.page-title h1 { font-size: 1.65rem; margin: 0; }
.crumbs { font-size: .8rem; color: var(--muted); margin: 0 0 .3em; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.content { padding-top: 28px; }
.content > *:not(.project-grid):not(.two-col) { max-width: 860px; }
.content > h2:first-child { margin-top: 1em; }
.lead { font-size: 1rem; }

/* ---------- research */
.project-card h3 a { color: var(--text); text-decoration: none; }
.project-card h3 a:hover { color: var(--link); text-decoration: underline; }

.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.project-card { margin: 0; display: flex; flex-direction: column; }
.project-grid { grid-template-columns: 1fr; }
.project-grid { gap: 12px; }
.project-card.has-img { flex-direction: row; align-items: flex-start; gap: 22px; padding: 16px; }
.card-img { display: block; flex: 0 0 216px; }
.card-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: var(--bg-soft); border: 1px solid var(--line); }
.project-card.has-img h3 { margin-top: .45em; }
.project-card.has-img p:not(.cite):not(.card-links) { margin-bottom: .5em; }
.project-card.has-img .card-links { margin: 0; }
.card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.project-card h3 { margin: .6em 0 .2em; font-size: 1.05rem; color: var(--text); }
.cite { font-size: .82rem; color: var(--muted); line-height: 1.55; margin-bottom: .7em; }
.project-card p { font-size: .93rem; }
.card-links { margin-top: auto; font-size: .88rem; }
.card-links a { margin-right: 1em; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-col .card { margin: 0; border-top: 3px solid var(--navy); }

/* ---------- detail pages */
figure { margin: 1.5em 0; }
figure img { border: 1px solid var(--line); }
figcaption { font-size: .85rem; color: var(--muted); margin-top: .4em; }

.paper {
  font-size: .93rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--navy);
  padding: 12px 16px;
  margin: 0 0 1.6em;
}
.paper p { margin: 0; }
.links { font-size: .92rem; }

.video { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #111; display: block; }

/* ---------- publications, CV */
ol.pubs { list-style: none; padding: 0; margin: 0; }
ol.pubs li {
  display: grid;
  grid-template-columns: 3.4em 1fr;
  padding: .5em 0;
  border-bottom: 1px solid var(--bg-soft);
}
ol.pubs .num { color: var(--navy); font-size: .88rem; font-weight: 500; padding-top: .1em; }
ol.pubs .award { color: #9a5a12; font-weight: 500; }

dl.list { margin: 0; }
dl.list div {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 0 1em;
  padding: .55em 0;
  border-bottom: 1px solid var(--bg-soft);
}
dl.list dt { color: var(--navy); font-weight: 500; font-variant-numeric: tabular-nums; }
dl.list dd { margin: 0; }
dl.list dd .muted { display: block; font-size: .88rem; }

ul.plain { padding-left: 1.2em; }
ul.plain li { margin-bottom: .5em; }

/* ---------- footer */
.site-footer {
  margin-top: 64px;
  background: var(--navy-dark);
  color: rgba(255,255,255,.82);
  font-size: .85rem;
  padding-top: 26px;
}
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.foot-name { font-size: 1rem; font-weight: 700; color: #fff; }
.foot-links { text-align: right; line-height: 1.9; }
.foot-bottom {
  margin-top: 20px;
  padding-top: 12px !important;
  padding-bottom: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .78rem;
  color: rgba(255,255,255,.55);
}

/* ---------- responsive */
@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; gap: 0; }
  .home-side { padding-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .home-side .profile-card { grid-row: span 2; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .site-header .container { padding-top: 12px; padding-bottom: 10px; }
  .brand-name { font-size: 1.15rem; }
  .site-header nav { margin-left: -12px; }
  .site-header nav a { padding: 4px 10px; }
  .site-header { position: relative; }
  .site-header--home { position: absolute; }
  .hero-inner { min-height: calc(300px + var(--header-h, 118px)); padding-top: calc(28px + var(--header-h, 118px)); padding-bottom: 40px; }
  .hero h1 { font-size: 1.45rem; }
  .hero::before { background: linear-gradient(180deg, rgba(10,24,40,.55) 0%, rgba(10,24,40,.85) 100%); }
  .topics, .project-grid, .two-col { grid-template-columns: 1fr; }
  .project-card.has-img { flex-direction: column; gap: 12px; }
  .card-img { flex: none; width: 100%; }
  .home-side { grid-template-columns: 1fr; }
  .news li, dl.list div { grid-template-columns: 1fr; }
  .foot-links { text-align: left; }
}

@media print {
  .site-header nav, .site-footer, .hero { display: none; }
  .site-header { background: none; color: #000; border: 0; }
  a { color: inherit; text-decoration: none; }
}
