/* Certifications Section */
#certifications .cert-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

#certifications .cert-card {
  background-color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
}

#certifications .cert-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

#certifications .cert-title {
  font-size: 1.25rem;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.5px;
}

#certifications .cert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--text);
  font-size: 0.875rem;
}

#certifications .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

#certifications .meta-label {
  color: var(--text-muted);
  font-weight: 500;
}

#certifications .cert-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

#certifications .cert-learned {
  color: var(--text-muted);
  margin: 0 0 20px 0;
}

#certifications .cert-skills-container {
  margin-top: 20px;
}

#certifications .cert-skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#certifications .cert-skill-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  height: 30px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

#certifications .cert-skill-tag:hover {
  background-color: var(--border);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  #certifications .cert-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
/* ------------------- */
/* ROOT & VARIABLES    */
/* ------------------- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Cal Sans', 'CalSans-Semibold', sans-serif;
  
  --background-light: #ffffff;
  --text-light: #18181b;
  --border-light: #e4e4e7;
  --accent-light: #4f46e5;
  --subtle-light: #f4f4f5;
  --text-muted-light: #71717a;
  --link-light: #2563eb;

  --background-dark: #0A0A0A;
  --text-dark: #e5e5e5;
  --border-dark: #27272a;
  --accent-dark: #a1a1aa;
  --subtle-dark: #18181b;
  --text-muted-dark: #a1a1aa;
  --link-dark: #60a5fa;

  --background: var(--background-light);
  --text: var(--text-light);
  --border: var(--border-light);
  --accent: var(--accent-light);
  --subtle: var(--subtle-light);
  --text-muted: var(--text-muted-light);
  --link: var(--link-light);
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

html.dark {
  --background: var(--background-dark);
  --text: var(--text-dark);
  --border: var(--border-dark);
  --accent: var(--accent-dark);
  --subtle: var(--subtle-dark);
  --text-muted: var(--text-muted-dark);
  --link: var(--link-dark);
  
  color-scheme: dark;
}

/* Header translucent overrides for dark theme */
html.dark .site-header {
  background-color: rgba(10,10,10,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ------------------- */
/* BASE & RESET        */
/* ------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { 
  scroll-behavior: smooth; 
  scroll-padding-top: 80px;
  overflow-y: overlay;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0v100M100 0v100' stroke='rgba(180, 180, 190, 0.5)' stroke-width='0.8' stroke-dasharray='4 6' fill='none'/%3E%3Cpath d='M0 0h100M0 100h100' stroke='rgba(180, 180, 190, 0.5)' stroke-width='0.8' stroke-dasharray='4 7' fill='none'/%3E%3C/svg%3E");
  background-size: 60px 60px; /* Keep grid size at 60px */
  background-position: center center;
}

html.dark body {
  background-image: 
    url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0v100M100 0v100' stroke='rgba(120, 120, 130, 0.4)' stroke-width='0.8' stroke-dasharray='4 6' fill='none'/%3E%3Cpath d='M0 0h100M0 100h100' stroke='rgba(120, 120, 130, 0.4)' stroke-width='0.8' stroke-dasharray='4 7' fill='none'/%3E%3C/svg%3E");
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text);
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

ul, ol {
  margin-left: 1.5rem;
}

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.75rem;
}


/* ------------------- */
/* MAIN LAYOUT         */
/* ------------------- */
.content-wrapper {
  max-width: 840px; /* Adjusted to align with grid lines */
  margin: 0 auto;
  padding: 0 24px; /* Changed to use px for more precise alignment */
  position: relative;
  z-index: 1;
}

.content-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg width='2' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 0v80' stroke='rgba(180, 180, 190, 0.6)' stroke-width='0.8' stroke-dasharray='8 3 2 5 7 4' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  z-index: -1;
  transform: translateX(-50%);
}

html.dark .content-wrapper::before {
  background-image: url("data:image/svg+xml,%3Csvg width='2' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 0v80' stroke='rgba(120, 120, 130, 0.5)' stroke-width='0.8' stroke-dasharray='8 3 2 5 7 4' fill='none'/%3E%3C/svg%3E");
}

main {
  margin-top: 1rem;
  padding-bottom: 2rem;
}

.main-section { 
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}


.hero-section {
  padding-top: 60px;
  border-bottom: none;
}

.section-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 60px; /* Match grid */
  display: flex;
  align-items: baseline;
  text-transform: uppercase;
  letter-spacing: 1px;
  gap: 0.5rem;
  position: relative;
  height: 30px; /* Align with half grid */
}

.section-title::after {
  content: '';
  position: absolute;
  width: 2rem;
  height: 1px;
  background-color: var(--border);
  bottom: -0.5rem;
  left: 0;
}

.subsection-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 18px; /* Slight tweak for visual alignment on mobile */
  color: var(--text);
  height: 30px; /* Fixed height for alignment */
  line-height: 30px; /* Center text vertically */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.item-count {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.section-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem; /* Increased for better vertical rhythm */
  text-align: left;
  width: 100%;
}

#about p {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.7;
  max-width: 90%;
  margin-bottom: 30px; /* Half grid */
  padding-right: 20px;
}

.separator-short { 
  height: 1px; 
  width: 100%; 
  background-color: var(--border); 
  margin: 30px 0; /* Half grid */
}

.separator-full { 
  height: 1px; 
  width: 100%; 
  background-color: var(--border);
  margin: 0; /* Ensure no extra margins */
}

/* ------------------- */
/* HEADER & NAV        */
/* ------------------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px; /* Slightly reduced vertical padding, keep horizontal */
  /* translucent, theme-aware header */
  --header-bg-light: rgba(255,255,255,0.6);
  --header-bg-dark: rgba(6,6,6,0.6);
  --header-border-light: rgba(0,0,0,0.06);
  --header-border-dark: rgba(255,255,255,0.04);
  background-color: var(--header-bg-light);
  border-bottom: 1px solid var(--header-border-light);
  position: fixed; /* Span the full viewport width */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  z-index: 9999;
  height: 64px; /* Slightly reduced header height */
}

.header-left { 
  display: flex; 
  align-items: center; 
  gap: 2rem; 
}

.logo {
  display: flex;
  align-items: center;
  gap: 10rem;
  margin-left: 250px; /* small left offset to preserve spacing from the left edge */
}

.logo a {
  font-family: "Covered By Your Grace", cursive;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.7px;
}

.logo .full-name {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.main-nav { 
  display: none; 
}

.main-nav a {
  font-family: "Oswald", sans-serif;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem;
  margin-right: 0.5rem;
  transition: color 0.2s ease;
}

.main-nav a:last-child {
  margin-right: 0;
}

.main-nav a:hover { 
  color: var(--text);
}

/* Active link underline (animated blue RGB underline) */
.main-nav a,
.mobile-nav-menu a {
  position: relative; /* for pseudo-element underline */
}

.main-nav a.active,
.mobile-nav-menu a.active {
  font-weight: 700; /* bolder for active section */
  color: var(--text);
}

.main-nav a.active::after,
.mobile-nav-menu a.active::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px; /* thinner underline */
  bottom: -4px; /* slightly closer to the text */
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(0,122,255,1) 0%, rgba(0,183,255,1) 50%, rgba(0,122,255,1) 100%);
  background-size: 200% 100%;
  animation: blue-slide 2s linear infinite;
  box-shadow: 0 1px 6px rgba(0,122,255,0.10);
}

@keyframes blue-slide {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Mobile header adjustments */
@media (max-width: 1024px) {
  .site-header {
    height: 56px;
    padding: 10px 12px; /* tighter padding */
    overflow: visible; /* allow hamburger/menu to be visible */
  }

  /* Hide desktop section shortcuts and show hamburger at this breakpoint */
  .main-nav {
    display: none !important;
  }

  /* Make hamburger visible and remove its background (flat icon) */
  .hamburger-menu {
    display: flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    z-index: 10090;
  }

  .hamburger-icon {
    background: transparent !important; /* remove background */
    box-shadow: none !important; /* remove shadow */
    border: none !important;
  }

  /* Remove large left offset on the logo for mobile */
  .logo {
    margin-left: 20px !important;
    gap: 0.5rem;
  }

  /* Reduce spacing to the right of theme toggle on mobile */
  .theme-toggle-container {
    margin-right: 6px !important;
    margin-left: 6px !important;
    padding: 2px !important;
  }

  /* Ensure the mobile nav sits directly under the header height */
  .mobile-nav-menu {
    top: 56px; /* match header height */
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  /* mobile underline handled by consolidated rules further down */

  /* Ensure header actions align to the right on mobile but with some inset */
  .header-left {
    flex: 0 0 auto;
    min-width: 0;
  }

  .header-actions {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end; /* push actions to the right */
    gap: 8px;
    align-items: center;
    margin-right: 8px; /* small inset from the right edge */
    min-width: 0; /* allow shrinking to avoid overflow */
  }

  /* Make the resume button and theme toggle compact and slightly inset */
  .resume-icon-button {
    padding: 0 10px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .theme-toggle-container {
    margin-right: 6px;
  }

  /* Ensure the hamburger icon is visible and clickable */
  .hamburger-menu {
    display: block !important;
    margin-left: 6px;
    z-index: 10020; /* ensure top-most in header */
    flex: 0 0 auto;
  }

  .hamburger-icon span {
    background-color: var(--text); /* force visible color */
  }
}

/* Stronger mobile hamburger rules (ensure visible and clickable) */
@media (max-width: 1024px) {
  .hamburger-menu {
    display: flex !important;
    position: relative; /* keep it in the header flow */
    order: 3;
    pointer-events: auto !important;
    z-index: 10040; /* ensure it's above action buttons */
    margin-left: auto; /* push it to the right edge inside header-actions */
  }

  .hamburger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
  }

  .hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.25s ease-in-out;
  }

  /* Absolute-position the hamburger inside the header to avoid layout overlap */
  .site-header .hamburger-menu {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    display: flex !important;
    pointer-events: auto !important;
    z-index: 10060 !important;
  }


/* Make the hamburger fixed on screen for consistent access across sections */
@media (max-width: 1024px) {
  .site-header {
    padding-right: 56px; /* smaller room for the fixed hamburger */
  }

  .theme-toggle-container {
    margin-right: 12px !important; /* match gap used for header items */
  }

  .hamburger-menu {
    position: fixed !important;
    right: 16px !important;
    top: 14px !important; /* sit near top-right, visible across sections */
    margin: 0 !important;
    display: flex !important;
    pointer-events: auto !important;
    z-index: 10090 !important; /* ensure it's above other UI */
  }

  .hamburger-icon {
    width: 44px !important;
    height: 44px !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .hamburger-icon span {
    width: 20px !important;
    height: 2px !important;
    background-color: var(--text) !important;
    display: block !important;
    margin: 2px 0 !important;
  }

  .hamburger-icon:hover {
    transform: translateY(-1px) scale(1.02);
  }
}
  /* Make sure the resume and theme toggle sit under the hamburger in stacking order */
  .resume-icon-button, .theme-toggle-container {
    z-index: 10005;
  }
}

.header-actions { 
  display: flex; 
  align-items: center; 
  gap: 10px; /* Consistent grid spacing */
}

.icon-button {
  color: var(--text-muted); 
  background: var(--subtle);
  border: 1px solid var(--border);
  cursor: pointer; 
  transition: all 0.2s ease;
  display: flex; 
  align-items: center; 
  justify-content: center;
  width: 40px; /* Align to grid */
  height: 40px; /* Align to grid */
  border-radius: var(--radius-md);
}

.resume-icon-button {
  width: auto;
  height: 36px;
  padding: 0 12px;
  gap: 6px;
}

.resume-icon-button span {
  font-size: 0.875rem;
  font-weight: 500;
}

.icon-button:hover { 
  color: var(--text);
  background-color: var(--border);
}

/* Theme Toggle Styling */
.theme-toggle-container {
  display: flex;
  align-items: center;
  gap: 3px;
  background-color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3px;
  margin-left: 6px;
  margin-right: 250px; /* Add space to the right of the theme toggle */
}

.theme-toggle-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-button:hover {
  color: var(--text);
  background-color: var(--border);
}

.theme-toggle-button.active {
  color: var(--text);
  background-color: var(--background);
  box-shadow: 0 0 0 1px var(--border), 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hamburger Menu */
.hamburger-menu { display: block; }
.hamburger-icon { 
  display: flex; 
  flex-direction: column; 
  justify-content: space-between; 
  width: 20px; 
  height: 16px; 
  cursor: pointer; 
}

.hamburger-icon span { 
  width: 100%; 
  height: 2px; 
  background-color: var(--text); 
  border-radius: 2px; 
  transition: all 0.3s ease-in-out; 
}

.hamburger-icon.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-icon.open span:nth-child(2) { opacity: 0; }
.hamburger-icon.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 1.5rem;
  /* translucent, theme-aware background with blur */
  background-color: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  /* Make the mobile menu fixed to viewport so it is accessible from any section */
  position: fixed;
  top: 56px; /* account for fixed header height */
  left: 0;
  right: 0;
  z-index: 10070; /* above page content but below floating hamburger */
  transform: translateY(-150%);
  transition: transform 0.3s ease-in-out;
  box-shadow: var(--shadow-md);
}

.mobile-nav-menu.open { 
  transform: translateY(0);
}

.mobile-nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.25rem; /* larger tap target */
  width: auto; /* shrink to content so underline matches text width */
  display: inline-block;
  margin: 0 auto; /* center each link */
  text-align: center;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.mobile-nav-menu a:hover {
  background-color: var(--subtle);
}

/* Make active underline only as wide as the link (anchor) */
.mobile-nav-menu a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  bottom: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(0,122,255,1) 0%, rgba(0,183,255,1) 50%, rgba(0,122,255,1) 100%);
  background-size: 200% 100%;
  animation: blue-slide 2s linear infinite;
}

/* Theme aware mobile menu background */
html.dark .mobile-nav-menu {
  background-color: rgba(8,8,8,0.78);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ------------------- */
/* HERO SECTION        */
/* ------------------- */
.hero-container {
  display: flex;
  flex-direction: column;
  gap: 60px; /* Exactly one grid unit */
  margin-bottom: 60px; /* Exactly one grid unit */
  padding: 0; /* Remove padding */
}

.hero-top-row {
  display: flex;
  align-items: center;
  gap: 30px; /* Half grid */
  margin-bottom: 0;
}

.profile-avatar {
  position: relative;
  flex-shrink: 0;
  width: 120px; /* Exact width to match grid (60px × 2) */
  height: 120px; /* Exact height to match grid (60px × 2) */
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block; /* Ensures no extra space */
  box-sizing: border-box;
}

.hero-title-container {
  display: flex;
  flex-direction: column;
}

.hero-content {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-top: 15px; /* Quarter grid */
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
}

.hero-title {
  font-family: "Covered By Your Grace", cursive;
  font-size: 3rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.1;
}

.pronunciation-btn {
  background-color: var(--subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pronunciation-btn:hover {
  background-color: var(--border);
  color: var(--text);
}

.pronunciation-btn.playing {
  background-color: var(--accent);
  color: white;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hero-tagline {
  font-family: "Covered By Your Grace", cursive;
  color: var(--text-muted);
  font-size: 1.3rem;
  margin-bottom: 0;
  margin-top: 0.5rem;
  line-height: 1.4;
  letter-spacing: 0.7px;
}

.hero-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0; /* No gap to align with grid lines */
  margin-top: 2rem; /* Aligned with grid */
  max-width: 600px;
  margin-bottom: 0;
}

/* Overview Section */
.overview-section {
  margin-bottom: 3rem;
}

.overview-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.job-title-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.job-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.5px;
  margin-bottom: 0;
  margin-top: 0;
}

.resume-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  background-color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.resume-btn:hover {
  background-color: var(--border);
  transform: translateY(-2px);
}

.personal-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 40px; /* Smaller height for horizontal layout */
  padding: 0;
  box-sizing: border-box; /* Ensure padding doesn't affect height */
  border-bottom: 1px solid transparent; /* For visual alignment */
  flex-shrink: 0;
  /* For horizontal layout, each item takes appropriate width */
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; /* Adjusted to match grid lines */
  height: 40px; /* Adjusted to match grid lines */
  border-radius: var(--radius-md);
  background-color: var(--subtle);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.icon-wrapper svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.info-item a, .info-item span {
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-item a:hover {
  text-decoration: underline;
  color: var(--link);
}

/* Specific alignment for each contact info item */
.info-location, .info-email, .info-phone, .info-website {
  position: relative;
  top: 0;
}

/* Ensure each item is exactly aligned with grid */
.info-email {
  position: relative;
  height: 60px; /* Align to grid */
}

/* Social Links */
.social-section {
  display: none; /* Hide the social section as we've moved it to the hero section */
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--subtle);
  color: var(--text);
  transition: all 0.2s ease;
  text-align: center;
}

.social-link:hover {
  background-color: var(--border);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 0.4rem;
}

.social-icon svg {
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

.social-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.social-username {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ------------------- */
/* STACK SECTION       */
/* ------------------- */
.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* Exact value for grid alignment */
  margin-bottom: 10px; /* Grid alignment */
}

.stack-item {
  display: inline-flex;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  background-color: var(--subtle);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: var(--text);
  height: 40px; /* Fixed height for grid alignment */
  box-sizing: border-box;
  align-items: center;
  cursor: pointer;
}

.stack-item:hover {
  background-color: var(--border);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ------------------- */
/* EXPERIENCE SECTION  */
/* ------------------- */
.experience-company {
  margin-bottom: 2.5rem;
}

.experience-company:last-child {
  margin-bottom: 0;
}

.company-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.company-name {
  font-family: "Oswald", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-right: 0;
}

.company-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--subtle);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  height: 1.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.company-tag:hover {
  background-color: var(--border);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.position-card {
  padding: 30px; /* Half grid */
  border-radius: var(--radius-md);
  background-color: var(--subtle);
  border: 1px solid var(--border);
  margin-bottom: 30px; /* Half grid */
}

.position-card:last-child {
  margin-bottom: 0;
}

.position-header {
  margin-bottom: 30px; /* Half grid */
}

.position-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

.position-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.employment-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.875rem;
  color: var(--text);
}

.position-description {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.position-description ul {
  margin-bottom: 1.25rem;
}

.position-description li {
  margin-bottom: 0.5rem;
}

.position-description p {
  margin-bottom: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* Consistent grid spacing */
  margin-top: 20px; /* Better spacing with grid */
}

.skill-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  height: 30px; /* Fixed height for alignment */
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  transition: all 0.2s ease;
  cursor: pointer;
}

.skill-tag:hover {
  background-color: var(--border);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ------------------- */
/* PROJECTS SECTION    */
/* ------------------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem; /* Increased spacing between projects */
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  padding: 20px; /* Increased padding for more space */
  border-radius: var(--radius-md);
  background-color: var(--subtle);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 15px; /* More consistent spacing */
  position: relative;
  max-width: 100%; /* Ensure it doesn't overflow */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure all cards have same height */
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.project-header {
  display: flex;
  position: relative;
  margin-bottom: 5px;
  width: 100%;
  justify-content: center; /* Center the title */
  text-align: center; /* Center text alignment */
  padding: 0 0 10px 0; /* Add padding at bottom */
  border-bottom: 1px solid var(--border); /* Add separator line */
}

.project-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem; /* Slightly larger font size */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 auto 5px auto; /* Center with margin auto */
  line-height: 1.3; /* Tighter line spacing for multi-line titles */
  text-align: center; /* Center text */
  word-wrap: break-word; /* Allow long titles to wrap */
  hyphens: auto; /* Enable hyphenation for better wrapping */
  max-width: 90%; /* Prevent titles from being too wide */
}

.project-period {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 0.75rem;
  margin: 5px auto 0 auto;
  color: var(--text-muted);
}

.period-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.period-value {
  font-size: 0.75rem;
  color: var(--text);
  font-weight: 500;
}

.project-actions {
  display: flex;
  justify-content: center; /* Center the buttons */
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* Center content */
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--link);
  transition: all 0.2s ease;
  height: 32px; /* Slightly taller for better readability */
  box-sizing: border-box;
  min-width: 110px; /* Ensure buttons have consistent width */
}

.project-link:hover {
  background-color: var(--border);
}

.project-link .link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-link .link-icon svg {
  width: 14px;
  height: 14px;
}

.project-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 5px 0 12px 0;
  flex-grow: 1; /* Take up available space to push tags to bottom */
}

.project-description p {
  margin-bottom: 0.8rem;
  text-align: center; /* Center the main description */
}

.project-description ul {
  margin-left: 1.2rem;
  margin-top: 10px;
}

.project-description li {
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Center the tags */
  gap: 0.4rem;
  padding-top: 10px;
  border-top: 1px solid var(--border); /* Add separator line */
  margin-top: auto; /* Push to bottom of card */
}

.project-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: all 0.2s ease;
  cursor: pointer;
}

.project-tag:hover {
  background-color: var(--border);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.show-more-container {
  display: flex;
  justify-content: center;
}

.show-more-btn {
  padding: 0.625rem 1rem;
  background-color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text);
  transition: all 0.2s ease;
}

.show-more-btn:hover {
  background-color: var(--border);
}

.hidden-project {
  display: none !important;
}

/* ------------------- */
/* CONTACT SECTION     */
/* ------------------- */
.contact-content {
  margin-bottom: 2rem;
}

.contact-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--subtle);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  color: var(--text);
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .contact-methods {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Last item spans full width on desktop */
  .contact-method:nth-child(3) {
    grid-column: 1 / -1;
  }
}

.contact-method:hover {
  background-color: var(--border);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.contact-method span {
  overflow-wrap: anywhere;
}

#contact-form-container {
  width: 100%;
  max-width: 500px;
  margin: 2rem auto;
  background-color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

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

.form-group label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
}

.form-group input, .form-group textarea {
  background-color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--link);
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.submit-btn {
  padding: 0.75rem 2rem;
  background-color: var(--link);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  opacity: 0.9;
}

#success-message {
  text-align: left;
  padding: 0;
  background-color: transparent;
  border: none;
}


/* ------------------- */
/* FOOTER              */
/* ------------------- */
.site-footer {
  padding: 3rem 0 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand {
  margin-bottom: 1rem;
}

.footer-brand h3 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.footer-brand p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 0;
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background-color: var(--subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background-color: var(--border);
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.scroll-to-top {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 16px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: opacity 0.25s ease, color 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.scroll-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-to-top:hover {
  color: var(--text);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .scroll-to-top {
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
    font-size: 0; /* Hide text */
    gap: 0; /* Remove gap since text is hidden */
  }
  
  /* Show only the SVG icon on mobile */
  .scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* ------------------- */
/* UTILITY CLASSES     */
/* ------------------- */
.hidden { display: none !important; }

/* ------------------- */
/* RESPONSIVE DESIGN   */
/* ------------------- */
@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .contact-method {
    width: 100%;
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
  /* On desktop/tablet and up, hide the hamburger and the mobile menu so the full header nav is used */
  .hamburger-menu {
    display: none !important;
  }

  .mobile-nav-menu {
    display: none !important;
  }
  
  .personal-info {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .info-item {
    flex: 1 1 calc(50% - 1rem);
  }
  
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .footer-brand {
    max-width: 50%;
  }
}

@media (min-width: 1024px) {
  .content-wrapper {
    max-width: 960px;
  }
  
  .info-item {
    flex: 1 1 calc(33.333% - 1rem);
  }
  
  .hero-contact-info {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .hero-contact-info .info-item {
    flex: 1 1 calc(50% - 1rem);
  }
  
  .project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .main-section {
    padding: 80px 0; /* Reduced padding on mobile */
    min-height: 100vh; /* Still maintain full viewport height */
  }
  
  /* Contact section gets even less padding on mobile */
  #contact.main-section {
    padding: 60px 0;
    min-height: 100vh;
  }
  
  .hero-section {
    padding-top: 60px;
  }
  
  .subsection-title.oswald-medium {
    padding-left: 0; /* rely on wrapper padding for alignment */
  }
  /* Center the contact cards on mobile and align with background grid */
  .contact-methods {
    justify-items: center;
    justify-content: center;
  }
  .contact-methods .contact-method {
    width: calc(100vw - 48px); /* viewport width minus wrapper padding (24px * 2) */
    max-width: 420px;           /* 7 * 60px grid columns for alignment */
    margin-left: auto;
    margin-right: auto;
  }
  .hero-contact-info .info-item {
    flex: 1 1 100%;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-top-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  
  .hero-header {
    justify-content: center;
  }
  
  .hero-title-container {
    text-align: center;
  }
  
  .hero-tagline {
    text-align: center;
  }
  
  .hero-content {
    align-items: center;
    text-align: center;
    padding-left: 0;
  }
}