:root {
  --bg-color: #fdfdfd;
  --text-color: #222;
  --accent-color: #333;
  --border-color: #eee;
  --muted-color: #666;
  --radius: 0.25rem;
  --toolbar-height: 0px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.1rem);
  background: var(--bg-color);
  color: var(--text-color);
  transition:
    background 0.3s ease,
    color 0.3s ease;
  padding-top: var(--toolbar-height);
}

body.dark-theme {
  --bg-color: #222;
  --text-color: #fdfdfd;
  --accent-color: #ddd;
  --border-color: #444;
  --muted-color: #aaa;
}

header {
  padding: 2rem 1rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 500;
}

.tagline {
  font-weight: 300;
  margin-top: 0.5rem;
}

.intro-grid {
  display: grid;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.intro-gallery {
  display: grid;
  gap: 0.5rem;
}

.intro-gallery img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

.intro-gallery .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

section {
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.period-title {
  font-weight: 400;
}

ul {
  list-style: none;
  padding: 0;
}

ul li {
  margin-bottom: 0.5rem;
}

footer {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--muted-color);
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

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

.lang-switcher {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  display: flex;
  gap: 0.25rem;
}

@media (max-width: 600px) {
  .lang-switcher {
    position: static;
    transform: none;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
}

.lang-switcher button,
#theme-toggle {
  font: inherit;
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.25rem 0.5rem;
}

.lang-switcher button:focus-visible,
#theme-toggle:focus-visible,
.top-nav a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

[data-lang] {
  display: none;
}

.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  z-index: 20;
}

.top-nav {
  position: sticky;
  top: var(--toolbar-height);
  background: var(--bg-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.top-nav a {
  border-bottom: none;
}

.highlights {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background: var(--border-color);
}

.cta-links a {
  margin: 0 0.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 2rem 1rem;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

.gallery .artwork {
  position: relative;
  cursor: pointer;
}

.gallery .artwork figcaption {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.5rem;
  font-size: 0.9rem;
}

.gallery .artwork figcaption.visible {
  display: block;
}
.title-with-photo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.profile-photo {
  border-radius: 50%;
  height: auto;
  width: 16%;
  max-width: 150px;
}

.bio-header h1,
.home-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

