/* ============================================================
   calmvex.top · style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

:root {
  --bg:         #fafaf9;
  --bg-card:    #f3f3f1;
  --text:       #18181b;
  --text-muted: #71717a;
  --text-faint: #a1a1aa;
  --border:     #e4e4e7;
  --accent:     #18181b;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 680px;
  --radius: 8px;
  --radius-lg: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0c0c0c;
    --bg-card:    #161616;
    --text:       #fafafa;
    --text-muted: #a1a1aa;
    --text-faint: #52525b;
    --border:     #27272a;
    --accent:     #fafafa;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.nav-name {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.15s;
}
.nav-name:hover { color: var(--text-muted); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--bg-card);
}
.nav-links a.active {
  color: var(--text);
  background: var(--bg-card);
}

/* ============================================================
   MAIN
   ============================================================ */

.main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* ============================================================
   ABOUT (index)
   ============================================================ */

.about {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.avatar-wrap {
  margin-bottom: 1.75rem;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--border);
}

.name {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.bio {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1rem;
  max-width: 54ch;
  line-height: 1.75;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

.page-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  transition: color 0.15s;
}
.page-link-item:first-child { border-top: 1px solid var(--border); }
.page-link-item:hover { color: var(--text-muted); }

.page-link-item span {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ============================================================
   BLOG
   ============================================================ */

.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
}

.post {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-heading {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.post p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  max-width: 60ch;
  line-height: 1.75;
}
.post p:last-child { margin-bottom: 0; }
.post p em { color: var(--text); font-style: italic; }

/* ============================================================
   PHOTOS
   ============================================================ */

.page-intro {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: -2.5rem;
  margin-bottom: 2.5rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 500px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

.photo-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: opacity 0.2s;
}
.photo-item img:hover { opacity: 0.85; }

.photo-item figcaption {
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.4;
  padding: 0 0.1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.site-footer p {
  max-width: var(--max-w);
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 420px) {
  .main { padding-top: 2.5rem; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 0.35rem 0.5rem; }
}