/* ---------------------------------------------------------------------------
   aquandio — dark, quiet, water.
--------------------------------------------------------------------------- */

:root {
  --bg: #040a10;
  --bg-hero: #030910;
  --surface-hi: rgba(14, 26, 36, 0.9);
  --surface-lo: rgba(8, 16, 24, 0.9);
  --line: rgba(150, 214, 255, 0.10);
  --ink: #e9f3fa;
  --dim: #92b2c6;
  --accent: #5fd0e6;
  --accent-soft: rgba(95, 208, 230, 0.14);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(95, 208, 230, 0.35); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- header ---------- */

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 44px);
  background: rgba(3, 9, 14, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(150, 214, 255, 0.06);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--ink);
}
.wordmark svg { width: 11px; height: 15px; fill: var(--accent); }

.site-nav { display: flex; gap: clamp(16px, 3vw, 34px); }
.site-nav a {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.25s ease;
}
.site-nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg-hero);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: url(#goo);
}

/* faint ambient light behind the water */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 55% at 50% 58%, rgba(95, 208, 230, 0.07), transparent 75%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: clamp(110px, 16vh, 170px) clamp(20px, 6vw, 72px) 0;
  text-shadow: 0 2px 26px rgba(2, 8, 14, 0.95);
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 16px;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.hero-copy h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
  padding-right: 0.06em;
}

.hero-copy .sub {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--dim);
}

.btn {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 24px;
  border: 1px solid rgba(95, 208, 230, 0.35);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); }

/* the animation narrates the quote, one line at a time */
.caption {
  position: absolute;
  left: 50%;
  bottom: clamp(40px, 8vh, 76px);
  transform: translateX(-50%);
  z-index: 2;
  width: max-content;
  max-width: 88vw;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: rgba(159, 194, 214, 0.92);
  text-align: center;
  text-shadow: 0 2px 20px rgba(2, 8, 14, 0.9);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.caption.is-out { opacity: 0; transform: translate(-50%, 8px); }

/* ---------- sections ---------- */

section:not(.hero) {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 130px) clamp(20px, 6vw, 44px);
}

section h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 500;
  margin-bottom: 44px;
  letter-spacing: -0.01em;
}

/* ---------- projects: a neutral stage, each card carries its own brand ---------- */

#projects {
  position: relative;
  isolation: isolate;
}
/* full-bleed neutral band behind the section — deliberately un-blue, so any
   project's palette can sit on it */
#projects::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  background: linear-gradient(180deg, #101012, #0b0b0d);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
#projects .eyebrow { color: #97979f; }
#projects h2 { color: #f2f3f5; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.card {
  display: block;
  padding: 30px 30px 34px;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-4px); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.card .arrow {
  font-size: 1rem;
  transition: transform 0.3s ease;
}
.card:hover .arrow { transform: translate(3px, -3px); }

.card h3 {
  margin: 22px 0 10px;
  font-size: 1.6rem;
  font-weight: 600;
}

.card p {
  font-size: 0.97rem;
  line-height: 1.6;
}

/* Body Handbook — a book cover: paper, ink, a navy spine */
.card--bh {
  background: linear-gradient(180deg, #efe9da, #e7e0cd);
  border: 1px solid #d5cdb6;
  border-left: 4px solid #24406e;
}
.card--bh .card-top { color: #8b8168; }
.card--bh .arrow { color: #24406e; }
.card--bh h3 {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: #1c2c50;
  letter-spacing: 0.01em;
}
.card--bh h3 em { font-style: italic; color: #2b4a8b; }
.card--bh p {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.55;
  color: #4d4736;
}
.card--bh:hover {
  border-color: #c4bb9e;
  border-left-color: #24406e;
  box-shadow: 0 26px 60px -26px rgba(20, 40, 90, 0.55);
}

/* LiveAbroad.ai — fresh air: mint-to-lavender gradient, green accents */
.card--la {
  background: linear-gradient(115deg, #d7efe1, #ebf3ee 48%, #ece4f4);
  border: 1px solid #cfe3d6;
}
.card--la .card-top { color: #5f7d6b; }
.card--la .arrow { color: #2f9e63; }
.card--la h3 { color: #182620; letter-spacing: -0.01em; }
.card--la h3 .ai { color: #2f9e63; }
.card--la p { color: #40514a; }
.card--la:hover {
  border-color: #a9d7bc;
  box-shadow: 0 26px 60px -26px rgba(47, 158, 99, 0.5);
}

/* ---------- footer ---------- */

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 20px 56px;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.droplet {
  display: inline-flex;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.droplet svg { width: 13px; height: 17px; fill: var(--accent); }
.droplet:hover { opacity: 1; transform: translateY(-2px); }

/* ---------------------------------------------------------------------------
   the easter egg: the old dark room, the old TV
--------------------------------------------------------------------------- */

.tv-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.tv-modal[hidden] { display: none; }
.tv-modal.open { opacity: 1; }

.tv-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 46%,
      rgba(150, 214, 255, 0.16),
      rgba(95, 208, 230, 0.06) 40%,
      transparent 72%),
    rgba(1, 4, 7, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tv-modal > * { position: relative; }

.tv {
  position: relative;
  width: min(480px, 92vw);
  padding: clamp(10px, 2vw, 15px);
  border-radius: 22px;
  background: linear-gradient(180deg, #151c24, #080c11);
  box-shadow:
    inset 0 1px 0 rgba(186, 226, 255, 0.14),
    0 0 90px -18px rgba(95, 208, 230, 0.55),
    0 30px 70px -24px rgba(0, 0, 0, 0.9);
}
.tv::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px 1px rgba(95, 208, 230, 0.85);
}

.screen {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  background: #000;
  transform-origin: center;
}
.tv-modal.open .screen { animation: tv-on 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }

.screen img { display: block; width: 100%; height: auto; }

.screen .scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.17) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.55);
  animation: scan-roll 5s linear infinite;
  pointer-events: none;
}
.screen .sheen {
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 90% at 28% 12%, rgba(255, 255, 255, 0.09), transparent 55%);
  pointer-events: none;
}

@keyframes tv-on {
  0%   { transform: scaleY(0.006) scaleX(0.55); filter: brightness(7); }
  32%  { transform: scaleY(0.006) scaleX(1);    filter: brightness(9); }
  55%  { transform: scaleY(0.55);               filter: brightness(3); }
  78%  { transform: scaleY(1);                  filter: brightness(1.6); }
  100% { transform: scaleY(1);                  filter: brightness(1); }
}
@keyframes scan-roll { to { background-position: 0 3px; } }

.tv-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent);
  text-align: center;
}
.tv-hint {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: 0.7;
}

.tv-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--dim);
  transition: color 0.2s ease;
}
.tv-close:hover { color: var(--ink); }

/* ---------- reduced motion ---------- */

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