@charset "UTF-8";
/*!
 * Michitoshi Tsubaki - personal site
 * Cool / editorial layout: full-bleed photographic hero, white nav boxes,
 * ultralight neo-grotesque display type, monochrome palette.
 */

:root {
  --ink: #0d0d0f;
  --ink-soft: #4a4d52;
  --muted: #7c8087;
  --line: #e4e4e6;
  --line-strong: #c9cace;
  --paper: #ffffff;
  --paper-soft: #f4f4f3;
  --mark: #0d0d0f;

  --shell: min(1320px, calc(100% - 3rem));
  --gutter: 1.5rem;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --jp: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:lang(ja) {
  font-family: var(--jp);
  line-height: 1.85;
}

/* Japanese has no spaces, so let the browser break on phrase boundaries. */
:lang(ja) p,
:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3,
:lang(ja) li {
  word-break: auto-phrase;
  text-wrap: pretty;
}

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

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

p {
  margin: 0;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 1.25rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-header.is-scrolled::before {
  opacity: 1;
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

/* Name plate: two stacked lines in a solid box, with a target mark. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  background: var(--paper);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brand-name {
  display: block;
  max-width: 7.5em;
}

.mark {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid var(--mark);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--mark) 0 42%, transparent 43%) center / 100% 100% no-repeat;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.375rem;
}

.site-nav a {
  padding: 0.5rem 0.85rem;
  background: var(--paper);
  font-size: 0.875rem;
  font-weight: 400;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background: var(--ink);
  color: var(--paper);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.site-nav .nav-lang {
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* Over white page content the boxes would vanish, so drop them. */
.site-header.is-scrolled .brand,
.site-header.is-scrolled .site-nav a {
  background: transparent;
}

.site-header.is-scrolled .site-nav a:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.42) 0%, rgba(10, 12, 16, 0.18) 45%, rgba(10, 12, 16, 0.5) 100%);
}

.hero-inner {
  width: var(--shell);
  text-align: center;
  color: #fff;
}

.hero h1 {
  font-size: clamp(2.6rem, 8.5vw, 7.5rem);
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.hero:lang(ja) h1 {
  font-size: clamp(2.1rem, 6.5vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-tagline {
  margin-top: 1.75rem;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
}

.hero-affiliation {
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero:lang(ja) .hero-affiliation {
  letter-spacing: 0.1em;
  text-transform: none;
}

/* Wide flat bar with a trailing target mark. */
.bar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(520px, 100%);
  margin: 2rem auto 0;
  padding: 0.85rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.bar-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.bar-link:hover .mark {
  --mark: var(--paper);
}

.hero-scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

/* --------------------------------------------------------------- section */

.section {
  padding: 6rem 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 200;
}

.section-index {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-lead {
  max-width: 46ch;
  color: var(--ink-soft);
}

/* Left label / right content rows, used by about, education, certificates. */
.rows {
  display: grid;
  gap: 0;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 0.5rem 3rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 1px solid var(--line);
}

.row-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.row-body {
  color: var(--ink-soft);
}

.row-body strong {
  display: block;
  font-weight: 500;
  color: var(--ink);
}

.row-body a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line-strong);
}

.row-body a:hover {
  text-decoration-color: currentColor;
}

/* ------------------------------------------------------------- about/bio */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.portrait {
  border: 1px solid var(--line);
}

.portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about-text p + p {
  margin-top: 1.25rem;
}

.about-text .lede {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.inline-links a {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.inline-links a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* --------------------------------------------------------- publications */

.pub-group {
  padding-top: 2.5rem;
}

.pub-group + .pub-group {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.pub-group-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.pub-group-head h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.pub-index {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pub-list {
  display: grid;
}

.pub-item {
  display: grid;
  grid-template-columns: minmax(0, 6rem) minmax(0, 1fr);
  gap: 0.5rem 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.pub-item:last-child {
  border-bottom: 1px solid var(--line);
}

.pub-year {
  margin-top: 0.3rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pub-title {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.pub-authors {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Own name, so a reader can find it in a long author list. */
.pub-me {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.pub-venue {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.pub-note {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.45rem;
  border: 1px solid var(--line-strong);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.pub-links {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.pub-links a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  color: var(--ink);
}

.pub-empty {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* -------------------------------------------------------------- projects */

.project-list {
  display: grid;
  gap: 0;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem 3.5rem;
  align-items: start;
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.project-media {
  display: grid;
  gap: 0.75rem;
}

.project-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-soft);
}

.project h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 300;
}

.project p {
  margin-top: 1rem;
  color: var(--ink-soft);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.project-links a {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong);
  font-size: 0.8125rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.project-links a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------------------------------------------------------------- awards */

.award-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.award-list li,
.plain-list li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.award-list li:last-child,
.plain-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.award-list a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line-strong);
  color: var(--ink);
}

.award-list a:hover {
  text-decoration-color: currentColor;
}

.skill-icons {
  margin-top: 0.5rem;
}

.github-status {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding: 4.5rem 0 3rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.5rem;
}

.site-footer h2 {
  margin-bottom: 0.6rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer:lang(ja) h2 {
  letter-spacing: 0.12em;
  text-transform: none;
}

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.site-footer a:hover {
  text-decoration-color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ------------------------------------------------- language landing page */

.lang-landing {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2rem;
  padding: 3rem 0;
  position: relative;
  isolation: isolate;
  color: #fff;
  text-align: center;
}

.lang-landing h1 {
  font-size: clamp(2.25rem, 7vw, 5rem);
  font-weight: 200;
  letter-spacing: -0.04em;
}

.lang-choice {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.lang-choice a {
  min-width: 11rem;
  padding: 0.85rem 1.5rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-choice a:hover {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1px #fff;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  :root {
    --shell: calc(100% - 2.5rem);
  }

  .section {
    padding: 4rem 0;
  }

  .section-head,
  .row,
  .about-grid,
  .project {
    grid-template-columns: 1fr;
  }

  .section-head {
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .about-grid {
    gap: 2rem;
  }

  .portrait {
    max-width: 16rem;
  }

  .project {
    padding: 2.5rem 0;
  }
}

@media (max-width: 620px) {
  :root {
    --shell: calc(100% - 2rem);
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .brand {
    align-self: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a {
    padding: 0.4rem 0.6rem;
    font-size: 0.8125rem;
  }

  .hero {
    padding-top: 10rem;
  }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  /* One column: the number and the year read better side by side. */
  .pub-meta {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
  }

  .pub-year {
    margin-top: 0;
  }

  .footer-bottom {
    margin-top: 2.5rem;
  }
}

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

  * {
    transition-duration: 0.01ms !important;
  }
}
