@font-face {
  font-family: 'PolySans';
  src: url('fonts/PolySans-Font-Family/polysanstrial-slim.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'PolySans';
  src: url('fonts/PolySans-Font-Family/polysanstrial-median.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'PolySans';
  src: url('fonts/PolySans-Font-Family/polysanstrial-neutral.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'PolySans';
  src: url('fonts/PolySans-Font-Family/polysanstrial-bulky.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'PolySans';
  src: url('fonts/PolySans-Font-Family/polysansitalictrial-medianitalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
}

:root {
  --bg: #F7F6F3;
  --text: #16171a;
  --border: #e2e4e8;
  --toggle-bg: #e2e4e8;
  --toggle-knob: #F7F6F3;
  --grid-line: rgba(0, 0, 0, 0.035);
  --accent: rgb(158, 240, 26);
}

html[data-theme="dark"] {
  --bg: #16171a;
  --text: #f2f3f5;
  --border: #2c2e33;
  --toggle-bg: #2c2e33;
  --toggle-knob: #16171a;
  --grid-line: rgba(255, 255, 255, 0.045);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

::selection {
  background: var(--text);
  color: var(--bg);
}

::-moz-selection {
  background: var(--text);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text);
  opacity: 0.5;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'PolySans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 400;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
}

.logo,
.footer-brand,
.nav-links button,
.footer-nav button,
.back-link,
.pager-link {
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* ---------- header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  z-index: 10;
}

.logo {
  display: grid;
  place-items: center;
  height: 40px;
}

.logo-img {
  grid-area: 1 / 1;
  height: 40px;
  width: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

html[data-theme="dark"] .logo-img.logo-dark {
  opacity: 1;
}

html[data-theme="light"] .logo-img.logo-light {
  opacity: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links button {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0.7;
  padding: 0;
  white-space: nowrap;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.nav-links button::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links button:hover {
  opacity: 1;
  color: var(--accent);
}

.nav-links button:hover::after {
  transform: scaleX(1);
}

.theme-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: var(--toggle-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle .knob {
  width: 20px;
  height: 20px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--toggle-knob);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

html[data-theme="dark"] .theme-toggle .knob {
  transform: translateX(22px);
}

@media (max-width: 600px) {
  .site-header {
    padding: 16px;
  }
}

/* ---------- mobile off-canvas nav ---------- */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 90;
}

.mobile-nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 84vw);
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -30px 0 60px rgba(0, 0, 0, 0.25);
  z-index: 91;
  display: flex;
  flex-direction: column;
  padding: 24px 28px 32px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.mobile-nav-brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.mobile-nav-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-nav-close:hover {
  opacity: 0.7;
  transform: rotate(90deg);
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-links li {
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateX(24px);
}

.mobile-nav.is-open .mobile-nav-links li {
  animation: mobileNavItemIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.06s + 0.1s);
}

@keyframes mobileNavItemIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-nav-links button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 18px 2px;
  margin: 0;
  text-align: left;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-links button:hover,
.mobile-nav-links button:active {
  color: var(--accent);
  padding-left: 10px;
}

.mobile-nav-bottom {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.mobile-nav-bottom a {
  display: flex;
  color: var(--text);
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.mobile-nav-bottom a:hover {
  opacity: 1;
}

@media (max-width: 700px) {
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, #000 15%, rgba(0,0,0,0.3) 65%);
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, #000 15%, rgba(0,0,0,0.3) 65%);
  pointer-events: none;
  z-index: -1;
}

.tagline {
  position: absolute;
  top: 110px;
  left: 24px;
  right: 24px;
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.corner-text {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 360px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.6;
}

.hero-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grid-line);
}

.hero-earth {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 770px;
  height: 770px;
  max-width: 96.25vw;
  max-height: 96.25vw;
  border: none;
  border-radius: 50%;
  background: transparent;
  /* translate is a % of this element's own box, so the corner-bleed
     stays proportional at any size instead of a fixed px clipping away
     a much bigger share of the circle on small screens */
  transform: translate(16%, 16%) rotate(50deg);
  pointer-events: none;
}

/* the tagline and corner text are absolutely positioned on desktop so they
   can overlay the earth precisely, but on narrow screens the earth is
   nearly full-width and there's no room beside it - stack the text in
   normal flow at the top instead of overlapping the globe */
@media (max-width: 700px) {
  .hero {
    height: auto;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    padding: 96px 0 40px;
  }

  .tagline,
  .corner-text {
    position: static;
    max-width: none;
    margin-left: 24px;
    margin-right: 24px;
  }

  .tagline {
    font-size: clamp(1.9rem, 8vw, 2.75rem);
    margin-bottom: 20px;
  }

  .hero-earth {
    max-width: 80vw;
    max-height: 80vw;
  }
}

/* ---------- shared section layout ---------- */

.projects-section,
.latest-project,
.articles-section {
  position: relative;
  background: var(--bg);
  padding: 100px 24px;
  transition: background-color 0.3s ease;
}

.latest-project {
  /* establishes a stacking context so the grid-overlay child's
     z-index:-1 stays contained above this section's own background
     instead of escaping to a broader context and rendering behind it */
  z-index: 0;
}

.projects-section {
  padding-top: 60px;
}

.articles-section {
  padding-bottom: 140px;
}

.latest-project,
.articles-section {
  border-top: 1px solid var(--border);
}

.projects-section .section-inner,
.latest-project .section-inner,
.articles-section .section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.projects-section h2,
.latest-project h2,
.articles-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 16px;
}

.projects-section .section-intro,
.articles-section .section-intro {
  max-width: 560px;
  color: var(--text);
  opacity: 0.6;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 56px;
}

/* ---------- projects grid ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 620px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.project-card:hover {
  transform: translateY(-3px);
}

.project-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--border);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease;
}

.project-card:hover .project-card-image {
  border-color: var(--text);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.06);
}

.project-card-body {
  padding: 18px 4px 4px;
  text-align: left;
}

.project-card-body h3 {
  margin: 10px 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project-card-body p {
  margin: 0;
  color: var(--text);
  opacity: 0.55;
  font-size: 0.88rem;
  line-height: 1.5;
}

.project-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text);
  opacity: 0.45;
  white-space: nowrap;
}

/* ---------- latest project spotlight ---------- */

.latest-project-card {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.latest-project-image {
  flex: 1 1 360px;
  max-width: 480px;
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.latest-project-content {
  flex: 1 1 280px;
}

.latest-project-content h3 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  margin: 12px 0 16px;
  letter-spacing: -0.01em;
}

.latest-project-content p {
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 0.6;
  margin: 0;
  max-width: 440px;
}

.latest-project-image,
.latest-project-content {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.latest-project-card.is-transitioning .latest-project-image,
.latest-project-card.is-transitioning .latest-project-content {
  opacity: 0;
  transform: translateY(6px);
}

.latest-project-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
}

.latest-project-prev {
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.latest-project-prev:hover {
  opacity: 1;
}

.latest-project-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #0c0f08;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.latest-project-cta:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.project-card.is-highlighted {
  border-color: var(--accent);
  transition: border-color 0.4s ease;
}

/* ---------- articles list ---------- */

.articles-list {
  border-top: 1px solid var(--border);
}

.article-row {
  display: grid;
  width: 100%;
  text-align: left;
  grid-template-columns: 96px 1fr 20px;
  align-items: center;
  column-gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.article-row:hover {
  background: var(--grid-line);
}

.article-thumb {
  width: 96px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.article-info h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.article-info p {
  margin: 0 0 10px;
  color: var(--text);
  opacity: 0.55;
  font-size: 0.88rem;
  line-height: 1.5;
}

.article-arrow {
  color: var(--text);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.article-row:hover .article-arrow {
  opacity: 0.7;
  transform: translateX(0);
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}

.article-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  opacity: 0.85;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.article-author:hover {
  opacity: 1;
  text-decoration: underline;
}

.author-pfp {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.article-byline-date {
  color: var(--text);
  opacity: 0.4;
}

/* ---------- article detail page ---------- */

.article-page {
  padding: 110px 24px 120px;
}

.article-page-inner {
  max-width: 700px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  opacity: 0.6;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 32px;
  transition: opacity 0.2s ease;
}

.back-link:hover {
  opacity: 1;
}

.article-page-cover {
  width: 100%;
  height: clamp(200px, 40vw, 360px);
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin-bottom: 32px;
}

.article-page-inner h1 {
  font-size: clamp(1.8rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 24px;
}

.article-page-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.article-body p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  opacity: 0.75;
  margin: 0 0 24px;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-pager {
  display: flex;
  border-top: 1px solid var(--border);
  margin-top: 56px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 48%;
  padding: 24px 0;
  text-align: left;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.pager-next {
  margin-left: auto;
  align-items: flex-end;
  text-align: right;
}

.pager-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text);
  opacity: 0.45;
}

.pager-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.pager-link:hover .pager-title {
  opacity: 1;
  text-decoration: underline;
}

/* ---------- about page ---------- */

.about-page {
  padding: 110px 24px 120px;
}

.about-page-inner {
  max-width: 700px;
  margin: 0 auto;
}

.about-page-inner h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
}

.about-page-inner p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  opacity: 0.75;
  margin: 0 0 24px;
}

.about-page-inner p:last-child {
  margin-bottom: 0;
}

.about-page-inner h1 .handle-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.about-page-inner h1 .handle-link:hover {
  opacity: 0.8;
}

/* ---------- archive page ---------- */

.archive-section {
  padding: 110px 24px 40px;
}

.archive-section .section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.archive-section h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.archive-section .section-intro {
  max-width: 560px;
  color: var(--text);
  opacity: 0.6;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 56px;
}

.archive-list {
  border-top: 1px solid var(--border);
}

.archive-empty {
  border-top: 1px solid var(--border);
  padding: 32px 4px 0;
  text-align: center;
}

.archive-empty p {
  margin: 0;
  color: var(--text);
  opacity: 0.5;
  font-size: 0.95rem;
}

.archive-row {
  display: grid;
  width: 100%;
  text-align: left;
  grid-template-columns: 64px 1fr auto 20px;
  align-items: center;
  column-gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.archive-row:hover {
  background: var(--grid-line);
}

.archive-row:hover .archive-thumb {
  opacity: 1;
}

.archive-arrow {
  color: var(--text);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.archive-row:hover .archive-arrow {
  opacity: 0.7;
  transform: translateX(0);
}

.archive-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  opacity: 0.7;
}

.archive-info h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0.75;
}

.archive-info p {
  margin: 0;
  color: var(--text);
  opacity: 0.5;
  font-size: 0.88rem;
  line-height: 1.5;
}

.archive-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text);
  opacity: 0.4;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .archive-row {
    grid-template-columns: 48px 1fr;
  }
  .archive-thumb {
    width: 48px;
    height: 48px;
  }
  .archive-tag,
  .archive-arrow {
    display: none;
  }
  .article-row {
    grid-template-columns: 64px 1fr;
  }
  .article-thumb {
    width: 64px;
    height: 48px;
  }
  .article-arrow {
    display: none;
  }
}

/* ---------- footer ---------- */

.page-footer-mini {
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  text-align: center;
}

.page-footer-mini-inner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.page-footer-mini-inner a {
  display: flex;
  color: var(--text);
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.page-footer-mini-inner a:hover {
  opacity: 1;
}

.page-footer-mini p {
  margin: 0;
  color: var(--text);
  opacity: 0.4;
  font-size: 0.8rem;
}

.site-footer {
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--border);
  transition: background-color 0.3s ease;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 56px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.footer-left {
  flex: 1 1 480px;
  max-width: 620px;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.footer-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0.45;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.footer-socials a {
  display: flex;
  color: var(--text);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.footer-socials a:hover {
  opacity: 1;
}


.footer-disclaimer p {
  margin: 0 0 16px;
  max-width: 560px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.5;
}

.footer-disclaimer p:last-child {
  margin-bottom: 0;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-nav button,
.footer-nav a {
  position: relative;
  display: inline-block;
  width: fit-content;
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.55;
  text-decoration: none;
  text-align: left;
  padding: 0;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.footer-nav button::after,
.footer-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.footer-nav button:hover::after,
.footer-nav a:hover::after {
  transform: scaleX(1);
}

.footer-nav button:hover,
.footer-nav a:hover {
  opacity: 1;
  color: var(--accent);
}

/* ---------- legal pages (terms / privacy) ---------- */

.legal-page {
  padding: 110px 24px 120px;
}

.legal-page-inner {
  max-width: 700px;
  margin: 0 auto;
}

.legal-page-inner h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.legal-page-updated {
  color: var(--text);
  opacity: 0.45;
  font-size: 0.85rem;
  margin: 0 0 40px;
}

.legal-page-inner h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
}

.legal-page-inner h2:first-of-type {
  margin-top: 0;
}

.legal-page-inner p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  opacity: 0.75;
  margin: 0 0 18px;
}

.legal-page-inner p:last-child {
  margin-bottom: 0;
}

.legal-page-inner a {
  color: var(--accent);
  text-decoration: none;
}

.legal-page-inner a:hover {
  text-decoration: underline;
}

/* ---------- cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: -120px;
  z-index: 60;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: bottom 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.cookie-banner.is-visible {
  bottom: 20px;
  opacity: 1;
}

.cookie-banner p {
  flex: 1 1 320px;
  margin: 0;
  color: var(--text);
  opacity: 0.75;
  font-size: 0.85rem;
  line-height: 1.5;
}

.cookie-banner a {
  color: var(--accent);
  text-decoration: none;
}

.cookie-banner a:hover {
  text-decoration: underline;
}

.cookie-accept {
  flex: 0 0 auto;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #0c0f08;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cookie-accept:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    padding: 16px;
  }

  .cookie-accept {
    width: 100%;
  }
}
