@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Outfit:wght@400;700&display=swap');

:root {
  /* Law Firm Light Mode Palette */
  --bg-primary: #FAFAFA;
  --bg-secondary: #F4EBE6;
  /* Warm brown tint */
  --text-primary: #000000;
  --text-secondary: #3D1A0E;
  --accent-color: #8B4513;
  /* Primary brown */
  --accent-hover: #5C2E0B;
  --border-color: #D2B48C;
  --btn-text: #FFFFFF;

  --hero-bg: linear-gradient(135deg, #3D1A0E 0%, #A0522D 100%);
  --hero-text: #FFFFFF;
  --footer-bg: #3D1A0E;
  --footer-text: #FFFFFF;
  --navbar-bg: #FFFFFF;

  /* Shared values */
  --font-primary: 'Creato Display', 'Outfit', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  --max-width: 1200px;
  --base-spacing: 8px;
  --card-padding: 32px;
  --radius-card: 12px;
  --radius-input: 8px;
  --section-padding-y: 100px;
  --section-padding-x: 24px;

  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(139, 69, 19, 0.05);
  --shadow-hover: 0 10px 20px rgba(139, 69, 19, 0.15);
}

[data-theme="dark"] {
  --bg-primary: #1A1513;
  --bg-secondary: #2A211D;
  --text-primary: #EAE6E1;
  --text-secondary: #D2B48C;
  --accent-color: #CD853F;
  --accent-hover: #A0522D;
  --border-color: rgba(210, 180, 140, 0.2);
  --btn-text: #1A1513;
  /* Dark text on bright button for dark mode */

  --hero-bg: linear-gradient(135deg, #24110A 0%, #4A2411 100%);
  --hero-text: #EAE6E1;
  --footer-bg: #110805;
  --footer-text: #EAE6E1;
  --navbar-bg: #1A1513;

  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 20px rgba(205, 133, 63, 0.15);
}

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

html {
  scroll-behavior: auto !important;
}

body {
  font-family: var(--font-secondary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  transition: background-color 0.4s ease-in-out, color 0.4s ease-in-out;
  overflow-x: hidden;
}

section {
  transition: background-color 0.4s ease-in-out;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.display-font {
  font-family: var(--font-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 64px;
  font-weight: 700;
}

h2 {
  font-size: 40px;
  font-weight: 700;
}

h3 {
  font-size: 28px;
  font-weight: 700;
}

h4 {
  font-size: 20px;
  font-weight: 400;
}

@media (max-width: 768px) {
  :root {
    --section-padding-y: 60px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 22px;
  }

  h4 {
    font-size: 18px;
  }

  body {
    font-size: 15px;
  }
}

/* Layout Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
}

.section {
  padding: var(--section-padding-y) 0;
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.0) 100%), url('image-one.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 0;
  color: var(--hero-text);
}

.hero-section .hero-container {
  width: 100%;
  padding-bottom: 80px;
  padding-left: 60px;
  margin: 0;
  max-width: none;
}

.hero-section h1,
.hero-section h3,
.hero-section p {
  color: var(--hero-text);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Components */
.card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Spotlight Effect */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.06),
      transparent 40%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.card:hover::before {
  opacity: 1;
}

.card>* {
  position: relative;
  z-index: 2;
}

.card:hover {
  box-shadow: 0 30px 60px rgba(139, 69, 19, 0.15);
  border-color: var(--accent-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-card);
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--btn-text);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-color);
  border: 1.5px solid var(--accent-color);
}

.btn-secondary:hover {
  background-color: rgba(139, 69, 19, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Magnetic & Ripple Effects */
.btn-magnetic {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Loading & Success States */
.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading .btn-text {
  visibility: hidden;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-success {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hero specific buttons (Desktop Only) */
@media (min-width: 769px) {
  .hero-section .btn {
    padding: 12px 32px;
    height: auto;
    letter-spacing: 0.03rem;
    gap: 12px;
  }

  .hero-section .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--hero-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
  }
}

.hero-section .btn-secondary {
  color: var(--hero-text);
  border-color: var(--hero-text);
}

.btn-ghost {
  background-color: transparent;
  color: var(--accent-color);
  padding: 0 16px;
}

.btn-ghost:hover {
  text-decoration: underline;
}

/* Forms */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.input-group label {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-secondary);
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Navigation Redesign: Anchored Header + Floating Pill */
.site-header {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  padding: 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  pointer-events: none;
}

.header-anchor-left,
.header-anchor-right {
  pointer-events: auto;
}

.wordmark-anchored {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 18px;
  color: #FFFFFF;
  text-decoration: none;
  letter-spacing: -0.02em;
  padding: 0;
  background-color: transparent;
  transition: color 0.4s ease;
  z-index: 1002;
  display: flex;
  align-items: center;
  height: 44px;
  /* Matching the height of the toggles/pill area */
}

.site-header.nav-dark-mode .wordmark-anchored {
  color: #1A1513;
  /* Sophisticated dark/black color */
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.navbar-actions-anchored {
  display: flex;
  gap: 8px;
  align-items: center;
}

.theme-toggle-anchored {
  width: 44px;
  height: 44px;
  border-radius: 100px;
  background: transparent;
  border: none;
  color: #FFFFFF !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1002;
}

.mobile-menu-btn-anchored {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 100px;
  background: transparent;
  border: none;
  color: #FFFFFF !important;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1002;
}

.site-header.nav-dark-mode .theme-toggle-anchored,
.site-header.nav-dark-mode .mobile-menu-btn-anchored {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.theme-toggle-anchored i,
.mobile-menu-btn-anchored i {
  color: inherit;
}

.theme-toggle-anchored:hover,
.mobile-menu-btn-anchored:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Floating Pill (Centered) */
.navbar-pill-wrapper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  z-index: 1001;
  pointer-events: auto;
}

.navbar-pill {
  background-color: rgba(255, 255, 255, 0.05);
  /* Frosted transparency */
  backdrop-filter: blur(30px);
  /* Heavy sophisticated blur */
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Definitive thin border */
  border-radius: 100px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.site-header.nav-dark-mode .navbar-pill {
  background-color: rgba(0, 0, 0, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-link {
  color: #FFFFFF !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 100px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link i,
.nav-link svg {
  color: inherit;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: var(--accent-color);
  color: #FFFFFF !important;
}

/* Dropdown System */
.nav-dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 200px;
  background-color: rgba(26, 21, 19, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Arrow rotation */
.nav-dropdown i[data-lucide="chevron-down"] {
  transition: transform 0.3s ease;
}

.nav-dropdown.active i[data-lucide="chevron-down"] {
  transform: rotate(180deg);
}

.nav-dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

[data-theme="light"] .dropdown-content {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(139, 69, 19, 0.1);
  box-shadow: 0 15px 40px rgba(139, 69, 19, 0.1);
}

.dropdown-content a {
  display: block;
  padding: 8px 16px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .dropdown-content a:hover {
  background-color: rgba(139, 69, 19, 0.05);
}

/* Dark Mode Toggle */
.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
  color: var(--accent-color);
}


/* Mobile Nav */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

@media (max-width: 768px) {

  /* --- Header & Pill --- */
  .site-header {
    padding: 0 20px;
    top: 16px;
  }

  /* Hide the floating pill entirely on mobile */
  .navbar-pill-wrapper {
    display: none;
  }

  /* Show hamburger icon (anchored right) */
  .mobile-menu-btn-anchored {
    display: flex;
  }

  /* Wordmark: slightly smaller on mobile */
  .wordmark-anchored {
    font-size: 15px;
  }

  /* Mobile dropdown menu panel */
  .mobile-nav-panel {
    display: none;
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    background-color: rgba(20, 16, 14, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 16px;
    z-index: 999;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }

  .mobile-nav-panel.mobile-active {
    display: flex;
  }

  [data-theme="light"] .mobile-nav-panel {
    background-color: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.08);
  }

  .mobile-nav-panel a {
    display: block;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: var(--font-primary);
    transition: background-color 0.2s ease;
  }

  [data-theme="light"] .mobile-nav-panel a {
    color: #1A1513;
  }

  .mobile-nav-panel a:hover,
  .mobile-nav-panel a.active {
    background-color: rgba(255, 255, 255, 0.08);
  }

  [data-theme="light"] .mobile-nav-panel a:hover,
  [data-theme="light"] .mobile-nav-panel a.active {
    background-color: rgba(0, 0, 0, 0.05);
  }

  .mobile-nav-panel a.active {
    color: var(--accent-color);
    font-weight: 700;
  }

  .mobile-nav-panel .mobile-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
  }

  [data-theme="light"] .mobile-nav-panel .mobile-nav-divider {
    background: rgba(0, 0, 0, 0.08);
  }
}

/* Footer */
.footer {
  padding: 60px 0 40px;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--border-color);
}

.footer p,
.footer h4 {
  color: var(--footer-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

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

.footer-newsletter h4 {
  margin-bottom: 16px;
}

.footer-newsletter p {
  opacity: 0.8;
  margin-bottom: 16px;
  font-size: 14px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input {
  flex-grow: 1;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease, color 0.3s ease;
  font-family: var(--font-primary);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  opacity: 0.7;
}

.social-icons {
  display: flex;
  gap: 16px;
}

.social-icons a {
  color: var(--footer-text);
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: var(--accent-color);
}

.footer .wordmark {
  color: var(--footer-text);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--accent-color);
  color: var(--btn-text);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--accent-hover);
  transform: translateY(-4px);
}

/* Glassmorphism elements */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .glass {
  background: rgba(26, 21, 19, 0.85);
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(139, 69, 19, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

[data-theme="dark"] .icon-box {
  background-color: rgba(205, 133, 63, 0.15);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--accent-color);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.page-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}

.page-header p {
  font-size: 20px;
  opacity: 0.8;
  margin-top: 16px;
  color: var(--text-primary);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.filter-tabs::-webkit-scrollbar {
  height: 4px;
}

.filter-tabs::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}

.filter-tab {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
  background-color: var(--accent-color);
  color: var(--btn-text);
  border-color: var(--accent-color);
}

/* Hero Section Responsive Styles */
.hero-content-wrapper {
  max-width: 800px;
  text-align: left;
}

.hero-text-hey {
  font-family: 'Creato Display', 'DM Sans', sans-serif;
  font-weight: 300;
  color: #E6E6E6;
  font-size: 52px;
  line-height: 1.0;
  margin-bottom: 12px;
  letter-spacing: 0.05rem;
}

.hero-text-name {
  font-family: 'Creato Display', 'DM Sans', sans-serif;
  font-weight: 400;
  color: #FFFFFF;
  font-size: 64px;
  font-style: normal;
  line-height: 1.0;
  margin-bottom: 16px;
  letter-spacing: 0.05rem;
  display: inline-flex;
  align-items: center;
}

.typewriter-cursor {
  color: var(--accent-color);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  from,
  to {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.typewriter-container {
  margin-bottom: 12px;
}

.hero-animated-box {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.hero-text-desc {
  font-family: 'Creato Display', 'DM Sans', sans-serif;
  font-weight: 300;
  color: #E8E8E8;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 480px;
  letter-spacing: 0.02rem;
}

/* Hero Entrance Animation */
/* Hero Entrance Animation (Desktop Only) */
@media (min-width: 769px) {
  .hero-entrance {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.4s;
  }
}

/* Fallback/Default for Mobile */
@media (max-width: 768px) {
  .hero-entrance {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.parallax-bg {
  will-change: transform;
}

/* Mobile Navigation Panel - Hidden by default on desktop */
.mobile-nav-panel {
  display: none;
}

/* ============================================
   MOBILE HERO — Complete Responsive System
   ============================================ */

/* --- Tablet (≤ 1024px) --- */
@media (max-width: 1024px) {
  .hero-text-hey {
    font-size: 60px;
  }

  .hero-text-name {
    font-size: 80px;
  }
}

/* --- Mobile (≤ 768px) --- */
@media (max-width: 768px) {

  /* 1. Background: mobile specific positioning and gradient */
  .hero-section {
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-image: url('image_mobile.png') !important;
    align-items: flex-end !important;
    min-height: 100svh;
  }

  /* 2. Container padding — symmetric, no left bias */
  .hero-section .hero-container,
  .hero-section .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
    padding-bottom: 56px !important;
    width: 100% !important;
  }

  /* 3. Content wrapper — full width, left aligned */
  .hero-content-wrapper {
    max-width: 100%;
    text-align: left;
    margin-left: 0;
  }

  /* 4. Animated box stays proportionate */
  .hero-animated-box {
    min-height: 120px;
    align-items: flex-start;
  }

  /* 5. Font sizes */
  .hero-text-hey {
    font-size: 36px;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.04em;
    white-space: nowrap;
  }

  .hero-text-name {
    font-size: 52px;
    line-height: 1.0;
    margin-bottom: 0;
    letter-spacing: -0.05em;
    white-space: pre-wrap;
    /* Allows long typewritten text to wrap */
    display: inline;
  }

  .hero-text-role {
    font-size: 14px;
    text-align: center;
  }

  .hero-text-desc {
    font-size: 13px;
    line-height: 1.6;
    max-width: 100%;
    text-align: left;
    letter-spacing: -0.01em;
  }

  /* 6. Button container — side by side, one line */
  .hero-btn-group {
    justify-content: flex-start !important;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .hero-btn-group .btn {
    padding: 0 16px;
    font-size: 13px;
    height: 44px;
    white-space: nowrap;
  }

  /* Typewriter container restricted to align with 'l' in technology */
  .typewriter-container {
    justify-content: flex-start;
    display: block;
    white-space: pre-wrap;
    max-width: 340px;
    /* Aligns with 'l' in technology at 15px font */
    margin-bottom: 12px;
  }

  /* === Header & Navbar — Mobile === */
  .site-header {
    padding: 0 16px;
    top: 14px;
  }

  /* Hide the desktop floating pill */
  .navbar-pill-wrapper {
    display: none !important;
  }

  /* Show hamburger */
  .mobile-menu-btn-anchored {
    display: flex !important;
  }

  /* Wordmark slightly smaller so it breathes */
  .wordmark-anchored {
    font-size: 15px;
    letter-spacing: -0.02em;
    max-width: calc(100vw - 120px);
    /* prevents overlap with right icons */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mobile nav floating card panel (Micro-Menu) */
  .mobile-nav-panel {
    display: none;
    position: fixed;
    top: 70px;
    right: 14px;
    left: auto;
    width: 200px;
    /* Ultra-Compact */
    background-color: rgba(255, 255, 255, 0.05);
    /* Phantom Transparency */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 6px;
    z-index: 1100;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    transform-origin: top right;
  }

  .mobile-nav-panel.mobile-active {
    display: flex;
  }

  /* Adaptive Contrast Logic for Menu Card */
  [data-theme="light"] .mobile-nav-panel.nav-light-bg {
    background-color: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }

  /* Menu Links - Adaptive Contrast */
  .mobile-nav-panel a {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    /* Default white for dark bg */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 12px;
    font-family: var(--font-primary);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    letter-spacing: -0.01em;
  }

  /* Dark Background State (Hero) */
  .mobile-nav-panel a.active {
    background-color: var(--accent-color);
    /* Brown/Tan */
    color: #FFFFFF !important;
  }

  /* Light Background State */
  .mobile-nav-panel.nav-light-bg a {
    color: rgba(0, 0, 0, 0.75);
    /* Dark for light bg */
  }

  .mobile-nav-panel.nav-light-bg a.active {
    background-color: #1A1513;
    /* Dark Slate / Black */
    color: #FFFFFF !important;
  }

  .mobile-nav-panel a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    padding-left: 18px;
  }

  .mobile-nav-panel.nav-light-bg a:hover {
    background-color: rgba(0, 0, 0, 0.04);
  }

  .mobile-nav-divider {
    display: none;
  }
}

/* --- Extra-small phones (≤ 480px) --- */
@media (max-width: 480px) {
  .hero-text-hey {
    font-size: 32px;
  }

  .hero-text-name {
    font-size: 48px;
    letter-spacing: -0.01em;
  }

  .hero-text-desc {
    font-size: 14px;
  }

  .site-header {
    padding: 0 14px;
    top: 12px;
  }

  .wordmark-anchored {
    font-size: 13px;
    max-width: calc(100vw - 110px);
  }
}

.navbar-container-home {
  max-width: none !important;
  padding-left: 60px !important;
  padding-right: 60px !important;
}

@media (max-width: 768px) {
  .navbar-container-home {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Stacked to Spread Animation Styles */
.stack-grid {
  perspective: 2000px;
  position: relative;
}

.stack-card {
  will-change: transform, opacity;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  clip-path: inset(0 0 0% 0);
  /* Default to visible */
  opacity: 1;
}

.glass-stack {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .stack-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* About Me Photo Styles */
.about-image-container {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background-color: var(--border-color);
  margin: 0 auto;
  overflow: hidden;
  border: 4px solid var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-image-container:hover .about-image {
  transform: scale(1.04);
}

@media (max-width: 1024px) {
  .about-image-container {
    width: 320px;
    height: 320px;
  }
}

@media (max-width: 768px) {
  .about-image-container {
    width: 260px;
    height: 260px;
  }
}