/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6a6a6a;
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --accent: #2c5282;
  --border: #e2e2e2;
  --max-width: 680px;
}

[data-theme="dark"] {
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-muted: #909090;
  --bg-primary: #1a1a1a;
  --bg-secondary: #222222;
  --accent: #6da3d9;
  --border: #333333;
}

html {
  font-size: 18px;
  line-height: 1.6;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Typography */
h1, h2, h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; margin-top: 2rem; }
h3 { font-size: 1.15rem; margin-top: 1.5rem; }

p {
  margin-bottom: 1rem;
}

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

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.site-title:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a.active {
  color: var(--text-primary);
  font-weight: 700;
}

/* Main content */
main {
  min-height: 60vh;
}

article {
  max-width: 100%;
}

article ul {
  padding-left: 1.2rem;
}

article ul li {
  margin-bottom: 0.25rem;
}

/* About page specific */
.profile-photo {
  display: block;
  width: 100%;
  max-width: 350px;
  margin: 0 auto 2.5rem auto;
  border-radius: 4px;
}

/* Research page */
.authorship-note {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-top: -0.75rem;
  margin-bottom: 1rem;
}

/* CV PDF viewer */
.cv-download {
  margin-bottom: 1rem;
  text-align: center;
}

.cv-viewer {
  width: 100%;
  height: 80vh;
  border: none;
}

@media (max-width: 768px) {
  .cv-viewer {
    display: none;
  }

  .cv-download a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: 4px;
    font-size: 1rem;
  }

  .cv-download a:hover {
    text-decoration: none;
    opacity: 0.9;
  }
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
}

.theme-toggle:hover {
  color: var(--text-primary);
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (min-width: 600px) {
  nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}

@media (max-width: 500px) {
  .profile-photo {
    width: 100%;
  }
}
