/* ============================================================
   Sofia Cruz Portfolio
   Design tokens
   ============================================================ */
:root {
  --paper: #faf8f4;
  --paper-deep: #efeae1;
  --white: #ffffff;
  --ink: #1b1b22;
  --ink-soft: #6e6e76;
  --ink-faint: #a3a3aa;
  --accent: #6b2a4e;
  --accent-soft: #8a3f68;
  --line: rgba(27, 27, 34, 0.09);

  /* Fixed tokens for the full-screen menu: it stays exactly this dark,
     high-contrast look regardless of the light/dark toggle below. */
  --ink-fixed: #1b1b22;
  --paper-fixed: #faf8f4;
  --accent-fixed: #8a3f68;
  /* Literal white, for text/icons over photographs (hero, lightbox, image
     badges), which must stay white regardless of --white (a themed surface
     color) or the light/dark toggle. */
  --pure-white: #ffffff;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-sm: 4px;
  --radius: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --topbar-h: 76px;
}

/* Dark theme: toggled via the sun/moon button, persisted in localStorage.
   Because every rule below reads color from --paper/--ink/etc rather than
   hardcoding light or dark values, redefining these tokens re-themes the
   whole site. The menu popup deliberately does NOT use these, see above. */
[data-theme="dark"] {
  --paper: #15151b;
  --paper-deep: #1d1d24;
  --white: #201f26;
  --ink: #f3f1ec;
  --ink-soft: #a9a9b2;
  --ink-faint: #75757e;
  --accent: #d98db8;
  --accent-soft: #c97ba3;
  --line: rgba(245, 243, 238, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- Preload screen ---------------- */
/* Shown on every page while it loads its own required data (settings
   always; portfolio entries too, on the Work page). When the browser
   cache from a previous page is warm, this resolves almost immediately,
   when it isn't (new tab, cache expired, first visit), it properly
   waits rather than revealing a page with empty/loading sections. */
.preload-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s var(--ease);
}

.preload-screen__mark {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  animation: preload-pulse 1.4s ease-in-out infinite;
}

@keyframes preload-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

.preload-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------------- Top bar ---------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar__mark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}

.topbar__menu {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink);
  transition: color 0.3s var(--ease);
}

.topbar__menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.topbar__menu-icon span {
  display: block;
  height: 1px;
  background: currentColor;
}

.topbar--hero {
  background: transparent;
  border-bottom-color: transparent;
}

.topbar--hero .topbar__mark,
.topbar--hero .topbar__menu {
  color: var(--pure-white);
}

.topbar--hero.is-scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.topbar--hero.is-scrolled .topbar__mark,
.topbar--hero.is-scrolled .topbar__menu {
  color: var(--ink);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.3s var(--ease);
}

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

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.topbar--hero .theme-toggle {
  color: var(--pure-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.topbar--hero.is-scrolled .theme-toggle {
  color: var(--ink);
  border-color: var(--line);
}

/* ---------------- Full-screen menu ---------------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--ink-fixed);
  color: var(--paper-fixed);
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}

.menu-overlay.is-open {
  transform: translateY(0);
}

.menu-overlay__close {
  position: absolute;
  top: 14px;
  right: calc(var(--gutter) - 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: var(--paper-fixed);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s var(--ease);
}

.menu-overlay__close:hover {
  opacity: 0.7;
}

.menu-overlay__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-overlay__group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-overlay__link {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  font-weight: 400;
  color: var(--paper-fixed);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.menu-overlay__link span {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--accent-fixed);
}

.menu-overlay__link:hover,
.menu-overlay__link.is-current {
  opacity: 1;
  transform: translateX(10px);
}

.menu-overlay__sub {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2vw, 22px);
  margin-left: calc(2.4ch + 20px);
}

.menu-overlay__sub a {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--paper-fixed);
  opacity: 0.45;
  text-decoration: none;
  transition: opacity 0.25s var(--ease);
}

.menu-overlay__sub a:hover {
  opacity: 1;
}

/* ---------------- Landing hero (nav sits directly on the photo) ---------------- */
.landing-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  color: var(--pure-white);
}

.landing-hero__bg {
  position: absolute;
  inset: 0;
}

.landing-hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.landing-hero__bg img.is-active {
  opacity: 1;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 20, 0.58) 0%, rgba(15, 15, 20, 0.42) 50%, rgba(15, 15, 20, 0.62) 100%);
  pointer-events: none;
}

.landing-nav {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(10px, 2vw, 20px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.landing-nav__item {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2.4vw, 24px);
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.8s var(--ease) forwards;
}

.landing-nav__group {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vw, 12px);
}

.landing-nav__group:nth-child(1) .landing-nav__item {
  animation-delay: 0.05s;
}
.landing-nav > .landing-nav__item:nth-child(2) {
  animation-delay: 0.18s;
}
.landing-nav > .landing-nav__item:nth-child(3) {
  animation-delay: 0.28s;
}

.landing-nav__num {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--accent-fixed);
  min-width: 2.4ch;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.landing-nav__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 6.4vw, 4.6rem);
  letter-spacing: -0.015em;
  color: var(--pure-white);
  opacity: 0.68;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.landing-nav__item:hover .landing-nav__name,
.landing-nav__item:focus-visible .landing-nav__name {
  opacity: 1;
  transform: translateX(10px);
}

.landing-nav__sub {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2vw, 24px);
  margin-left: calc(2.4ch + clamp(14px, 2.4vw, 24px));
  opacity: 0;
  animation: reveal 0.8s var(--ease) 0.32s forwards;
}

.landing-nav__sub a {
  font-family: var(--sans);
  font-size: clamp(0.76rem, 2.6vw, 0.92rem);
  color: var(--pure-white);
  opacity: 0.45;
  text-decoration: none;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
  transition: opacity 0.25s var(--ease);
}

.landing-nav__sub a:hover,
.landing-nav__sub a:focus-visible {
  opacity: 1;
}

.landing-hero__foot {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: clamp(24px, 4vw, 40px);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.65);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------- Page header (Work / Contact) ---------------- */
.page-head {
  padding: calc(var(--topbar-h) + clamp(48px, 8vw, 88px)) 0 clamp(32px, 5vw, 52px);
}

.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  max-width: 18ch;
}

.page-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 50ch;
  margin: 0 0 28px;
}

/* ---------------- Filter tabs ---------------- */
.filters {
  position: relative;
  display: flex;
  gap: clamp(16px, 3vw, 30px);
  flex-wrap: wrap;
}

.filters button {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.94rem;
  color: var(--ink-soft);
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.filters button:hover {
  color: var(--ink);
}

.filters button.is-active {
  color: var(--ink);
  font-weight: 600;
}

.filters__indicator {
  position: absolute;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: left 0.35s var(--ease), width 0.35s var(--ease);
}

/* ---------------- Section / Gallery ---------------- */
.section {
  padding: 0 0 clamp(56px, 8vw, 96px);
}

.gallery-bleed {
  padding: 0 clamp(12px, 2.4vw, 28px);
}

.gallery {
  columns: 4;
  column-gap: clamp(16px, 2.4vw, 28px);
}

@media (max-width: 900px) {
  .gallery {
    columns: 2;
  }
}

@media (max-width: 540px) {
  .gallery {
    columns: 1;
  }
}

.card {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: clamp(16px, 2.4vw, 28px);
  background: var(--white);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.7s var(--ease) forwards;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* Cycle through a few proportions so tiles read as a curated
   mosaic rather than a uniform, spreadsheet-like grid. */
.card:nth-child(5n + 1) {
  aspect-ratio: 3 / 4;
}
.card:nth-child(5n + 2) {
  aspect-ratio: 1 / 1;
}
.card:nth-child(5n + 3) {
  aspect-ratio: 4 / 5;
}
.card:nth-child(5n + 4) {
  aspect-ratio: 5 / 6;
}
.card:nth-child(5n + 5) {
  aspect-ratio: 4 / 3;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px -24px rgba(27, 27, 34, 0.4);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card:hover img {
  transform: scale(1.05);
}

.card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(4px);
  color: var(--ink-fixed);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 1;
}

.card__count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(27, 27, 34, 0.65);
  backdrop-filter: blur(4px);
  color: var(--pure-white);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 1;
}

.card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
  background: linear-gradient(0deg, rgba(27, 27, 34, 0.85), rgba(27, 27, 34, 0));
  color: var(--pure-white);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.card:hover .card__caption {
  opacity: 1;
  transform: translateY(0);
}

.card__caption strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
}

.gallery__empty {
  padding: 64px 0;
  text-align: center;
  color: var(--ink-soft);
  column-span: all;
}

/* ---------------- Loading skeleton ---------------- */
.skeleton {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: clamp(16px, 2.4vw, 28px);
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--paper-deep) 30%, #f8f6f1 50%, var(--paper-deep) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton:nth-child(4n + 1) {
  aspect-ratio: 3 / 4;
}
.skeleton:nth-child(4n + 2) {
  aspect-ratio: 1 / 1;
}
.skeleton:nth-child(4n + 3) {
  aspect-ratio: 4 / 5;
}
.skeleton:nth-child(4n + 4) {
  aspect-ratio: 5 / 6;
}

@keyframes shimmer {
  0% {
    background-position: 140% 0;
  }
  100% {
    background-position: -40% 0;
  }
}

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 26, 0.94);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vw;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox__inner {
  max-width: 900px;
  max-height: 90vh;
  text-align: center;
  transform: scale(0.97);
  transition: transform 0.3s var(--ease);
}

.lightbox.is-open .lightbox__inner {
  transform: scale(1);
}

.lightbox__inner img {
  max-height: 72vh;
  width: auto;
  margin: 0 auto 16px;
  border-radius: var(--radius-sm);
}

.lightbox__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
}

.lightbox__arrow {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--pure-white);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.lightbox__arrow:hover {
  border-color: var(--pure-white);
  background: rgba(255, 255, 255, 0.08);
}

.lightbox__dots {
  display: flex;
  gap: 8px;
}

.lightbox__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.lightbox__dot.is-active {
  background: var(--pure-white);
  transform: scale(1.3);
}

.lightbox__inner h3 {
  font-family: var(--serif);
  color: var(--pure-white);
  font-weight: 500;
  margin: 0 0 6px;
}

.lightbox__inner p {
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  font-size: 0.9rem;
}

.lightbox__close {
  position: absolute;
  top: 28px;
  right: clamp(20px, 4vw, 56px);
  background: none;
  border: none;
  color: var(--pure-white);
  font-size: 1.7rem;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s var(--ease);
}

.lightbox__close:hover {
  opacity: 0.7;
}

/* ---------------- About page: modern byline, small photo ---------------- */
.about-modern {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(72px, 10vw, 120px);
}

.about-modern__byline {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(28px, 4vw, 40px);
  padding-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}

.about-modern__avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.about-modern__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.about-modern__meta strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.005em;
}

.about-modern__meta span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.about-modern__body p {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 18px;
  font-size: 1.08rem;
  line-height: 1.75;
}

.text-skeleton span {
  display: block;
  height: 15px;
  width: 100%;
  margin-bottom: 11px;
  border-radius: 4px;
  background: linear-gradient(100deg, var(--paper-deep) 30%, #f8f6f1 50%, var(--paper-deep) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.about-modern__actions {
  margin-top: 10px;
}

/* ---------------- Contact: side-by-side list + form ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: clamp(8px, 1.5vw, 16px);
  padding-bottom: clamp(64px, 9vw, 110px);
}

@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: clamp(28px, 6vw, 48px);
  }
}

.contact-list {
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(22px, 3.4vw, 32px) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.contact-row:first-child {
  padding-top: 0;
}

.contact-row__left {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 32px);
}

.contact-row__num {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-faint);
  min-width: 2ch;
}

.contact-row__label {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 4px;
}

.contact-row__value {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  font-weight: 400;
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.contact-row:hover .contact-row__value {
  transform: translateX(8px);
  color: var(--accent);
}

.contact-row__arrow {
  font-size: 1.3rem;
  color: var(--ink-faint);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.contact-row:hover .contact-row__arrow {
  transform: translateX(6px);
  color: var(--accent);
}

/* ---------------- Contact form ---------------- */
.contact-form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 36px);
}

.contact-form-panel h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.contact-form-panel__hint {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.contact-form-panel .field {
  margin-bottom: 18px;
}

.contact-form-panel label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.contact-form-panel input,
.contact-form-panel textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease);
}

.contact-form-panel input:focus,
.contact-form-panel textarea:focus {
  border-color: var(--accent);
}

.contact-form-panel textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-form__status {
  font-size: 0.88rem;
  color: var(--accent);
}

.contact-form__status.is-error {
  color: #b3435f;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------------- Footer ---------------- */
.foot {
  padding: 28px 0 44px;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.foot .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.foot a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.foot a:hover {
  color: var(--ink);
}

.foot__social {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ---------------- Small-screen overrides ---------------- */
@media (max-width: 420px) {
  .menu-overlay__nav {
    gap: 4px;
  }

  .menu-overlay__link {
    gap: 12px;
    font-size: clamp(1.7rem, 10vw, 2.4rem);
  }

  .menu-overlay__link span {
    font-size: 0.76rem;
  }

  .menu-overlay__sub a {
    font-size: 0.8rem;
  }

  .menu-overlay__sub {
    margin-left: calc(2ch + 12px);
    gap: 12px;
  }

  .landing-nav {
    gap: 8px;
  }

  .landing-nav__item {
    gap: 12px;
  }

  .landing-nav__name {
    font-size: clamp(1.5rem, 9vw, 2.1rem);
  }

  .landing-nav__num {
    font-size: 0.76rem;
    min-width: 2ch;
  }

  .landing-nav__sub {
    margin-left: calc(2ch + 12px);
    gap: 12px;
  }
}
