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

:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --text: #1a1a18;
  --text-muted: #6b6b66;
  --border: #e4e2de;
  --accent: #2d2d2a;
  --hover-bg: #f0ede9;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { font-size: 16px; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  line-height: 1.6;
}

main {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

header { display: flex; flex-direction: column; gap: 0.5rem; }

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.tagline { font-size: 1rem; color: var(--text-muted); line-height: 1.5; }

.links { display: flex; flex-direction: column; gap: 0.75rem; }

.link-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.link-card:hover {
  background: var(--hover-bg);
  border-color: #ccc9c4;
  transform: translateY(-1px);
}

.link-card:active { transform: translateY(0); }

.link-icon { display: flex; align-items: center; flex-shrink: 0; opacity: 0.75; }
.link-label { flex: 1; font-size: 0.9375rem; font-weight: 500; }
.link-arrow { font-size: 0.875rem; color: var(--text-muted); transition: transform 0.15s ease; }
.link-card:hover .link-arrow { transform: translate(2px, -2px); }

footer { margin-top: 3rem; font-size: 0.8125rem; color: var(--text-muted); text-align: center; }

/* ── Site Navigation ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(247, 245, 242, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo:hover { color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* pages with nav need top padding so content isn't hidden behind the bar */
body.has-nav {
  justify-content: flex-start;
  padding-top: 5rem;
}

/* ── About Page ── */
.about-main {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 0;
}

.about-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  background: var(--surface);
}

.about-photo-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.3;
  padding: 0.5rem;
}

.about-bio {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-bio p {
  color: var(--text);
  line-height: 1.7;
}

/* ── Gallery Page ── */
.gallery-main {
  width: 100%;
  max-width: 900px;
  padding: 2rem 0;
}

.gallery-main h1 {
  margin-bottom: 1.5rem;
}

.masonry-grid {
  columns: 3;
  column-gap: 1rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.masonry-item:hover img {
  transform: scale(1.02);
}

.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: var(--text-muted);
  font-size: 0.875rem;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .masonry-grid { columns: 2; }
}

@media (max-width: 400px) {
  .masonry-grid { columns: 1; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --surface: #1c1c1a;
    --text: #e8e6e1;
    --text-muted: #7a7871;
    --border: #2e2e2b;
    --accent: #d4d1cb;
    --hover-bg: #242422;
  }

  .site-nav {
    background: rgba(17, 17, 16, 0.85);
  }
}
