/* =========================================================
   Tatsuya Sugiyama — personal site
   Compact, document-style, fact-based. Deep indigo accent.
   Consistent rhythm: title + meta + date + description.
   ========================================================= */

:root {
  --bg: #ffffff;
  --text: #1d1d1f;
  --text-2: #74747a;     /* meta: org, dates */
  --text-body: #43434a;  /* descriptions */
  --accent: #1d1d1f;     /* monochrome — headings */
  --accent-deep: #000000;
  --link: #0066cc;       /* Apple-style hyperlink blue */
  --link-hover: #0051a8;
  --border: rgba(0, 0, 0, 0.10);
  --maxw: 740px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }

/* ---------- Layout ---------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* ---------- Header ---------- */
.masthead { padding: 48px 0 4px; }
.masthead__name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.masthead__role {
  margin-top: 0.35rem;
  color: var(--text-2);
  font-size: 0.95rem;
}
.masthead__contact {
  margin-top: 0.55rem;
  line-height: 0;
  display: flex;
  gap: 20px;
}
.social {
  display: inline-flex;
  color: var(--accent);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.social svg { width: 19px; height: 19px; }
.social:hover { color: var(--accent-deep); transform: translateY(-1px); }

/* ---------- Sections ---------- */
.section { margin-top: 1.9rem; }
.section__label {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  padding-bottom: 0.35rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

/* ---------- Entry (unified rhythm) ---------- */
.entry { margin-bottom: 0.95rem; }
.entry:last-child { margin-bottom: 0; }
.entry__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.entry__title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.entry__date {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-2);
  white-space: nowrap;
}
.entry__org {
  margin-top: 0.05rem;
  font-size: 0.88rem;
  color: var(--text-2);
}
.entry__desc {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.5;
}

/* ---------- Inline lists (interests, skills) ---------- */
.inline-list {
  font-size: 0.95rem;
  color: var(--text-body);
}

/* ---------- Key/value rows (skills) ---------- */
.kv {
  display: flex;
  gap: 0.75rem;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}
.kv:last-child { margin-bottom: 0; }
.kv__k {
  flex: 0 0 96px;
  color: var(--text-2);
}
.kv__v { color: var(--text-body); }

/* ---------- Publications ---------- */
.pub { margin-bottom: 0.95rem; }
.pub:last-child { margin-bottom: 0; }
.pub__type {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.pub__cite {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-body);
}
.pub__cite a {
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pub__cite a:hover { color: var(--link-hover); }

/* ---------- Inline link ---------- */
.lnk {
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.lnk:hover { color: var(--link-hover); }

/* ---------- Photo strips ----------
   Four film-strips; each track holds its photos twice, and script.js
   slides them by up to one copy-width, so the loop is seamless. The
   strips drift left-to-right on their own and can be scrubbed with a
   horizontal trackpad scroll or a touch swipe (touch-action keeps
   vertical page scrolling native). */
.mosaic {
  --strip-h: 106px;
  margin-top: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-radius: 18px;
  overflow: hidden;
  touch-action: pan-y;
}
.mosaic__row {
  height: var(--strip-h);
  overflow: hidden;
}
.mosaic__track {
  display: flex;
  width: max-content;
  height: 100%;
  will-change: transform;
}
.mosaic__track img {
  display: block;
  height: 100%;
  width: auto;
  margin-right: 3px;
}

@media (max-width: 560px) {
  .mosaic { --strip-h: 76px; }
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 2.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.82rem;
}

/* ---------- Reveal (disabled — content always visible) ---------- */
[data-reveal] { opacity: 1; transform: none; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .entry__head { flex-direction: column; gap: 0.05rem; }
  .entry__date { order: -1; font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
