/* Ke Shi — minimal academic website
   Warm paper, dark green shadow, banana/pink accent.
   Artsy, readable, job-market safe. */

:root {
  --paper: #f5efdf;
  --ink: #11100d;
  --muted: #6d6458;
  --green: #063e24;
  --green-soft: rgba(6, 62, 36, 0.12);
  --banana: #f1c400;
  --pink: #ee4c8c;
  --orange: #0b4b2b;  /* deep green, calmer */;

  --display: "Archivo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 7%, rgba(6, 62, 36, 0.16), transparent 23rem),
    radial-gradient(circle at 98% 38%, rgba(238, 76, 140, 0.08), transparent 20rem),
    linear-gradient(90deg, rgba(17, 16, 13, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 116px 116px, auto;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.56;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--banana);
  color: var(--ink);
}

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

a:hover {
  color: var(--orange);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 239, 223, 0.9);
  backdrop-filter: blur(14px);
}

.nav {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand,
.nav-links a,
.eyebrow,
.paper-meta,
.button,
.footer,
.elsewhere-list,
.text-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.brand {
  font-weight: 600;
  text-decoration: none;
}

.brand::before {
  content: "●";
  color: var(--green);
  margin-right: 0.7rem;
}

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

.nav-links a {
  text-decoration: none;
}

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 5.9rem 1.4rem;
}

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  align-items: center;
  gap: 4rem;
  padding-top: 4rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--orange);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 0 0 1.3rem;
  font-family: var(--display);
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 0.82;
  letter-spacing: -0.105em;
  font-weight: 800;
  white-space: nowrap;
}

h1::after {
  content: "";
  display: block;
  width: min(31vw, 310px);
  height: 0.095em;
  margin-top: 0.15em;
  background: linear-gradient(90deg, var(--green) 0 48%, var(--banana) 48% 78%, var(--pink) 78% 100%);
}

.subtitle {
  margin-bottom: 1.5rem;
  max-width: 650px;
  color: var(--ink);
  font-size: clamp(1.18rem, 1.85vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.intro {
  max-width: 700px;
  margin-bottom: 2rem;
  color: var(--ink);
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
  line-height: 1.52;
  font-weight: 600;
}

.button-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.48rem 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
}

.button:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 0;
  padding-inline: 0.95rem;
}

.button.primary:hover {
  background: var(--green);
  color: var(--paper);
}

.profile-card {
  max-width: 310px;
  justify-self: end;
}

.portrait-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 34%;
  display: block;
  margin-bottom: 1.25rem;
  filter: saturate(0.96) contrast(1.03);
}

.profile-card dl {
  margin: 0;
  display: grid;
  gap: 0.82rem;
}

.profile-card div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 0.85rem;
}

.profile-card dt {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.profile-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 600;
}

.section-heading {
  margin-bottom: 2.2rem;
}

.section-heading h2 {
  margin: 0;
  max-width: 860px;
  font-family: var(--display);
  font-size: clamp(2.5rem, 5.8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
  font-weight: 800;
  text-transform: uppercase;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 5.8rem;
  height: 0.12em;
  margin-top: 0.18em;
  background: linear-gradient(90deg, var(--green) 0 55%, var(--banana) 55% 82%, var(--pink) 82% 100%);
}

.paper,
.simple-list article {
  padding: 1.55rem 0;
  border-top: 1px solid rgba(17, 16, 13, 0.20);
}

.paper:last-child,
.simple-list article:last-child {
  border-bottom: 1px solid rgba(17, 16, 13, 0.20);
}

.paper.featured {
  padding-top: 0;
  border-top: 0;
}

.paper-meta {
  margin-bottom: 0.8rem;
  color: var(--orange);
}

.paper h3,
.simple-list h3 {
  max-width: 900px;
  margin-bottom: 0.62rem;
  font-size: clamp(1.32rem, 2.45vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.052em;
  font-weight: 800;
}

.paper p,
.simple-list p,
.section-intro {
  max-width: 800px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.15vw, 1.04rem);
  font-weight: 600;
}

.text-link {
  display: inline-block;
  margin-top: 0.25rem;
}

.work-list {
  margin-top: 1rem;
}

.simple-list h3,
.simple-list p {
  margin-bottom: 0;
}

.elsewhere-list {
  display: flex;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
  color: var(--ink);
}

.elsewhere-list span::before {
  content: "●";
  color: var(--green);
  margin-right: 0.5rem;
}

.elsewhere-list span:nth-child(2)::before {
  color: var(--banana);
}

.elsewhere-list span:nth-child(3)::before {
  color: var(--pink);
}

.elsewhere-list span:nth-child(4)::before {
  color: var(--orange);
}

.contact-section > p {
  margin-bottom: 0.45rem;
  font-size: clamp(1.25rem, 2.8vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2rem 1.4rem 3rem;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 3rem;
  }

  .profile-card {
    justify-self: start;
    max-width: 360px;
  }

  h1 {
    font-size: clamp(4.5rem, 22vw, 10rem);
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .section {
    padding-top: 4.2rem;
    padding-bottom: 4.2rem;
  }

  .hero {
    padding-top: 3.3rem;
  }

  h1 {
    font-size: clamp(4.1rem, 26vw, 6.4rem);
    white-space: normal;
  }

  .section-heading h2 {
    font-size: clamp(2.8rem, 14vw, 4.9rem);
  }

  .profile-card div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .contact-section p {
    font-size: clamp(1.35rem, 7vw, 2.3rem);
  }
}
