:root {
  --bg: #fffdfe;
  --blue-50: #f6faff;
  --blue-100: #e6f0fb;
  --blue-200: #cfe1f5;
  --blue-300: #b3d0ee;
  --blue-500: #6f9bcb;
  --blue-600: #46709f;
  --blue-900: #24406a;
  --pink-100: #fdeef2;
  --pink-200: #f8d3dd;
  --pink-300: #f2b8c6;
  --pink-500: #d97b98;
  --ink: #2b3a52;
  --muted: #667690;
  --line: #d9e6f5;
  --radius: 20px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24'><path d='M20 12C14 2 3 0 2 6c-1 7 10 9 18 6z' fill='%23f2b8c6'/><path d='M20 12C26 2 37 0 38 6c1 7-10 9-18 6z' fill='%23f2b8c6'/><path d='M18 14l-5 9M22 14l5 9' stroke='%23e39ab0' stroke-width='2.2' fill='none' stroke-linecap='round'/><circle cx='20' cy='12' r='3.4' fill='%23e39ab0'/></svg>");
  --gingham: linear-gradient(90deg, rgba(111, 155, 203, .16) 50%, transparent 50%), linear-gradient(rgba(111, 155, 203, .16) 50%, transparent 50%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Scroll progress */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 20; background: linear-gradient(90deg, var(--blue-300), var(--pink-300)); transform: scaleX(0); transform-origin: left; }

/* Frosted-glass nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(111, 155, 203, .2);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.brand { display: flex; flex-direction: column; font-family: var(--script); font-size: 2.3rem; color: var(--blue-900); -webkit-text-stroke: 0.7px var(--blue-900); text-decoration: none; line-height: 1.05; }
.brand .owner { -webkit-text-stroke: 0; font-family: var(--sans); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav a.link { color: var(--blue-900); text-decoration: none; font-size: 0.86rem; letter-spacing: 0.06em; transition: color .2s ease; }
.nav a.link:hover { color: var(--pink-500); }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: -70px; padding: 189px 0 130px; text-align: center; color: var(--blue-900);
  background:
    radial-gradient(50% 70% at 92% 8%, rgba(242, 184, 198, .38), transparent 62%),
    radial-gradient(60% 80% at 8% 100%, rgba(179, 208, 238, .8), transparent 65%),
    linear-gradient(180deg, #dbe9f8, #f2f8ff 75%, var(--bg));
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--gingham); background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 22px; z-index: 1;
  background: radial-gradient(circle at 14px 0, transparent 13px, var(--bg) 13.5px) 0 0 / 28px 22px repeat-x;
}
.hero .spot {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 35%), rgba(255, 255, 255, .75), transparent 65%);
}
.eyebrow { color: var(--pink-500); letter-spacing: 0.26em; text-transform: uppercase; font-size: 0.74rem; font-weight: 600; margin: 0 0 14px; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.6rem, 6.6vw, 4.8rem); line-height: 1.02; margin: 0 auto 20px; font-weight: 600; max-width: 13em; text-wrap: balance; color: var(--blue-900); }
.grad { display: inline-block; font-family: var(--script); font-weight: 400; font-size: 1.3em; line-height: 1.1; color: var(--pink-500); text-shadow: 0 2px 14px rgba(255, 255, 255, .9); }
.hero p.lede { max-width: 620px; margin: 0 auto 34px; color: var(--muted); font-size: 1.08rem; }

.btn {
  display: inline-block; padding: 13px 30px; border-radius: 99px;
  background: linear-gradient(180deg, #5f8dbf, var(--blue-600)); color: #fff; text-decoration: none; font-weight: 600; letter-spacing: 0.05em; font-size: 0.9rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 10px 24px -6px rgba(70, 112, 159, .55);
  transition: box-shadow .25s ease, filter .25s ease;
}
.btn:hover { filter: brightness(1.07); box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 12px 30px -6px rgba(217, 123, 152, .5); }
.btn.ghost { background: rgba(255, 255, 255, .8); color: var(--blue-900); border: 1px solid var(--blue-300); box-shadow: none; margin-left: 10px; }
.btn.ghost:hover { background: #fff; border-color: var(--pink-300); filter: none; box-shadow: 0 8px 22px -8px rgba(217, 123, 152, .45); }

/* Sections */
section { padding: 92px 0; }
section.alt { background: var(--blue-50); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 2.9rem); line-height: 1.08; margin: 0 0 12px; color: var(--blue-900); font-weight: 600; text-wrap: balance; }
.section-head p { margin: 0; color: var(--muted); }
.section-head::after {
  content: ""; display: block; width: 240px; height: 22px; margin-top: 22px; transform-origin: left;
  background:
    var(--bow) left center / 34px 20px no-repeat,
    linear-gradient(90deg, var(--pink-300), transparent) 46px 50% / calc(100% - 46px) 1px no-repeat;
}

/* Sub-headings inside the Writing section */
.subhead { max-width: 640px; margin: 0 0 24px; }
.subhead:not(:first-of-type) { margin-top: 70px; }
.subhead h3 { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; font-weight: 600; margin: 0 0 6px; color: var(--blue-900); }
.subhead p { margin: 0; color: var(--muted); }

/* Writing cards: polaroid frames with a cursor-following glow */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.card {
  position: relative; isolation: isolate; overflow: hidden; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(70, 112, 159, .05), 0 16px 36px -22px rgba(70, 112, 159, .45);
  transition: box-shadow .35s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--pink-300), var(--blue-300) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease;
}
.card::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 184, 198, .16), transparent 65%);
  opacity: 0; transition: opacity .3s ease;
}
.card:hover { box-shadow: 0 1px 2px rgba(70, 112, 159, .06), 0 26px 46px -22px rgba(217, 123, 152, .45); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card img { aspect-ratio: 1206 / 1000; object-fit: cover; width: 100%; border-radius: 13px; }
.card .body { padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; position: relative; z-index: 1; }
.tag { align-self: flex-start; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--blue-600); background: var(--blue-100); padding: 4px 11px; border-radius: 99px; }
.card blockquote { margin: 0; font-family: var(--serif); font-size: 1.22rem; line-height: 1.45; color: var(--ink); }
.card blockquote .hash { color: var(--pink-500); font-family: var(--sans); font-size: 0.82rem; }
.card .date { margin-top: auto; padding-left: 26px; font-size: 0.8rem; color: var(--muted); background: var(--bow) left center / 20px 12px no-repeat; }

/* Article cards: title, opening paragraph, then a "read more" that opens the full text */
.grid.articles { align-items: start; }
.article h3 { font-family: var(--serif); font-size: 1.7rem; line-height: 1.15; font-weight: 600; margin: 0; color: var(--blue-900); }
.article .byline, .video .byline { margin: -6px 0 0; font-size: 0.82rem; color: var(--muted); }
.article .text { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.6; color: var(--ink); }
.article details summary {
  display: inline-block; cursor: pointer; list-style: none;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--blue-600);
  background: var(--blue-50); border: 1px solid var(--blue-200); padding: 8px 16px; border-radius: 99px;
  transition: border-color .3s ease, background .3s ease;
}
.article details summary::-webkit-details-marker { display: none; }
.article details summary:hover { border-color: var(--pink-300); background: var(--pink-100); }
.article details summary:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; }
.article details[open] .more, .article details:not([open]) .less { display: none; }
.article .full { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }

/* About */
.about-text { max-width: 720px; margin: 0; font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.5; color: var(--ink); }

/* Video cards: soft gingham "poster" with a play button; the whole card is the link */
.grid.videos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card.video { text-decoration: none; color: inherit; }
.card.video:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; }
.video .poster {
  aspect-ratio: 16 / 9; border-radius: 13px; display: grid; place-items: center;
  background: var(--gingham) 0 0 / 28px 28px, linear-gradient(135deg, var(--blue-100), var(--pink-100));
  background-color: var(--blue-50);
}
.video a.poster { text-decoration: none; }
.video a.poster:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; }
.video iframe, .video video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 13px; background: #000; }
.video .play { width: 64px; height: 64px; border-radius: 50%; background: #fff; box-shadow: 0 10px 24px -10px rgba(70, 112, 159, .55); position: relative; }
.video .play::before { content: ""; position: absolute; left: 26px; top: 20px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent var(--blue-600); }
.video h3 { font-family: var(--serif); font-size: 1.7rem; line-height: 1.15; font-weight: 600; margin: 0; color: var(--blue-900); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.note { margin-top: 38px; font-size: 0.85rem; color: var(--muted); border-left: 3px solid var(--pink-300); padding-left: 14px; }

/* Placeholder tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.tile { border: 1.5px dashed var(--blue-300); border-radius: var(--radius); padding: 38px 24px; text-align: center; background: #fff; transition: border-color .3s ease, background .3s ease; }
.tile:hover { border-color: var(--pink-300); background: var(--pink-100); }
.tile h3 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 8px; color: var(--blue-900); }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Closing line / footer */
.closing { text-align: center; }
.closing .section-head { margin-inline: auto; }
.closing .section-head::after {
  margin-inline: auto; transform-origin: center;
  background:
    var(--bow) center / 34px 20px no-repeat,
    linear-gradient(90deg, transparent, var(--pink-300)) left center / calc(50% - 26px) 1px no-repeat,
    linear-gradient(90deg, var(--pink-300), transparent) right center / calc(50% - 26px) 1px no-repeat;
}
footer { background: var(--blue-900); color: #b9cbe6; text-align: center; padding: 30px 16px; font-size: 0.85rem; }

/* Entrance: quiet fades, images unveiled by a soft wipe (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .card img { clip-path: inset(0 0 100% 0 round 13px); transform: scale(1.06); transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1), transform 1.4s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--d, 0ms) + 150ms); }
.js .card.in img { clip-path: inset(0 0 0 0 round 13px); transform: none; }
.js .section-head::after { transform: scaleX(0); transition: transform 1s cubic-bezier(.2, .8, .2, 1) .2s; }
.js .section-head.in::after { transform: scaleX(1); }
.js .hero .hero-inner > * { opacity: 0; filter: blur(8px); transform: translateY(10px); animation: settle 1s cubic-bezier(.2, .8, .2, 1) forwards; }
.js .hero .hero-inner > *:nth-child(1) { animation-delay: .05s; }
.js .hero .hero-inner > *:nth-child(2) { animation-delay: .2s; }
.js .hero .hero-inner > *:nth-child(3) { animation-delay: .4s; }
.js .hero .hero-inner > *:nth-child(4) { animation-delay: .55s; }
.js .hero .hero-inner > *:nth-child(5) { animation-delay: .65s; }
@keyframes settle { to { opacity: 1; filter: none; transform: none; } }

@media (max-width: 760px) {
  .nav ul { display: none; }
  .hero { padding: 130px 0 96px; }
  .btn.ghost { margin: 12px 0 0; }
  section { padding: 62px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero .hero-inner > * { opacity: 1; filter: none; transform: none; }
  .js .card img { clip-path: none; transform: none; }
  .js .section-head::after { transform: none; }
}
