/* Shared design tokens + base styles for the portfolio's index/listing pages.
   The individual project pages (e.g. the-dome) stay self-contained and don't
   use this file, so they still work as standalone downloads. */

:root {
  --paper:   #7A7265;   /* Dim Grey */
  --paper-2: #433E3F;   /* Graphite — panel wash, distinct from the main background */
  --ink:     #F3EEE6;   /* warm off-white */
  --ink-soft:#BFB6A9;   /* off-white muted toward Dim Grey */
  --line:    rgba(243, 238, 230, 0.18);
  --accent:  #90C2E7;   /* Sky Blue */
  --accent-2:#C69C72;   /* Camel */
  --accent-3:#8E6E53;   /* Toffee Brown */
  --font-head: "Mikela", "Fraunces", "Didot", "Bodoni MT", "Playfair Display", Georgia, serif;
  --font-body: "Marcellus", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Reserve the scrollbar's width on every page so fixed, centered elements
     (like .home-btn) land at the same spot whether or not a page scrolls. */
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  margin: 0;
  min-height: calc(var(--vh, 1vh) * 100);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

.serif { font-family: var(--font-head); }
a { color: inherit; }

.wrap {
  width: min(1250px, 100%);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.topbar a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.home-btn {
  position: absolute;
  top: clamp(14px, calc(var(--vh, 1vh) * 2.5), 24px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  color: var(--ink);
  opacity: 0.9;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.home-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, calc(var(--vh, 1vh) * 3), 32px);
}
.side-nav-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: center;
}
.home-kicker {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.side-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px 24px;
}
.side-nav a {
  font-family: "Marcellus", Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.side-nav a.current {
  color: var(--ink);
  opacity: 1;
  font-weight: 700;
}
@media (max-width: 640px) {
  .side-nav { flex-wrap: wrap; }
  .side-nav a { white-space: normal; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

footer {
  padding: clamp(18px, calc(var(--vh, 1vh) * 3), 32px) 0;
  border-top: 1px solid var(--line);
  margin-top: clamp(60px, calc(var(--vh, 1vh) * 10), 120px);
}
.foot-grid {
  display: flex;
  justify-content: center;
  text-align: center;
}
.foot-grid .meta {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Hover-only states — skipped on touch, where :hover would otherwise
   stick until the next tap elsewhere. */
@media (hover: hover) {
  .topbar a:hover { opacity: 1; color: var(--accent); }
  .home-btn:hover { opacity: 1; color: var(--accent); }
  .side-nav a:hover { opacity: 1; color: var(--accent); }
}
