@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";

* {
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  transition: all 0.3s;
  background-color: #ffffff;
  color: #2c405e;
}

body.dark {
  background-color: #222222;
  color: #f5f5f5;
}

button {
  border-style: none;
  cursor: pointer;
  background-color: inherit;
  color: inherit;
  outline: none;
}

button:focus {
  outline-style: none;
}

/* ========== NAV ========== */
nav {
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  overflow: hidden;
  position: sticky;
  top: 0;
  background-color: #ffffff;
  z-index: 100;
  transition: background-color 0.3s;
}

body.dark nav {
  background-color: #222222;
}

nav p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}

.burger {
  border: 0;
  background-color: transparent;
  color: inherit;
  font-size: 20px;
  display: none;
}

.burger:focus {
  outline: none;
}

nav ul {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 10px;
}

nav ul li a {
  text-decoration: none;
  color: inherit;
  position: relative;
}

nav ul li a::after {
  content: "";
  background-color: #2c405e;
  position: absolute;
  left: 0;
  bottom: -18px;
  height: 2px;
  width: 100%;
  opacity: 0;
  transition: transform 0.2s ease;
}

body.dark nav ul li a::after {
  background-color: #f5f5f5;
}

nav ul li a:hover::after {
  transform: translateY(-15px);
  opacity: 1;
}


/* ========== PROFILE / HERO ========== */
.profile {
  padding: 20px;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.profile > img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 4px solid;
  object-fit: cover;
}

.profile .bio-text {
  width: 80%;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.profile .bio-text .tagline {
  font-weight: 600;
  font-size: 1em;
  margin-top: 0;
  margin-bottom: 5px;
  opacity: 0.85;
}

.profile .bio-text .social-media {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.profile .bio-text .social-media i {
  margin: 0 10px 10px 10px;
}

.profile .bio-text .social-media i:first-child {
  margin-left: 0px;
}

.profile .bio-text .social-media i a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
  margin-left: 5px;
}

/* ========== MEDIA FEATURE ========== */
.featured-videos-section {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  padding: 20px;
}

.featured-videos {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.featured {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== SECTION HEADINGS ========== */
.profile .bio-text > h2,
.tech-stack > h2,
.projects > h2,
.communities > h2,
.experience > h2,
.education > h2,
.featured-videos-section > h2,
.tech-talks > h2 {
  margin-bottom: 0;
  margin-top: 0;
}

.profile .bio-text > span,
.tech-stack > span,
.projects > span,
.communities > span,
.experience > span,
.education > span,
.featured-videos-section > span,
.tech-talks > span {
  padding: 0;
  margin: 0;
  width: 70px;
  border-bottom: 4px solid;
  z-index: 1;
  margin-bottom: 1.2em;
  border-radius: 5px;
}

/* ========== EXPERIENCE ========== */
.tech-stack,
.communities,
.experience,
.education,
.tech-talks {
  padding: 20px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
}

.experience-container {
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.experience .exp {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  box-shadow: 0px 0px 1.5px;
  border-radius: 8px;
  padding: 20px;
}

.experience .description {
  text-align: justify;
}

.experience .exp .role {
  font-weight: bold;
}

.experience .exp .date {
  font-style: italic;
}

.experience .exp .role i,
.experience .exp .company i,
.experience .exp .date i {
  margin-right: 5px;
}

/* ========== PROJECTS ========== */
.projects {
  padding: 20px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

.projects .project-section {
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 10px;
}

.projects .project-section .content {
  margin: 10px;
}

.projects .background {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  cursor: pointer;
}

.projects .project-section .content .bg-image {
  height: 207px;
  width: 100%;
  padding: 10px;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  cursor: pointer;
  border-radius: 5px 5px 0 0;
  box-shadow: 0px 0px 2px;
}

/* Project backgrounds - replace with your actual images */
.projects .project-section .content .city-safi {
  background: url("../assets/img/projects/city_safi.png");
  background-color: #1a1a2e;
}

.projects .project-section .content .cubesat {
  background: url("../assets/img/projects/cubesat.png");
  background-color: #16213e;
}

.projects .project-section .content .n8n-project {
  background: url("../assets/img/projects/n8n_project.png");
  background-color: #0f3460;
}

.projects .project-section .content .agtech {
  background: url("../assets/img/projects/agtech.png");
  background-color: #1a1a2e;
}

.projects .project-section .content .footer {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 0px 1.5px;
  border-radius: 0 0 5px 5px;
  min-height: 230px;
}

.projects .project-section .content .footer > h3 {
  margin: 0;
}

.projects .project-section .content .footer > p {
  font-size: 12px;
}

.projects .project-section .content .footer > a {
  align-self: flex-end;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  color: white;
  font-size: 12px;
  width: 40%;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 5px;
  background-color: #2c405e;
}

.badge {
  background-color: #e6b800;
  color: #1a1a1a;
  font-size: 0.65em;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 5px;
}

/* ========== TECH TALKS TIMELINE ========== */
.timeline {
  position: relative;
  padding-left: 30px;
  border-left: 2px solid #2c405e;
  margin-left: 15px;
}

body.dark .timeline {
  border-left-color: #f5f5f5;
}

.timeline-year {
  font-size: 1.4em;
  font-weight: 700;
  margin: 20px 0 10px -30px;
  padding-left: 40px;
  position: relative;
}

.timeline-year::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: #2c405e;
  border-radius: 50%;
}

body.dark .timeline-year::before {
  background-color: #f5f5f5;
}

.timeline-item {
  position: relative;
  padding: 10px 0 20px 15px;
}

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 18px;
  width: 8px;
  height: 8px;
  background-color: #e6b800;
  border-radius: 50%;
}

.timeline-content h3 {
  margin: 0 0 4px 0;
  font-size: 0.95em;
  font-weight: 600;
}

.timeline-event {
  font-size: 0.85em;
  opacity: 0.7;
  font-style: italic;
}

.timeline-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.timeline-links a {
  text-decoration: none;
  color: #2c405e;
  font-size: 0.8em;
  font-weight: 500;
  transition: opacity 0.2s;
}

.timeline-links a i {
  margin-right: 4px;
}

.timeline-links a:hover {
  opacity: 0.7;
}

body.dark .timeline-links a {
  color: #f5f5f5;
}

/* ========== TECH STACK ========== */
.stack-category {
  margin-bottom: 20px;
}

.stack-category h3 {
  margin-bottom: 10px;
  opacity: 0.8;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tech-stack .stack-imgs {
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.tech-stack .stack-imgs > img {
  width: 100px;
  height: 100px;
  margin: 10px;
}

/* ========== COMMUNITIES ========== */
.communities .communities-details {
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.communities .communities-details .details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0px 0px 1.5px;
  border-radius: 8px;
  padding: 20px;
}

.communities .communities-details .details .logos {
  width: 120px;
  height: auto;
  background-color: #fff;
  border-radius: 5px;
  padding: 5px;
}

.communities .communities-details .details .role {
  margin-top: 3px;
  font-weight: bolder;
  font-size: 1.1em;
}

.communities .communities-details .details .socials {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.communities .communities-details .details .socials i {
  margin: 5px;
}

.communities .communities-details .details .socials i a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
  margin-left: 5px;
}

/* ========== EDUCATION ========== */
.education .edu {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  padding: 5px;
}

.education .edu .course {
  font-weight: bold;
}

.education .edu .date {
  font-style: italic;
}

.education .edu .course i,
.education .edu .school i,
.education .edu .date i {
  margin-right: 5px;
}

/* ========== PHOTO DUMP BUTTON ========== */
.photo-dump-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 99;
  transition: transform 0.2s;
}

.photo-dump-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.photo-dump-btn:hover {
  transform: scale(1.1);
}

/* ========== FOOTER ========== */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px;
  padding: 20px;
}

footer > span {
  opacity: 0.5;
}

footer > span > a {
  text-decoration: none;
  color: inherit;
}

/* ========== NAV OVERLAY (click outside to close) ========== */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 98;
}

.nav-overlay.active {
  display: block;
}

/* ========== RESPONSIVE ========== */

/* Tablets */
@media screen and (max-width: 767.98px) {
  .burger {
    display: block;
  }

  nav {
    overflow: visible;
  }

  nav ul {
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 10%;
    width: 80%;
    text-align: center;
    transform: translateX(120%);
    transition: transform 0.4s ease, background-color 0.3s;
    border-radius: 5px;
    z-index: 99;
  }

  body.dark nav ul {
    background-color: #333;
  }

  nav ul li a {
    color: #2c405e;
  }

  body.dark nav ul li a {
    color: #f5f5f5;
  }

  nav ul.show {
    transform: translateX(0);
  }

  nav ul li {
    margin: 15px;
  }

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

  .experience-container {
    grid-template-columns: 1fr;
  }

  .communities .communities-details {
    grid-template-columns: 1fr;
  }

  .featured > iframe {
    width: 100% !important;
  }

  .profile {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .profile > img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
  }

  .profile .bio-text {
    width: 100%;
    align-items: center;
  }

  .profile .bio-text .social-media {
    justify-content: center;
  }

  .communities .communities-details .details {
    align-items: center;
  }

  .communities .communities-details .details .role,
  .communities .communities-details .details .description {
    text-align: center;
  }

  .education .edu {
    align-items: center;
    text-align: center;
  }

  .experience .exp {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .tech-stack .stack-imgs {
    justify-content: center;
  }

  .tech-stack .stack-imgs > img {
    width: 70px;
    height: 70px;
  }

}

/* Small phones */
@media (max-width: 380px) {
  .profile > img {
    width: 160px;
    height: 160px;
  }

  .tech-stack .stack-imgs > img {
    width: 55px;
    height: 55px;
  }
}
