/* Design system: #EBD5AB #8BAE66 #628141 #1B211A (+ white/black) */

:root {
  --ivory: #FBF8F0;          /* almost-white background */
  --primary: #1B211A;        /* near-black green */
  --primary-light: #2A3328;
  --accent: #8BAE66;         /* green */
  --accent-hover: #7CA45B;
  --olive: #628141;          /* olive */
  --sand: #EBD5AB;           /* warm sand */
  --surface: #FFFFFF;
  --ink: #0B0F0E;
  --ink-muted: rgba(11, 15, 14, 0.72);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Keep footer at bottom; no content below it */
.footer-wrapper {
  margin-top: auto;
}

.main-content {
  flex: 1 1 auto;
  min-height: 0;
  opacity: 0;
  transform: translateY(16px);
  animation: mainEnter 0.6s ease forwards;
}

h1, h2, h3, h4, .font-heading {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
}

/* Contain blog post content so it cannot break out below footer */
.blog-post-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

/* ——— Buttons: scale + shadow bloom ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 18px rgba(27, 33, 26, 0.26);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 32px rgba(27, 33, 26, 0.34);
}

.btn-outline {
  border: 1px solid rgba(11, 15, 14, 0.18);
  color: var(--ink);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--accent);
}

/* ——— Card system: rounded-2xl, shadow, hover lift, scale, border, gradient overlay, icon motion ——— */
.card {
  background: var(--surface);
  border-radius: 1.25rem;
  border: 1px solid rgba(27, 33, 26, 0.10);
  padding: 28px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease, border-color 0.3s ease;
  will-change: transform;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 56px rgba(11, 15, 14, 0.10);
  border-color: rgba(139, 174, 102, 0.32);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(27, 33, 26, 0.12) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card-icon-wrap {
  transition: transform 0.35s ease;
}

.card:hover .card-icon-wrap {
  transform: translateY(-2px) scale(1.05);
}

/* Subtle card tilt (use .card-tilt on parent) */
.card-tilt {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-tilt:hover {
  transform: perspective(800px) rotateX(1deg) rotateY(-1deg) translateY(-6px);
}

/* ——— Image zoom + overlay ——— */
.img-zoom-hover {
  overflow: hidden;
}

.img-zoom-hover img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.img-zoom-hover:hover img {
  transform: scale(1.08);
}

.img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(27, 33, 26, 0.22) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.img-zoom-hover:hover .img-overlay,
.group:hover .img-overlay {
  opacity: 1;
}

/* ——— Link underline slide ——— */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.link-underline:hover::after {
  width: 100%;
}

.link-underline-hover:hover {
  color: var(--accent);
}

/* ——— Navbar ——— */
#siteHeader.navbar-shrink {
  height: 4rem;
}

#siteHeader.navbar-shrink .nav-logo-img {
  width: 2.5rem;
  height: 2.5rem;
}

/* Translucent when scrolled (content slightly visible through) */
#siteHeader {
  background: transparent;
  border: 1px solid rgba(27, 33, 26, 0.08);
  box-shadow: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

#siteHeader.navbar-scrolled {
  background: rgba(251, 248, 240, 0.72);
  border-color: rgba(27, 33, 26, 0.12);
  box-shadow: 0 16px 44px rgba(11, 15, 14, 0.12);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

/* Mobile menu slide-down */
.mobile-menu {
  transition: max-height 0.35s ease-out;
}

.mobile-menu.closed {
  max-height: 0;
}

.mobile-menu:not(.closed) {
  max-height: 320px;
}

/* ——— Section backgrounds (alternating) ——— */
.bg-section-light { background: var(--surface); }
.bg-section-cream { background: var(--ivory); }
.bg-section-soft { background: rgba(235, 213, 171, 0.55); }

/* Footer: deep teal (overridden by utility classes when needed) */
.footer-premium {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-premium .footer-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 24px 24px;
}

.footer-social:hover .footer-social-icon {
  filter: brightness(0) invert(1);
}

.footer-link {
  transition: transform 0.25s ease;
}

/* Hero CTA: arrow hidden by default (opacity+width); hover = gradient + arrow visible */
.hero-cta-btn .hero-cta-arrow {
  opacity: 0;
  visibility: hidden;
}
.hero-cta-btn:hover .hero-cta-arrow {
  opacity: 1;
  visibility: visible;
}
.hero-cta-btn:hover {
  background: #628141 !important;
}

/* Hero CTA main (green) */
.hero-cta-main:hover {
  background: #628141 !important;
}

/* Hero image: box shadow dropping downward */
.hero-image-shadow {
  box-shadow: 0 14px 48px rgba(11, 15, 14, 0.14);
}

/* Typing effect above hero: soft cursor pulse (no blink) */
.typing-line {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #8BAE66;
  margin-left: 1px;
  animation: typing-cursor-pulse 1.2s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes typing-cursor-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Card dance: slight slant/tilt on hover (cute hover) */
.card-dance {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
.card-dance:hover {
  transform: translateY(-6px) rotate(-2deg) scale(1.02);
}

/* Service cards: dance slant on hover */
.card-dance-slant {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
.card-dance-slant:hover {
  transform: translateY(-6px) rotate(-2deg) scale(1.02);
}

/* No gap above first section (hero under navbar) */
.main-content > section:first-child {
  margin-top: 0;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease 0.25s forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Project Overview: small green underline (5px, 8BAE66), not full width */
.project-overview-title {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 5px solid #8BAE66;
  width: auto;
  max-width: 80%;
}

/* ——— Work page cards: full image, bottom overlay, hover blur + link icon ——— */
.work-page-card {
  min-height: 0;
}
.work-card-title {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  font-weight: 500;
}
@media (min-width: 768px) {
  .work-card-title {
    font-size: 1.2rem;
  }
}
.work-page-card-inner {
  will-change: filter;
}
.work-page-card:hover .work-page-card-inner {
  filter: blur(6px);
}