/* ==============================
   NATURE / ORGANIC — Style
   Flowing curves, earthy tones, organic shapes
   ============================== */

[data-theme="navy"] {
  --bg: #0a1a0a;
  --bg-alt: #0f260f;
  --bg-card: rgba(15,40,15,0.7);
  --text-primary: #c8dcc8;
  --text-secondary: #6a8a6a;
  --accent: #c8a84e;
  --accent-glow: rgba(200,168,78,0.2);
  --heading: #e0f0d8;
  --border: rgba(200,168,78,0.15);
  --wave-1: rgba(15,40,15,0.5);
  --wave-2: rgba(15,40,15,0.8);
  --leaf-color: #4a8a3a;
}
[data-theme="dark"] {
  --bg: #0a0f08;
  --bg-alt: #121a10;
  --bg-card: rgba(18,28,16,0.7);
  --text-primary: #d0dcc8;
  --text-secondary: #708868;
  --accent: #5cb85c;
  --accent-glow: rgba(92,184,92,0.2);
  --heading: #d8ecd0;
  --border: rgba(92,184,92,0.15);
  --wave-1: rgba(18,28,16,0.5);
  --wave-2: rgba(18,28,16,0.8);
  --leaf-color: #3a7a2a;
}
[data-theme="light"] {
  --bg: #f5f2ec;
  --bg-alt: #ebe6dc;
  --bg-card: rgba(255,255,255,0.7);
  --text-primary: #2a3520;
  --text-secondary: #5a6a4a;
  --accent: #6b8e23;
  --accent-glow: rgba(107,142,35,0.15);
  --heading: #3a4a28;
  --border: rgba(107,142,35,0.15);
  --wave-1: rgba(235,230,220,0.5);
  --wave-2: rgba(235,230,220,0.8);
  --leaf-color: #8aaa5a;
}
[data-theme="vibrant"] {
  --bg: #081808;
  --bg-alt: #102010;
  --bg-card: rgba(16,35,16,0.7);
  --text-primary: #d8f0d0;
  --text-secondary: #80b870;
  --accent: #00e676;
  --accent-glow: rgba(0,230,118,0.2);
  --heading: #e0ffe0;
  --border: rgba(0,230,118,0.15);
  --wave-1: rgba(16,35,16,0.5);
  --wave-2: rgba(16,35,16,0.8);
  --leaf-color: #00e676;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Nunito Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  transition: background 0.6s, color 0.6s;
}

/* --- Leaf Canvas --- */
#leafCanvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* --- Organic Card --- */
.organic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s;
}
.organic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  border-color: var(--accent);
}

/* --- Leaf Pill --- */
.leaf-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.4rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem; color: var(--text-secondary);
  transition: all 0.3s;
  text-decoration: none;
}
.leaf-pill:hover { border-color: var(--accent); color: var(--accent); }
.leaf-pill--featured {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-glow); font-weight: 600;
}
.leaf-pill small { opacity: 0.7; font-size: 0.75rem; }

/* --- Section Divider --- */
.section-divider {
  position: absolute; top: -1px; left: 0; width: 100%; height: 100px;
  display: block;
}

/* --- Container --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }
.section { padding: 7rem 0; position: relative; z-index: 1; }
.section--alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section__label { display: block; font-size: 0.85rem; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 0.5rem; }
.section__title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 600;
  color: var(--heading);
}

/* --- Nav --- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 1rem 0; transition: all 0.4s;
}
.nav--scrolled {
  background: rgba(10,15,8,0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 0.7rem 0;
}
[data-theme="light"] .nav--scrolled { background: rgba(245,242,236,0.9); }
.nav__container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.nav__links { display: flex; list-style: none; gap: 2rem; }
.nav__links a { color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: color 0.3s; }
.nav__links a:hover, .nav__links a.active { color: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: 1rem; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: border-color 0.3s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle__icon { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.theme-palette {
  position: fixed; top: 65px; right: 2rem; display: flex; gap: 0.5rem;
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.3s; z-index: 101;
}
.theme-palette--open { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform 0.3s; }
.theme-swatch:hover { transform: scale(1.2); }
.theme-swatch--navy { background: #0a1a0a; border-color: #c8a84e; }
.theme-swatch--dark { background: #0a0f08; border-color: #5cb85c; }
.theme-swatch--light { background: #f5f2ec; border-color: #6b8e23; }
.theme-swatch--vibrant { background: #081808; border-color: #00e676; }

.nav__menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav__menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--text-primary); transition: all 0.3s; }
.nav__menu-btn--open span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.nav__menu-btn--open span:nth-child(2) { opacity: 0; }
.nav__menu-btn--open span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(10,15,8,0.96);
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
}
[data-theme="light"] .mobile-menu { background: rgba(245,242,236,0.96); }
.mobile-menu--open { display: flex; }
.mobile-menu a { font-family: 'Fraunces', serif; color: var(--text-primary); text-decoration: none; font-size: 1.8rem; transition: color 0.3s; }
.mobile-menu a:hover { color: var(--accent); }

/* --- Hero --- */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero__bg { position: absolute; bottom: 0; left: 0; right: 0; }
.hero__wave { width: 100%; display: block; }
.hero__wave--1 { animation: waveFlow 8s ease-in-out infinite; }
.hero__wave--2 { margin-top: -60px; animation: waveFlow 10s ease-in-out infinite reverse; }
@keyframes waveFlow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-30px); }
}
.hero__content { position: relative; z-index: 2; text-align: center; }
.hero__label { font-size: 0.9rem; color: var(--accent); margin-bottom: 1rem; letter-spacing: 0.1em; }
.hero__name {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 8vw, 6rem); font-weight: 700;
  color: var(--heading); line-height: 1.05; margin-bottom: 1rem;
}
.hero__role { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2.5rem; }
.hero__cta { display: flex; gap: 1rem; justify-content: center; }
.btn {
  display: inline-block; padding: 0.85rem 2rem;
  font-family: 'Nunito Sans', sans-serif; font-size: 0.85rem; font-weight: 600;
  border-radius: 100px; text-decoration: none; transition: all 0.3s;
}
.btn--primary { background: var(--accent); color: #fff; border: none; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn--outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn--outline:hover { background: var(--accent); color: #fff; }
.hero__scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2; }
.hero__scroll-leaf { font-size: 1.5rem; animation: leafFall 3s ease-in-out infinite; }
@keyframes leafFall {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(15px) rotate(15deg); }
}

/* --- Reveal --- */
.reveal-grow {
  opacity: 0; transform: translateY(40px) scale(0.97);
  transition: opacity 0.8s cubic-bezier(0.22,1,0.36,1), transform 0.8s cubic-bezier(0.22,1,0.36,1);
}
.reveal-grow--visible { opacity: 1; transform: translateY(0) scale(1); }

/* --- About --- */
.about__grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: center; }
.about__photo-inner {
  aspect-ratio: 3/4; padding: 2rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  color: var(--text-secondary);
}
.about__photo-inner span { font-size: 0.8rem; }
.about__text p { font-size: 1rem; color: var(--text-secondary); margin-bottom: 2rem; }
.about__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat { padding: 1.2rem; text-align: center; }
.stat__number { font-family: 'Fraunces', serif; font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat__number::after { content: '+'; font-size: 0.5em; }
.stat__label { font-size: 0.72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.3rem; }
.about__languages { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* --- Timeline (Tree) --- */
.timeline { max-width: 800px; margin: 0 auto; position: relative; }
.timeline__trunk {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 3px; transform: translateX(-50%);
}
.timeline__item { position: relative; width: 45%; margin-bottom: 2rem; }
.timeline__item--right { margin-left: auto; }
.timeline__branch {
  position: absolute; top: 1.5rem; width: 40px; height: 2px;
  background: var(--accent); opacity: 0.4;
}
.timeline__item:not(.timeline__item--right) .timeline__branch { right: -40px; }
.timeline__item--right .timeline__branch { left: -40px; }
.timeline__card { padding: 1.5rem; }
.timeline__date { font-size: 0.8rem; color: var(--accent); letter-spacing: 0.1em; }
.timeline__card h3 { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 600; color: var(--heading); margin: 0.4rem 0 0.2rem; }
.timeline__company { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.8rem; }
.badge-leaf {
  display: inline-block; padding: 0.1rem 0.5rem;
  background: var(--accent-glow); color: var(--accent); border-radius: 100px;
  font-size: 0.7rem; font-weight: 600;
}
.timeline__card ul { list-style: none; }
.timeline__card li { font-size: 0.85rem; color: var(--text-secondary); padding: 0.3rem 0 0.3rem 1rem; position: relative; }
.timeline__card li::before { content: '🌿'; position: absolute; left: 0; font-size: 0.7rem; }

/* --- Skills --- */
.skills__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.skills__category { padding: 2rem; }
.skills__category h3 { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 600; color: var(--heading); margin-bottom: 1rem; }
.skills__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* --- Education --- */
.education__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.education__card { padding: 1.5rem; text-align: center; }
.education__icon { font-size: 2rem; margin-bottom: 0.8rem; }
.education__card h3 { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 600; color: var(--heading); margin-bottom: 0.3rem; }
.education__card p { font-size: 0.85rem; color: var(--text-secondary); }
.education__status { display: inline-block; margin-top: 0.6rem; font-size: 0.75rem; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; }
.education__extras { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.education__extra-group { padding: 1.5rem; }
.education__extra-group h3 { font-family: 'Fraunces', serif; font-size: 1rem; font-weight: 600; color: var(--heading); margin-bottom: 1rem; }
.education__extra-items { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* --- Portfolio --- */
.portfolio__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.portfolio__card { padding: 2rem; }
.portfolio__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.portfolio__card h3 { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 600; color: var(--heading); margin-bottom: 0.6rem; }
.portfolio__card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }
.portfolio__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* --- Contact --- */
.contact__content { max-width: 600px; margin: 0 auto; padding: 2.5rem; text-align: center; }
.contact__content p { font-size: 1rem; color: var(--text-secondary); margin-bottom: 2rem; }
.contact__links { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; margin-bottom: 2rem; }
.contact__link { text-decoration: none; }

/* --- Footer --- */
.footer { padding: 2rem 0; text-align: center; position: relative; z-index: 1; }
.footer p { font-size: 0.85rem; color: var(--text-secondary); }
.footer__heart { color: var(--accent); }

/* --- Back to Top --- */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 100;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--accent);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.back-to-top--visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent); color: #fff; }

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__menu-btn { display: flex; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { display: none; }
  .about__stats { grid-template-columns: repeat(2, 1fr); }
  .skills__grid { grid-template-columns: 1fr; }
  .education__grid { grid-template-columns: 1fr; }
  .education__extras { grid-template-columns: 1fr; }
  .portfolio__grid { grid-template-columns: 1fr; }
  .timeline__trunk { left: 0; }
  .timeline__item, .timeline__item--right { width: 100%; margin-left: 2rem; }
  .timeline__branch { display: none; }
}
