:root {
  --sage-green: #414a37;
  --warm-brown: #99744a;
  --light-beige: #dbc2a6;
  --cream: #f5f1ed;
  --text-dark: #414a37;
  --accent: #6b4d2f;
  --accent-hover: #4a3620;
  --border-radius: 16px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bg-primary: #f5f1ed;
  --bg-secondary: #dbc2a6;
  --text-primary: #414a37;
  --text-secondary: #5a5a5a;
  --border-color: rgba(65, 74, 55, 0.25);
  /* High contrast text for light backgrounds */
  --text-contrast-light: #2a2f27;
  --text-contrast-dark: #f0f0f0;
}

body.dark-mode {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #f0f0f0;
  --text-secondary: #e0e0e0;
  --accent: #d4a574;
  --accent-hover: #e8b885;
  --border-color: rgba(255, 255, 255, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #414a37 0%, #2f3428 100%);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease;
  font-variation-settings: "wght" 400;
}

body.dark-mode {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  color: var(--text-primary);
}

/* --- HEADING STYLES (Explicit Definition) --- */
/* Fixes Lighthouse warning: H1UserAgentFontSizeInSection */
/* Remove reliance on browser default heading styles */

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: clamp(1.2, 6vw, 1.3);
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(1rem, 2vw, 1.5rem) 0;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Playfair Display', Georgia, serif;
}

h1,
section h1,
article h1,
nav h1,
aside h1,
main h1 {
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  line-height: clamp(1.2, 6vw, 1.3) !important;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(1rem, 2vw, 1.5rem) 0 !important;
  font-weight: 700 !important;
  font-family: 'Playfair Display', Georgia, serif !important;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.25;
  margin: clamp(1.25rem, 3vw, 2rem) 0 clamp(0.75rem, 1.5vw, 1.25rem) 0;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Playfair Display', Georgia, serif;
}

h3 {
  font-size: clamp(1.375rem, 3vw, 2rem);
  line-height: 1.35;
  margin: clamp(1rem, 2vw, 1.5rem) 0 clamp(0.5rem, 1vw, 1rem) 0;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Playfair Display', Georgia, serif;
}

section h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.25;
  margin: clamp(1.25rem, 3vw, 2rem) 0 clamp(0.75rem, 1.5vw, 1.25rem) 0;
}

/* Premium Luxury Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(153, 116, 74, 0.6);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #b8936d 0%, #5a6652 50%, #b8936d 100%);
  background-clip: padding-box;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4), 0 0 8px rgba(153, 116, 74, 0.4);
}

/* Firefox Scrollbar */
* {
  scrollbar-color: rgba(153, 116, 74, 0.8) transparent;
  scrollbar-width: thin;
}

/* Modal Scrollbar - Ultra Premium Design with Circular Ends */
.modal-content::-webkit-scrollbar {
  width: 14px;
  padding: 0 2px;
}

.modal-content::-webkit-scrollbar-track {
  background: linear-gradient(180deg,
      rgba(219, 194, 166, 0.2) 0%,
      rgba(219, 194, 166, 0.08) 50%,
      rgba(219, 194, 166, 0.2) 100%);
  border-radius: 20px;
  margin: 8px 0;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg,
      #d4a574 0%,
      #c49766 25%,
      #99744a 50%,
      #c49766 75%,
      #d4a574 100%);
  border-radius: 20px;
  border: 2.5px solid rgba(219, 194, 166, 0.4);
  background-clip: padding-box;
  box-shadow: 0 2px 8px rgba(153, 116, 74, 0.25),
    inset 0 1px 4px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.15);
  min-height: 50px;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg,
      #d4a574 0%,
      #c49766 25%,
      #99744a 50%,
      #c49766 75%,
      #d4a574 100%);
  background-clip: padding-box;
  box-shadow: 0 2px 8px rgba(153, 116, 74, 0.25),
    inset 0 1px 4px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.15);
}

.modal-content {
  scrollbar-color: #d4a574 rgba(219, 194, 166, 0.15);
  scrollbar-width: thin;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  padding: 0;
  margin-left: 280px;
}

@media (max-width: 768px) {
  .page-wrapper {
    margin-left: 0;
    margin-top: 0;
  }
}

.container {
  width: 100%;
  background: var(--light-beige);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  transition: background 0.3s ease;
  will-change: background;
}

body.dark-mode .container {
  background: #1a1a1a;
}

/* Header Styles - Left Sidebar */
.header {
  background: var(--light-beige);
  border-right: 2px solid rgba(65, 74, 55, 0.1);
  padding: 0;
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  z-index: 999;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  contain: layout style paint;
}

/* Mobile: Hide header by default on small screens */
@media (max-width: 768px) {
  .header {
    width: 100%;
    height: auto;
    transform: translateY(-100%);
    z-index: 998;
    border-right: none;
    border-bottom: 2px solid rgba(65, 74, 55, 0.1);
  }

  .header.mobile-open {
    transform: translateY(0);
  }
}

body.dark-mode .header {
  background: #242424;
  border-right: 2px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  body.dark-mode .header {
    border-right: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  }
}

.header.fixed {
  position: fixed;
  width: 280px;
  height: 100vh;
  top: 0;
  left: 0;
  background: rgba(219, 194, 166, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15);
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  z-index: 1000;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: box-shadow, background;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.header-content {
  padding: 40px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100vh;
}

/* Header Top Section - Contains Theme Toggle */
.header-top {
  padding: 20px 15px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

body.dark-mode .header-top {
  border-bottom: none;
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }

  .header-content {
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
  }
}

.logo {
  font-family: Georgia, "Playfair Display", serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--sage-green);
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
  text-align: center;
  margin-bottom: 10px;
  padding: 15px 0;
  border-bottom: 2px solid rgba(65, 74, 55, 0.15);
  width: 100%;
  will-change: color;
}

@media (max-width: 768px) {
  .logo {
    font-size: 18px;
    margin-bottom: 0;
    padding: 0;
    border-bottom: none;
  }
}

body.dark-mode .logo {
  color: #d4a574;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
  flex: 1;
  justify-content: flex-start;
  margin-top: 30px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 10px 20px;
  border-radius: 8px;
  width: 100%;
  will-change: color, background;
  text-align: center;
  display: block;
  position: relative;
}

body.dark-mode .nav-link {
  color: var(--text-primary);
}

.nav-link:hover {
  color: var(--warm-brown);
  background: rgba(65, 74, 55, 0.08);
}

/* Active link indicator box */
.nav-link.active {
  color: white;
  background: linear-gradient(135deg, #99744a 0%, #b8936d 100%);
  box-shadow: 0 4px 16px rgba(153, 116, 74, 0.3);
  font-weight: 600;
}

body.dark-mode .nav-link.active {
  color: #000;
  background: linear-gradient(135deg, #d4a574 0%, #e8dcc9 100%);
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.4);
}

/* Theme Toggle Button */
.theme-toggle {
  background: rgba(219, 194, 166, 0.5);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 22px;
  margin: 0;
  will-change: background, border-color, transform, box-shadow;
  box-shadow: 0 8px 32px rgba(65, 74, 55, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
}

.theme-toggle:hover {
  background: rgba(219, 194, 166, 0.7);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 40px rgba(65, 74, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.theme-toggle:active {
  transform: scale(0.95);
}

body.dark-mode .theme-toggle {
  background: rgba(36, 36, 36, 0.6);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-mode .theme-toggle:hover {
  background: rgba(50, 50, 50, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sun-icon,
.sun-icon,
.moon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  width: 20px;
  height: 20px;
}

.sun-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0.6);
}

.moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.sun-icon svg {
  color: #ffffff;
  stroke: #ffffff;
}

.moon-icon svg {
  color: #414a37;
}

body.dark-mode .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body.dark-mode .moon-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0.6);
}

/* Mobile Toggle Button */
.mobile-toggle {
  background: rgba(219, 194, 166, 0.85);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  margin: 0;
  position: fixed;
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  top: 12px;
  left: 12px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(65, 74, 55, 0.15);
  justify-content: center;
  align-items: center;
}

.mobile-toggle span {
  width: 100%;
  height: 3px;
  background: var(--sage-green);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, opacity 0.3s ease;
  display: block;
  will-change: transform, background, opacity;
}

body.dark-mode .mobile-toggle {
  background: rgba(36, 36, 36, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode .mobile-toggle span {
  background: #d4a574;
}

.mobile-toggle:hover {
  background: rgba(219, 194, 166, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 40px rgba(65, 74, 55, 0.25);
  transform: translateY(-2px);
}

body.dark-mode .mobile-toggle:hover {
  background: rgba(50, 50, 50, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.mobile-toggle:hover span {
  background: var(--warm-brown);
}

body.dark-mode .mobile-toggle:hover span {
  background: #e8dcc9;
}

/* Hamburger animation when header is open */
.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
    top: 12px;
    left: 12px;
  }
}

/* Mobile overlay when header is open */
@media (max-width: 768px) {
  body.mobile-menu-open {
    overflow: hidden;
  }

  .header.mobile-open~.container {
    position: relative;
  }

  .header.mobile-open::after {
    content: '';
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
    pointer-events: none;
  }
}

.nav-link:hover {
  color: var(--warm-brown);
}


/* Hero Section */
.hero-section {
  padding: 30px 40px;
  flex: 1;
  will-change: auto;
  contain: layout style;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
  align-items: flex-start;
  contain: layout style paint;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-tile {
  background: linear-gradient(135deg, var(--sage-green) 0%, #3a4532 100%);
  color: var(--cream);
  padding: 5px 25px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-mode .hero-tile {
  background: linear-gradient(135deg, #2d3d28 0%, #1f2a1a 100%);
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: 40px !important;
  font-weight: 400;
  line-height: 1;
  margin: 0;
  color: var(--cream);
}

body.dark-mode .hero-title {
  color: #f0f0f0;
}

.download-btn {
  font-family: "Playfair Display", serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  text-align: center;
  will-change: transform, opacity;
  background: var(--sage-green);
}

.download-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}


.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.intro-tile {
  background: linear-gradient(135deg, var(--sage-green) 0%, #3a4532 100%);
  color: var(--cream);
  padding: 18px 20px;
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.dark-mode .intro-tile {
  background: linear-gradient(135deg, #2d3d28 0%, #1f2a1a 100%);
}

.intro-tile p {
  margin: 0;
}

.learning-tile {
  background: linear-gradient(135deg, var(--sage-green) 0%, #3a4532 100%);
  color: var(--cream);
  padding: 18px 20px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dark-mode .learning-tile {
  background: linear-gradient(135deg, #2d3d28 0%, #1f2a1a 100%);
}

.learning-title {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
  margin: 0;
  margin-bottom: 5px;
}

body.dark-mode .learning-title {
  color: #f0f0f0;
}

.learning-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.learning-list li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
  color: var(--cream);
}

.learning-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 16px;
}

.cta-tile {
  background: linear-gradient(135deg, var(--warm-brown) 0%, #8a6340 100%);
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  box-shadow: 0 6px 18px rgba(153, 116, 74, 0.2);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  flex: none;
  width: 100%;
  will-change: transform, box-shadow;
}

.cta-button {
  font-family: "Playfair Display", serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  will-change: transform, opacity, box-shadow;
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  letter-spacing: 0.8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  user-select: none;
}

.cta-button:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.cta-button:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Center Column: Portrait */
.center-column {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
}

.highlight-card {
  background: linear-gradient(135deg, var(--light-beige) 0%, #e8dcc9 100%);
  border-radius: 20px;
  padding: 30px 25px;
  text-align: 20px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  border: 2px solid rgba(153, 116, 74, 0.2);
  will-change: transform, box-shadow, border-color;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
  will-change: left;
}

body.dark-mode .highlight-card {
  background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
  border: 2px solid rgba(212, 165, 116, 0.25);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.highlight-card:hover {
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
  border-color: rgba(153, 116, 74, 0.4);
}

body.dark-mode .highlight-card:hover {
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6);
  border-color: rgba(212, 165, 116, 0.4);
}

.highlight-card:hover::before {
  left: 100%;
}

.highlight-number {
  font-family: "Playfair Display", serif;
  font-size: 56px;
  font-weight: 700;
  background: linear-gradient(135deg, #414a37 0%, #99744a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  letter-spacing: -1px;
  transition: none;
}

body.dark-mode .highlight-number {
  background: linear-gradient(135deg, #e8dcc9 0%, #d4a574 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight-label {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--sage-green);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

body.dark-mode .highlight-label {
  color: #d4a574;
}

.portrait-tile {
  width: 100%;
  max-width: 400px;
  height: 440px;
  background: #3B4233;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  position: relative;
  overflow: hidden;
  flex: 1;
  flex-shrink: 0;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 11px;
}

/* Right Sidebar */
.right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
}

.works-card {
  background: var(--sage-green);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.works-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.works-list {
  padding: 18px;
  color: var(--cream);
}

.works-title {
  font-family: "Playfair Display", serif;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.projects {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-link {
  color: var(--cream);
  text-decoration: none;
  font-size: 13px;
  transition: opacity 0.3s ease;
}

.project-link:hover {
  opacity: 0.7;
}

.quick-info {
  background: linear-gradient(135deg, var(--sage-green) 0%, #3a4532 100%);
  border-radius: 16px;
  padding: 25px;
  color: var(--cream);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

body.dark-mode .quick-info {
  background: linear-gradient(135deg, #2d3d28 0%, #1f2a1a 100%);
}

.info-title {
  font-family: "Playfair Display", serif;
  font-size: 36px;
  font-weight: 600;
  margin: 0;
  text-align: center;
  color: var(--cream);
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-icon {
  flex: 1;
  background: var(--sage-green);
  color: var(--cream);
  padding: 14px 16px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s ease;
  border: 2px solid var(--sage-green);
  box-shadow: 0 4px 12px rgba(65, 74, 55, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-icon:hover {
  background: #353d2f;
  border-color: #353d2f;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(65, 74, 55, 0.3);
}

/* Footer */
.footer {
  background: rgba(65, 74, 55, 0.05);
  border-top: 1px solid rgba(65, 74, 55, 0.1);
  padding: 24px 40px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

body.dark-mode .footer {
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.footer-link {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #d4a574;
}

body.dark-mode .footer-link {
  color: var(--text-primary);
}

body.dark-mode .footer-link:hover {
  color: #d4a574;
}

.divider {
  color: rgba(65, 74, 55, 0.3);
}

body.dark-mode .divider {
  color: rgba(255, 255, 255, 0.2);
}

.footer p {
  margin: 0;
}

/* ===== NEW SECTIONS ===== */

/* General Section Styles */
.section {
  padding: 60px 40px;
  border-top: 1px solid rgba(65, 74, 55, 0.1);
  background: #f0ebe5;
  animation: fadeInSection 0.8s ease-out;
  transition: all 0.3s ease;
}

body.dark-mode .section {
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section:nth-child(odd) {
  background: #e8dfd7;
}

body.dark-mode .section:nth-child(odd) {
  background: #1a1a1a;
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Section Grid Layout - Left Right */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: stretch;
  align-content: stretch;
}

.section-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  min-height: 100%;
}

.section-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  min-height: 100%;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--sage-green);
  margin-bottom: 40px;
  text-align: center;
  transition: color 0.3s ease;
}

body.dark-mode .section-title {
  color: #d4a574;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.about-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dark);
}

body.dark-mode .about-text p {
  color: var(--text-primary);
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.highlight-item {
  background: var(--sage-green);
  color: var(--cream);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

body.dark-mode .highlight-item {
  background: #2d2d2d;
}

.highlight-item h4 {
  font-family: "Playfair Display", serif;
  font-size: 32px;
  margin-bottom: 8px;
}

.highlight-item p {
  font-size: 14px;
  color: var(--cream);
}

body.dark-mode .highlight-item p {
  color: #c0c0c0;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

.skill-category {
  background: var(--cream);
  padding: 50px;
  border-radius: 12px;
  border: 1px solid rgba(65, 74, 55, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  justify-content: flex-start;
}

body.dark-mode .skill-category {
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.skill-category-title {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--sage-green);
  margin-bottom: 16px;
}

body.dark-mode .skill-category-title {
  color: #d4a574;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: var(--sage-green);
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
  will-change: transform, box-shadow;
}

.skill-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(65, 74, 55, 0.2);
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: stretch;
  flex: 1;
}

.project-card {
  background: var(--cream);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 2px solid transparent;
  will-change: transform, box-shadow, border-color;
  display: flex;
  flex-direction: column;
  height: 100%;
}

body.dark-mode .project-card {
  background: #242424;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-md);
  border-color: var(--warm-brown);
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #e0e0e0;
  border: 3px solid rgba(65, 74, 55, 0.15);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin: 0;
  flex-shrink: 0;
}

.project-image img,
.project-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-image::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(65, 74, 55, 0.1);
  border-radius: 5px;
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(65, 74, 55, 0.08);
}

body.dark-mode .project-image {
  background: #3a3a3a;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-image::before {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.project-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--sage-green);
  margin-bottom: 8px;
}

body.dark-mode .project-title {
  color: #d4a574;
}

.project-desc {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 16px;
  max-height: 5.2em;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

body.dark-mode .project-desc {
  color: #b0b0b0;
}

.project-desc.expanded {
  max-height: none;
  overflow: visible;
}

.read-more-btn {
  display: block;
  background: none;
  border: none;
  color: var(--sage-green);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  transition: color 0.3s ease;
}

body.dark-mode .read-more-btn {
  color: #d4a574;
}

.read-more-btn:hover {
  color: var(--accent);
}

body.dark-mode .read-more-btn:hover {
  color: #f5b183;
}

.case-study-btn {
  display: inline-block;
  flex: 1;
  background: var(--warm-brown);
  color: var(--cream);
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
}

.case-study-btn:hover {
  background: #8a6340;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(153, 116, 74, 0.3);
}

.case-study-btn.active {
  background: var(--sage-green);
}

.case-study {
  background: linear-gradient(135deg,
      rgba(65, 74, 55, 0.05) 0%,
      rgba(153, 116, 74, 0.05) 100%);
  border-left: 3px solid var(--warm-brown);
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 16px;
}

body.dark-mode .case-study {
  background: linear-gradient(135deg,
      rgba(60, 60, 60, 0.8) 0%,
      rgba(50, 50, 50, 0.8) 100%);
  border-left: 3px solid #d4a574;
}

.case-study-title {
  font-family: "Playfair Display", serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--sage-green);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.dark-mode .case-study-title {
  color: #d4a574;
}

.case-study-item {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}

body.dark-mode .case-study-item {
  color: #e0e0e0;
}

.case-study-item:last-child {
  margin-bottom: 0;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tech-tag {
  background: rgba(65, 74, 55, 0.1);
  color: var(--sage-green);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

body.dark-mode .tech-tag {
  background: rgba(212, 165, 116, 0.15);
  color: #d4a574;
}

.project-links {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.project-link {
  flex: 1;
  background: var(--sage-green);
  color: var(--cream);
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.project-link:hover {
  background: #353d2f;
}

/* Resume Section */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.resume-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.resume-subtitle {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--sage-green);
  margin-bottom: 20px;
}

body.dark-mode .resume-subtitle {
  color: #d4a574;
}

.resume-item {
  background: #f8f6f3;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid var(--warm-brown);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  flex: 1;
}

body.dark-mode .resume-item {
  background: #282828;
  border-left: 4px solid #d4a574;
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 8px;
}

.resume-title {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--sage-green);
}

body.dark-mode .resume-title {
  color: #d4a574;
}

.resume-date {
  font-size: 12px;
  color: var(--warm-brown);
  font-weight: 600;
}

body.dark-mode .resume-date {
  color: #d4a574;
}

.resume-company {
  font-size: 13px;
  color: var(--warm-brown);
  margin-bottom: 12px;
  font-weight: 600;
}

body.dark-mode .resume-company {
  color: #d4a574;
}

.resume-list {
  list-style: none;
  font-size: 13px;
  line-height: 1.8;
  color: #555;
}

body.dark-mode .resume-list {
  color: #b0b0b0;
}

.resume-list li {
  margin-bottom: 8px;
}

.resume-list li:before {
  content: "▸ ";
  color: var(--warm-brown);
  font-weight: bold;
  margin-right: 6px;
}

.resume-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
}

body.dark-mode .resume-desc {
  color: #b0b0b0;
}

.resume-download {
  text-align: center;
}

.download-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--warm-brown) 0%, #8a6340 100%);
  color: var(--cream);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: x-large;
  width: 100%;
  text-align: center;
}


/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  background: var(--cream);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(65, 74, 55, 0.1);
  transition: all 0.3s ease;
}

body.dark-mode .contact-item {
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-label {
  font-family: "Playfair Display", serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--sage-green);
  margin-bottom: 8px;
}

body.dark-mode .contact-label:not(.contact-socials .contact-label) {
  color: #d4a574;
}

.contact-value {
  font-size: 14px;
  color: var(--text-dark);
  text-decoration: none;
}

body.dark-mode .contact-value {
  color: var(--text-primary);
}

.contact-value:hover {
  color: var(--warm-brown);
}

body.dark-mode .contact-value:hover {
  color: #d4a574;
}

.contact-socials {
  background: var(--sage-green);
  color: var(--cream);
  padding: 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

body.dark-mode .contact-socials {
  background: #2d2d2d;
}

.contact-socials .contact-label {
  color: var(--cream);
}

body.dark-mode .contact-socials .contact-label {
  color: var(--cream);
}

.social-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-btn {
  flex: 1;
  min-width: 100px;
  background: var(--warm-brown);
  color: var(--cream);
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.social-btn:hover {
  background: #8a6340;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--cream);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(65, 74, 55, 0.1);
  transition: all 0.3s ease;
}

body.dark-mode .contact-form {
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-family: "Playfair Display", serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--sage-green);
}

body.dark-mode .form-label {
  color: #e0d4c8;
}

.form-input {
  padding: 12px;
  border: 1px solid rgba(65, 74, 55, 0.2);
  border-radius: 6px;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  transition: border-color 0.3s ease;
  background: var(--cream);
  color: var(--text-dark);
}

body.dark-mode .form-input {
  background: #3a3a3a;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

body.dark-mode .form-label {
  color: #e0d4c8;
}

body.dark-mode .form-select {
  background-color: #3a3a3a;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

body.dark-mode .form-select option {
  background: #2a2a2a;
  color: var(--text-primary);
}

body.dark-mode .form-select option:checked {
  background: linear-gradient(#d4a574, #d4a574);
  background-color: #d4a574 !important;
  color: #1a1a1a;
}

body.dark-mode .form-textarea {
  background: #3a3a3a;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--warm-brown);
  box-shadow: 0 0 0 3px rgba(153, 116, 74, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Select Dropdown Styling */
.form-select {
  appearance: none;
  padding: 12px;
  cursor: pointer;
  font-weight: 500;
  color: var(--sage-green);
}

.form-select:hover:not(:disabled) {
  border-color: var(--warm-brown);
}

.form-select:focus {
  border-color: var(--warm-brown);
  box-shadow: 0 0 0 3px rgba(153, 116, 74, 0.15), inset 0 0 0 1px rgba(153, 116, 74, 0.1);
}

.form-select option {
  padding: 10px;
  color: var(--text-dark);
  background: var(--cream);
  font-family: "Inter", sans-serif;
}

.form-select option:hover {
  background: var(--light-beige);
}

.form-select option:checked {
  background: linear-gradient(#c9a66a, #c9a66a);
  background-color: #c9a66a !important;
  color: var(--cream);
}

.form-submit {
  background: var(--sage-green);
  color: var(--cream);
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.form-submit:hover {
  background: #353d2f;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(65, 74, 55, 0.2);
}

.form-submit:disabled {
  background: #99a08f;
  cursor: not-allowed;
  transform: none;
}

body.dark-mode .form-submit {
  background: #414a37;
  color: #f0f0f0;
}

body.dark-mode .form-submit:hover {
  background: #d4a574;
  color: #1a1a1a;
}

body.dark-mode .form-submit:disabled {
  background: #666;
  cursor: not-allowed;
}

.form-status {
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  padding: 12px 16px !important;
  margin-top: 15px !important;
  text-align: center;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInSection {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes floatEffect {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-12px);
  }

  100% {
    transform: translateY(0px);
  }
}

@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resume-grid {
    gap: 30px;
  }

  .section-title {
    font-size: 32px;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .right-sidebar {
    flex-direction: column;
  }

  .hero-section {
    padding: 30px;
  }

  .header-content {
    padding: 0 24px;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 30px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .page-wrapper {
    padding: 20px;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--light-beige);
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid rgba(65, 74, 55, 0.1);
    z-index: 100;
  }

  body.dark-mode .nav-menu {
    background: #242424;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-menu.active {
    display: flex;

    /* Sidebar Footer - Theme Toggle and Mobile Menu */
    .theme-toggle {
      margin-top: auto;
      padding-top: 20px;
      border-top: 2px solid rgba(65, 74, 55, 0.15);
      width: 100%;
      text-align: center;
    }

    body.dark-mode .theme-toggle {
      border-top-color: rgba(255, 255, 255, 0.1);
    }

  }

  .mobile-toggle {
    display: flex;
  }

  .header {
    position: relative;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .center-column {
    justify-content: center;
  }

  .portrait-tile {
    width: 250px;
    height: 250px;
    margin: 0 auto;
  }

  .right-sidebar {
    flex-direction: column;
  }

  .works-card {
    flex: 1;
  }

  .hero-section {
    padding: 24px;
    padding-top: 60px;
  }

  .hero-tile {
    padding: 30px;
    min-height: 200px;
  }

  .hero-title {
    font-size: 28px;
  }

  .section {
    padding: 40px 24px;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .resume-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 20px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 22px;
  }

  .hero-tile {
    padding: 20px;
    min-height: 160px;
  }

  .portrait-tile {
    width: 180px;
    height: 180px;
  }

  .social-links {
    flex-direction: column;
  }

  .right-sidebar {
    flex-direction: column;
  }

  .hero-section {
    padding: 16px;
    padding-top: 60px;
  }

  .header-content {
    padding: 0 16px;
  }

  .logo {
    font-size: 20px;
  }

  .nav-menu {
    gap: 10px;
  }

  .nav-link {
    font-size: 13px;
  }

  .section {
    padding: 30px 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .skill-category {
    padding: 16px;
  }

  .highlight-item h4 {
    font-size: 28px;
  }

  .resume-header {
    flex-direction: column;
    gap: 4px;
  }

  .contact-form {
    padding: 20px;
  }
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--light-beige);
  border-radius: 20px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  border: 2px solid rgba(65, 74, 55, 0.1);
}

body.dark-mode .modal-content {
  background: #242424;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px;
  border-bottom: 2px solid rgba(65, 74, 55, 0.1);
  position: sticky;
  top: 0;
  background: var(--light-beige);
  border-radius: 20px 20px 0 0;
}

body.dark-mode .modal-header {
  background: #242424;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--sage-green);
  margin: 0;
}

body.dark-mode .modal-title {
  color: #d4a574;
}

.modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--sage-green);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

body.dark-mode .modal-close {
  color: #d4a574;
}

.modal-close:hover {
  background: rgba(65, 74, 55, 0.1);
  transform: rotate(90deg);
}

body.dark-mode .modal-close:hover {
  background: rgba(212, 165, 116, 0.15);
}

.modal-body {
  padding: 30px;
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 15px;
}

body.dark-mode .modal-body {
  color: var(--text-primary);
}

.case-study-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid rgba(65, 74, 55, 0.1);
}

body.dark-mode .case-study-section {
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.case-study-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.case-study-section h3 {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--sage-green);
  margin: 0 0 12px 0;
  letter-spacing: 0.3px;
}

body.dark-mode .case-study-section h3 {
  color: #d4a574;
}

.case-study-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

body.dark-mode .case-study-section p {
  color: #b0b0b0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Experience Section */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: relative;
  padding-left: 60px;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #4a5a3a, rgba(74, 90, 58, 0.3));
}

.experience-item {
  position: relative;
  padding-left: 60px;
  padding-right: 20px;
  padding-top: 15px;
  padding-bottom: 15px;
  margin-left: -60px;
}

.experience-item::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background: #f5f5f5;
  border: 3px solid #4a5a3a;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(74, 90, 58, 0.15);
}

body.dark-mode .experience-item::before {
  background: #2a2a2a;
  border: 3px solid #8fb47d;
  box-shadow: 0 0 0 4px rgba(143, 180, 125, 0.15);
}

.experience-header {
  margin-bottom: 12px;
}

.experience-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 5px;
}

.experience-title h3 {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--sage-green);
  margin: 0;
}

body.dark-mode .experience-title h3 {
  color: #d4a574;
}

.experience-period {
  font-size: 13px;
  font-weight: 600;
  color: var(--sage-green);
  background: rgba(65, 74, 55, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

body.dark-mode .experience-period {
  color: #d4a574;
  background: rgba(212, 165, 116, 0.15);
}

.experience-company {
  font-size: 14px;
  color: #666;
  margin: 0;
  font-weight: 500;
}

body.dark-mode .experience-company {
  color: #c0c0c0;
}

.experience-description {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 12px 0;
}

body.dark-mode .experience-description {
  color: #b0b0b0;
}

.experience-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* WCAG-compliant Skill Chips - Blue Tones */
.exp-skill-chip {
  font-size: 12px;
  font-weight: 500;
  color: #003d82;
  background: #e3f2fd;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #90caf9;
}

body.dark-mode .exp-skill-chip {
  color: #90caf9;
  background: #0d47a1;
  border: 1px solid #1565c0;
}

/* WCAG-compliant Time Period Chips - Purple Tones */
.exp-period-chip {
  font-size: 13px;
  font-weight: 600;
  color: #4a148c;
  background: #f3e5f5;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid #ce93d8;
}

body.dark-mode .exp-period-chip {
  color: #ce93d8;
  background: #6a1b9a;
  border: 1px solid #8e24aa;
}

/* Keep legacy class for backward compatibility */
.exp-skill-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--warm-brown);
  background: rgba(153, 116, 74, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(153, 116, 74, 0.3);
}

body.dark-mode .exp-skill-tag {
  color: #d4a574;
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid rgba(212, 165, 116, 0.3);
}

/* Project Header Styling */
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 15px;
  margin-bottom: 12px;
}

.project-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--warm-brown);
  background: rgba(153, 116, 74, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--warm-brown);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(153, 116, 74, 0.3);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  z-index: 50;
  will-change: transform, background, box-shadow;
}

body.dark-mode .back-to-top {
  background: #d4a574;
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.back-to-top:hover {
  background: #8a6340;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(153, 116, 74, 0.4);
}

body.dark-mode .back-to-top:hover {
  background: #e8b88a;
  box-shadow: 0 8px 20px rgba(212, 165, 116, 0.4);
}

.back-to-top:active {
  transform: translateY(-1px);
}

/* Skill Tags with Proficiency */
.skill-tag[data-proficiency]::after {
  content: "";
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}

.skill-tag[data-proficiency="Expert"] {
  background: #4a5a3a;
  color: #ffffff;
  border: 1px solid #2f3b28;
  box-shadow: 0 2px 8px rgba(74, 90, 58, 0.3);
}

.skill-tag[data-proficiency="Intermediate"] {
  background: #4a5a3a;
  color: #ffffff;
  border: 1px solid #2f3b28;
  box-shadow: 0 2px 8px rgba(74, 90, 58, 0.3);
}

.skill-tag[data-proficiency="Beginner"] {
  background: #4a5a3a;
  color: #ffffff;
  border: 1px solid #2f3b28;
  box-shadow: 0 2px 8px rgba(74, 90, 58, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .right-sidebar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .experience-timeline::before {
    left: 15px;
  }

  .experience-item {
    padding-left: 50px;
  }

  .experience-item::before {
    width: 32px;
    height: 32px;
    left: -6px;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .right-sidebar {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--light-beige);
    border-bottom: 2px solid rgba(65, 74, 55, 0.1);
    padding: 20px;
    border-radius: 0 0 12px 12px;
  }

  .nav-menu.active {
    display: flex;

    /* Sidebar Footer - Theme Toggle and Mobile Menu */
    .theme-toggle {
      margin-top: auto;
      padding-top: 20px;
      border-top: 2px solid rgba(65, 74, 55, 0.15);
      width: 100%;
      text-align: center;
    }

    body.dark-mode .theme-toggle {
      border-top-color: rgba(255, 255, 255, 0.1);
    }

  }

  .mobile-toggle {
    display: flex;
  }

  .contact-form {
    padding: 20px;
  }

  .experience-item {
    padding-left: 40px;
  }

  .experience-item::before {
    width: 28px;
    height: 28px;
    left: -10px;
    top: 25px;
  }

  .experience-timeline::before {
    left: 10px;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
  }
}