/* =============== THEME =============== */
:root {
  /* Soft light theme */
  --bg: #eceeea;        /* soft warm gray-sage background */
  --surface: #f7f8f5;   /* gentle off-white card surface */
  --text: #2b332f;      /* slightly softer dark text */
  --muted: #6d746e;

  --brand-sage: #9BB39E;
  --brand-sage-600: #6F8E7A;
  --brand-lavender: #CBB7EA;
  --brand-eggplant: #5E4B6E;

  --card-shadow: 0 8px 24px rgba(0,0,0,0.05);
  --border-subtle: rgba(0,0,0,0.08);
  --ring: rgba(155, 179, 158, 0.25);
}

:root[data-theme="dark"] {
  /* Dark theme */
  --bg: #111314;
  --surface: #181b1c;
  --text: #e8ece8;
  --muted: #a7b2ab;

  --brand-sage: #8FAE9A;
  --brand-sage-600: #7AA38D;
  --brand-lavender: #BAA7D7;
  --brand-eggplant: #CBB7EA;

  --card-shadow: 0 16px 40px rgba(0,0,0,0.6);
  --border-subtle: rgba(255,255,255,0.08);
  --ring: rgba(155, 179, 158, 0.35);
}

/* =============== GLOBAL =============== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow-x: hidden;
}

/* =============== HEADER / NAV =============== */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--border-subtle);
  max-width: 100%;
}

.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.brand-role {
  font-size: 0.8rem;
  color: var(--muted);
}

nav {
  margin-left: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

nav a:hover {
  background: rgba(155, 179, 158, 0.22);
  color: var(--text);
}

nav a.active {
  background: var(--brand-sage-600);
  color: #fff;
}

/* Theme toggle */
.theme-toggle {
  margin-left: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
}

.theme-toggle:hover {
  background: color-mix(in srgb, var(--surface) 85%, var(--brand-sage) 15%);
}

/* Hamburger menu */
.nav-toggle {
  display: none;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  font-size: 1.1rem;
}
.nav-toggle:hover {
  background: color-mix(in srgb, var(--surface) 85%, var(--brand-sage) 15%);
}

/* =============== MAIN =============== */
main {
  flex: 1;
}

.section {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2.4rem 1.5rem;
}

.hero {
  padding-top: 2.8rem;
  padding-bottom: 2.2rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2.4rem;
}

/* =============== TYPOGRAPHY =============== */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-title {
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  line-height: 1.2;
  margin: 0.75rem 0 0.4rem;
}

.hero-highlight {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brand-eggplant);
  margin-top: 0.35rem;
}

.hero-lede {
  max-width: 40rem;
  font-size: 0.98rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.section-heading {
  font-size: 1.6rem;
  margin: 0.4rem 0;
}

.section-subtitle {
  max-width: 40rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.2rem 0 1.4rem;
}

.card-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card-text {
  font-size: 0.92rem;
  color: var(--muted);
}

.price-tag {
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0.1rem 0 0.6rem;
}

/* =============== CARDS & GRIDS =============== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
}

.portfolio-grid {
  margin-top: 1.2rem;
}

.project-card .card-thumb {
  border-radius: 0.9rem;
  overflow: hidden;
  margin-bottom: 0.7rem;
}

.card-kicker {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.chip {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--surface) 80%, var(--brand-sage) 20%);
}

/* Lists */
.bullet-list {
  list-style: disc;
  padding-left: 1.1rem;
  margin: 0.2rem 0 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Portrait */
.portrait-frame {
  display: flex;
}

.portrait-inner {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3/4;
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem 1.2rem;
  margin-top: 1.2rem;
}

label {
  font-size: 0.8rem;
  color: var(--muted);
}

input,
textarea,
select {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px var(--ring);
}

/* LIGHTBOX */
#lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

#lightbox-overlay.is-visible {
  display: flex;
}

.lightbox-inner {
  max-width: min(90vw, 900px);
  max-height: 90vh;
  position: relative;
}

#lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(0,0,0,0.7);
}

#lightbox-close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}

.footer-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Links */
a {
  color: var(--brand-lavender);
}

a:hover {
  text-decoration: underline;
}

/* soften images in dark mode */
:root[data-theme="dark"] img {
  filter: brightness(0.96);
}

/* =============== RESPONSIVE =============== */
@media (max-width: 720px) {

  .nav-inner {
    padding: 0.8rem 1.1rem;
    gap: 0.5rem;
  }

  /* show hamburger */
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  /* dropdown nav */
  #site-nav {
    width: 100%;
    margin-top: 0.25rem;
    display: none;
  }

  #site-nav.is-open {
    display: block;
  }

  #site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  #site-nav a {
    width: 100%;
    padding: 0.45rem 0.6rem;
  }

  .theme-toggle {
    margin-left: 0;
  }

  .section {
    padding: 1.8rem 1.1rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-meta-row {
    grid-template-columns: 1fr;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
