/* etan — personal notes, anything under the sun */

:root {
  --ink: #12151c;
  --ink-soft: #4a5160;
  --paper: #f5f7fa;
  --paper-deep: #e8ecf2;
  --sky: #d9e4f0;
  --sun: #ff9f1c;
  --sun-deep: #e8890b;
  --sea: #2b4c7e;
  --sea-soft: #3d6499;
  --line: rgba(18, 21, 28, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Figtree", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 100% 70% at 0% -20%, rgba(255, 159, 28, 0.16), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(43, 76, 126, 0.12), transparent 50%),
    linear-gradient(180deg, #eef3f8 0%, var(--paper) 38%, var(--paper-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

.font-display {
  font-family: "Bricolage Grotesque", sans-serif;
}

.font-reading {
  font-family: "Figtree", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ——— Nav ——— */
.site-nav {
  backdrop-filter: blur(14px);
  background: rgba(245, 247, 250, 0.84);
  border-bottom: 1px solid var(--line);
}

.nav-link {
  position: relative;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--sun);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.brand-mark {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}

.brand-dot {
  color: var(--sun);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.06);
  animation: hero-drift 24s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.2%, -0.8%, 0);
  }
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(18, 21, 28, 0.15) 0%, rgba(18, 21, 28, 0.2) 35%, rgba(18, 21, 28, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--paper);
  padding-bottom: clamp(3rem, 8vw, 5.5rem);
}

html.js .hero-brand,
html.js .hero-headline,
html.js .hero-lede,
html.js .hero-cta {
  opacity: 0;
}

html.js.motion-ready .hero-brand {
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.js.motion-ready .hero-headline {
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

html.js.motion-ready .hero-lede {
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

html.js.motion-ready .hero-cta {
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.35rem;
  border-radius: 2px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.btn-primary:hover {
  background: #ffb44a;
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--paper);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.95rem 0.35rem;
  border-bottom: 1.5px solid rgba(245, 247, 250, 0.4);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.btn-ghost:hover {
  border-color: var(--sun);
  color: #fff;
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover .btn-arrow,
.btn-ghost:hover .btn-arrow,
.article-link:hover .btn-arrow,
.elsewhere-link:hover .btn-arrow {
  transform: translateX(4px);
}

/* ——— Reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ——— Notes list ——— */
.article-row {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.article-row:hover {
  opacity: 0.96;
}

.article-row:last-child {
  border-bottom: 1px solid var(--line);
}

.article-media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
}

.article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-link:hover .article-media img {
  transform: scale(1.045);
}

.article-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sea-soft);
}

.article-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
  transition: color 0.25s ease;
}

.article-link:hover .article-title {
  color: var(--sea);
}

/* ——— Elsewhere ——— */
.elsewhere-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: color 0.25s ease;
}

.elsewhere-link:last-child {
  border-bottom: 1px solid var(--line);
}

.elsewhere-link:hover {
  color: var(--sea);
}

.elsewhere-name {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.elsewhere-meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ——— Tools ——— */
.tool-entry {
  padding: clamp(2rem, 5vw, 3.25rem) 0;
  border-top: 1px solid var(--line);
}

.tool-entry:last-of-type {
  border-bottom: 1px solid var(--line);
}

.tool-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  color: var(--ink);
  margin-top: 0.65rem;
}

.tool-lede {
  margin-top: 1rem;
  max-width: 40rem;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-soft);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-top: 1.5rem;
}

.tool-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sea);
  border-bottom: 1.5px solid rgba(43, 76, 126, 0.28);
  padding: 0.35rem 0;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.tool-secondary:hover {
  color: var(--sea-soft);
  border-color: var(--sun);
}

.tool-secondary:hover .btn-arrow {
  transform: translateX(4px);
}

.tool-affiliate {
  margin-top: 1.75rem;
  max-width: 42rem;
  padding-top: 1.35rem;
  border-top: 1px dashed var(--line);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.tool-affiliate ul {
  margin: 0.85rem 0 1rem;
  padding-left: 1.15rem;
  list-style: disc;
}

.tool-affiliate li + li {
  margin-top: 0.4rem;
}

.tool-affiliate a {
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tool-affiliate a:hover {
  color: var(--sea-soft);
}

.tool-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  opacity: 0.92;
}

.tool-steps {
  margin: 1.1rem 0 1.4rem;
  padding-left: 1.2rem;
  list-style: decimal;
  color: var(--ink-soft);
}

.tool-steps li + li {
  margin-top: 0.75rem;
}

.tool-disclosure {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  opacity: 0.88;
}

/* ——— About ——— */
.about-hero-media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 2px;
}

.about-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-drift 26s ease-in-out infinite alternate;
}

.pull-quote {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--sea);
  border-left: 3px solid var(--sun);
  padding-left: 1.15rem;
}

/* ——— Article ——— */
.article-hero {
  position: relative;
  min-height: min(78svh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.article-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.article-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: hero-drift 20s ease-in-out infinite alternate;
}

.article-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(18, 21, 28, 0.16) 0%, rgba(18, 21, 28, 0.32) 45%, rgba(18, 21, 28, 0.82) 100%);
}

.article-hero-copy {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.prose-article {
  font-family: "Figtree", system-ui, sans-serif;
  font-size: clamp(1.08rem, 1.02rem + 0.3vw, 1.22rem);
  line-height: 1.75;
  color: var(--ink-soft);
}

.prose-article p + p {
  margin-top: 1.3em;
}

.prose-article ul {
  margin: 1.2em 0;
  padding-left: 1.2em;
  list-style: disc;
}

.prose-article li + li {
  margin-top: 0.55em;
}

.prose-article a {
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-article a:hover {
  color: var(--sea-soft);
}

.prose-article h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 1.25rem + 0.7vw, 1.9rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-top: 2.1em;
  margin-bottom: 0.55em;
  line-height: 1.15;
}

.inline-figure {
  margin: 2.4rem 0;
}

.inline-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
}

.inline-figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  opacity: 0.9;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(18, 21, 28, 0.03);
}

/* ——— Mobile nav ——— */
.mobile-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-panel.is-open {
  max-height: 320px;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn span + span {
  margin-top: 6px;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
