/* ============================================================
   kyledunne.ai — warm, minimal personal site
   Palette derived from the autumn-birch forest hero image:
   birch whites, olive/forest greens, autumn orange/tan.
   ============================================================ */

:root {
  --bg:           #FAF7F1;  /* warm off-white canvas            */
  --surface:      #F1EBDC;  /* birch-cream cards                */
  --green-deep:   #33431C;  /* deep forest/olive (headings)     */
  --green:        #5E7D3A;  /* moss green                       */
  --orange:       #B5631B;  /* autumn orange — primary action   */
  --orange-bright:#D2792A;  /* hover                            */
  --ink:          #262420;  /* warm near-black body text        */
  --muted:        #6B6354;  /* muted brown-grey                 */
  --line:         rgba(38, 36, 32, 0.12);
  --cream-line:   rgba(241, 235, 220, 0.18);

  --maxw: 1080px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--orange);
  margin: 0 0 0.9rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 500; font-size: 0.98rem;
  padding: 0.8rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-bright); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--green-deep); background: rgba(51, 67, 28, 0.05); }
.btn--small { padding: 0.55rem 1.05rem; font-size: 0.9rem; background: var(--green-deep); color: var(--bg); }
.btn--small:hover { background: var(--green); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.1) blur(8px);
  background: rgba(250, 247, 241, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__brand { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--green-deep); letter-spacing: -0.01em; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links > a:not(.btn) { font-size: 0.95rem; color: var(--ink); opacity: 0.82; transition: opacity .2s; }
.nav__links > a:not(.btn):hover { opacity: 1; color: var(--green-deep); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav__mobile { display: none; flex-direction: column; padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.nav__mobile a { padding: 0.7rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.nav__mobile a:last-child { border-bottom: 0; color: var(--orange); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 90vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero__media {
  position: absolute; inset: 0; z-index: 0;
  /* Forest photo at full strength up top, fading into the page bg as it
     descends — and a soft cream wash low-left so the dark headline stays legible. */
  background:
    linear-gradient(to bottom,
      rgba(250,247,241,0.05) 0%,
      rgba(250,247,241,0.00) 22%,
      rgba(250,247,241,0.45) 62%,
      rgba(250,247,241,0.92) 90%,
      var(--bg) 100%),
    url("assets/hero-forest.jpg") center 18% / cover no-repeat;
}
.hero__inner { position: relative; z-index: 1; padding-block: 4rem 5.5rem; }
.hero__title { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 600; letter-spacing: -0.02em; }
.t-human { font-weight: 700; color: var(--green-deep); }
.t-ai {
  font-weight: 700;
  background: linear-gradient(100deg, var(--orange) 10%, var(--green) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { max-width: 38ch; margin: 1.4rem 0 2rem; font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--ink); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Generic section ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section__title { font-size: clamp(1.9rem, 4.5vw, 2.9rem); color: var(--green-deep); }

/* ---------- Work ---------- */
.work-card {
  margin-top: 2.4rem;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.work-card__kicker { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--green); font-weight: 600; margin: 0 0 0.6rem; }
.work-card__title { font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--ink); margin-bottom: 0.8rem; }
.work-card__body p:last-child { margin-bottom: 0; color: var(--muted); }

.quote { margin: 0; padding-left: 1.4rem; border-left: 3px solid var(--orange); }
.quote blockquote { margin: 0 0 0.7rem; font-family: var(--font-display); font-style: italic; font-size: 1.18rem; line-height: 1.5; color: var(--green-deep); }
.quote figcaption { font-size: 0.95rem; color: var(--muted); font-weight: 500; }
.quote__cite { display: flex; flex-direction: column; gap: 0.1rem; }
.quote__name { color: var(--green-deep); font-weight: 600; }
.quote__title { font-size: 0.9rem; color: var(--muted); }
.quote__note { font-style: italic; opacity: 0.7; font-weight: 400; margin-top: 0.45rem; }

/* ---------- Planet You (dark "cosmic" band — themed to planetyou.ai) ----------
   This one section breaks from the warm site palette to match planetyou.ai:
   near-black night-sky ground, the four brand-layer colors as glowing accents,
   and the animated starfield ported from that site (planet-starfield.js). */
.section--planet {
  position: relative;
  overflow: hidden;
  background: #0A0E1A;                       /* planetyou.ai night-sky near-black */
  color: #EDEAF2;
  border-block: 1px solid rgba(237, 234, 242, 0.12);
  text-align: center;
}
/* Animated starfield canvas, pinned behind this section only. */
.planet-starfield { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* Soft luminous glow rising from center, echoing the planet's atmosphere. */
.section--planet::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 56%,
    rgba(142, 197, 232, 0.10) 0%, rgba(242, 140, 40, 0.06) 38%, transparent 72%);
}
.section--planet > .container { position: relative; z-index: 1; }
.section--planet .eyebrow { color: #F28C28; }
.planet { max-width: 640px; margin-inline: auto; }

.planet__logo {
  width: clamp(84px, 12vw, 112px); height: auto; margin: 0 auto 1.3rem;
  filter: drop-shadow(0 0 32px rgba(142, 197, 232, 0.45)) drop-shadow(0 0 12px rgba(242, 140, 40, 0.35));
  animation: planet-float 7s ease-in-out infinite;
}
@keyframes planet-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Re-typeset wordmark (Poppins), matching planetyou.ai's two-tone "PlanetYou". */
.planet__wordmark {
  font-family: "Poppins", var(--font-body); font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.05; margin: 0;
}
.wordmark__planet { color: #9A6233; }   /* dark-brown logo tint, legible on dark */
.wordmark__you   { color: #F28C28; }   /* orange core / "You"                   */

.planet__lede { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: #9AA3B8; margin: 1.1rem auto 1.4rem; max-width: 46ch; }
.planet__status { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; color: #9AA3B8; margin: 0 0 1.8rem; }
.planet__status .dot { width: 9px; height: 9px; border-radius: 50%; background: #F28C28; box-shadow: 0 0 0 0 rgba(242,140,40,0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(242,140,40,0.55); } 70% { box-shadow: 0 0 0 10px rgba(242,140,40,0); } 100% { box-shadow: 0 0 0 0 rgba(242,140,40,0); } }

/* CTA tuned for the dark band (matches planetyou.ai's primary button). */
.section--planet .btn--primary { background: #F28C28; color: #1A0E03; font-weight: 600; }
.section--planet .btn--primary:hover { background: #FFA646; box-shadow: 0 8px 28px rgba(242, 140, 40, 0.28); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 280px 1fr; gap: clamp(1.8rem, 5vw, 3.5rem); align-items: center; }
.about__photo img { border-radius: var(--radius); width: 100%; height: auto; box-shadow: 0 14px 40px rgba(38,36,32,0.14); }
.about__text p { color: var(--muted); margin: 0 0 1rem; }
.about__text p:first-of-type { color: var(--ink); }
.about__links { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.link-pill { padding: 0.5rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; font-weight: 500; color: var(--green-deep); transition: background .2s, border-color .2s; }
.link-pill:hover { background: var(--surface); border-color: var(--green); }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 2.4rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1.2rem 2.5rem; align-items: center; justify-content: space-between; }
.footer__brand { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--green-deep); margin: 0; }
.footer__tag { font-size: 0.9rem; color: var(--muted); margin: 0.2rem 0 0; }
.footer__links { display: flex; gap: 1.4rem; }
.footer__links a { font-size: 0.95rem; color: var(--ink); opacity: 0.8; }
.footer__links a:hover { opacity: 1; color: var(--orange); }
.footer__copy { font-size: 0.88rem; color: var(--muted); margin: 0; width: 100%; padding-top: 0.6rem; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__mobile:not([hidden]) { display: flex; }

  .work-card { grid-template-columns: 1fr; }
  .quote { border-left: 0; border-top: 3px solid var(--orange); padding-left: 0; padding-top: 1.2rem; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  .planet__status .dot { animation: none; }
  .planet__logo { animation: none; }
}
