/* Rick Weible — personal site */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650;9..144,700&family=Figtree:wght@400;500;600;700&display=swap");

:root {
  --ink: #1c2834;
  --ink-soft: #3a4a5a;
  --muted: #5e7082;
  --paper: #f3f6f8;
  --paper-2: #e8eef3;
  --line: rgba(28, 40, 52, 0.12);
  --accent: #2f6f62;
  --accent-deep: #1f4f46;
  --warm: #b56a3a;
  --sky: #6a8eab;
  --nav-h: 4.25rem;
  --max: 68rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 50px rgba(28, 40, 52, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Figtree", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  background:
    radial-gradient(1200px 620px at 8% -8%, #d9e7f0 0%, transparent 55%),
    radial-gradient(900px 520px at 96% 4%, #d7ebe4 0%, transparent 48%),
    radial-gradient(800px 480px at 70% 100%, #ebe4d8 0%, transparent 42%),
    var(--paper);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: color 0.2s ease;
}

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

h1,
h2,
h3,
.brand-mark {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(243, 246, 248, 0.82);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.brand-mark:hover {
  color: var(--accent-deep);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0.5rem;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  align-items: center;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* —— Layout —— */
main {
  overflow-x: clip;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.kicker {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 38rem;
}

/* —— Shared hero (home + interior) —— */
.home-hero,
.page-hero {
  position: relative;
  display: grid;
  align-items: end;
  color: #f5f8fa;
  isolation: isolate;
}

.home-hero {
  min-height: calc(100svh - var(--nav-h));
}

.page-hero {
  min-height: clamp(14rem, 32vh, 20rem);
}

.home-hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(18, 32, 42, 0.25) 0%, rgba(18, 32, 42, 0.72) 70%, rgba(18, 32, 42, 0.88) 100%),
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(106, 142, 171, 0.45), transparent 60%),
    linear-gradient(135deg, #243848 0%, #1a3d38 42%, #2a3a2e 100%);
  background-size: cover;
  animation: hero-shift 18s var(--ease) infinite alternate;
}

.home-hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 75%);
  animation: grain-drift 22s linear infinite;
}

@keyframes hero-shift {
  from { filter: saturate(1) brightness(1); }
  to { filter: saturate(1.08) brightness(1.05); }
}

@keyframes grain-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-24px, 16px, 0); }
}

.home-hero .wrap,
.page-hero .wrap {
  padding: 3.25rem 0 3.5rem;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.home-hero .wrap {
  padding: 4rem 0 4.5rem;
}

.page-hero .kicker {
  color: rgba(245, 248, 250, 0.72);
}

.page-hero .kicker a {
  color: inherit;
  text-decoration: none;
}

.page-hero .kicker a:hover {
  color: #fff;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: #f5f8fa;
  opacity: 0;
  transform: translateY(1rem);
  animation: rise-in 0.85s var(--ease) 0.12s forwards;
}

.page-hero .lede {
  margin: 0;
  max-width: 36rem;
  color: rgba(245, 248, 250, 0.88);
  opacity: 0;
  transform: translateY(0.75rem);
  animation: rise-in 0.85s var(--ease) 0.28s forwards;
}

.home-hero .brand-hero {
  margin: 0 0 0.85rem;
  font-size: clamp(3.2rem, 10vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise-in 0.9s var(--ease) 0.15s forwards;
}

.home-hero .tagline {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: rgba(245, 248, 250, 0.88);
  opacity: 0;
  transform: translateY(1rem);
  animation: rise-in 0.9s var(--ease) 0.35s forwards;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(0.75rem);
  animation: rise-in 0.9s var(--ease) 0.55s forwards;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: 0.55rem;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #f5f8fa;
  color: var(--ink);
}

.btn-primary:hover {
  background: #fff;
  color: var(--accent-deep);
}

.btn-ghost {
  background: transparent;
  color: #f5f8fa;
  border-color: rgba(245, 248, 250, 0.4);
}

.btn-ghost:hover {
  border-color: #f5f8fa;
  color: #fff;
}

.btn-solid {
  background: var(--accent);
  color: #fff;
}

.btn-solid:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* —— Home sections —— */
.home-intro h2,
.section h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
}

.link-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.link-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.08rem;
}

.link-list a span {
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--muted);
}

.link-list a:hover {
  color: var(--accent-deep);
}

.link-list a:hover span {
  color: var(--warm);
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.family-link {
  display: block;
  padding: 1.35rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  transition: border-color 0.2s ease, transform 0.25s var(--ease), background 0.2s ease;
}

.family-link:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 98, 0.45);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-deep);
}

.family-link strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
}

.family-link small {
  color: var(--muted);
  font-size: 0.88rem;
}

/* —— Content pages —— */
.prose {
  max-width: 40rem;
}

.prose p {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

.note {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.95rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.photo-slot {
  aspect-ratio: 1;
  border-radius: 0.65rem;
  border: 1px dashed rgba(28, 40, 52, 0.22);
  background:
    linear-gradient(145deg, rgba(106, 142, 171, 0.18), rgba(47, 111, 98, 0.12));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.album-wrap {
  margin-top: 1.5rem;
}

.album-status {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
}

.album-item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.55rem;
  background: rgba(28, 40, 52, 0.06);
  box-shadow: 0 8px 22px rgba(28, 40, 52, 0.08);
  text-decoration: none;
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.album-item:hover img {
  transform: scale(1.04);
}

.album-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.album-more,
.album-all {
  margin-top: 0;
}

.album-more.hidden,
.album-all.hidden {
  display: none;
}

.contact-block {
  display: grid;
  gap: 1.25rem;
  max-width: 32rem;
  margin-top: 1.5rem;
}

.contact-item {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.contact-item dt {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-item dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-deep);
}

/* —— Reveal on scroll —— */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1.1rem;
    background: rgba(243, 246, 248, 0.97);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a[aria-current="page"] {
    border-bottom-color: var(--accent);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .home-hero .brand-hero,
  .home-hero .tagline,
  .page-hero h1,
  .page-hero .lede,
  .cta-row,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
