/* Global & Base Styles */
* {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background-color: #2d2d2d;
  color: #fff;
  transition: background-color 0.3s, color 0.3s;
  padding-top: 80px; /* Reserve space for sticky nav */
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #2a8b8e;
  z-index: 10001;
  transition: width 0.1s ease-out;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Dark Theme Variables */
:root {
  --bg-color: #2d2d2d;
  --text-color: #fff;
  --nav-bg: rgba(45, 45, 45, 0.95);
  --card-bg: #333;
  --secondary-text: #ababab;
  --accent-color: #2a8b8e;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #333;
  --nav-bg: rgba(220, 220, 220, 0.95);
  --card-bg: #f5f5f5;
  --secondary-text: #666;
  --accent-color: #2a8b8e;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

nav {
  background: var(--nav-bg);
}

/* Sticky Navigation */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
}


nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0px 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap; /* Prevents wrapping */
  z-index: 10000;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
nav ul {
  display: flex;
  list-style: none;
}
nav ul li {
  margin: 0 15px;
}
nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 18px;
  transition: 0.3s;
}
nav ul li a:hover {
  color: var(--accent-color);
}
.logo {
  margin-top: 4pt;
  width: 190px;
}

/* Header Section */
#header {
  width: 100%;
  height: calc(var(--vh) * 100);
  background-size: cover;
  background-position: center;  background-size: cover;
  background-position: center;
}
.container {
  padding: 10px 10%;
}

.header-text {
  margin-top: 20%;
  font-size: 25px;
  text-align: center;
}
.header-text h1 {
  font-size: 60px;
  margin-top: 20px;
}
.header-text h1 span {
  color: var(--accent-color);
}

/* About Section */
#about {
  padding: 60px 0;
  scroll-margin-top: 20px;
  color: var(--secondary-text);
}
.row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.about-col-1 {
  flex-basis: 35%;
}
.about-col-1 img {
  width: 100%;
  border-radius: 15px;
  margin-top: 30px;
}
.about-col-2 {
  flex-basis: 60%;
  padding: 20px;
}
.sub-title {
  font-size: 60px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 20px;
}

.description{
  font-size: 20px;
}

.resume-button {
  display: inline-block;
  background-color: #007991;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 18px;
  transition: background 0.3s ease;
}

.resume-button:hover {
  background-color: #005f73;
}


/* Tabs */
.tab-titles {
  display: flex;
  margin: 20px 0 40px;
}
.tab-links {
  margin-right: 50px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  color: var(--text-color);
}
.tab-links::after {
  content: '';
  width: 0;
  height: 3px;
  background: var(--accent-color);
  position: absolute;
  left: 0;
  bottom: -8px;
  transition: 0.5s;
}
.tab-links.active-link::after {
  width: 50%;
}
.tab-contents {
  display: none;
}
.tab-contents.active-tab {
  display: block;
}
.tab-contents ul li {
  list-style: none;
  margin: 10px 0;
}
.tab-contents ul li span {
  color: var(--accent-color);
  font-size: 18px;
}

/* Portfolio */
#portfolio {
  padding: 50px 0;
  scroll-margin-top: 40px;

}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
  margin-top: 40px;
}
.project {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: center; 
  margin: 20px;
  min-height: 250px; 
}

.image-container {
  position: relative;
  width: 100%;
  height: 325px;
  padding-top: 75%; /* 4:3 aspect ratio (adjust as needed) */
  overflow: hidden;
  border: 0px solid var(--accent-color);
  border-radius: 10px;
  transition: border 0.5s ease;
}

.image-container:hover{
  border: 3px solid var(--accent-color);
}

.image-container img {
  scale: 1.005;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.project img {
  width: 100%;
  border-radius: 10px;
  display: block;
  transition: transform 0.3s;
  height: auto;  
}

.project figcaption {
  margin-top: 10px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--secondary-text); 
}

.project:hover img {
  transform: scale(1.05);
}
.project-info {
  padding: 15px;
  background: #1f1f1f;
  border-radius: 0 0 10px 10px;
}
.project-info h3 {
  margin-bottom: 10px;
}
.project-info p {
  font-size: 14px;
  color: #ccc;
}


/* Apply border and hover glow ONLY to the image container of first project 
.project:first-child .image-container {
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 15px rgba(42, 139, 142, 0.3);
  border-radius: 10px;
  transition: scale 0.5s ease, transform 0.4s ease, box-shadow 0.8s ease;
  transform-origin: center;

}

/* Scale entire project box 
.project:first-child {
  scale: 1;
  transition: scale 5s ease;
}*/

/* On hover: slightly enlarge and glow */
/*.project:first-child:hover {
  /*scale: 1.005;
}

.project:first-child:hover .image-container {
  /*box-shadow: 0 0 30px rgba(42, 139, 142, 0.5);
}



/* Contact */
#contact {
  padding: 50px 0;
  text-align: center;
  font-size: 30px;
}
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}
.social-icons a {
  color: var(--text-color);
  font-size: 50px;
  margin: 10px;
  transition: transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.social-icons a:hover {
  transform: scale(1.3);
}
.email-text {
  font-size: 20px;
  color: var(--text-color);
  text-decoration: none;
}

/* Copyright */
.copyright {
  width: 100%;
  text-align: center;
  padding: 25px 0;
  background: #262626;
  font-weight: 300;
  margin-top: 20px;
  color: white;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1500;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}
.modal-content {
  background-color: var(--card-bg);
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 10px;
  color: var(--text-color);
  position: relative;
}
.modal-content h2 {
  margin-bottom: 10px;
}
.modal-content p {
  font-size: 16px;
  line-height: 1.5;
}

.modal-content a {
  color: var(--accent-color);
  text-decoration: underline;
  transition: color 0.3s;
}

.modal-content a:hover {
  color: #1a6b6e;
}


.close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}
.close:hover,
.close:focus {
  color: #fff;
}

/* Floating Particles */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;

}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--accent-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-to-top:hover {
  background-color: #1a6b6e;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:active {
  transform: translateY(1px);
}


/* ----- Tablet & Mobile (< 768px) ----- */
@media (max-width: 768px) {
  /* Show hamburger, hide links by default */
  .hamburger { display: flex; }
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 10%;
    background: var(--nav-bg);
    padding: 1rem;
    border-radius: 8px;
  }
  nav ul.active { display: flex; }

  /* Stack About columns */
  .row { flex-direction: column; }
  .about-col-1,
  .about-col-2 { flex-basis: 100%; }

  /* One-column Projects */
  .project-list {
    grid-template-columns: 1fr !important;
    grid-gap: 20px;
  }

  .row {
    display: flex;
    flex-direction: column;
  }
  .about-col-1,
  .about-col-2 {
    flex-basis: 100% !important;
    width: 100% !important;
  }
  /* give some breathing room between image and text */
  .about-col-1 {
    margin-bottom: 1.5rem;
  }
  /* ensure text has its own background so it never floats on top */
  .about-col-2 {
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
  }

  /* Reduce paddings & margins */
  .container { padding: 10px 5%; }
  #about, #portfolio, #contact { padding: 40px 0; }
}

/* ----- Phone (< 480px) ----- */
@media (max-width: 480px) {
  /* Smaller header text */
  .header-text h1 { font-size: 36px; }
  .header-text p   { font-size: 18px; }

  /* Smaller section titles */
  .sub-title { font-size: 36px; }

  /* Reduce avatar size */
  .about-col-1 img { margin-top: 20px; }
}
