/* =======================
    BASIC GLOBAL RESET
======================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow: visible;
}


/* =======================
    HEADER
======================= */
.site-header {
  background-color: #222;
  color: #fff;
  padding: 1rem 0;
}

.site-header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.header-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

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

/* Fix header-right spacing when resizing */
.header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem; /* Increased gap for breathing room */
  padding-right: 1rem; /* Add some right padding */
}


.site-nav {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: letter-spacing 0.5s ease;
}

.site-nav a:hover {
  color: #ffffff;
  letter-spacing: 2.5px;
  transition: 0.5s ease;
}


/* =======================
    SECTIONS BASE STYLING
======================= */
.section {
  padding: 3rem 0;
  min-height: 200px;
  border-bottom: 1px solid #dfdfdf;
  transition: background-color 0.75s ease;
}

.section:hover {
  background-color: #efefef;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}


/* =======================
    ABOUT SECTION
======================= */
.about-wrapper {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.about-text {
  flex: 1 1 60%;
}

.about-image {
  flex: 1 1 35%;
  text-align: center;
  border-left: #ddd;
}

.about-image img {
  max-width: 50%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover .about-image img {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.section .header-text {
  letter-spacing: 0px; 
  transform: translateY(0);
  transition: letter-spacing 0.5s, transform 0.5s;
}

.section:hover .header-text {
  letter-spacing: 3px; 
  transform: translateY(-5px);
}


/* =======================
    ICONS (TECH LOGOS + SOCIAL LINKS)
======================= */
.icons-wrapper {
  display: flex;
  justify-content: flex-end;
}

.tech-logos {
  display: flex;
  justify-content: flex-end;
  gap: 2.7rem;
  flex-wrap: wrap;
  padding-right: 3rem;
  padding-left: 3rem;
  padding-top: 1rem;
  max-width: 70%; /* Prevent them from stretching across the entire screen */
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 2.7rem;
  flex-wrap: wrap;
  padding-right: 3rem;
  padding-left: 3rem;
  padding-top: 1rem;
}

.social-links img,
.tech-logos img {
  width: 40px;
  height: auto;
  transition: transform 0.3s ease;
}

.social-links-linkedin img {
  width: 100px;
  height: auto;
  transition: transform 0.3s ease;
  padding: 0.5rem;
}

.social-links-linkedin img:hover {
  transform: scale(1.5);
}

.social-links img:hover,
.tech-logos img:hover {
  transform: scale(1.8);
}

#contact.section .social-links-linkedin {
  transition: transform 0.3s ease;
}

#contact.section:hover .social-links-linkedin {
  transform: translateY(-5px);
}


/* =======================
    PROJECTS SECTION
======================= */
.project-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.project-item {
  position: relative;
  aspect-ratio: 1 / 1;
  perspective: 1000px;
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

#projects.section:hover .project-item {
  transform: translateY(-10px);
}

.project-item:hover .card-front {
  transform: rotateY(180deg);
}

.project-item:hover .card-back {
  transform: rotateY(0deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 5px;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  transition: transform 0.6s ease;
}




.card-front {
  background-color: #ffffff;
  color: #333;
  transform: rotateY(0deg);
  overflow: hidden;
}

.card-back {
  background-color: #b0b0b0;
  color: #ffffff;
  font-size: 0.95rem;
  transform: rotateY(-180deg);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0px;
}


/* =======================
    CONTACT SECTION
======================= */
.contact-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.contact-form {
  flex: 1 1 300px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form button {
  align-self: flex-start;
  background-color: #00bcd4;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.contact-form button:hover {
  background-color: #0097a7;
}

.contact-extras {
  flex: 1 1 250px;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


/* =======================
    SECTION ELEMENT ANIMATIONS
======================= */
.section h2,
.section h3,
.section h5,
.section p,
.section label,
.section input,
.section textarea,
.social-links,
.section .tech-logos,
.section button {
  transition: transform 0.3s ease, color 0.3s ease;
  color: inherit;
}

.section:hover h2,
.section:hover h3,
.section:hover h5,
.section:hover p,
.section:hover label,
.section:hover input,
.section:hover textarea,
.section:hover .social-links,
.section:hover .tech-logos,
.section:hover button,
.section:hover .contact-form label {
  transform: translateY(-5px);
}

.contact-form label {
  display: inline-block;   /* Now transforms can take effect */
  transition: transform 0.3s ease, color 0.3s ease;
}



/* =======================
    FOOTER
======================= */
.site-footer {
  background-color: #222;
  color: #fff;
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
}


/* =======================
    RESPONSIVE QUERIES
======================= */
@media (max-width: 768px) {
  .header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .site-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

  
  .header-right {
    padding-left: 2rem; /* push it away from nav on smaller screens */
    gap: 2rem;
  }



  /* Center tech logos & social icons */
  .tech-logos,
  .icons-wrapper,
  .social-links {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .social-links img,
  .tech-logos img {
    width: 35px;
  }

  .about-wrapper {
    display: flex;
    flex-direction: column;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .project-item {
    padding: 1rem;
  }

  #weather {
    display: none;
  }

  .contact-form {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 1200px) {
  .project-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

@media (max-width: 600px) {
  .project-list {
    grid-template-columns: 1fr;
  }
}


/* =======================
    DARK MODE
======================= */
.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

.dark-mode .section {
  background-color: #1a1a1a;
  border-color: #2a2a2a;
}

.dark-mode .section:hover {
  background-color: #202020;
}

.dark-mode .card-front {
  background-color: #252525;
  color: #e0e0e0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .card-back {
  background-color: #252525;
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}


/* =======================
    THEME TOGGLE
======================= */
#themeToggle {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

#themeToggle img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

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


/* =======================
    WEATHER STYLES
======================= */
#weather span {
  margin: 0 0.25rem;
  padding
}

#weather img {
  vertical-align: middle;
  width: 32px;
  height: 32px;
}
