/* ============================================================
   LINDEN — Interior Designer Portfolio Template
   Organic / Scandinavian warmth: warm oat canvas, forest-green
   primary with a honey accent, soft rounded forms, curved
   section dividers, big rounded imagery, material-swatch detail,
   generous whitespace, Spectral + Mulish pairing.
   Stack: HTML5 + CSS3 + vanilla JS (no frameworks).
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Light (default) — warm oat / linen */
  --bg:      #ECE7DD;   /* warm oat */
  --bg-2:    #F5F1E9;   /* lighter linen (tint sections) */
  --panel:   #FBF9F4;   /* cards */
  --ink:     #2B2A23;   /* warm charcoal */
  --ink-soft:#6A665A;
  --ink-faint:#9A9587;
  --forest:  #47583C;   /* primary */
  --forest-2:#37472E;
  --sage:    #7E9068;   /* soft green */
  --honey:   #C79A4B;   /* warm accent */
  --line:    rgba(43, 42, 35, .14);
  --line-soft:rgba(43, 42, 35, .07);
  --shadow:  0 26px 50px -34px rgba(43, 42, 35, .5);

  --f-display: "Spectral", Georgia, serif;
  --f-body:    "Mulish", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 60px);
  --sp: clamp(74px, 10vw, 148px);
  --r: 22px;
  --r-lg: 34px;
  --ease: cubic-bezier(.3,.7,.3,1);
  --nav-h: 76px;
}

html[data-theme="dark"] {
  --bg:      #201E18;   /* warm espresso */
  --bg-2:    #29261F;
  --panel:   #2E2B23;
  --ink:     #ECE7DB;
  --ink-soft:#ADA692;
  --ink-faint:#726C5C;
  --forest:  #9DB185;   /* lifted sage-green */
  --forest-2:#B6C79F;
  --sage:    #8CA06F;
  --honey:   #D8B063;
  --line:    rgba(236, 231, 219, .15);
  --line-soft:rgba(236, 231, 219, .08);
  --shadow:  0 26px 55px -34px rgba(0, 0, 0, .7);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.68;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sage); color: #211f18; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
main { position: relative; z-index: 2; }

/* ---------- 3. TYPE HELPERS ---------- */
.eyebrow, .s-head__eyebrow { font-family: var(--f-body); font-weight: 600; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--forest); display: inline-flex; align-items: center; gap: .6em; }
.s-head { margin-bottom: clamp(34px, 5vw, 60px); }
.s-head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.s-head__eyebrow { margin-bottom: 14px; }
.s-head__eyebrow span[data-no] { color: var(--honey); }
.s-head__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.2rem, 5.6vw, 4rem); line-height: 1.05; letter-spacing: -.01em; }
.leaf { width: 14px; height: 14px; background: var(--sage); border-radius: 0 100% 0 100%; display: inline-block; }

/* ---------- 4. BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; gap: .55em; font-family: var(--f-body); font-weight: 600; font-size: .84rem; letter-spacing: .02em; padding: 14px 26px; border-radius: 40px; border: 1.5px solid transparent; transition: transform .35s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
.btn--solid { background: var(--forest); color: #F6F3EA; box-shadow: 0 14px 26px -14px var(--forest); }
html[data-theme="dark"] .btn--solid { color: #211f18; }
.btn--solid:hover { background: var(--forest-2); transform: translateY(-2px); }
html[data-theme="dark"] .btn--solid:hover { background: var(--forest-2); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--line:hover { border-color: var(--forest); color: var(--forest); transform: translateY(-2px); }
.btn--lg { padding: 16px 30px; font-size: .9rem; }

/* ---------- 5. NAV ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; color: #F6F3EA; background: var(--forest); border-radius: 50% 50% 50% 8px; }
html[data-theme="dark"] .brand__mark { color: #211f18; }
.brand__name { font-family: var(--f-display); font-weight: 500; font-size: 1.15rem; letter-spacing: -.01em; }

.nav__links { display: flex; gap: 28px; }
.nav__links a { font-family: var(--f-body); font-weight: 600; font-size: .82rem; color: var(--ink-soft); position: relative; padding: 4px 0; transition: color .3s var(--ease); }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--honey); border-radius: 2px; transition: width .35s var(--ease); }
.nav__links a:hover, .nav__links a.active { color: var(--forest); }
.nav__links a.active::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 15px; }
.theme-toggle { width: 44px; height: 30px; border: 1px solid var(--line); border-radius: 30px; position: relative; display: grid; place-items: center; background: var(--panel); }
.theme-toggle span { position: absolute; font-size: .9rem; line-height: 1; transition: opacity .3s var(--ease), transform .3s var(--ease); }
[data-ic-sun] { opacity: 0; transform: scale(.6) rotate(-40deg); color: var(--honey); }
[data-ic-moon] { opacity: 1; color: var(--ink-soft); }
html[data-theme="dark"] [data-ic-sun] { opacity: 1; transform: none; }
html[data-theme="dark"] [data-ic-moon] { opacity: 0; transform: scale(.6); }
.nav__cta { padding: 10px 20px; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.hamburger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), opacity .3s var(--ease); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--honey); }

/* ---------- 6. HERO ---------- */
.hero { padding: clamp(44px, 7vw, 92px) 0 clamp(60px, 8vw, 100px); position: relative; overflow-x: clip; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow { margin-bottom: 24px; }
.hero__name { font-family: var(--f-display); font-weight: 500; font-size: clamp(3rem, 8.5vw, 6rem); line-height: .98; letter-spacing: -.02em; margin-bottom: 12px; }
.hero__name-2 { font-style: italic; color: var(--forest); }
.hero__role { font-family: var(--f-body); font-weight: 600; font-size: clamp(.9rem, 1.6vw, 1.05rem); letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 26px; }
.hero__typed { font-family: var(--f-display); font-style: italic; font-size: clamp(1.2rem, 2.5vw, 1.7rem); line-height: 1.35; min-height: 1.4em; margin-bottom: 22px; color: var(--ink); }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--honey); transform: translateY(3px); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__intro { max-width: 46ch; color: var(--ink-soft); margin-bottom: 32px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__figure { position: relative; }
.hero__frame { position: relative; border-radius: 50% 50% var(--r-lg) var(--r-lg) / 34% 34% var(--r-lg) var(--r-lg); overflow: hidden; box-shadow: var(--shadow); z-index: 2; }
.hero__frame img { aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.hero__badge { position: absolute; bottom: 22px; left: -14px; z-index: 3; font-family: var(--f-body); font-weight: 600; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; background: var(--panel); color: var(--ink); padding: 10px 16px; border-radius: 30px; box-shadow: var(--shadow); }
.hero__arc { position: absolute; top: -22px; right: -22px; width: 120px; height: 120px; border-radius: 50%; background: var(--honey); opacity: .3; z-index: 1; }

.wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.wave svg { width: 100%; height: clamp(40px, 6vw, 80px); display: block; }
.wave path { fill: var(--bg-2); }

/* ---------- 7. SECTION SHELL ---------- */
.section { padding: var(--sp) 0; position: relative; }
.section--tint { background: var(--bg-2); }

/* ---------- 8. ABOUT ---------- */
.about { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.about__lead { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.35rem, 2.8vw, 2rem); line-height: 1.4; margin-bottom: 26px; }
.about__lead::first-letter { color: var(--forest); }
.about__text p { color: var(--ink-soft); margin-bottom: 16px; max-width: 60ch; }
.about__facts { background: var(--panel); border-radius: var(--r); padding: 8px 24px; box-shadow: var(--shadow); }
.about__facts li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.about__facts li:last-child { border-bottom: none; }
.about__facts .k { font-weight: 600; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.about__facts .v { font-family: var(--f-display); font-size: 1.1rem; }

/* ---------- 9. SKILLS ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 46px) clamp(38px, 6vw, 72px); }
.skill__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 11px; }
.skill__name { font-family: var(--f-display); font-size: 1.15rem; }
.skill__pct { font-family: var(--f-body); font-weight: 600; font-size: .82rem; color: var(--forest); }
.skill__bar { height: 10px; background: color-mix(in srgb, var(--ink) 10%, transparent); border-radius: 20px; overflow: hidden; }
.skill__fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--forest), var(--sage)); border-radius: 20px; transition: width 1.3s var(--ease); }

/* ---------- 10. EXPERIENCE ---------- */
.timeline { position: relative; padding-left: clamp(24px, 4vw, 40px); }
.timeline::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 clamp(30px, 4vw, 46px); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: calc(-1 * clamp(24px, 4vw, 40px)); top: 6px; width: 13px; height: 13px; border-radius: 50% 50% 50% 2px; background: var(--panel); border: 2px solid var(--forest); transform: translateX(-5.5px); transition: background .3s var(--ease); }
.tl-item:hover::before { background: var(--honey); border-color: var(--honey); }
.tl-item__date { font-family: var(--f-body); font-weight: 600; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--honey); margin-bottom: 8px; }
.tl-item__role { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.2rem, 2.4vw, 1.6rem); line-height: 1.1; }
.tl-item__org { font-weight: 600; font-size: .9rem; color: var(--forest); margin: 4px 0 10px; }
.tl-item__desc { color: var(--ink-soft); max-width: 62ch; }

/* ---------- 11. EDUCATION ---------- */
.edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.edu-card { background: var(--panel); border-radius: var(--r); padding: 30px; box-shadow: var(--shadow); transition: transform .4s var(--ease); }
.edu-card:hover { transform: translateY(-5px); }
.edu-card__year { font-family: var(--f-body); font-weight: 600; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--honey); }
.edu-card__deg { font-family: var(--f-display); font-weight: 500; font-size: 1.35rem; margin: 12px 0 5px; }
.edu-card__school { color: var(--forest); font-weight: 600; font-size: .95rem; }
.edu-card__note { color: var(--ink-soft); font-size: .92rem; margin-top: 12px; }

/* ---------- 12. WORK (projects) ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn { font-family: var(--f-body); font-weight: 600; font-size: .76rem; letter-spacing: .02em; padding: 9px 18px; border: 1px solid var(--line); border-radius: 30px; color: var(--ink-soft); transition: all .3s var(--ease); }
.filter-btn:hover { border-color: var(--forest); color: var(--forest); }
.filter-btn.active { background: var(--forest); color: #F6F3EA; border-color: var(--forest); }
html[data-theme="dark"] .filter-btn.active { color: #211f18; }

.work { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: clamp(24px, 3vw, 36px); }
.card { background: var(--panel); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .45s var(--ease); }
.card:hover { transform: translateY(-8px); }
.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; margin: 10px 10px 0; border-radius: calc(var(--r-lg) - 10px); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__scope { position: absolute; top: 14px; left: 14px; font-family: var(--f-body); font-weight: 600; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--ink); padding: 6px 12px; border-radius: 30px; backdrop-filter: blur(6px); }
.card__body { padding: 22px 24px 8px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__name { font-family: var(--f-display); font-weight: 500; font-size: 1.4rem; }
.card__meta { font-family: var(--f-body); font-weight: 600; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--honey); margin-top: -4px; }
.card__desc { color: var(--ink-soft); font-size: .92rem; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.card__tags span { font-family: var(--f-body); font-weight: 600; font-size: .66rem; letter-spacing: .04em; padding: 5px 11px; border: 1px solid var(--line); border-radius: 30px; color: var(--ink-soft); }
.card__links { display: flex; gap: 10px; padding: 16px 24px 24px; }
.card__links a { flex: 1; justify-content: center; padding: 11px; font-size: .76rem; }

/* ---------- 13. STATS ---------- */
.stats { background: var(--forest); color: #F1EEE3; }
html[data-theme="dark"] .stats { background: var(--bg-2); color: var(--ink); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 14%; height: 72%; width: 1px; background: rgba(241,238,227,.28); }
html[data-theme="dark"] .stat:not(:last-child)::after { background: var(--line); }
.stat__num { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.5rem, 6vw, 4.2rem); line-height: 1; letter-spacing: -.01em; }
.stat__num .stat__suffix { color: var(--honey); }
.stat__label { font-family: var(--f-body); font-weight: 600; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; margin-top: 12px; opacity: .85; }

/* ---------- 14. SERVICES ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.service { background: var(--panel); border-radius: var(--r); padding: 34px 30px; box-shadow: var(--shadow); transition: transform .4s var(--ease); }
.service:hover { transform: translateY(-5px); }
.service__ic { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50% 50% 50% 10px; background: color-mix(in srgb, var(--sage) 24%, transparent); color: var(--forest); margin-bottom: 18px; }
.service__ic svg { width: 24px; height: 24px; }
.service__title { font-family: var(--f-display); font-weight: 500; font-size: 1.4rem; margin-bottom: 10px; }
.service__desc { color: var(--ink-soft); font-size: .92rem; }

/* ---------- 15. TOOLS ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 12px; }
.tools li { display: flex; align-items: center; gap: 10px; font-family: var(--f-body); font-weight: 600; font-size: .84rem; padding: 12px 20px; border-radius: 40px; background: var(--panel); box-shadow: var(--shadow); transition: transform .35s var(--ease); }
.tools li:hover { transform: translateY(-3px); }
.tools li::before { content: ""; width: 9px; height: 9px; background: var(--sage); border-radius: 0 100% 0 100%; }

/* ---------- 16. AWARDS + CERTS ---------- */
.cred { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); }
.cred__label { font-family: var(--f-body); font-weight: 700; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--forest); margin-bottom: 22px; }
.awards li { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.awards li:first-child { border-top: 1px solid var(--line); }
.awards__year { font-family: var(--f-body); font-weight: 700; font-size: .82rem; color: var(--honey); }
.awards__title { font-family: var(--f-display); font-size: 1.15rem; }
.awards__by { color: var(--ink-soft); font-size: .88rem; }
.certs li { display: flex; align-items: baseline; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.certs li::before { content: "❦"; color: var(--honey); }
.certs__name { font-family: var(--f-display); font-size: 1.08rem; }
.certs__meta { display: block; font-family: var(--f-body); font-weight: 600; font-size: .74rem; color: var(--ink-faint); margin-top: 2px; }

/* ---------- 17. TESTIMONIALS ---------- */
.quotes { position: relative; min-height: 220px; }
.quote { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease); display: flex; flex-direction: column; gap: 26px; }
.quote.active { opacity: 1; visibility: visible; position: relative; }
.quote__text { font-family: var(--f-display); font-weight: 500; font-style: italic; font-size: clamp(1.4rem, 3.2vw, 2.2rem); line-height: 1.4; max-width: 26ch; }
.quote__text::before { content: "“"; color: var(--honey); }
.quote__by { display: flex; align-items: center; gap: 16px; }
.quote__avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--panel); box-shadow: var(--shadow); }
.quote__name { font-family: var(--f-display); font-weight: 500; }
.quote__role { font-family: var(--f-body); font-weight: 600; font-size: .76rem; color: var(--ink-soft); }
.quotes__dots { display: flex; gap: 10px; margin-top: 38px; }
.quotes__dots button { width: 30px; height: 6px; border-radius: 6px; background: var(--line); transition: background .3s var(--ease); }
.quotes__dots button.active { background: var(--forest); }

/* ---------- 18. RESUME BANNER ---------- */
.resume { background: var(--panel); border-radius: var(--r-lg); padding: clamp(32px, 5vw, 58px); box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; position: relative; overflow: hidden; }
.resume::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--sage); opacity: .16; }
.resume > * { position: relative; }
.resume__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 12px 0 10px; letter-spacing: -.01em; }
.resume__text { color: var(--ink-soft); max-width: 46ch; }

/* ---------- 19. FAQ ---------- */
.faq { max-width: 860px; display: grid; gap: 14px; }
.faq-item { background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; padding: 0 26px; }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.05rem, 2.1vw, 1.35rem); }
.faq-q__icon { position: relative; width: 17px; height: 17px; flex-shrink: 0; }
.faq-q__icon::before, .faq-q__icon::after { content: ""; position: absolute; background: var(--forest); border-radius: 2px; transition: transform .35s var(--ease); }
.faq-q__icon::before { top: 7.5px; left: 0; width: 17px; height: 2px; }
.faq-q__icon::after { left: 7.5px; top: 0; width: 2px; height: 17px; }
.faq-item.open .faq-q__icon::after { transform: scaleY(0); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .4s var(--ease); }
.faq-a p { color: var(--ink-soft); padding: 0 0 24px; max-width: 68ch; }

/* ---------- 20. CONTACT ---------- */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact__blurb { font-family: var(--f-display); font-weight: 500; font-size: 1.4rem; line-height: 1.5; margin-bottom: 30px; }
.contact__list { margin-bottom: 30px; }
.contact__list li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.contact__list .lbl { font-family: var(--f-body); font-weight: 600; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 3px; }
.contact__list .val { font-size: 1.05rem; transition: color .3s var(--ease); }
.contact__list a:hover .val { color: var(--forest); }

.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); transition: all .3s var(--ease); }
.socials a:hover { background: var(--forest); color: #F6F3EA; transform: translateY(-3px); border-color: var(--forest); }
html[data-theme="dark"] .socials a:hover { color: #211f18; }
.socials svg { width: 18px; height: 18px; }

.cform { background: var(--panel); border-radius: var(--r-lg); padding: clamp(26px, 4vw, 42px); box-shadow: var(--shadow); }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; display: flex; flex-direction: column; }
.field label { font-family: var(--f-body); font-weight: 600; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.field input, .field textarea { font-family: var(--f-body); font-size: .98rem; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; transition: border-color .3s var(--ease); resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--forest); }
.field__err { font-family: var(--f-body); font-weight: 600; font-size: .72rem; color: #B4553F; margin-top: 6px; min-height: 1em; }
.cform__submit { width: 100%; justify-content: center; margin-top: 4px; }
.cform__note { font-family: var(--f-body); font-weight: 600; font-size: .82rem; margin-top: 16px; text-align: center; min-height: 1.2em; }
.cform__note.ok { color: var(--forest); }
.cform__note.bad { color: #B4553F; }

/* ---------- 21. FOOTER ---------- */
.footer { background: var(--forest); color: #E9E6DA; padding: 0 0 40px; margin-top: var(--sp); position: relative; }
html[data-theme="dark"] .footer { background: var(--bg-2); color: var(--ink); }
.footer__wave { line-height: 0; margin-top: -1px; }
.footer__wave svg { width: 100%; height: clamp(40px, 6vw, 70px); display: block; }
.footer__wave path { fill: var(--bg); }
html[data-theme="dark"] .footer__wave path { fill: var(--bg); }
.footer__inner { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 40px; align-items: start; padding-top: 20px; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer .brand__mark { background: var(--honey); color: #211f18; }
.footer__name { font-family: var(--f-display); font-weight: 500; font-size: 1.2rem; }
.footer__title { font-family: var(--f-body); font-weight: 600; font-size: .76rem; opacity: .8; margin-top: 2px; }
.footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; }
.footer__nav a { font-family: var(--f-body); font-weight: 600; font-size: .8rem; opacity: .82; transition: opacity .3s var(--ease); }
.footer__nav a:hover { opacity: 1; color: var(--honey); }
.footer .socials--footer { justify-content: flex-end; }
.footer .socials--footer a { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: inherit; }
.footer .socials--footer a:hover { background: var(--honey); color: #211f18; border-color: var(--honey); }
.footer__legal { grid-column: 1 / -1; margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.16); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--f-body); font-weight: 600; font-size: .74rem; opacity: .85; }
html[data-theme="dark"] .footer__legal { border-top-color: var(--line); }
.footer__made strong { font-family: var(--f-display); font-style: italic; font-weight: 500; color: var(--honey); }

/* ---------- 22. BACK TO TOP ---------- */
.to-top { position: fixed; bottom: 26px; right: 26px; z-index: 90; width: 50px; height: 50px; display: grid; place-items: center; background: var(--forest); color: #F6F3EA; border-radius: 50% 50% 50% 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .4s var(--ease), visibility .4s, transform .4s var(--ease), background .3s var(--ease); }
html[data-theme="dark"] .to-top { color: #211f18; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--honey); color: #211f18; transform: translateY(-3px); }

/* ---------- 23. PRELOADER ---------- */
.preloader { position: fixed; inset: 0; z-index: 999; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; transition: opacity .6s var(--ease), visibility .6s; }
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__mark { font-family: var(--f-display); font-weight: 500; font-size: 2rem; width: 80px; height: 80px; display: grid; place-items: center; color: #F6F3EA; background: var(--forest); border-radius: 50% 50% 50% 14px; animation: bob 1.5s var(--ease) infinite; }
html[data-theme="dark"] .preloader__mark { color: #211f18; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.preloader__label { font-family: var(--f-body); font-weight: 600; font-size: .74rem; letter-spacing: .3em; color: var(--ink-soft); }

/* ---------- 24. SCROLL REVEAL ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- 25. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .about, .contact, .cred { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__figure { max-width: 400px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .stat:nth-child(2)::after { display: none; }
}
@media (max-width: 860px) {
  .nav__links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 28px; transform: translateY(-120%); transition: transform .45s var(--ease); box-shadow: var(--shadow); }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: 16px 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
  .nav__links a:last-child { border-bottom: none; }
  .hamburger { display: flex; }
  .nav__cta { display: none; }
  .skills { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer .socials--footer { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat::after { display: none !important; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
  .cform__row { grid-template-columns: 1fr; }
  .resume { flex-direction: column; align-items: flex-start; }
}

/* ---------- 26. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .caret { animation: none; }
}
