/* gureya.github.io: one hand-written stylesheet, no build step, no web fonts. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #59616d;
  --faint: #7d8590;
  --rule: #e4e1da;
  --accent: #1d5bb8;
  --accent-soft: #e9f0fb;
  --chip: #f0eee8;
  --measure: 52rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --surface: #161a1f;
    --text: #e6e8eb;
    --muted: #a5adb8;
    --faint: #7f8893;
    --rule: #262c33;
    --accent: #82b4ff;
    --accent-soft: #1a2a40;
    --chip: #1d2228;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.25rem;
}

.nav-name {
  font-weight: 650;
  color: var(--text);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  font-size: 0.92rem;
}

.nav ul a {
  color: var(--muted);
}

.nav ul a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Layout */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

section {
  padding: 2rem 0 0.75rem;
  border-top: 1px solid var(--rule);
}

h2 {
  margin: 0 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.4;
}

p {
  margin: 0 0 1rem;
}

.prose {
  max-width: 68ch;
}

/* Header */

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.75rem;
  padding: 3rem 0 2.25rem;
}

.hero img {
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.role {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
}

.role .sep {
  color: var(--faint);
  padding: 0 0.35em;
}

.org,
.place {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.place {
  margin-top: 0;
  font-size: 0.92rem;
}

.tagline {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.links {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.links a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
}

.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Interests */

.chips {
  list-style: none;
  margin: 0.25rem 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chips li {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.88rem;
}

/* Experience and education */

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 1rem;
  margin-bottom: 1.6rem;
}

.meta {
  color: var(--faint);
  font-size: 0.9rem;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.entry .sub {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.entry ul,
.entry .note {
  grid-column: 1 / -1;
}

.entry ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
}

.entry li {
  margin: 0.2rem 0;
}

.entry .note {
  margin: 0.35rem 0 0;
}

.entry .entry-label {
  grid-column: 1 / -1;
  margin: 1rem 0 0.1rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--muted);
}

.entry .projects {
  list-style: none;
  padding-left: 0;
}

.entry .projects li {
  margin: 0 0 0.7rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--rule);
}

.project-title {
  display: block;
  font-weight: 600;
}

.project-desc {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.5rem;
  margin: 0 0 1.25rem;
}

.contact dt {
  color: var(--muted);
}

.contact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.subhead {
  margin: 2rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--muted);
}

.compact {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.compact li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--rule);
}

.compact li:last-child {
  border-bottom: 0;
}

.compact .what {
  font-weight: 600;
}

.compact .where {
  color: var(--muted);
}

.compact .note {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Publications */

.year {
  margin: 1.5rem 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.year:first-of-type {
  margin-top: 0;
}

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

.pub {
  margin: 0 0 1.25rem;
}

.pub-title {
  display: block;
  font-weight: 620;
  line-height: 1.45;
}

.pub-authors,
.pub-venue {
  display: block;
  font-size: 0.94rem;
  color: var(--muted);
}

.pub-authors .me {
  color: var(--text);
  font-weight: 600;
}

.pub-venue {
  font-style: italic;
}

.pub-venue .tag {
  font-style: normal;
  font-size: 0.8rem;
  padding: 0.05rem 0.45rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.pub-links a {
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.pub-links a:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

/* Footer */

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.85rem;
}

/* Error page */

.error {
  padding: 5rem 0 3rem;
  text-align: center;
}

.error h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

/* Small screens */

@media (max-width: 640px) {
  /* The nav wraps to several lines here, so a sticky bar would cover headings. */
  html {
    scroll-padding-top: 1rem;
  }

  .nav {
    position: static;
  }

  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding-top: 2rem;
  }

  .hero img {
    width: 7.5rem;
    height: 7.5rem;
  }

  .links {
    justify-content: center;
  }

  .entry,
  .compact li {
    grid-template-columns: 1fr;
  }

  .meta {
    text-align: left;
  }

  .contact {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact dd {
    margin-bottom: 0.6rem;
  }
}

@media print {
  .nav,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    break-inside: avoid-page;
  }
}
