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

:root {
  --sky-top: #dcecff;
  --sky-bot: #fdeef2;
  --cloud: #ffffff;
  --leaf: #bfe3cc;
  --leaf-dark: #9bd0b2;
  --trunk: #cba787;
  --text: #5b5468;
  --text-soft: #837c8f;
  --pink: #f4c6d0;
  --pink-dark: #e39aab;
  --mint: #bfe3cc;
  --mint-dark: #8fc9a6;
  --lav: #d9cdf0;
  --lav-dark: #b9a4e0;
  --butter: #fbe3ad;
  --butter-dark: #eec96b;
  --card: #fffbf6;
  --shadow: 0 14px 34px rgba(91, 84, 104, 0.14);
  --shadow-sm: 0 6px 16px rgba(91, 84, 104, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 55%, #fff7ef 100%);
  color: var(--text);
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

a { color: inherit; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 22px;
  position: relative;
}

main, .hero, footer { position: relative; z-index: 1; }

/* ---------- PERSISTENT NATURE BACKGROUND ---------- */
/* Fixed to the viewport (not the document), z-index:-1 so it can never
   sit above readable content regardless of scroll position or DOM order. */
.nature-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.hills {
  position: absolute;
  left: -10%;
  bottom: -60px;
  width: 60%;
  height: 160px;
  background: var(--mint);
  border-radius: 50%;
  opacity: .55;
}
.hills.back {
  left: 35%;
  bottom: -90px;
  width: 70%;
  height: 200px;
  background: var(--lav);
  opacity: .35;
}

.cloud {
  position: absolute;
  background: var(--cloud);
  border-radius: 50px;
  opacity: .85;
  filter: drop-shadow(0 8px 10px rgba(180, 190, 210, .25));
  animation: drift linear infinite;
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: var(--cloud);
  border-radius: 50%;
}
.cloud::before { width: 55%; height: 140%; top: -60%; left: 8%; }
.cloud::after { width: 40%; height: 110%; top: -45%; right: 12%; }

.bird {
  position: absolute;
  opacity: 0;
  animation: fly linear infinite;
}
.bird svg { display: block; }
.bird .wing {
  transform-box: fill-box;
  transform-origin: 80% 30%;
  animation: flap 0.45s ease-in-out infinite;
}

@keyframes drift {
  from { transform: translateX(-15vw); }
  to { transform: translateX(115vw); }
}

@keyframes fly {
  0% { transform: translateX(-10vw) translateY(0); opacity: 0; }
  4% { opacity: .6; }
  50% { transform: translateX(55vw) translateY(-18px); }
  96% { opacity: .6; }
  100% { transform: translateX(115vw) translateY(6px); opacity: 0; }
}

@keyframes flap {
  0%, 100% { transform: rotate(-28deg); }
  50% { transform: rotate(32deg); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

/* ---------- MUSIC TOGGLE ---------- */
.music-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease;
}
.music-toggle:hover { transform: scale(1.08); }
.music-toggle.playing { animation: bob 1.8s ease-in-out infinite; }
.music-toggle .ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--pink-dark);
  opacity: 0;
}
.music-toggle.playing .ring {
  opacity: .6;
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(.85); opacity: .6; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ---------- NAV ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 238, 242, 0.75);
  backdrop-filter: blur(8px);
}
.navbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.brand {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--pink-dark); }
.navlinks {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.navlinks a {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  color: var(--text-soft);
  padding: 7px 14px;
  border-radius: 20px;
  transition: background .18s ease, color .18s ease;
}
.navlinks a:hover { background: var(--pink); color: var(--text); }

/* ---------- SECTION SCAFFOLD ---------- */
section { padding: 84px 0; position: relative; }

.kicker {
  display: inline-block;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  color: var(--pink-dark);
  margin-bottom: 10px;
}
.kicker::before { content: '✿ '; }

.section-title {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  margin-bottom: 30px;
}

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- PANEL / CARD ---------- */
.panel {
  background: var(--card);
  color: var(--text);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 30px 32px;
  position: relative;
  z-index: 2;
}

/* ---------- HERO ---------- */
.hero {
  padding-top: 60px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 800px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  color: var(--text);
}
.hero h1 .accent { color: var(--pink-dark); }
.hero .sub {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--mint-dark);
  margin-top: 12px;
}
.cloud-bubble {
  position: relative;
  background: var(--card);
  border-radius: 40px 40px 40px 8px;
  padding: 20px 26px;
  margin-top: 26px;
  max-width: 480px;
  box-shadow: var(--shadow-sm);
}
.cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 30px;
  padding: 13px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn-pink { background: var(--pink); color: #7a3f4c; }
.btn-mint { background: var(--mint); color: #33604a; }
.btn-lav  { background: var(--lav); color: #4c3b73; }
.btn-butter { background: var(--butter); color: #6b551a; }

.badge-card .kicker { margin-bottom: 6px; }
.badge-card .panel h3 { font-size: 1.4rem; margin-bottom: 10px; }

.tree {
  position: absolute;
  bottom: -10px;
  width: 90px;
  z-index: 1;
  transform-origin: bottom center;
  animation: sway 6s ease-in-out infinite;
}
.tree.left { left: 0; }
.tree.right { right: 20px; animation-delay: -3s; width: 70px; }

/* ---------- ABOUT ---------- */
.about-panel p { font-size: 1.06rem; }
.about-panel .signoff {
  margin-top: 6px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  color: var(--pink-dark);
}

/* ---------- EXPERIENCE ---------- */
.strip { display: flex; flex-direction: column; gap: 28px; }
.frame { position: relative; padding-left: 66px; }
.frame-num {
  position: absolute;
  left: 0;
  top: 6px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.frame:nth-of-type(4n+1) .frame-num { background: var(--pink-dark); }
.frame:nth-of-type(4n+2) .frame-num { background: var(--mint-dark); }
.frame:nth-of-type(4n+3) .frame-num { background: var(--lav-dark); }
.frame:nth-of-type(4n+4) .frame-num { background: var(--butter-dark); }
.frame .panel h3 { font-size: 1.3rem; }
.frame .company {
  color: var(--mint-dark);
  font-weight: 700;
  font-size: .95rem;
  margin-top: 2px;
}
.frame .duration {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  color: var(--text-soft);
  float: right;
  font-size: .85rem;
  background: #f3eee6;
  padding: 4px 12px;
  border-radius: 20px;
}
.frame .quip {
  margin-top: 12px;
  font-style: italic;
  color: var(--text-soft);
}

/* ---------- EDUCATION ---------- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .edu-grid { grid-template-columns: 1fr; } }
.edu-grid .panel h3 { font-size: 1.2rem; }
.edu-grid .gpa {
  display: inline-block;
  margin-top: 10px;
  background: var(--butter);
  color: #6b551a;
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: .85rem;
}

/* ---------- SKILLS ---------- */
.skills-wrap { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-chip {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  border-radius: 20px;
  padding: 9px 18px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease;
}
.skill-chip:hover { transform: translateY(-3px) scale(1.04); }
.skill-chip:nth-child(5n+1) { background: var(--pink); }
.skill-chip:nth-child(5n+2) { background: var(--mint); }
.skill-chip:nth-child(5n+3) { background: var(--lav); }
.skill-chip:nth-child(5n+4) { background: var(--butter); }
.skill-chip:nth-child(5n+5) { background: #cfe7f5; }

/* ---------- PROJECTS ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px;
}
.cover {
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cover:hover { transform: translateY(-5px); }
.cover-top { padding: 16px 20px 10px; }
.cover-top .issue {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: .78rem;
  color: var(--text-soft);
  margin: 0 0 4px;
}
.cover-top h3 { font-size: 1.22rem; }
.cover:nth-child(6n+1) .cover-top { background: var(--pink); }
.cover:nth-child(6n+2) .cover-top { background: var(--mint); }
.cover:nth-child(6n+3) .cover-top { background: var(--lav); }
.cover:nth-child(6n+4) .cover-top { background: var(--butter); }
.cover:nth-child(6n+5) .cover-top { background: #cfe7f5; }
.cover:nth-child(6n+6) .cover-top { background: #f5d9c8; }
.cover-body { padding: 16px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.cover-body .tagline {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  color: var(--pink-dark);
  font-size: .92rem;
  margin-bottom: 8px;
}
.cover-body p { flex: 1; margin: 0 0 14px; font-size: .95rem; }
.tools-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tool-tag {
  font-size: .74rem;
  font-weight: 700;
  background: #f3eee6;
  color: var(--text-soft);
  border-radius: 10px;
  padding: 3px 9px;
}
.cover-body .btn { align-self: flex-start; font-size: .85rem; padding: 9px 18px; }
.no-link {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-soft);
}

/* ---------- CONTACT ---------- */
.contact-panel { text-align: center; }
.contact-panel .kicker { display: block; }
.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 30px 0 50px;
  font-size: .85rem;
  color: var(--text-soft);
  position: relative;
  z-index: 2;
}
footer a { color: var(--pink-dark); text-decoration: none; }

/* ---------- PROJECT DETAIL PAGE ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  color: var(--text-soft);
  text-decoration: none;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--pink-dark); }

.detail-hero { padding-top: 50px; padding-bottom: 10px; }
.detail-hero h1 { font-size: clamp(2rem, 5.5vw, 3rem); }
.detail-meta {
  color: var(--text-soft);
  font-weight: 700;
  font-family: 'Quicksand', sans-serif;
  margin-top: 8px;
}

.story-lede {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  max-width: 640px;
}

.mech-panel { text-align: center; }
.mech-panel p { text-align: left; max-width: 640px; margin: 0 auto 18px; }
.mech-panel svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.mech-panel svg.wide { max-width: 680px; }
