/* --------------------------------------------------------------
   BALANCED SOPHISTICATED THEME: neutral dark base with warm accents
   INCREASED TYPOGRAPHY: body 18px, comfortable reading sizes
   REDUCED COLOR CHAOS: restrained palette, purposeful highlights
   -------------------------------------------------------------- */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #f9f6f0;
  --bg-surface: #ffffff;
  --card-bg: rgba(250, 248, 245, 0.92);
  --border-light: rgba(0, 0, 0, 0.08);
  /* darker, richer accents for white background */
  --warm-sand: #b87c4a;
  --terracotta: #b45f3a;
  --deep-teal: #2d6b6c;
  --soft-amber: #c8873d;
  --muted-slate: #6b6b6b;
  --pure-white: #ffffff;
  --text-primary: #2c2822;
  --text-muted: #5a554c;
  --ff-serif: 'Playfair Display', Georgia, serif;
  --ff-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --ff-mono: 'DM Mono', monospace;
  --accent-gradient: linear-gradient(135deg, #e87a2e, #c95a1a);
  --accent-soft: #c8873d;
}

[data-theme="light"] {
  --bg-deep: #f9f6f0;
  --bg-surface: #ffffff;
  --card-bg: rgba(250, 248, 245, 0.92);
  --border-light: rgba(0, 0, 0, 0.08);
  --text-primary: #2c2822;
  --text-muted: #6e685e;
  --warm-sand: #b87c4a;
  --terracotta: #b45f3a;
  --deep-teal: #3d6e6f;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--ff-sans);
  font-size: 1.125rem;
  line-height: 1.6;
  transition: background 0.35s, color 0.3s;
  overflow-x: hidden;
}

::selection {
  background: var(--terracotta);
  color: #0f0e0c;
}

/* custom scroll */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--terracotta); border-radius: 8px; }

/* animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slowDrift {
  0% { transform: translate(0px, 0px) scale(1); }
  50% { transform: translate(15px, -12px) scale(1.05); }
  100% { transform: translate(-8px, 8px) scale(0.98); }
}

.fade-up { animation: fadeUp 0.65s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }

/* background blobs */
.blob-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.handwritten {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--terracotta);
}


.blob {
  position: absolute;
  filter: blur(90px);
  opacity: 0.2;
  border-radius: 50%;
  animation: slowDrift 28s infinite alternate ease-in-out;
}
.blob1 { width: 50vw; height: 50vw; background: #c97e5a; top: -20vh; left: -20vw; opacity: 0.12; animation-duration: 32s; }
.blob2 { width: 45vw; height: 45vw; background: #4f8b8c; bottom: -15vh; right: -15vw; opacity: 0.10; animation-duration: 27s; }
.blob3 { width: 38vw; height: 38vw; background: #d8a25c; top: 45vh; left: 55vw; opacity: 0.08; animation-duration: 35s; }

/* navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  background: rgba(250, 248, 245, 0.9);
  border-bottom: 1px solid var(--border-light);
}
[data-theme="light"] nav {
  background: rgba(250, 248, 245, 0.9);
}

.nav-logo {
  font-family: var(--ff-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  position: relative;
  text-decoration: none;
}

.logo-dot {
  color: #c97e5a;
  font-size: 1.2rem;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.nav-logo:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.nav-logo:hover .logo-dot {
  transform: rotate(20deg) scale(1.1);
  filter: drop-shadow(0 0 6px rgba(201,126,90,0.4));
}

.nav-logo::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.nav-logo:hover::after { width: 100%; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.2s;
}

.nav-links a:hover { color: var(--terracotta); }
.nav-links a.active { color: var(--deep-teal); border-bottom: 2px solid var(--warm-sand); }

.music-toggle {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-light);
  padding: 0.45rem 1.1rem;
  border-radius: 60px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
  font-family: var(--ff-sans);
}

.music-toggle:hover {
  border-color: var(--soft-amber);
  color: var(--soft-amber);
  background: rgba(200, 135, 61, 0.1);
}
/* hero */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.hero-content { max-width: 880px; }

.hero-eyebrow {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--deep-teal);
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.hero-eyebrow::before {
  content: '';
  width: 42px;
  height: 2px;
  background: var(--accent-gradient);
}

/* Hero headings (large display size) */
.hero h2 {
  font-family: var(--ff-serif);
  font-size: clamp(2.4rem, 8vw, 5.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}

.typing-wrapper {
  font-size: clamp(1.3rem, 4vw, 2rem);
  margin: 1.2rem 0;
  min-height: 3.2rem;
  font-weight: 500;
  color: var(--text-muted); /* Or use var(--terracotta) if you want it to pop */
}


/* Standard section headings */
h2 {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

/* buttons */
.btn-group {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  justify-content: center;
}

.btn {
  position: relative;
  padding: 14px 28px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.35s ease;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
}

.btn:hover::before { animation: shine 0.9s ease; }

@keyframes shine {
  100% { left: 140%; }
}

.btn-primary {
  background: linear-gradient(135deg, #4f8b8c, #2d6b6c);
  color: #fff;
  box-shadow: 0 12px 35px rgba(45, 107, 108, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 18px 45px rgba(45, 107, 108, 0.5);
}


.btn-outline {
  background: rgba(0, 0, 0, 0.03);
  color: #2c2822;
}
.btn-outline:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.15);
}

.btn:active { transform: scale(0.97); }

/* stats row */
.stats-row {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat-item .stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--ff-serif);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}

.stat-item .mono {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* containers & sections */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 3rem 0 2rem; }

.section-label {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-block;
  padding: 0.2rem 1rem;
  background: rgba(79, 139, 140, 0.18);
  border-radius: 40px;
  color: var(--deep-teal);
  margin-bottom: 1rem;
  font-weight: 500;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }

.card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 1.5rem;
  transition: all 0.25s;
  border: 1px solid rgba(44, 40, 34, 0.12); /* Crisper, organic border using your primary text tone */
  box-shadow: 0 4px 15px rgba(44, 40, 34, 0.03); /* Subtle anchoring shadow so it doesn't look washed out */
}


.card:hover {
  transform: translateY(-5px);
  border-color: rgba(45, 107, 108, 0.4);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
}

.card-icon { font-size: 2.2rem; margin-bottom: 0.9rem; }
.card h3 { font-family: var(--ff-serif); font-size: 1.45rem; margin-bottom: 0.6rem; font-weight: 600; }
.card p { font-size: 0.95rem; line-height: 1.5; color: var(--text-muted); }
.card span { font-size: 0.8rem; }

/* reading tracker */
.tracker-panel {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 32px;
  padding: 1.6rem;
  border: 1px solid rgba(79, 139, 140, 0.25);
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.progress-label { width: 130px; font-weight: 500; font-size: 0.9rem; }
.progress-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 0.4s;
}

.fill-green { background: linear-gradient(90deg, #4f8b8c, #6aa3a4); }
.fill-orange { background: linear-gradient(90deg, #c97e5a, #d89a6e); }
.fill-pink { background: #b5705c; }
.fill-blue { background: #5f9495; }

hr {
  margin: 2rem 0;
  border: none;
  height: 1px;
  background: var(--border-light);
}

/* footer */
footer {
  border-top: 1px solid var(--border-light);
  padding: 2rem 0 1.8rem;
  text-align: center;
  margin-top: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: 0.2s;
}

.footer-links a:hover { color: var(--terracotta); }

/* optional footer text styling */
.footer-title { font-family: var(--ff-serif); font-size: 0.95rem; }
.footer-location { color: var(--terracotta); }
.footer-tagline { font-family: var(--ff-mono); font-size: 0.7rem; margin-top: 0.3rem; }

/* hamburger menu (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: 0.3s;
  border-radius: 2px;
  display: block;
}

/* 2x2 journal grid */
.journal-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1rem 0 0.5rem;
}

.journal-note-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 1.2rem;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--terracotta);
  transition: all 0.2s ease;
}

.journal-note-card:hover {
  transform: translateY(-4px);
  border-left-width: 6px;
  border-color: var(--soft-amber);
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.15);
}

.note-date {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--terracotta);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  background: rgba(201,126,90,0.12);
  display: inline-block;
  padding: 0.1rem 0.7rem;
  border-radius: 30px;
}

.note-title {
  margin: 0.3rem 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--ff-serif);
}

.note-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.note-title a:hover { color: var(--terracotta); }

.note-excerpt {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.note-link {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--deep-teal);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s;
}

.note-link:hover { color: var(--terracotta); }

/* reading tracker list style */
.sketch-list {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--border-light);
}

.reading-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.reading-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
  font-size: 1rem;
}

.reading-item .book-title {
  font-weight: 500;
  color: var(--text-primary);
}

.reading-item .percentage {
  font-family: var(--ff-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--terracotta);
}

.reading-footer-stats {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--ff-mono);
}

/* blog & projects preview grids */
.blog-preview-grid,
.projects-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
  margin: 1.5rem 0;
}

/* contact cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
  color: var(--text-primary);
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--soft-amber);
}

.contact-emoji {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.contact-platform {
  font-weight: 600;
  font-size: 1rem;
}

.contact-handle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--ff-mono);
}

/* responsive */
@media (max-width: 780px) {
  body { font-size: 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 1.2rem; }
  .hero { min-height: 70vh; padding: 2rem 0 1rem; }
  .stats-row { gap: 1.4rem; }
  .container { padding: 0 1.2rem; }
  .card { padding: 1.3rem; }
  .progress-label { width: 100px; }

  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 70px; left: 0;
    width: 100%;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
    display: none;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    z-index: 99;
  }
  .nav-links.show { display: flex; }
  .nav-links a { font-size: 1rem; }

  .btn-group {
    flex-direction: column;
    gap: 14px;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }

  .journal-grid-2x2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .journal-note-card:hover { transform: none; }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
/* Social section styles */
.social-section {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.social-icon img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  transition: all 0.2s ease;
}

.social-icon:hover {
  transform: translateY(-3px);
}

.social-icon:hover img {
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Make section label smaller */
.social-section .section-label {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

/* Custom styling for card images */
/* Update this at the bottom of style.css */
.card-image {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px; /* Harmonizes perfectly with the outer card curve */
  margin-bottom: 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.04); /* Clean accent frame around your cover artwork */
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15); /* Rich, realistic 3D depth shadow */
}


/* Hero section structural improvement (desktop/tablet only) */
@media (min-width: 781px) {
  .hero .container {
    display: flex;
    justify-content: center;
  }
  .hero-content {
    width: 100%;
    max-width: 760px;
  }
}

.hero-image-wrapper img {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-light);
  display: block;
  margin: 0 auto;
}
/* ---------- COMPACT CARD – tuned for 2 columns ---------- */
.card-compact {
  padding: 1rem;
  border-radius: 18px;
  text-align: center;
  transition: all 0.2s;
}

.card-compact .card-image {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.8rem;
  width: 100%;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.card-compact h3 {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-family: var(--ff-serif);
}

.card-compact p {
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.75rem;
  border-radius: 24px;
  letter-spacing: 0.03em;
  width: 100%;
  justify-content: center;
}

/* mobile fine-tune for 2 columns */
@media (max-width: 480px) {
  .card-compact {
    padding: 0.6rem;
  }
  .card-compact .card-image {
    border-radius: 8px;
    margin-bottom: 0.4rem;
  }
  .card-compact h3 {
    font-size: 0.8rem;
  }
  .card-compact p {
    font-size: 0.6rem;
    -webkit-line-clamp: 2;
  }
  .btn-sm {
    font-size: 0.80rem;
    padding: 4px 10px;
  }
}
/* Force 2 columns on mobile for the book section only */
@media (max-width: 780px) {
  .grid-2-keep {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem;
  }
}
/* ---------- Light green Buy button ---------- */
.btn-buy-green {
  background: #d4edda;          /* light green */
  color: #155724;               /* dark green text for contrast */
  border-color: #b7d7b0;
  box-shadow: 0 2px 8px rgba(0,80,20,0.12);
}

.btn-buy-green:hover {
  background: #c3e6cb;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,80,20,0.18);
  border-color: #8fcb9a;
}

/* keep the existing 2‑column override (already in your CSS) */
@media (max-width: 780px) {
  .grid-2-keep {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem;
  }
}
/* ====== MEDIUM HERO IMAGE STYLING ====== */
.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.hero-image-wrapper img {
  width: 100%;
  /* Scaled down to a balanced medium width */
  max-width: 290px; 
  /* Forces the wide/landscape look seen in your reference picture */
  aspect-ratio: 1.3 / 1; 
  object-fit: cover;
  /* Premium curved corners matching the screenshot profile card */
  border-radius: 22px; 
  /* Deep, elegant card shadow */
  box-shadow: 0 15px 35px rgba(44, 40, 34, 0.12); 
  border: 1px solid var(--border-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Subtle interactive lift on hover */
.hero-image-wrapper img:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(44, 40, 34, 0.18);
}

/* Mobile responsive scaling */
@media (max-width: 780px) {
  .hero-image-wrapper {
    margin-top: 2.5rem;
  }
  .hero-image-wrapper img {
    max-width: 360px; /* Keeps it medium-sized and proportional on mobile phones */
  }
}

/* ====== MOBILE FIX: TIGHT & CONTAINED ====== */
@media (max-width: 900px) {
  .project-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* Text left, Image right */
    gap: 1rem; /* Much smaller gap */
    padding: 1.2rem; /* Tight padding */
    border-radius: 20px;
    overflow: hidden; /* CRITICAL: Keeps everything inside the rounded card */
    align-items: center;
  }

  /* Override your global mobile button styles */
  .project-row .btn {
    width: auto !important; /* Stop button from going full width */
    justify-content: flex-start !important;
    padding: 10px 18px;
    font-size: 0.85rem;
    border-radius: 12px;
    margin-top: 0.5rem;
  }

  .project-visual {
    border-radius: 12px;
    max-height: 140px; /* Constrain image height so it doesn't stretch the card */
    overflow: hidden;
  }

  .project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Image fills the box perfectly without stretching */
    display: block;
  }

  .project-text h2 {
    font-size: 1.3rem;
    margin: 0.3rem 0 0.6rem;
    line-height: 1.2;
  }

  .project-text p {
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    /* Hide extra text on very small screens if needed */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .project-row {
    grid-template-columns: 1.3fr 0.7fr; /* Give text even more space */
    padding: 0.8rem; /* Very tight padding for small phones */
    gap: 0.6rem;
  }

  .project-visual {
    max-height: 100px; /* Smaller image box */
  }

  .project-text h2 {
    font-size: 1.1rem;
  }

  .project-text p {
    font-size: 0.75rem;
    -webkit-line-clamp: 2; /* Only show 2 lines of text */
  }

  .project-text .section-label {
    font-size: 0.55rem;
    padding: 0.1rem 0.5rem;
  }

  .project-row .btn {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
}
/* ====== PROJECT ROWS: DESKTOP/TABLET LAYOUT (901px and up) ======
   These elements had NO layout rules outside the mobile media queries,
   so on desktop they were falling back to plain stacked block boxes.
   This adds a proper side-by-side layout without touching anything
   inside the existing @media (max-width: 900px) / (max-width: 480px) blocks. */
@media (min-width: 901px) {
  .project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 28px;
    padding: 3.5rem;
    box-shadow: 0 20px 50px rgba(44, 40, 34, 0.06);
  }

  .project-horizontal {
    padding: 1rem 0;
  }

  /* alternate direction on every other project for visual rhythm */
  .project-horizontal:nth-of-type(even) .project-row {
    flex-direction: row-reverse;
  }

  .project-text {
    flex: 1 1 50%;
    max-width: 480px;
  }

  .project-text h2 {
    margin-bottom: 0.8rem;
  }

  .project-text p {
    margin-bottom: 1.6rem;
  }

  .project-visual {
    flex: 1 1 42%;
    border-radius: 20px;
    overflow: hidden;
  }

  .project-visual img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
  }

  .project-visual:hover img {
    transform: scale(1.03);
  }
}

/* ====== BLOG LIST (HR STYLE) ====== */
.blog-list {
  margin-top: 1rem;
}

.blog-list hr {
  margin: 0.8rem 0;
  border: none;
  height: 1px;
  background: var(--border-light);
}

.blog-item {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 1.2rem;
  align-items: center;
  padding: 0.8rem 0;
}

.blog-content h3 {
  font-family: var(--ff-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.blog-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-thumb {
  border-radius: 12px;
  overflow: hidden;
}

.blog-thumb img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.blog-item:hover .blog-thumb img {
  transform: scale(1.05);
}

/* Mobile */
@media (max-width: 780px) {
  .blog-item {
    grid-template-columns: 1fr 80px;
    gap: 0.8rem;
    padding: 0.6rem 0;
  }

  .blog-content h3 {
    font-size: 1rem;
  }

  .blog-content p {
    font-size: 0.8rem;
  }

  .blog-thumb img {
    width: 80px;
    height: 60px;
  }
}

/* ====== PROJECTS HEADING SECTION ====== */
.section.text-center {
  text-align: center;
}

.section h2 {
  margin-bottom: 1rem;
}

/* Optional: Add spacing between projects heading and first project */
.project-horizontal:first-of-type {
  margin-top: 1rem;
}

/* ====== CONTACT FORM ====== */
.contact-form-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 28px;
  padding: 3rem 2.5rem;
  max-width: 720px;
  margin: 0 auto;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(44, 40, 34, 0.06);
}

.contact-form-card h2 {
  margin: 0.5rem 0 1rem;
}

.contact-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--ff-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--deep-teal);
  box-shadow: 0 0 0 3px rgba(79, 139, 140, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-group textarea {
  min-height: 140px;
  line-height: 1.5;
}

.contact-form .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* Mobile */
@media (max-width: 600px) {
  .contact-form-card {
    padding: 2rem 1.5rem;
    border-radius: 22px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .contact-form .btn {
    width: 100%;
    justify-content: center;
  }
}
/* ====== EXPLORE MORE BUTTONS - LEFT ALIGNED ====== */
.btn-explore {
  background: linear-gradient(135deg, #4f8b8c, #2d6b6c);
  color: #fff;
  padding: 14px 32px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  box-shadow: 0 12px 35px rgba(45, 107, 108, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.btn-explore::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
}

.btn-explore:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 18px 45px rgba(45, 107, 108, 0.5);
}

.btn-explore:hover::before {
  animation: shine 0.9s ease;
}

.btn-explore:active {
  transform: scale(0.97);
}

/* For blogs button - use terracotta color */
.btn-explore-blog {
  background: linear-gradient(135deg, #b45f3a, #8f4a2e);
  color: #fff;
  padding: 14px 32px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  box-shadow: 0 12px 35px rgba(180, 95, 58, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.btn-explore-blog::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
}

.btn-explore-blog:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 18px 45px rgba(180, 95, 58, 0.5);
}

.btn-explore-blog:hover::before {
  animation: shine 0.9s ease;
}

.btn-explore-blog:active {
  transform: scale(0.97);
}

/* Mobile responsive */
@media (max-width: 600px) {
  .btn-explore,
  .btn-explore-blog {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}