@import url('https://fonts.googleapis.com/css2?family=Athiti:wght@200;300;400;500;600;700&family=Ephesis&family=Exo+2:ital,wght@0,100..900;1,100..900&family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --button-bg-color: rgba(0, 64, 84, 0.9);
  --logo-beige: rgba(198, 160, 106, 0.9);
  --logo-grey: rgba(255, 255, 255, 0.35);
  --header-bg: rgba(23, 23, 23, 1);
  --header-shadow: 0 6px 20px rgba(0,0,0,0.65);

  --nav-gap: clamp(10px, 2vw, 40px);
  --nav-hit-y: clamp(7px, 1vw, 8px);
  --nav-hit-x: clamp(10px, 1.8vw, 20px);
  --nav-radius: 1px;

  --bracket-size: 12px;
  --bracket-stroke: 1px;
  --bracket-color: rgba(255,255,255,0.95);
  --bracket-active-color: var(--logo-grey);

  --transition-fast: 180ms;
  --transition-page: 220ms;

  --container-max: 1180px;
  --content-max: 980px;
  --section-x: clamp(18px, 4vw, 32px);
  --section-y: clamp(28px, 5vw, 56px);

  --surface-light: rgba(248, 244, 238, 0.78);
  --surface-light-strong: rgba(250, 247, 242, 0.88);
  --surface-line: rgba(198, 160, 106, 0.22);

  --text-main: #4b433b;
  --text-title: #2c2723;
  --text-soft: #6e6257;

  --accent-gold: rgba(198, 160, 106, 0.95);
  --shadow-soft: 0 12px 34px rgba(0,0,0,0.12);
}

/* =========================
   THEME LIGHT
   ========================= */

body.theme-light {
  --button-bg-color: rgba(163, 133, 88, 0.92);
  --logo-beige: rgba(198, 160, 106, 0.96);
  --logo-grey: rgba(99, 89, 78, 0.45);
  --header-bg: rgba(246, 242, 236, 0.92);
  --header-shadow: 0 6px 20px rgba(52, 41, 27, 0.40);

  --bracket-color: rgba(92, 78, 60, 0.85);
  --bracket-active-color: rgba(92, 78, 60, 0.45);

  --surface-light: rgba(255, 255, 255, 0.78);
  --surface-light-strong: rgba(255, 255, 255, 0.90);
  --surface-line: rgba(198, 160, 106, 0.18);

  --text-main: #433a31;
  --text-title: #241f1a;
  --text-soft: #6f6255;

  --accent-gold: rgba(186, 149, 95, 0.98);
  --shadow-soft: 0 12px 34px rgba(70, 54, 32, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Athiti', sans-serif;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

a{
  color: inherit;
}

@media (min-width: 900px) {
  body {
    overflow-y: scroll;
  }
}

.wallPaper {
  background:
    radial-gradient(
      circle at 100% 100%,
      rgba(202,158,103,0.55) 0%,
      rgba(202,158,103,0.20) 25%,
      rgba(0,0,0,0) 40%
    ),
    radial-gradient(
      circle at 0% 40%,
      rgba(202,158,103,0.35) 0%,
      rgba(202,158,103,0.15) 10%,
      rgba(0,0,0,0) 20%
    ),
    linear-gradient(
      180deg,
      #191919 0%,
      #111111 30%,
      #0a0a0a 70%
    );
}

body.theme-light .wallPaper {
  background:
    radial-gradient(
      circle at 100% 100%,
      rgba(198,160,106,0.26) 0%,
      rgba(198,160,106,0.10) 22%,
      rgba(0,0,0,0) 42%
    ),
    radial-gradient(
      circle at 0% 35%,
      rgba(198,160,106,0.16) 0%,
      rgba(198,160,106,0.06) 12%,
      rgba(0,0,0,0) 24%
    ),
    linear-gradient(
      180deg,
      #f7f3ee 0%,
      #f1ece5 38%,
      #ebe5dd 100%
    );
}

.wallPaper::after{
  content:"";
  position:absolute;
  inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.10'/%3E%3C/svg%3E");
  pointer-events:none;
}

body.theme-light .wallPaper::after {
  opacity: 0.25;
}

#wallPaper {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.page {
  flex: 1 0 auto;
  min-height: 0;
}

/* =========================
   FOOTER
   ========================= */

.siteFooter {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(14px, 2vw, 18px) 16px clamp(16px, 2.5vw, 24px);
  background: var(--header-bg);
  box-shadow: 0 -6px 20px rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  transition:
    background-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease;
}

body.theme-light .siteFooter {
  box-shadow: 0 -6px 20px rgba(76, 59, 40, 0.08);
}

.footerInner {
  position: relative;
  width: min(100%, var(--container-max));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  color: rgba(255,255,255,0.86);
  text-shadow: 0 2px 10px rgba(0,0,0,0.42);
  padding-right: 120px;
  transition: color 220ms ease, text-shadow 220ms ease;
}

body.theme-light .footerInner {
  color: rgba(63, 53, 43, 0.88);
  text-shadow: none;
}

.footerTop p {
  margin: 6px 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.65;
}

.footerNav {
  width: 100%;
  display: flex;
  justify-content: center;
}

.footerLinks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 14px;
  margin: 0;
  padding: 0;
}

.footerLinks li {
  list-style: none;
}

.footerLinks a {
  position: relative;
  display: inline-block;
  padding: 7px 12px;
  text-decoration: none;
  font-size: clamp(11px, 1.3vw, 13px);
  color: #aaa;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--nav-radius);
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition:
    color var(--transition-fast) ease,
    background-color var(--transition-fast) ease,
    box-shadow var(--transition-fast) ease,
    opacity var(--transition-fast) ease;
}

body.theme-light .footerLinks a {
  color: rgba(83, 72, 61, 0.88);
}

.footerLinks a:hover,
.footerLinks a:focus-visible {
  color: #1a1a1a;
  background-color: var(--logo-beige);
  box-shadow:
    0 3px 7px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.18);
}

body.theme-light .footerLinks a:hover,
body.theme-light .footerLinks a:focus-visible {
  color: #2b241d;
  box-shadow:
    0 3px 10px rgba(88, 69, 44, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 0 rgba(0,0,0,0.08);
}

.footerLinks a:focus-visible {
  outline: none;
}

/* =========================
   SWITCH THEME
   ========================= */

.themeSwitchWrap {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  z-index: 3;
}

.themeSwitch {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: rgba(255,255,255,0.72);
  font-family: 'Mulish', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 180ms ease, color 220ms ease;
}

.themeSwitch:hover {
  opacity: 0.9;
}

.themeSwitch:focus-visible {
  outline: none;
}

body.theme-light .themeSwitch {
  color: rgba(78, 66, 54, 0.76);
}

.themeSwitch__label {
  opacity: 0.62;
  transition: opacity 180ms ease, color 180ms ease;
}

.themeSwitch__track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.36),
    0 2px 8px rgba(0,0,0,0.18);
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

body.theme-light .themeSwitch__track {
  background: rgba(198, 160, 106, 0.18);
  border-color: rgba(198, 160, 106, 0.32);
  box-shadow:
    inset 0 2px 6px rgba(90, 69, 43, 0.10),
    0 2px 8px rgba(90, 69, 43, 0.06);
}

.themeSwitch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.80) 45%, rgba(210,210,210,0.72) 100%);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.65);
  transform: translateX(0);
  transition:
    transform 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

body.theme-light .themeSwitch__thumb {
  transform: translateX(20px);
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,1) 0%, rgba(244,238,226,1) 45%, rgba(214,189,146,0.95) 100%);
  box-shadow:
    0 2px 6px rgba(104, 79, 50, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.75);
}

body:not(.theme-light) .themeSwitch__label--dark,
body.theme-light .themeSwitch__label--light {
  opacity: 1;
}

/* =========================
   LIGHT THEME HELPERS FOR NAV
   ========================= */

body.theme-light .mainNav a {
  color: rgba(74, 63, 52, 0.88);
}

body.theme-light .mainNav a:hover,
body.theme-light .mainNav a.active,
body.theme-light .mainNav a.nav-pressed {
  color: #2b241d;
}

body.theme-light .mainNav a:hover {
  box-shadow:
    0 3px 7px rgba(93, 71, 42, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -1px 0 rgba(0,0,0,0.08);
}

body.theme-light .mainNav a.active,
body.theme-light .mainNav a.nav-pressed {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.24);
}

@media (max-width: 767px) {
  .siteFooter {
    padding-top: 14px;
    padding-bottom: 18px;
  }

  .footerInner {
    gap: 14px;
  }

  .footerTop p {
    font-size: 11px;
    line-height: 1.6;
  }

  .footerLinks {
    gap: 8px 10px;
  }

  .footerLinks a {
    padding: 7px 10px;
    letter-spacing: 0.08em;
  }

  .themeSwitchWrap {
    position: static;
    justify-content: center;
    margin-top: 2px;
  }

  .footerInner {
  padding-right: 0;
}
}