/* Scroll offset fix for sticky nav bar */
html {
  scroll-padding-top: 64px;
  scroll-behavior: smooth;
}

.section {
  scroll-margin-top: 64px;
}

/* Reset and base */
*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #F5F5DC; /* off-white */
  color: #3D211A; /* dark brown */
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Links */
a {
  color: #6F4D38; /* medium brown */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: #A07856; /* light brown */
  outline: none;
}

/* Header title and subtitle adjustments */
header.animated-gradient-bg {
  background: linear-gradient(270deg, #6F4D38, #A07856, #CBB799, #F5F5DC);
  background-size: 800% 800%;
  animation: gradientAnimation 15s ease infinite;
  color: #F5F5DC; /* off-white text */
  padding: 1.5rem 1rem;
}

header.animated-gradient-bg h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.2;
  color: #F5F5DC;
}

header.animated-gradient-bg p {
  font-size: 1.125rem;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.3;
  text-align: center;
  color: #F5F5DC;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  header.animated-gradient-bg h1 {
    font-size: 1.8rem;
  }

  header.animated-gradient-bg p {
    font-size: 1rem;
  }
}


/* Nav bar */
.nav-bar {
  background-color: rgba(61, 33, 26, 0.85); /* dark brown with opacity */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(61, 33, 26, 0.7);
}

.nav-bar a {
  color: #CBB799; /* beige */
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s, outline-offset 0.3s;
  outline-offset: 4px;
}

.nav-bar a:hover,
.nav-bar a:focus-visible {
  color: #F5F5DC; /* off-white */
  outline: 2px solid #A07856; /* light brown */
  outline-offset: 2px;
  border-radius: 4px;
}

/* Active nav link */
.nav-bar a.active {
  color: #F5F5DC;
  border-bottom: 2px solid #A07856;
}

/* Sections */
.section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
}

/* Section titles */
.section-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #6F4D38; /* medium brown */
  border-bottom: 3px solid #A07856; /* light brown */
  display: inline-block;
  padding-bottom: 0.25rem;
  scroll-margin-top: 80px;
}

/* Section text */
.section-text {
  font-size: 1.125rem;
  color: #3D211A; /* dark brown */
  margin-top: 1rem;
  line-height: 1.7;
}

/* Skills */
.skills-category {
  margin-bottom: 2rem;
}

/* Skills category headings */
.skills-category h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #6F4D38; /* medium brown */
}

.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

/* Skills list */
.skills-list li {
  background: #F5F5DC; /* off-white */
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(111, 77, 56, 0.15);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #6F4D38; /* medium brown */
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: default;
}

.skills-list li:hover,
.skills-list li:focus {
  background-color: #6F4D38; /* medium brown */
  color: #F5F5DC; /* off-white */
  outline: none;
}

.skill-icon {
  font-size: 1.2rem;
  color: #A07856; /* light brown */
}

/* Experience cards */
.glass-card {
  background: rgba(203, 183, 153, 0.15); /* beige translucent */
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(111, 77, 56, 0.37);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(167, 120, 86, 0.3);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  color: #3D211A; /* dark brown */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.glass-card:hover,
.glass-card:focus {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(111, 77, 56, 0.3);
  outline: none;
}

.card h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  color: #4A90E2;
  margin-bottom: 0.5rem;
}

.card p {
  color: #555;
  font-size: 1rem;
  line-height: 1.5;
}

/* Footer */
.footer {
  background-color: #CBB799; /* beige */
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid #A07856;
  color: #3D211A; /* dark brown */
}

.footer h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #6F4D38; /* medium brown */
}

.footer p {
  margin: 0.5rem 0;
  font-size: 1.125rem;
}

.footer-link {
  color: #6F4D38; /* medium brown */
  font-weight: 600;
}

.footer-link:hover,
.footer-link:focus {
  color: #F5A623;
  outline: none;
}

/* Responsive */
@media (max-width: 600px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
    .nav-bar {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .skills-list {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Dark mode overrides */
body.dark {
  background-color: #3D211A; /* dark brown */
  color: #CBB799; /* beige */
}

body.dark a {
  color: #A07856; /* light brown */
}

body.dark a:hover,
body.dark a:focus {
  color: #F5F5DC; /* off-white */
}

body.dark header.animated-gradient-bg {
  background: linear-gradient(270deg, #3D211A, #6F4D38, #A07856, #CBB799);
  color: #F5F5DC;
}

body.dark .nav-bar {
  background-color: rgba(203, 183, 153, 0.85); /* beige translucent */
  box-shadow: 0 2px 5px rgba(203, 183, 153, 0.7);
}

body.dark .nav-bar a {
  color: #3D211A; /* dark brown */
}

body.dark .nav-bar a:hover,
body.dark .nav-bar a:focus-visible {
  color: #6F4D38; /* medium brown */
  outline-color: #A07856;
}

body.dark .section-title {
  color: #CBB799; /* beige */
  border-color: #A07856; /* light brown */
}

body.dark .skills-category h3 {
  color: #CBB799;
}

body.dark .skills-list li {
  background: #6F4D38; /* medium brown */
  color: #F5F5DC; /* off-white */
}

body.dark .skills-list li:hover,
body.dark .skills-list li:focus {
  background-color: #A07856; /* light brown */
  color: #3D211A; /* dark brown */
}

body.dark .glass-card {
  background: rgba(61, 33, 26, 0.6);
  border: 1px solid rgba(203, 183, 153, 0.3);
  color: #CBB799;
}

body.dark .footer {
  background-color: #3D211A; /* dark brown */
  color: #CBB799; /* beige */
  border-top: 1px solid #6F4D38;
}

body.dark .footer h2 {
  color: #A07856; /* light brown */
}

body.dark .footer-link {
  color: #A07856;
}

body.dark .footer-link:hover,
body.dark .footer-link:focus {
  color: #F5F5DC;
}

body.dark .project-card {
  background: #6F4D38; /* medium brown */
  color: #F5F5DC;
  box-shadow: 0 8px 24px rgba(203, 183, 153, 0.1);
}

body.dark .project-card:hover,
body.dark .project-card:focus {
  box-shadow: 0 16px 48px rgba(167, 120, 86, 0.5);
}

body.dark .project-card h3 {
  color: #CBB799;
}

body.dark .project-card p {
  color: #F5F5DC;
}

body.dark .project-card a {
  color: #F5F5DC;
}

/* Override other text elements as needed */
body.dark p,
body.dark li,
body.dark label {
  color: #ccc;
}


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

/* Accessibility focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 3px solid #A07856; /* warm medium brown */
  outline-offset: 2px;
}


/* Glass card style for experience */
.glass-card {
  background: rgba(203, 183, 153, 0.15); /* light tan translucent */
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(111, 77, 56, 0.37); /* medium brown shadow */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(167, 120, 86, 0.3); /* light brown border */
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  color: #3D211A; /* dark brown text */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

body.dark .glass-card {
  background: rgba(61, 33, 26, 0.6); /* dark brown translucent */
  border: 1px solid rgba(203, 183, 153, 0.3); /* light tan border */
  color: #CBB799; /* light tan text */
}


.glass-card:hover,
.glass-card:focus {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(111, 77, 56, 0.5);
  outline: none;
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Contact form */
.contact-form label {
  font-weight: 600;
  color: #6F4D38; /* medium brown */
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #A07856; /* light brown */
  color: #3D211A; /* dark brown */
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #6F4D38; /* medium brown */
  outline: none;
}

.contact-form button {
  background-color: #6F4D38; /* medium brown */
  color: #F5F5DC; /* off-white */
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover,
.contact-form button:focus {
  background-color: #A07856; /* light brown */
  outline: none;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .section {
    padding: 0 1rem;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Project cards */
.project-card {
  background: #F5F5DC; /* off-white */
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(111, 77, 56, 0.1);
  padding: 1rem 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  color: #3D211A; /* dark brown */
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card:hover,
.project-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(111, 77, 56, 0.15);
  outline: none;
}

.project-card h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #6F4D38; /* medium brown */
}

.project-card p {
  font-size: 0.9rem;
  color: #A07856; /* light brown */
  flex-grow: 1;
}

.project-card a {
  margin-top: 1rem;
  font-weight: 600;
  color: #A07856; /* light brown */
  text-align: right;
  font-size: 0.9rem;
}

.header {
  margin-top: 0;
  transition: margin-top 0.3s ease;
}

.header.collapsed {
  margin-top: -100px;
}

main {
  margin-top: 0;
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
opacity: 1;
transform: translateY(0);
}