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

/* ---------- Design tokens ---------- */
:root {
  --bg: #fdfbf9;
  --surface: rgba(255, 255, 255, 0.65);
  --card: rgba(255, 255, 255, 0.72);
  --accent: #7a4a1e;
  --accent-light: rgba(122, 74, 30, 0.12);
  --muted: #5a524b;
  --text: #1e1a17;
  --border: rgba(122, 74, 30, 0.15);
  --glass-border: rgba(255, 255, 255, 0.45);
  --shadow-sm: 0 2px 8px rgba(26, 21, 15, 0.06);
  --shadow-md: 0 12px 40px rgba(26, 21, 15, 0.1);
  --shadow-lg: 0 30px 80px rgba(26, 21, 15, 0.14);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --nav-clearance: 88px;
  --brand-font: 'Playfair Display', Georgia, serif;
  --body-font: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: linear-gradient(165deg, #fefcfa 0%, #f6efe8 50%, #ebe3da 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-clearance);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding: 0.9rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-family: var(--brand-font);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  white-space: nowrap;
}

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

.nav-link {
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--accent-light);
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero-section {
  padding: 9rem 0 5rem;
  overflow: hidden;
  position: relative;
}

.hero-ornaments {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(122, 74, 30, 0.28), rgba(122, 74, 30, 0.02) 65%, transparent 70%);
  filter: blur(2px);
  opacity: 0.9;
  animation: float 12s ease-in-out infinite;
}

.orb-1 {
  top: -80px;
  left: -40px;
  animation-delay: -2s;
}

.orb-2 {
  top: 20%;
  right: -90px;
  width: 320px;
  height: 320px;
  animation-delay: -6s;
}

.orb-3 {
  bottom: -120px;
  left: 35%;
  width: 220px;
  height: 220px;
  animation-delay: -9s;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(120deg, rgba(122, 74, 30, 0.18) 0%, rgba(122, 74, 30, 0.08) 45%, rgba(255, 255, 255, 0.6) 70%);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  background-size: 200% 200%;
  animation: shimmer 4s linear infinite;
}

.hero-title {
  font-family: var(--brand-font);
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 54ch;
  margin-bottom: 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-figure {
  position: relative;
}

.hero-figure::before {
  content: '';
  position: absolute;
  inset: -18px;
  background: linear-gradient(135deg, rgba(122,74,30,0.15) 0%, transparent 60%);
  border-radius: var(--radius-lg);
  z-index: -1;
}

.hero-figure img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.hero-content > * {
  animation: rise 0.9s var(--ease) both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.12s; }
.hero-content > *:nth-child(3) { animation-delay: 0.2s; }
.hero-content > *:nth-child(4) { animation-delay: 0.28s; }

.hero-figure {
  animation: floatIn 1.1s var(--ease) both;
  animation-delay: 0.2s;
}

.hero-figure figcaption {
  text-align: center;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 40px rgba(122, 74, 30, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(122, 74, 30, 0.42);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

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

.btn-sm {
  font-size: 0.88rem;
  padding: 0.65rem 1.4rem;
}

/* ---------- Section Layouts ---------- */
main { padding-bottom: 5rem; }

.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--brand-font);
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--muted);
  max-width: 60ch;
  margin-inline: auto;
}

/* ---------- Glass Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.card h3 {
  font-family: var(--brand-font);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

/* ---------- Feature Block ---------- */
.feature-block {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
}

.feature-block h2 {
  font-family: var(--brand-font);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature-block p + p {
  margin-top: 1rem;
}

/* ---------- Profile ---------- */
.profile-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 2rem;
}

.profile-figure img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
}

.profile-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Resource List ---------- */
.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.resource-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--muted);
}

.resource-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Memory Cards ---------- */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.memory-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.7) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.memory-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(122, 74, 30, 0.12), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

.memory-card h3 {
  font-family: var(--brand-font);
  font-size: 1.2rem;
  margin: 0.5rem 0 0.6rem;
  color: var(--text);
}

.memory-card p {
  color: var(--muted);
}

.memory-theme {
  display: inline-flex;
  align-items: center;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

/* ---------- Footer ---------- */
footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

footer p + p {
  margin-top: 0.75rem;
}

/* ---------- Author Link ---------- */
.author-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s var(--ease);
}

.author-link:hover {
  color: #5a3614;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle { margin-inline: auto; }
  .hero-figure { max-width: 300px; margin-inline: auto; }
  .hero-cta { justify-content: center; flex-wrap: wrap; }
  .feature-block { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content > *,
  .hero-figure,
  .orb,
  .hero-badge {
    animation: none !important;
  }
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(18px);
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

@media (max-width: 680px) {
  :root { --nav-clearance: 140px; }
  .navbar-inner { flex-direction: column; gap: 0.75rem; }
  .nav-links { justify-content: center; }
  .hero-section { padding-top: 8rem; }
  .feature-block { padding: 2rem 1.5rem; }
  .card { padding: 1.6rem; }
}

@media (max-width: 520px) {
  :root { --nav-clearance: 160px; }
  .nav-links { gap: 0.2rem; }
  .nav-link { padding: 0.45rem 0.8rem; font-size: 0.88rem; }
  .hero-title { font-size: clamp(2.2rem, 7vw, 3rem); }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-cta { width: 100%; }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  .hero-figure { max-width: 260px; }
}