/* ============ ATLA THEME — minimal v1 ============ */
:root {
  --parchment: #f3ead8;
  --parchment-2: #eadfc6;
  --ink: #33291f;
  --ink-soft: #5c5040;

  --water: #2e6f95;
  --water-soft: #cfe3ee;
  --earth: #57803e;
  --earth-soft: #dde7cf;
  --fire: #a83226;
  --fire-soft: #f2d9d2;
  --air: #d98e2b;
  --air-soft: #f6e7c8;

  --radius: 14px;
  --font-head: "Philosopher", serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 4.6rem; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0.4rem 0; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; }
a { color: var(--water); }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.2rem;
  background: color-mix(in srgb, var(--parchment) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--parchment-2);
}
.nav-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--fire);
  display: flex;
  align-items: center;
  height: 38px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--fire);
  display: none;
}
.nav.past-photo .nav-brand-photo { display: block; animation: brandPop 0.35s ease; }
.nav.past-photo .nav-brand-text { display: none; }
@keyframes brandPop {
  from { opacity: 0; transform: scale(0.4) rotate(-25deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
.nav-links { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-links a:hover { color: var(--fire); }
.nav-links a.nav-resume {
  background: var(--fire);
  color: #fff;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
}
.nav-links a.nav-resume:hover { background: #8a2a20; color: #fff; }

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6rem 1.2rem 3rem;
  background:
    radial-gradient(ellipse at 20% 15%, var(--water-soft) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 20%, var(--air-soft) 0%, transparent 45%),
    radial-gradient(ellipse at 15% 85%, var(--earth-soft) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 85%, var(--fire-soft) 0%, transparent 45%),
    var(--parchment);
}
.hero-inner { max-width: 720px; }
.elements-line {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.06em;
  display: flex;
  gap: 0.6em;
  justify-content: center;
  flex-wrap: wrap;
}
.el.water { color: var(--water); }
.el.earth { color: var(--earth); }
.el.fire  { color: var(--fire); }
.el.air   { color: var(--air); }

.hero-photo-ring {
  width: 192px;
  height: 192px;
  margin: 1.2rem auto 1rem;
  border-radius: 50%;
  padding: 7px;
  background: conic-gradient(from -45deg,
    var(--air) 0 25%, var(--water) 25% 50%,
    var(--earth) 50% 75%, var(--fire) 75% 100%);
  box-shadow: 0 8px 26px rgba(60, 45, 20, 0.28);
}
.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--parchment);
  display: block;
}

.hero-tag {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.hero-bio { max-width: 620px; margin: 0 auto 1.6rem; color: var(--ink-soft); }
.hero-cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.scroll-hint { margin-top: 3rem; font-size: 0.8rem; color: var(--ink-soft); opacity: 0.7; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.btn-fire  { background: var(--fire); color: #fff; }
.btn-water { background: var(--water); color: #fff; }
.btn.big { font-size: 1.05rem; }

/* ============ SECTIONS ============ */
.section { padding: 5.5rem 1.2rem; }
.section > .zoom { max-width: 980px; margin: 0 auto; }
.section-kicker {
  font-family: var(--font-head);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
}
.section-sub { color: var(--ink-soft); margin-bottom: 2rem; }

.section-parchment { background: var(--parchment); }
.section-earth { background: var(--earth-soft); }
.section-dark {
  background: #2b2620;
  color: #f0e8d8;
}
.section-dark .section-sub { color: #c9bda6; }

.water-text { color: var(--water); }
.earth-text { color: var(--earth); }
.fire-text  { color: var(--fire); }
.air-text   { color: var(--air); }

/* ============ JOURNEY ============ */
.role-card {
  background: rgba(255,255,255,0.55);
  border-left: 4px solid var(--earth);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem;
  margin-top: 1.1rem;
}
.role-card p { color: var(--ink-soft); margin-top: 0.3rem; }
.role-sep { color: var(--ink-soft); }
.role-where { font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.cert-list { list-style: none; margin-top: 0.4rem; }
.cert-list li { margin: 0.35rem 0; }
.cert-list a { font-weight: 600; text-decoration: none; }
.cert-list a:hover { text-decoration: underline; }

/* ============ PROJECTS ============ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.2rem;
}
.project {
  background: #fffdf7;
  border-radius: var(--radius);
  padding: 1.3rem;
  border-top: 5px solid var(--ink);
  box-shadow: 0 2px 10px rgba(60, 45, 20, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(60,45,20,0.15); }
.project p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.water-border { border-top-color: var(--water); }
.earth-border { border-top-color: var(--earth); }
.fire-border  { border-top-color: var(--fire); }
.air-border   { border-top-color: var(--air); }

.badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  color: #fff;
}
.water-bg { background: var(--water); }
.earth-bg { background: var(--earth); }
.fire-bg  { background: var(--fire); }
.air-bg   { background: var(--air); }

.project-link { font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.project-link:hover { text-decoration: underline; }
.project-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }

/* ============ SKILLS ============ */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}
.skill {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.4rem;
  border: 2px solid transparent;
  color: #f4ecda;
  transition: transform 0.25s ease;
}
.skill:hover { transform: translateY(-5px); }
.skill h3 { margin-bottom: 0.2rem; position: relative; z-index: 1; }
.skill-motto { font-size: 0.85rem; opacity: 0.85; margin-bottom: 0.7rem; font-style: italic; position: relative; z-index: 1; }
.skill ul { list-style: none; position: relative; z-index: 1; }
.skill li { padding: 0.25rem 0 0.25rem 1.4em; font-size: 0.95rem; position: relative; }
.skill li::before { content: "—"; opacity: 0.6; position: absolute; left: 0; }
.skill::after {
  position: absolute;
  right: -18px;
  bottom: -28px;
  font-size: 7rem;
  line-height: 1;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* — Water: flowing current — */
.water-card {
  background:
    linear-gradient(115deg, transparent 0 32%, rgba(255, 255, 255, 0.09) 40% 48%, transparent 56% 100%),
    linear-gradient(165deg, #0c3550 0%, #17567c 48%, #2e86ab 100%);
  background-size: 260% 100%, 100% 100%;
  border-color: #7fc4e8;
  box-shadow: 0 8px 26px rgba(28, 108, 158, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: waterFlow 8s linear infinite;
}
.water-card::after { content: "🌊"; }
.water-card h3 { color: #a8dcf5; }
.water-card li::before { color: #8fd0f0; }
@keyframes waterFlow {
  from { background-position: 130% 0, 0 0; }
  to   { background-position: -130% 0, 0 0; }
}

/* — Earth: solid stone slab — */
.earth-card {
  background:
    repeating-linear-gradient(-35deg, transparent 0 26px, rgba(0, 0, 0, 0.09) 26px 27px),
    linear-gradient(165deg, #26331b 0%, #3d5527 55%, #567636 100%);
  border-color: #9dbd6d;
  box-shadow: 0 9px 0 -3px #18200f, 0 16px 26px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.earth-card::after { content: "⛰️"; }
.earth-card h3 { color: #bfdd97; }
.earth-card li::before { color: #a9cc78; }

/* — Fire: breathing embers — */
.fire-card {
  background: linear-gradient(165deg, #400f09 0%, #7c2015 55%, #b03a24 100%);
  border-color: #f2a06b;
  animation: emberPulse 3.4s ease-in-out infinite;
}
.fire-card::after { content: "🔥"; }
.fire-card h3 { color: #ffb59c; }
.fire-card li::before { color: #f5a37e; }
@keyframes emberPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(222, 92, 40, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
  50%      { box-shadow: 0 8px 42px rgba(245, 125, 55, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
}

/* — Air: drifting breeze — */
.air-card {
  background: linear-gradient(165deg, #6d4f1d 0%, #a4782b 55%, #cf9d3e 100%);
  border-color: #f3d48c;
  box-shadow: 0 8px 26px rgba(210, 165, 70, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.air-card::after { content: "🌪️"; animation: airDrift 7s ease-in-out infinite; }
.air-card h3 { color: #ffe3a1; }
.air-card li::before { color: #f0d391; }
@keyframes airDrift {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50%      { transform: rotate(9deg) translateY(-9px); }
}

/* ============ CONTACT ============ */
.contact-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}
.hawk-form {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.hawk-form input,
.hawk-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 2px solid var(--parchment-2);
  background: #fffdf7;
  color: var(--ink);
  resize: vertical;
}
.hawk-form input:focus,
.hawk-form textarea:focus { outline: none; border-color: var(--water); }
.form-note { font-size: 0.78rem; color: var(--ink-soft); text-align: center; }

.contact-links { display: flex; gap: 1.5rem; }
.contact-links a { font-weight: 700; text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }

/* ============ FOOTER ============ */
.footer {
  background: #211c17;
  color: #b8ab93;
  text-align: center;
  padding: 2.2rem 1.2rem;
  font-size: 0.9rem;
}
.footer-quote {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: #e0d4bc;
  margin-bottom: 0.6rem;
}

/* ============ ZOOM-ON-SCROLL ============ */
.zoom {
  transform: scale(0.82);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease;
  will-change: transform, opacity;
}
.zoom.visible {
  transform: scale(1);
  opacity: 1;
}

/* ============ PHASE 3 — AMBIENT EFFECTS ============ */

/* — loader: spinning glider staff — */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--parchment);
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.glider {
  width: 84px;
  height: 84px;
  animation: gliderSpin 1.1s linear infinite;
}
.loader-inner p {
  font-family: var(--font-head);
  color: var(--ink-soft);
  margin-top: 0.7rem;
  letter-spacing: 0.08em;
}
@keyframes gliderSpin { to { transform: rotate(360deg); } }

/* — scroll progress bar — */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(90deg, var(--water), var(--earth), var(--fire), var(--air));
  background-size: 100vw 100%;
  background-attachment: fixed;
  pointer-events: none;
}

/* — elements intro: one word at a time — */
.el { opacity: 0; display: inline-block; animation: 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) forwards; }
.el.water { animation-name: elWater; animation-delay: 0.15s; }
.el.earth { animation-name: elEarth; animation-delay: 0.75s; }
.el.fire  { animation-name: elFire;  animation-delay: 1.35s; }
.el.air   { animation-name: elAir;   animation-delay: 1.95s; }
@keyframes elWater {
  0%   { opacity: 0; transform: translateX(-28px) skewX(-10deg); }
  60%  { opacity: 1; transform: translateX(5px) skewX(3deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes elEarth {
  0%   { opacity: 0; transform: translateY(26px); }
  55%  { opacity: 1; transform: translateY(-6px); }
  75%  { transform: translateY(2px); }
  100% { opacity: 1; transform: none; }
}
@keyframes elFire {
  0%   { opacity: 0; transform: scale(0.4); filter: brightness(1); }
  45%  { opacity: 1; transform: scale(1.22); filter: brightness(1.5); }
  70%  { transform: scale(0.93); }
  100% { opacity: 1; transform: none; filter: brightness(1); }
}
@keyframes elAir {
  0%   { opacity: 0; transform: translateY(-26px) rotate(-10deg); }
  60%  { opacity: 1; transform: translateY(4px) rotate(4deg); }
  100% { opacity: 1; transform: none; }
}

/* — avatar state glow on the portrait — */
.hero-photo-ring:hover { animation: avatarState 1.5s ease-in-out infinite; }
.hero-photo-ring:hover .hero-photo { filter: brightness(1.07); }
@keyframes avatarState {
  0%, 100% { box-shadow: 0 8px 26px rgba(60, 45, 20, 0.28), 0 0 22px 6px rgba(140, 210, 255, 0.55); }
  50%      { box-shadow: 0 8px 26px rgba(60, 45, 20, 0.28), 0 0 46px 16px rgba(170, 228, 255, 0.85); }
}

/* — hero ambience: clouds & rising motes — */
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; }
.hero-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cloud {
  position: absolute;
  width: 140px;
  height: 34px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 40px;
  filter: blur(2px);
  box-shadow: 32px -15px 0 4px rgba(255, 255, 255, 0.45), 66px -5px 0 8px rgba(255, 255, 255, 0.38);
  animation: drift linear infinite;
}
.c1 { top: 13%; animation-duration: 75s;  animation-delay: -20s; }
.c2 { top: 32%; animation-duration: 100s; animation-delay: -60s; transform: scale(0.65); }
.c3 { top: 6%;  animation-duration: 120s; animation-delay: -90s; transform: scale(1.25); }
@keyframes drift { from { left: -240px; } to { left: 108%; } }
.mote {
  position: absolute;
  bottom: -14px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0;
  animation: rise linear infinite;
}
.m1 { left: 12%; background: #e8934a; animation-duration: 11s; }
.m2 { left: 28%; background: #7fb3d5; animation-duration: 14s; animation-delay: 3s;   width: 7px; height: 7px; }
.m3 { left: 47%; background: #a9cc78; animation-duration: 12s; animation-delay: 6s; }
.m4 { left: 63%; background: #e8b04b; animation-duration: 15s; animation-delay: 1.5s; width: 6px; height: 6px; }
.m5 { left: 78%; background: #e8934a; animation-duration: 10s; animation-delay: 4.5s; }
.m6 { left: 90%; background: #7fb3d5; animation-duration: 13s; animation-delay: 7.5s; width: 7px; height: 7px; }
@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 0.75; }
  90%  { opacity: 0.45; }
  100% { transform: translateY(-105vh) translateX(34px); opacity: 0; }
}

/* — section dividers — */
.divider { line-height: 0; display: block; }
.divider svg { width: 100%; height: 56px; display: block; }
.div-rock  { background: var(--parchment); }
.div-rock path  { fill: var(--earth-soft); }
.div-wave  { background: var(--earth-soft); }
.div-wave path  { fill: var(--parchment); }
.div-mtn   { background: var(--parchment); }
.div-mtn path   { fill: #2b2620; }
.div-cloud { background: #2b2620; }
.div-cloud path { fill: var(--parchment); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zoom { transform: none; opacity: 1; transition: none; }
  .water-card, .fire-card, .air-card::after,
  .nav.past-photo .nav-brand-photo,
  .hero-photo-ring:hover { animation: none !important; }
  .el { animation: none; opacity: 1; }
  .hero-sky, #loader { display: none; }
}
