/* Font declarations - consolidated */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("webfonts/opensans.woff2") format('woff2');
  unicode-range: U+0000-FFFF; /* Simplified to cover all ranges */
}

:root {
  --primary-color: #4c8e75;
  --primary-hover: #55e95b;
  --bg-light: #e6e6e6;
  --bg-dark: #303030;
  --text-light: #000000;
  --text-dark: #e0e0e0;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  
  font-family: 'Open Sans', sans-serif;
}

/* Base styles */
.gBody {
  height: 100%;
  padding: 3%;
  opacity: 0.75;

  /*background: linear-gradient(135deg, rgba(51,255,81,1) 0%, rgba(45,233,255,1) 100%);*/
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  pointer-events: none;
  user-select: none;
}

.gLanding {
  display: flex;
  padding: 3%;
  width: 94%;
  max-width: 94%;
  height: 100%;
  flex-flow: wrap column;
  justify-content: center;
  align-content: center;
  background-color: var(--bg-light);
}

/* Typography */
.gTitle {
  font-size: 8vw;
  font-weight: 900;
  margin: 0;
}

.gSubtitle {
  display: block;
  padding: 1vw 3vw;
  border: 2px grey solid;
  border-radius: 5px;
  font-size: 5vw;
  margin: 1vw 10vw 5vw 10vw;
}

.responsiveLargeText {
  font-size: 5vw;
}

/* Lazy loading */
.lazy-image, .lazy-background {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-image[src], .lazy-background[style*="background-image"] {
  opacity: 1;
}

/* Images and icons */

.responsiveImage {
  display: inline-block;
  margin-top: 2vw;
  height: 20vw;
  width: 20vw;
  min-width: 64px;
  min-height: 64px;
  max-width: 200px;
  max-height: 200px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.responsiveIcon {
  color: var(--primary-color);
  pointer-events: all;
  font-size: 20vw;
  display: block;
  height: 25vw;
  padding-right: 5vw;
}

.responsiveIcon, 
.responsiveIcon i {
  pointer-events: auto !important;
}

.responsiveIcon i:hover {
  color: var(--primary-hover);
}

/* Layout components */
.gAvatar, .gBadge {
  display: flex;
  flex-flow: wrap column;
  justify-content: center;
  align-content: center;
}

.gLinksBlock {
  display: flex;
  flex-flow: wrap column;
  justify-content: center;
  align-content: center;
  width: 100%;
}

.gLinksList {
  display: flex;
  justify-content: center;
  margin: 2vw 0 2vw 4vw;
  align-items: flex-start;
  flex-flow: wrap column;
  padding: 0;
}

.gLinksList li {
  list-style-type: none;
  display: flex;
  align-items: center;
  justify-content: left;
  text-align: left;
  font-size: 3.5vw;
}

/* Utility classes */
.round-large {
  border-radius: 8px;
}

.center {
  text-align: center;
}

.title-animate {
  position: relative;
  font-weight: 900;
  font-size: 3.3em;
}

.title-animate .title-wrapper {
  position: relative;
  display: inline-block;
  padding-top: 0.2em;
  padding-right: 0.05em;
  padding-bottom: 0.1em;
  overflow: hidden;
}

.title-animate .letter {
  display: inline-block;
  line-height: 1em;
}

/* Links */
a {
  pointer-events: all;
  user-select: auto;
}

.responsiveSmallLink {
  color: #1b9a1b;
  text-decoration: none;
}

.responsiveSmallLink:hover {
  text-decoration: underline;
}

/* Resume download button */
.resume-download {
  display: flex;
  justify-content: center;
  margin: 3vw 0;
  width: 100%;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  pointer-events: all;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.download-btn i {
  font-size: 1.5em;
  margin-right: 10px;
}

/* Skills Section */
.skills-category {
  margin-bottom: 3vw;
}

.skills-category h3 {
  display: flex;
  align-items: center;
  font-size: 4.5vw;
  margin: 0 0 2vw 0;
  color: var(--primary-color);
}

.skills-category h3 i {
  margin-right: 1vw;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2vw;
}

.skill-tag {
  background-color: rgba(76, 142, 117, 0.1);
  color: var(--primary-color);
  padding: 1vw 2vw;
  border-radius: 20px;
  font-size: 3.5vw;
  transition: all 0.3s ease;
  pointer-events: all;
}

.skill-tag:hover {
  background-color: rgba(76, 142, 117, 0.2);
  transform: translateY(-2px);
}

/* Projects Section */
.projects-section .section-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.project-card {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 0;
  margin-bottom: 3vw;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  pointer-events: all;
  border: 1px solid rgba(200, 200, 200, 0.3);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(76, 142, 117, 0.05) 0%, rgba(85, 233, 91, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.project-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-color: rgba(76, 142, 117, 0.3);
}

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

.card-content {
  padding: 3vw;
}

.project-title {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
  margin-bottom: 2rem;
}

.project-image-container {
  margin: -3vw -3vw 3vw -3vw; /* Negative margin to make image full width */
  height: 200px;
  overflow: hidden;
  position: relative;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-card:hover .project-title {
  color: var(--primary-color);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5vw;
  margin-bottom: 2vw;
}

.tech-tag {
  color: var(--primary-color);
  padding: 0.8vw 1.5vw;
  border-radius: 15px;
  font-size: 3vw;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.project-card:hover .tech-tag {
  background-color: rgba(76, 142, 117, 0.2);
}

.project-description {
  font-size: 3.5vw;
  line-height: 1.6;
  margin-bottom: 2vw;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3vw;
}

.project-links a {
  pointer-events: auto;
  z-index: 1;
}

.project-link {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 3.5vw;
  transition: all 0.3s ease;
}

.project-link i {
  margin-right: 1vw;
}

.project-link:hover {
  color: var(--primary-hover);
  transform: translateX(3px);
}

/* Certifications Section */
.cert-list {
  padding: 0;
  margin: 0;
}

.cert-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2vw;
  font-size: 3.5vw;
  line-height: 1.6;
}

.cert-list li i {
  color: var(--primary-color);
  font-size: 5vw;
  margin-right: 2vw;
  flex-shrink: 0;
}

/* Footer section */
.footer-card {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  margin-top: 5vw;
  padding: 3vw;
  position: relative;
  backdrop-filter: blur(5px);
}

.footer-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.footer-title {
  width: 100%;
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 2vw;
  padding-bottom: 1vw;
  color: var(--primary-color);
  border-bottom: 2px solid rgba(76, 142, 117, 0.3);
  text-align: center;
}

.gCreditBlock {
  display: flex;
  flex-flow: wrap column;
  justify-content: center;
  align-items: center;
  padding: 2vw 1vw;
  font-size: 1.5rem;
  text-align: center;
  width: 100%;
}

.credits-content {
  display: flex;
  flex-direction: column;
  gap: 1vw;
  font-size: 16px;
}

.credits-content p {
  margin: 0;
  line-height: 1.5;
}

/* Dark Mode Toggle */
.theme-toggle {
  position: fixed;
  top: 2rem;
  right: 1.5rem;
  z-index: 100;
  user-select: all;
  pointer-events: all;
}

#themeToggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: inherit;
  padding: 8px;
  border-radius: 50%;
  background-color: rgba(230, 230, 230, 0.3);
  backdrop-filter: blur(5px);
  pointer-events: all;
  transition: all 0.3s ease;
}

#themeToggle:hover {
  transform: scale(1.1);
}

.theme-icon {
  padding: 0.1em 0.15em 0 0.15em;
}

/* Enhanced section title styling */
.section-title {
  position: relative;
  font-size: 6vw;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 4vw 0;
  padding-bottom: 2vw;
  text-align: left;
  overflow: hidden;
  pointer-events: all;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--primary-hover));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.section-card:hover .section-title::after {
  width: 100px;
}

/* Dark theme styles */
body.dark-theme {
  color: var(--text-dark);
  background: linear-gradient(to right, #EC6EAD, #3494E6);
}

body.dark-theme .gLanding {
  color: var(--text-dark);
  background-color: var(--bg-dark);
}

body.dark-theme .responsiveImage {
  filter: brightness(0.8) contrast(1.2);
}

body.dark-theme .download-btn {
  background-color: #2a6e55;
}

body.dark-theme .download-btn:hover {
  background-color: #3dd63d;
}

body.dark-theme .skill-tag,
body.dark-theme .tech-tag {
  background-color: rgba(85, 233, 91, 0.1);
  color: var(--primary-hover);
}

body.dark-theme .project-card {
  background-color: rgba(50, 50, 50, 0.5);
  border-color: rgba(70, 70, 70, 0.3);
}

body.dark-theme .project-card::before {
  background: linear-gradient(135deg, rgba(45, 100, 80, 0.1) 0%, rgba(60, 180, 70, 0.1) 100%);
}

body.dark-theme .project-card:hover {
  border-color: rgba(85, 233, 91, 0.3);
}

body.dark-theme .project-card:hover .project-title {
  color: var(--primary-hover);
}

body.dark-theme .skills-category h3,
body.dark-theme .project-title,
body.dark-theme .footer-title,
body.dark-theme .project-link,
body.dark-theme .cert-list li i {
  color: var(--primary-hover);
}

body.dark-theme .project-card {
  background-color: rgba(50, 50, 50, 0.5);
}

body.dark-theme .credits-content p {
  color: var(--text-dark);
}

body.dark-theme .footer-card {
  background-color: rgba(40, 40, 40, 0.85);
}

body.dark-theme .section-title {
  color: var(--primary-hover);
}

body.dark-theme .section-title::after {
  background: linear-gradient(to right, var(--primary-hover), rgba(85, 233, 91, 0.5));
}

body.dark-theme .theme-icon {
  color: white;
}

body.light-theme .theme-icon {
  color: rgb(51, 51, 51);
}

/* Light theme explicit styles */
body.light-theme {
  color: var(--text-light);
  background: linear-gradient(90deg, #FC466B 0%, #3F5EFB 100%);
}

body.light-theme .gLanding {
  background-color: var(--bg-light);
}

/* Responsive styles */
@media screen and (min-width: 640px) {
  .responsiveIcon {
    width: 128px;
    height: 145px;
    font-size: 128px;
    padding: 1vw 0;
  }
  
  .responsiveLargeText {
    font-size: 32px;
  }
  
  .gTitle {
    font-size: 52px;
  }
  
  .gSubtitle {
    font-size: 32px;
  }
  
  .gLinksList {
    flex-flow: wrap row;
    margin: 0 1vw 1vw 1vw;
  }
  
  .gLinksList li {
    justify-content: center;
    text-align: center;
    flex-flow: wrap column;
    width: 33%;
    font-size: 16px;
  }
  
  .download-btn {
    padding: 12px 25px;
    font-size: 18px;
  }
  
  .download-btn i {
    font-size: 24px;
  }
  
  .skills-category h3 {
    font-size: 22px;
    margin-bottom: 15px;
  }
  
  .skill-tag {
    font-size: 14px;
    padding: 6px 12px;
  }
  
  .project-title {
    font-size: 24px;
    margin-bottom: 3rem;
  }
  
  .tech-tag {
    font-size: 12px;
    padding: 4px 10px;
  }
  
  .project-description {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .project-link {
    font-size: 16px;
  }
  
  .cert-list li {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  .cert-list li i {
    font-size: 20px;
    margin-right: 10px;
  }
  
  .footer-card {
    padding: 30px;
    margin-top: 30px;
  }
  
  .footer-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }
  
  .credits-content {
    font-size: 1.5rem;
    gap: 8px;
  }
  
  .gCreditBlock {
    font-size: 16px;
  }
  
  #themeToggle {
    font-size: 3rem;
  }
  
  /* Two-column layout for skills on larger screens */
  .skills-section .section-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  /* Project cards in a grid */
  .projects-section .section-content {
    grid-template-columns: repeat(auto-fill, minmax(40rem, 1fr));
  }

  .project-image-container {
    height: 250px;
    margin: -25px -25px 25px -25px;
  }
  
  .card-content {
    padding: 25px;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
  }
  
  .section-title::after {
    height: 4px;
    width: 80px;
  }
  
  .section-card:hover .section-title::after {
    width: 120px;
  }
}

/* For very large screens */
@media screen and (min-width: 1200px) {
  .projects-section .section-content {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1200px;
    margin: 0 auto;
  }
}
