/* ============================================================
   PERSONAL ACADEMIC PAGE — style.css
   ============================================================
   You generally don't need to edit this file.
   To change colors or fonts, update the variables in :root.
   ============================================================ */
a:visited { color: inherit; }
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --ink-mid: #4a4a4f;
  --ink-light: #8e8e93;
  --accent: #11A2B3;
  --accent-light: #e8f0f7;
  --rule: #d8d8dc;
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Layout ── */
.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  background: rgba(247,246,243,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  z-index: 10;
  padding: env(safe-area-inset-top, 0px) 0 0;
}
nav .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
nav .name {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
}
nav ul a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-mid);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
nav ul a:hover { color: var(--accent); }

/* ── Hero / About ── */
#about {
  padding: 72px 0 60px;
  border-bottom: 1px solid var(--rule);
}
.hero {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 48px;
  align-items: start;
}
.hero-text h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 6px;
  color: var(--ink);
}
.hero-text .title-line {
  font-size: 0.9rem;
  color: var(--ink-mid);
  margin: 0 0 24px;
  font-weight: 300;
}
.hero-text .title-line span {
  color: var(--accent);
  font-weight: 400;
}
.hero-text p {
  font-size: 0.95rem;
  color: var(--ink-mid);
  max-width: 56ch;
  margin: 0 0 20px;
}
.hero-text p a {
  color: inherit;
  text-decoration: underline;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 5px 12px;
  transition: background 0.15s, color 0.15s;
}
.links a:hover {
  background: var(--accent);
  color: #fff;
}
.avatar {
  width: 180px;
  height: 180px;
  border-radius: 4px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 65%;
}

/* ── Sections ── */
section {
  padding: 56px 0;
  border-bottom: 1px solid var(--rule);
}
section:last-child { border-bottom: none; }

.section-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 32px;
  color: var(--ink);
}

/* ── Publications ── */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 20px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.pub-item:first-child { border-top: none; }
.pub-year {
  font-size: 0.78rem;
  color: var(--ink-light);
  padding-top: 3px;
  font-weight: 300;
}
.pub-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
}
.pub-title a {
  color: inherit;
  text-decoration: none;
}
.pub-title a:hover { text-decoration: underline; }
.pub-meta {
  font-size: 0.82rem;
  color: var(--ink-mid);
  margin: 0 0 6px;
  font-style: italic;
}
.pub-venue {
  font-size: 0.82rem;
  color: var(--ink-light);
  margin: 0 0 8px;
}
.pub-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.73rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 2px;
  padding: 2px 8px;
}

/* ── Projects ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 24px;
}
.project-card h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--ink);
}
.project-card p {
  font-size: 0.85rem;
  color: var(--ink-mid);
  margin: 0 0 14px;
  line-height: 1.55;
}
.project-card a {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}
.project-card a:hover { text-decoration: underline; }

/* ── CV / Education ── */
.cv-section { margin-bottom: 36px; }
.cv-section h3 {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-light);
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  text-transform: uppercase;
}
.cv-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 20px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.cv-item:first-child { border-top: none; }
.cv-period {
  font-size: 0.8rem;
  color: var(--ink-light);
  padding-top: 2px;
}
.cv-body strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.cv-body span {
  font-size: 0.82rem;
  color: var(--ink-mid);
}

/* ── Footer ── */
footer {
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rule);
}
footer p {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .avatar {
    width: 120px;
    height: 120px;
    order: -1;
  }
  .hero-text h1 { font-size: 1.9rem; }
  .cv-item { grid-template-columns: 90px 1fr; }
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141416;
    --surface: #1e1e22;
    --ink: #f0f0f0;
    --ink-mid: #a0a0a8;
    --ink-light: #5a5a62;
    --accent: #6ba3d0;
    --accent-light: #1a2a38;
    --rule: #2c2c32;
  }
}
:root[data-theme="dark"] {
  --bg: #141416;
  --surface: #1e1e22;
  --ink: #f0f0f0;
  --ink-mid: #a0a0a8;
  --ink-light: #5a5a62;
  --accent: #6ba3d0;
  --accent-light: #1a2a38;
  --rule: #2c2c32;
}
