/* This is the required project styling. Will contain essential CSS styles like:
   * Flex property
   * Grid layout
   * Cards and sections
*/

@import url(https://fonts.googleapis.com/css?family=Raleway:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);

/* variables */
:root {
  /* Colors */
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #ffffff;
  --text-color: #222222;
  --text-color-two: #ffffff;
  --bg-secondary: #000000;
  --card-background: #f4f4f4;
  --bg-secondary-two: #111111;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);

  /* Font Weight */
  --weight-small: 400;
  --weight-semibold: 600;
  --weight-bold: 800;

  /* Max width */
  --width-small: 600px;
  --width-medium: 1100px;
  --width-large: 1300px;
}

[data-theme="dark"] {
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #000000;
  --text-color: #ffffff;
  --text-color-two: #222222;
  --bg-secondary: #ffffff;
  --card-background: #111111;
  --bg-secondary-two: #f4f4f4;
  --shadow: 0 2px 10px rgba(95, 95, 95, 0.2);
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

/* Reset default styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

/* Main styling */
body {
  background: var(--bg-primary);
  color: var(--text-color);
  font-family: "Raleway", sans-serif;
  line-height: 1.5;
  flex: 1;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-primary);
  animation: fadeInDown 0.8s ease-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.navbar:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  height: 80px;
  width: 100%;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
}

.navbar .nav-link {
  margin: 0 1rem;
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
  transition: all 0.3s ease;
  position: relative;
}

/* Add hover effect to nav links */
.navbar .nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Add underline effect on hover */
.navbar .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.navbar .nav-link:hover::after {
  width: 100%;
}

/* Add staggered animation delays for nav links */
.navbar .nav-link:nth-child(1) {
  animation-delay: 0.1s;
}

.navbar .nav-link:nth-child(2) {
  animation-delay: 0.2s;
}

.navbar .nav-link:nth-child(3) {
  animation-delay: 0.3s;
}

.navbar .nav-link:nth-child(4) {
  animation-delay: 0.4s;
}

.navbar #logo img {
  display: block;
  width: 75px;
  opacity: 0;
  animation: fadeIn 0.5s ease-out 0.1s forwards;
  transition: transform 0.3s ease;
}

.navbar #logo img:hover {
  transform: scale(1.05);
}

.navbar .btn {
  margin-right: 1.5rem;
  opacity: 0;
  animation: fadeIn 0.5s ease-out 0.5s forwards;
}

.fas.fa-arrow-right {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* hamburger */
.hamburger {
  margin-bottom: 0.1rem;
  display: none;
}

.bar {
  display: block;
  width: 23px;
  height: 3px;
  margin: 4px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  background-color: var(--bg-secondary);
}

/* Hero section */
#hero {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-image {
  width: 200px;
  border-radius: 50%;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-10px);
  }
}

.division {
  width: 100%;
  height: 2px;
  background-color: var(--card-background);
  margin: 5.5rem 0;
}

/* Projects */
#projects {
  display: flex;
  flex-direction: column;
  margin: 2rem auto 5rem;
}

#projects .btn {
  align-self: center;
  margin: 2rem 0;
}

/* Project Image */
.project-image {
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
}

.project-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

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

/* Project Cards - Make them nicer */
.project {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  max-width: 100%;
  min-height: auto;
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  position: relative;
  transition: 0.5s ease-in-out;
  height: 100%;
}

.project-bio {
  flex: 1;
}

.project-bio h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  transition: color 0.4s ease;
  line-height: 1.3;
}

.project-bio p {
  font-size: 0.85rem;
  color: var(--text-color);
  transition: color 0.4s ease;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

.project-link {
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: flex-start;
  gap: 0.8rem;
}

[data-theme="dark"] .project-link {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Project Tools Tags */
.project-tools {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tool-tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  padding: 0.25rem 0.7rem;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: var(--weight-semibold);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.tool-tag:hover {
  background: var(--primary-color);
  color: var(--text-color-two);
  transform: translateY(-2px);
}

.card:hover .tool-tag {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.card:hover .tool-tag:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* Project Video Button */
.project-video {
  margin-top: 0.8rem;
}

.project-video .btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: var(--weight-semibold);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.project-video .btn:hover {
  background: var(--primary-color);
  color: var(--text-color-two);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card:hover .project-video .btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.card:hover .project-video .btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* Certificates */
.certificates-container {
  display: flex;
  overflow-x: hidden;
  padding: 1rem 0;
  gap: 1rem;
  position: relative;
}

.certificates-scroll {
  display: flex;
  animation: scrollCertificates 20s linear infinite;
  gap: 1rem;
  padding: 0 1rem;
}

@keyframes scrollCertificates {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.certificates-container:hover .certificates-scroll {
  animation-play-state: paused;
}

.certificates-container::-webkit-scrollbar {
  height: 8px;
}

.certificates-container::-webkit-scrollbar-track {
  background: #ccc;
}

.certificates-container::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}

.certificate-badge img {
  height: 100px;
  width: auto;
  transition: transform 0.3s ease;
}

.certificate-badge img:hover {
  transform: scale(1.1);
}

/* Footer */
#footer {
  background: #111111;
  margin-top: auto;
}

#footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  min-height: 160px;
  text-align: center;
}

#footer a {
  font-size: 0.8rem;
  color: #fff;
}

#footer a:hover {
  opacity: 0.6;
}

#footer .social {
  margin: 0.9rem 0;
}

#footer .social img {
  width: 20px;
  height: 20px;
}

#footer .social a {
  margin: 0 0.5rem;
}

#footer p {
  font-size: 0.8rem;
}

/* Responsiveness */

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

@media (max-width: 768px) {}

@media (max-width: 670px) {
  .navbar .nav-menu {
    position: fixed;
    right: -100vw;
    top: 4.5rem;
    flex-direction: column;
    width: calc(80% - 10px);
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-radius: 5px;
    align-items: flex-start;
  }

  .navbar .btn {
    margin: 0;
    margin-top: 1rem;
  }

  .nav-menu.active {
    right: 20px;
  }

  .nav-menu .nav-link {
    font-size: 0.9rem;
    margin: 0 0.2rem;
  }

  .nav-menu li {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
  }

  .hamburger.active {
    border: 1px dotted gray;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

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

  .header-container .btn {
    border-radius: 5px;
    width: 80%;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skills-container {
  padding: 4rem 0;
}

/* Limit card width on small screens */
@media (max-width: 480px) {
  .skill-card {
    max-width: 90%;
    margin: 0 auto;
    /* center the card */
  }
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Card Base */
.skill-card {
  background: var(--card-bg, #1a1a1a);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s, color 0.3s;
}

/* Hover Effect */
.skill-card:hover {
  background: #000 !important;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.skill-card:hover h3,
.skill-card:hover p {
  color: #fff !important;
}

/* Title + Text */
.skill-card h3 {
  margin-bottom: 0.5rem;
  color: #00aaff;
  font-size: 1.2rem;
}

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

/* --- Responsive Tweaks --- */

/* Medium screens */
@media (max-width: 768px) {
  .skills-container {
    padding: 3rem 0;
  }

  .skill-card {
    padding: 1.8rem 1.3rem;
  }

  .skill-card h3 {
    font-size: 1.1rem;
  }

  .skill-card p {
    font-size: 0.95rem;
  }
}

/* Small screens */
@media (max-width: 480px) {
  .skills-list {
    grid-template-columns: 1fr;
    /* one card per row */
    gap: 1.2rem;
  }

  .skill-card {
    padding: 1.6rem 1.2rem;
  }

  .skill-card h3 {
    font-size: 1rem;
  }

  .skill-card p {
    font-size: 0.9rem;
  }
}