:root {
  --accent: #2B3F63;
  --bg: #ffffff;
  --text: #0a0a0a;
  --text-secondary: #555;
  --border: #e5e5e5;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  --bg: #2B3F63;
  --text: #ffffff;
  --text-secondary: #c5cee0;
  --accent: #8FB4E8;
  --border: rgba(255, 255, 255, 0.18);
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a:hover {
  text-decoration: underline;
}

/* ─── Layout ─────────────────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────────────── */

.sidebar,
.page-nav,
.paper,
.resource-block,
.paper-abstract {
  transition: border-color 0.2s ease;
}

.sidebar {
  padding: 48px 32px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.profile-photo {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-bottom: 20px;
}

[data-theme="dark"] .profile-photo {
  outline: 1px solid var(--border);
}

.sidebar-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.sidebar-role {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.4;
}

.sidebar-affiliation {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 12px;
}

.sidebar-email {
  display: block;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  margin-top: 16px;
  word-break: break-all;
}

.sidebar-email:hover {
  text-decoration: underline;
}

.icon-buttons {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  transition: background 150ms, color 150ms, border-color 150ms;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

.icon-btn svg {
  display: block;
}

/* ─── Theme toggle ────────────────────────────────────────── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* show moon in light, sun in dark */
html:not([data-theme="dark"]) .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

/* ─── Main column ─────────────────────────────────────────── */

.main {
  padding: 48px 72px;
}

.main-inner {
  max-width: 720px;
}

.main-name {
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 28px;
}

/* ─── Nav ─────────────────────────────────────────────────── */

.page-nav {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 52px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: opacity 150ms;
  white-space: nowrap;
}

.nav-link:hover {
  text-decoration: none;
  opacity: 0.7;
}

.nav-link.active {
  border-bottom-color: var(--accent);
  opacity: 1;
}

/* ─── Content sections ─────────────────────────────────────── */

.content section {
  margin-bottom: 56px;
}

.section-heading {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.2px;
}

/* ─── Bio ──────────────────────────────────────────────────── */

.bio p {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 14px;
}

.bio p:last-child {
  margin-bottom: 0;
}

/* ─── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  text-decoration: none;
  transition: background 150ms, color 150ms, border-color 150ms;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ─── News ─────────────────────────────────────────────────── */

.news-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: baseline;
}

.news-date {
  font-weight: 600;
  color: var(--accent);
  font-size: 15px;
  white-space: nowrap;
}

.news-content {
  font-size: 15px;
  color: var(--text);
}

/* ─── Research papers ─────────────────────────────────────── */

.paper {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.paper:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.paper-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  line-height: 1.35;
}

.paper-coauthors {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.paper-buttons {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

button.btn {
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.4;
}

.btn-toggle[aria-expanded="true"] {
  background: var(--accent);
  color: var(--bg);
}

.paper-abstract {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin-top: 12px;
  color: var(--text);
}

.paper-abstract[hidden] {
  display: none;
}

.paper-abstract p {
  font-size: 15px;
  line-height: 1.65;
}

/* ─── Resources ────────────────────────────────────────────── */

.resource-block {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.resource-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.resource-heading {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.resource-desc {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 14px;
}

/* ─── Football ─────────────────────────────────────────────── */

.football-desc {
  font-size: 16px;
  margin-bottom: 36px;
  line-height: 1.65;
}

.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  margin-bottom: 36px;
  border-radius: 4px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.photo {
  margin-bottom: 36px;
}

.photo img {
  width: 100%;
  border-radius: 4px;
  display: block;
}

.photo figcaption {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
}

/* ─── Mobile ───────────────────────────────────────────────── */

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 32px 24px;
  }

  .profile-photo {
    max-width: 200px;
  }

  .main {
    padding: 32px 24px;
  }

  .main-name {
    font-size: 28px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
