:root {
  --bg: #f3f6f8;
  --text: #111827;
  --muted: #666666;
  --rule: #e7e7e7;
  --link: #1f4fa3;
  --max: 760px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.25rem;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0 0.9rem;
}

.brand {
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
}

.nav-links a.active,
.nav-links a:hover,
a:hover {
  color: var(--link);
}

.hero {
  margin-bottom: 2.5rem;
}

.hero-with-photo {
  display: block;
}

.hero-text {
  display: block;
  min-width: 0;
}

.hero-with-photo .muted {
  font-size: 0.92rem;
  margin-top: -0.15rem;
  margin-bottom: 0.45rem;
}

.hero-photo {
  float: right;
  width: 230px;
  margin: 0.15rem 0 1rem 1.75rem;
  display: flex;
  justify-content: center;
}

.photo-slot {
  width: 230px;
  aspect-ratio: 3 / 4;
  border: 2px solid #141414;
  outline: 1px solid #2a2a2a;
  outline-offset: 6px;
  background: #f4efe3;
  padding: 8px;
  box-shadow: 0 2px 0 #d7cfbf, 0 8px 18px rgba(35, 29, 20, 0.14);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

h1, h2, h3 {
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 0.8rem 0;
}

h1 { font-size: 2rem; }

h2 {
  font-size: 1.15rem;
  margin-top: 2.4rem;
  padding-top: 0.1rem;
}

p {
  margin: 0 0 1rem 0;
}

.subtitle {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

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

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

a:hover {
  text-decoration: underline;
}

.links-line {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.entry-list {
  display: grid;
  gap: 1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.95rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 1.15rem 1.15rem 1rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0) 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(242, 245, 248, 0.98));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(135deg, rgba(17, 24, 39, 0.028), rgba(17, 24, 39, 0.028) 1px, transparent 1px, transparent 16px);
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.13);
  border-color: rgba(31, 79, 163, 0.25);
}

.project-card-meta {
  background:
    radial-gradient(circle at 88% 14%, rgba(61, 102, 255, 0.18), rgba(61, 102, 255, 0) 30%),
    linear-gradient(150deg, #f8fbff 0%, #eef4ff 48%, #f7f8fc 100%);
}

.project-card-sana {
  background:
    radial-gradient(circle at 90% 10%, rgba(118, 188, 67, 0.2), rgba(118, 188, 67, 0) 28%),
    linear-gradient(150deg, #fbfdf7 0%, #eef6e8 45%, #f7f8f3 100%);
}

.project-kicker,
.project-title,
.project-copy,
.project-tags,
.project-links {
  position: relative;
  z-index: 1;
}

.project-kicker {
  margin: 0 0 0.45rem;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #334155;
}

.project-title {
  margin: 0 0 0.55rem;
  font-size: 1.24rem;
  line-height: 1.2;
}

.project-copy {
  margin: 0 0 1rem;
  color: #273244;
  line-height: 1.55;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.2rem 0.62rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}

.project-links {
  margin: auto 0 0;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0;
  font-size: 0.96rem;
  color: #0f2d63;
}

.project-links a::after {
  content: "->";
  font-size: 0.95em;
}

.entry {
  padding: 0 0 0.95rem 0;
  border-bottom: 1px solid var(--rule);
}

.entry:last-child {
  border-bottom: none;
}

.compact .entry {
  padding-bottom: 0.6rem;
}

.publications-page h1 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  font-weight: 700;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #9ca3af;
  margin-bottom: 1.2rem;
}

.projects-page h1 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  font-weight: 700;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #9ca3af;
  margin-bottom: 1.2rem;
}

.publications-page h2 {
  margin-top: 1.7rem;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.publication-list {
  gap: 0;
}

.publication-list .entry {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: center;
  padding: 1.05rem 0;
}

.entry-venue {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f2937;
  line-height: 1.4;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.entry-main {
  min-width: 0;
}

.entry-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  font-weight: 300;
}

.entry-authors,
.entry-links,
.entry-meta {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.entry-authors {
  color: #374151;
}

.entry-meta {
  color: var(--muted);
  font-size: 0.87rem;
}

.entry-links {
  font-size: 0.95rem;
  color: var(--muted);
}

.entry-links a {
  margin-right: 0.45rem;
  color: #374151;
}

.entry-links a::before {
  content: "[";
}

.entry-links a::after {
  content: "]";
}

.page-content {
  padding-bottom: 2rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
  padding: 1rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

code {
  background: #f6f6f6;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  font-size: 0.9em;
}

@media (max-width: 700px) {
  html { font-size: 17px; }

  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .hero-photo {
    float: none;
    margin: 0.55rem 0 1rem;
    justify-content: flex-start;
  }

  .links-line {
    clear: none;
  }

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

  .project-card {
    min-height: 0;
  }

  .publication-list .entry {
    grid-template-columns: 1fr;
    row-gap: 0.35rem;
  }

  .entry-venue {
    padding-top: 0;
    font-size: 0.72rem;
  }
}
