@charset "UTF-8";

:root {
  color-scheme: light;
  font-family: Inter, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-synthesis: none;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

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

button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent, #b24f31);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  background: var(--ink, #222);
  color: var(--surface, #fff);
  transform: translateY(-180%);
}

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

.wordmark {
  display: inline-grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 1px solid currentColor;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-decoration: none;
}

.eyebrow,
.entry-tag {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Shared portfolio foundations */

.portfolio-page {
  --bg: #f2f1ed;
  --surface: #fbfaf7;
  --ink: #232422;
  --accent: #62675f;
  min-width: 20rem;
}

.site-header {
  display: grid;
  position: sticky;
  z-index: 30;
  top: 0;
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.25rem 0;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 21%, transparent);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(0.6rem);
}

.site-header nav {
  display: flex;
  gap: clamp(0.85rem, 2vw, 2rem);
  justify-content: center;
}

.site-header nav a,
.portfolio-link {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header a:hover {
  color: var(--accent);
}

.portfolio-link {
  padding-bottom: 0.15rem;
  border-bottom: 1px solid currentColor;
}

.portfolio-page main {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
}

.portfolio-hero {
  display: grid;
  min-height: min(48rem, calc(100vh - 5.2rem));
  padding: clamp(5rem, 11vw, 10rem) 0 clamp(4rem, 8vw, 7rem);
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
}

.hero-main .eyebrow {
  margin-bottom: 1.8rem;
  color: var(--accent);
}

.hero-main h1 {
  margin: 0;
  font-size: clamp(4rem, 11vw, 9.5rem);
  font-weight: 650;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.hero-main h1 span {
  display: block;
  font-weight: 300;
}

.hero-japanese {
  margin: 1.5rem 0 3rem;
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.25em;
}

.portfolio-hero .hero-japanese {
  font-size: 1rem;
}

.hero-lede {
  max-width: 42rem;
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.7;
}

.entry-links {
  display: flex;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.entry-links a {
  display: inline-flex;
  padding: 0.38rem 0.7rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--ink) 31%, transparent);
  border-radius: 100vmax;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-decoration: none;
}

.entry-links a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
}

.link-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.entry-links a:hover .link-icon {
  filter: grayscale(1) brightness(0) invert(1);
}

.link-arrow {
  font-size: 0.8em;
}

.rail-links {
  display: none;
}

.hero-aside {
  display: block;
  padding-top: 1.1rem;
  align-self: end;
}

.hero-aside p {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-aside span {
  display: block;
  font-size: 0.8rem;
}

.content-section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 23%, transparent);
  scroll-margin-top: 5.5rem;
}

.section-heading {
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  font-weight: 550;
  letter-spacing: -0.055em;
  line-height: 1;
}

.section-heading span {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.86rem;
  opacity: 0.65;
}

.research-entry {
  display: grid;
  padding: 2.3rem 0;
  grid-template-columns: 8rem minmax(0, 1fr);
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.research-entry:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.entry-index {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--accent);
}

.entry-index span {
  font-size: 1.8rem;
}

.entry-index time {
  font-size: 0.72rem;
}

.entry-content {
  max-width: 50rem;
}

.entry-tag {
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.entry-content h3,
.project-entry h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.45rem);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 1.22;
}

.entry-content > p:not(.entry-tag) {
  margin: 1.3rem 0 0;
  font-size: 0.92rem;
}

.publication-entry {
  display: grid;
  padding: 1.7rem 0;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.publication-entry:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.publication-meta {
  display: flex;
  gap: 0.25rem;
  flex-direction: column;
  font-size: 0.69rem;
}

.publication-meta time {
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 750;
}

.publication-meta span {
  opacity: 0.65;
}

.publication-entry h3 {
  max-width: 55rem;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 600;
  line-height: 1.45;
}

.publication-entry p {
  margin: 0.5rem 0 0;
  font-size: 0.77rem;
  opacity: 0.72;
}

.publication-entry .publication-code {
  margin-top: 0.8rem;
  opacity: 1;
}

.publication-entry .publication-authors {
  margin-top: 0.8rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
  opacity: 1;
}

.publication-entry .publication-venue {
  margin-top: 0.2rem;
}

.source-note {
  margin: 1.5rem 0 0;
  font-size: 0.71rem;
}

.project-entry {
  display: grid;
  padding: 3rem 0;
  grid-template-columns: minmax(13rem, 0.75fr) minmax(17rem, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.project-entry:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.project-copy {
  max-width: 43rem;
}

.project-copy > p {
  margin: 0 0 1rem;
  font-size: 0.86rem;
}

.project-copy > .media-frame {
  margin-top: 1.2rem;
}

.references {
  margin-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  font-size: 0.75rem;
}

.references summary {
  padding: 0.8rem 0;
  cursor: pointer;
  font-weight: 700;
}

.references ul {
  margin: 0;
  padding: 0 0 0.8rem 1rem;
}

.project-entry > .media-frame,
.project-entry > .project-media-pair {
  grid-column: 2;
}

.media-frame {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background: color-mix(in srgb, var(--ink) 8%, var(--surface));
}

.media-frame video {
  width: 100%;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-embed iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
  inset: 0;
}

.project-media-pair {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

.project-image {
  width: 100%;
  height: 100%;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  object-fit: cover;
}

.awards-block ul,
.presentations-block ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.awards-block li {
  display: grid;
  padding: 0.9rem 0;
  grid-template-columns: 4rem 1fr;
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  font-size: 0.8rem;
}

.awards-block li:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.awards-block time,
.presentations-block time {
  color: var(--accent);
}

.activity-kind {
  display: inline-block;
  margin-bottom: 0.3rem;
  color: var(--accent);
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.awards-block li p {
  margin: 0;
}

.support-note {
  margin: 1.5rem 0 0;
  font-size: 0.75rem;
}

.support-note span {
  display: block;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.list-note {
  margin: 0 0 1.5rem;
  font-size: 0.69rem;
  opacity: 0.62;
}

.presentations-block li {
  display: grid;
  padding: 0.9rem 0;
  grid-template-columns: 4rem 1fr;
  gap: 0.8rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.presentations-block li:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.presentations-block p {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 750;
}

.presentations-block .presentation-event {
  font-size: 0.96rem;
}

.presentations-block .presentation-title,
.presentations-block .presentation-authors {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
  line-height: 1.55;
}

.presentations-block .presentation-authors {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  opacity: 0.65;
}

.site-footer {
  display: grid;
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  grid-template-columns: auto auto 1fr;
  gap: 2rem;
  align-items: start;
  border-top: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  font-size: 0.67rem;
}

.site-footer > p {
  margin: 0;
}

/* Main portfolio layout */

.layout-timeline .site-header {
  width: auto;
  margin-left: clamp(12rem, 21vw, 19rem);
  padding-right: 1.5rem;
}

.layout-timeline .site-header .wordmark {
  display: none;
}

.layout-timeline .site-header {
  grid-template-columns: 1fr auto;
}

.layout-timeline .site-header nav {
  justify-content: flex-start;
  padding-left: clamp(1.5rem, 5vw, 5rem);
}

.layout-timeline main,
.layout-timeline .site-footer {
  width: auto;
  margin-left: clamp(12rem, 21vw, 19rem);
  padding-right: clamp(1.5rem, 5vw, 5rem);
  padding-left: clamp(1.5rem, 5vw, 5rem);
}

.layout-timeline::before {
  position: fixed;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  width: clamp(12rem, 21vw, 19rem);
  background: var(--ink);
  content: "";
}

.layout-timeline .rail-home {
  display: block;
  position: fixed;
  z-index: 3;
  top: 2rem;
  left: 2rem;
  width: min(12rem, calc(21vw - 4rem));
  color: var(--surface);
  font-size: clamp(0.85rem, 1.6vw, 1.35rem);
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-decoration: none;
}

.layout-timeline .rail-home:hover {
  opacity: 0.75;
}

.layout-timeline .rail-links {
  position: fixed;
  z-index: 3;
  bottom: 2rem;
  left: 2rem;
  display: grid;
  width: min(12rem, calc(21vw - 4rem));
  gap: 0.5rem;
}

.layout-timeline .rail-links a {
  display: flex;
  padding: 0.2rem 0;
  align-items: center;
  gap: 0.5rem;
  color: var(--surface);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  opacity: 0.7;
  text-decoration: none;
}

.layout-timeline .rail-links a:hover {
  opacity: 1;
}

.layout-timeline .rail-links .link-icon {
  filter: grayscale(1) brightness(0) invert(1);
}

.layout-timeline .rail-links .link-arrow {
  margin-left: auto;
}

.layout-timeline .portfolio-hero {
  min-height: auto;
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.layout-timeline .hero-main h1 {
  font-size: clamp(3.5rem, 7vw, 7rem);
}

.layout-timeline .hero-main h1 span {
  display: inline;
}

.layout-timeline .hero-aside {
  max-width: 28rem;
}

.layout-timeline .content-section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.layout-timeline .section-heading {
  margin-bottom: 3.5rem;
}

.layout-timeline .section-heading h2 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.layout-timeline .research-entry {
  grid-template-columns: 6rem minmax(0, 1fr);
}

.layout-timeline .publication-entry {
  grid-template-columns: 7rem minmax(0, 1fr);
}

.layout-timeline .project-entry {
  grid-template-columns: minmax(11rem, 0.65fr) minmax(18rem, 1fr);
}

.layout-timeline .site-footer {
  grid-template-columns: auto auto;
}

/* Personal project card grid */

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

.layout-hybrid .project-entry {
  display: flex;
  min-width: 0;
  padding: clamp(1.4rem, 3vw, 2rem);
  flex-direction: column;
  gap: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  background: var(--surface);
}

.layout-hybrid .project-entry:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
}

.layout-hybrid .project-heading {
  min-height: 7rem;
}

.layout-hybrid .project-copy {
  flex: 0 0 auto;
}

.layout-hybrid .project-entry > .media-frame,
.layout-hybrid .project-entry > .project-media-pair {
  grid-column: auto;
}

.layout-hybrid .project-media-pair {
  grid-template-columns: 1fr;
}

.layout-hybrid .project-image {
  max-height: 17rem;
}

/* Curriculum vitae */

.cv-page .site-header nav a[aria-current="page"] {
  color: var(--accent);
}

.cv-hero {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.cv-hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 7vw, 7rem);
  font-weight: 550;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.cv-hero .hero-japanese {
  margin-bottom: 2rem;
}

.cv-lede {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.7;
}

.cv-hero .entry-links {
  margin-top: 1.5rem;
}

.cv-section {
  display: grid;
  padding: clamp(3rem, 6vw, 5rem) 0;
  grid-template-columns: minmax(10rem, 0.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  border-top: 1px solid color-mix(in srgb, var(--ink) 23%, transparent);
}

.cv-section > h2 {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cv-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-entry {
  display: grid;
  padding: 1rem 0;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.cv-entry:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.cv-entry time {
  color: var(--accent);
  font-size: 0.86rem;
}

.cv-entry p,
.cv-entry h3 {
  margin: 0;
}

.cv-entry h3 {
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.5;
}

.cv-entry p {
  margin-top: 0.25rem;
  font-size: 0.82rem;
}

.cv-entry .cv-meta {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-entry .cv-authors {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.cv-entry .cv-venue {
  opacity: 0.68;
}

.cv-interests {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
}

.cv-interests li {
  padding: 0.9rem 1rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  font-size: 0.86rem;
}

.cv-interests li:nth-last-child(-n + 2) {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.cv-interests li:nth-child(odd) {
  border-right: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

@media (max-width: 860px) {
  .portfolio-hero {
    grid-template-columns: 1fr;
  }

  .portfolio-hero {
    min-height: auto;
  }

  .hero-aside {
    max-width: 30rem;
  }

  .project-entry {
    grid-template-columns: 1fr;
  }

  .project-entry > .media-frame,
  .project-entry > .project-media-pair {
    grid-column: 1;
  }

  .layout-hybrid .project-list {
    grid-template-columns: 1fr;
  }

  .layout-timeline .site-header,
  .layout-timeline main,
  .layout-timeline .site-footer {
    width: min(100% - 3rem, 1180px);
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
  }

  .layout-timeline::before,
  .layout-timeline .rail-home,
  .layout-timeline .rail-links {
    display: none;
  }

  .layout-timeline .site-header .wordmark {
    display: inline-grid;
  }

  .layout-timeline .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .layout-timeline .site-header nav {
    justify-content: center;
    padding-left: 0;
  }

  .cv-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 620px) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  .portfolio-page main,
  .site-footer,
  .layout-timeline .site-header,
  .layout-timeline main,
  .layout-timeline .site-footer {
    width: min(100% - 2rem, 1180px);
  }

  .site-header {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }

  .site-header nav {
    display: none;
  }

  .portfolio-page .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .portfolio-page .site-header nav {
    display: flex;
    justify-content: center;
  }

  .portfolio-page .site-header nav a {
    display: none;
  }

  .portfolio-page .site-header nav a[href="#"],
  .portfolio-page .site-header nav a[href$="index.html"],
  .portfolio-page .site-header nav a[href$="cv.html"] {
    display: inline;
  }

  .portfolio-link {
    justify-self: end;
  }

  .portfolio-hero {
    padding-top: 4rem;
  }

  .hero-main h1,
  .layout-timeline .hero-main h1 {
    font-size: clamp(3.4rem, 20vw, 5.8rem);
  }

  .research-entry,
  .publication-entry,
  .layout-timeline .research-entry,
  .layout-timeline .publication-entry {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .entry-index {
    flex-direction: row;
  }

  .entry-index span {
    font-size: 1rem;
  }

  .publication-meta {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .cv-entry {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .cv-interests {
    grid-template-columns: 1fr;
  }

  .cv-interests li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .cv-interests li:last-child {
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  }

  .cv-interests li:nth-child(odd) {
    border-right: 0;
  }

  .project-entry {
    padding: 2.2rem 0;
  }

  .project-media-pair {
    grid-template-columns: 1fr;
  }

  .site-footer,
  .layout-timeline .site-footer {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .cv-page .site-header,
  .cv-page::before,
  .cv-page .rail-home,
  .cv-page .rail-links {
    display: none;
  }

  .cv-page main,
  .cv-page .site-footer {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .cv-hero {
    padding: 0 0 2rem;
  }

  .cv-section {
    padding: 2rem 0;
    break-inside: avoid;
  }
}
