:root {
  --bg: #fafaf8;
  --sidebar-bg: #ffffff;
  --text: #1a1a18;
  --text-muted: #787870;
  --text-light: #a0a098;
  --border: #e4e4de;
  --link: #2c4a8a;
  --sidebar-w: 260px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'EB Garamond', serif;
  font-size: 1.3rem;
  line-height: 1.75;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s;
}

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

h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h2 {
  font-family: 'EB Garamond', serif;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin: 3rem 0 1.25rem;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.75rem;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-name {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
}

.sidebar-name:hover {
  color: var(--link);
}

.sidebar-role {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.sidebar nav {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar nav a {
  font-family: 'DM Mono', monospace;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: color 0.15s;
}

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

.sidebar nav a.active {
  border-left: 2px solid var(--text);
  color: var(--text);
}

.sidebar-social {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-social a {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.15s;
}

.sidebar-social a:hover {
  color: var(--text);
}

.hamburger {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:last-child {
  transform: rotate(-45deg) translate(4px, -4px);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 90;
}

.sidebar-overlay.open {
  display: block;
}

.main-content {
  margin-left: var(--sidebar-w);
  max-width: calc(100% - var(--sidebar-w));
  padding: 4rem 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

section {
  padding-top: 2rem;
  padding-bottom: 2rem;
  width: min(100%, 900px);
  text-align: left;
}

#home {
  text-align: center;
}

section:first-child {
  padding-top: 0;
}

.profile-photo {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  margin-bottom: 1.5rem;
}

.lead {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 1.25rem;
}

.bio p {
  margin-bottom: 1rem;
}

.quick-facts {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-icons a {
  color: var(--text-muted);
  font-size: 2.1rem;
  transition: color 0.15s;
}

.social-icons a:hover {
  color: var(--text);
}

.contact-info-row {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.contact-info-row .separator {
  color: var(--text-light);
}

.cv-button {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  background: var(--sidebar-bg);
  transition: border-color 0.2s, color 0.15s;
}

.cv-button:hover {
  border-color: var(--text-muted);
  color: var(--link);
}

.home-quote {
  margin-top: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
}

.vtimeline {
  position: relative;
  padding-left: 28px;
  margin-top: 1.5rem;
}

.vtimeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.vtimeline-item {
  position: relative;
  margin-bottom: 3rem;
  text-align: left;
}

.vtimeline-item:last-child {
  margin-bottom: 0;
}

.vtimeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--bg);
  z-index: 1;
}

.vtimeline-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.vtimeline-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
}

.vtimeline-org {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.vtimeline-desc {
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  line-height: 1.65;
  margin-top: 0.5rem;
  color: var(--text);
}

.vtimeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.project-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  background: var(--sidebar-bg);
  transition: border-color 0.2s;
  color: var(--text);
  text-decoration: none;
}

.project-card:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.project-card-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.project-card-type {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.project-card-desc {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0.6rem;
  text-align: left;
}

.project-card-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--link);
}

.blog-note {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.blog-list {
  list-style: none;
}

.blog-list li {
  margin-bottom: 0.85rem;
  line-height: 1.6;
  text-align: left;
}

.blog-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.blog-teaser {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.pub-placeholder {
  font-style: italic;
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.gallery-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--sidebar-bg);
  overflow: hidden;
}

.gallery-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.gallery-card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.gallery-card-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

.gallery-card-caption {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: left;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.contact-links a {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
}

.contact-note {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.15rem;
}

@media (max-width: 1024px) {
  :root {
    --sidebar-w: 220px;
  }

  .main-content {
    padding: 3rem 3rem;
  }

  .social-icons a {
    font-size: 1.95rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    width: 260px;
    border-right: 1px solid var(--border);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 4.5rem 1.5rem 2rem;
    max-width: 100%;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
  }

  .contact-info-row .separator {
    display: none;
  }

  .profile-photo {
    width: 240px;
    height: 240px;
  }

  .social-icons a {
    font-size: 1.8rem;
  }

  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 4.5rem 1rem 2rem;
  }

  body {
    font-size: 1.15rem;
  }

  h1 {
    font-size: 1.9rem;
  }

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

  .social-icons a {
    font-size: 1.65rem;
  }
}
