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

body {
  background-color: #e8e8e8;
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color: #222;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #000; }

/* Layout */
.site { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 320px;
  height: 100vh;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  overflow-y: auto;
}

.sidebar-title {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111;
}

nav { display: flex; flex-direction: column; gap: 24px; }

.nav-section { display: flex; flex-direction: column; gap: 4px; }

.nav-label {
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111;
  margin-bottom: 6px;
}

.nav-sub {
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #555;
  text-align: center;
  padding: 3px 0;
}

.nav-sub a:hover { color: #111; }

.nav-link {
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111;
}

/* Main */
.main {
  margin-left: 320px;
  flex: 1;
  padding: 50px 60px 80px 40px;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-thumb { display: block; cursor: pointer; }

.project-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.project-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.project-thumb-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

.project-thumb-label {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: #444;
  margin-top: 8px;
}

/* Gallery page */
.page-title {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}

.page-statement {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 30px;
  max-width: 720px;
}

.page-statement p + p { margin-top: 16px; }

.gallery-images {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.gallery-images img {
  width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: default;
}

/* Text pages */
.text-page-title {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 36px;
  text-transform: uppercase;
  color: #111;
}

.text-content {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: #333;
  max-width: 720px;
}

.text-content p + p { margin-top: 16px; }
.text-content .cv-section-title {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-top: 24px;
  margin-bottom: 4px;
  color: #111;
}

/* Contact */
.contact-block {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 2.2;
  text-align: center;
}
.contact-label { font-weight: 700; }

/* Loading */
.loading {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #888;
  padding: 20px 0;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 24px 20px;
  }
  .main { margin-left: 0; padding: 20px; }
  .site { flex-direction: column; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
