/* ═══ BASE — Variables, Reset, Typography, Shared ═══ */

:root {
  --bg: #FAFAF8;
  --bg2: #F3F2EF;
  --bg3: #ECEAE5;
  --card: #FFFFFF;
  --card-h: #F7F6F3;
  --t1: #1A1A1A;
  --t2: #5C5C5C;
  --t3: #9A9A9A;
  --a1: #1A6B3C;
  --a2: #2B5EA7;
  --a3: #C4550A;
  --a4: #7B4BAA;
  --bdr: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(250, 250, 248, .85);
  --fd: 'DM Serif Display', Georgia, serif;
  --fb: 'Instrument Sans', -apple-system, sans-serif;
  --fm: 'JetBrains Mono', monospace;
}

html[data-theme="dark"] {
  --bg: #141414;
  --bg2: #1C1C1C;
  --bg3: #222222;
  --card: #1A1A1A;
  --card-h: #222222;
  --t1: #E8E8E8;
  --t2: #A0A0A0;
  --t3: #666666;
  --a1: #2EAD5E;
  --a2: #4A8FE0;
  --a3: #E07030;
  --a4: #A070D0;
  --bdr: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(20, 20, 20, .85);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease !important;
}

body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--fb);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(26, 107, 60, 0.12);
}

/* ═══ GRADIENT TEXT ═══ */
.gradient-text {
  background: linear-gradient(135deg, var(--a1), var(--a2), var(--a4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text--warm {
  background: linear-gradient(135deg, var(--a3), var(--a1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text--cool {
  background: linear-gradient(135deg, var(--a2), var(--a4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══ SCROLL PROGRESS ═══ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--a1);
  z-index: 300;
  transition: width .1s linear;
}

/* ═══ PAGE FADE-IN ═══ */
@keyframes pi {
  from { opacity: 0 }
  to { opacity: 1 }
}

@keyframes fu {
  from { opacity: 0; transform: translateY(20px) }
  to { opacity: 1; transform: translateY(0) }
}

/* ═══ REVEAL ANIMATION ═══ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.25, 1, .5, 1), transform .8s cubic-bezier(.25, 1, .5, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ SHARED LAYOUT ═══ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.img-full {
  width: 100%;
  display: block;
  margin: 2rem 0;
}

/* ═══ THEME TOGGLE ═══ */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--t3);
  transition: all .3s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--t1);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform .4s ease;
}

.theme-toggle:hover svg {
  transform: rotate(30deg);
}

.theme-toggle__moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle__sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle__moon {
  display: block;
}

/* ═══ FOOTER ═══ */
.footer {
  padding: 4rem 0;
  border-top: 1px solid var(--bdr);
  text-align: center;
  background: var(--bg2);
}

.footer__text {
  font-family: var(--fm);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--t3);
  text-transform: uppercase;
}

/* ═══ SHARED RESPONSIVE ═══ */
@media(max-width:768px) {
  .container,
  .container--wide {
    padding: 0 1.25rem;
  }
  .footer {
    padding: 3rem 0;
  }
}

@media(max-width:480px) {
  .container,
  .container--wide {
    padding: 0 1rem;
  }
  .home-hero__name {
    font-size: clamp(2rem, 5vw, 4.5rem);
  }
}
