/* Modern Components Styles */

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  padding: 1rem 0;
}

.header.scrolled {
  padding: 0.7rem 0;
  background-color: rgba(26, 26, 46, 0.95);
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  display: flex;
  align-items: center;
}

.main-logo {
  width: 40px;
  height: 40px;
  margin-right: 0.5rem;
  border-radius: var(--radius-sm);
}

.nav {
  display: flex;
}

.nav ul {
  display: flex;
  list-style: none;
}

.nav-item {
  margin: 0 1rem;
}

.nav-item a {
  color: var(--light);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: width var(--transition-fast);
}

.nav-item a:hover {
  color: var(--white);
}

.nav-item a:hover::after {
  width: 100%;
}

.nav-toggler {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

@media (max-width: 768px) {
  .nav-toggler {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--dark);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }

  .nav.open {
    right: 0;
  }

  .nav ul {
    flex-direction: column;
    width: 100%;
  }

  .nav-item {
    margin: 1rem 0;
  }

  .nav-item a {
    display: block;
    font-size: 1.2rem;
  }
}

.nav-toggler span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--white);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.nav-toggler span:first-child {
  top: 0;
}

.nav-toggler span:nth-child(2) {
  top: 9px;
}

.nav-toggler span:last-child {
  top: 18px;
}

.nav-toggler.active span:first-child {
  transform: rotate(45deg);
  top: 9px;
}

.nav-toggler.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggler.active span:last-child {
  transform: rotate(-45deg);
  top: 9px;
}

/* Hero Section */
.home-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.home-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/top-banner.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: -1;
  filter: brightness(0.3) saturate(1.2);
}

.home-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.8));
}

.home-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  animation: fadeIn 1s ease forwards;
}

.home-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  background: linear-gradient(to right, var(--white), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--light);
}

.home-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* About Section */
.about-section {
  background-color: var(--dark-light);
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 210, 211, 0.05), transparent 70%);
  z-index: 0;
}

.about-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(45, 70, 185, 0.1), transparent 70%);
  z-index: 0;
}

.about-section .container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
}

.avatar-icon {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--secondary);
  box-shadow: var(--shadow-lg);
  margin: 0 auto 1.5rem;
  display: block;
  transition: transform var(--transition-normal);
}

.avatar-icon:hover {
  transform: scale(1.05);
}

.title-header {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.paragraph-body {
  color: var(--light);
  margin-bottom: 1.5rem;
}

.git-account {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.git-account:hover {
  background-color: rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

.git-account h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--secondary);
}

.btn-cover {
  margin-top: 1rem;
}

.helper-div {
  background-color: rgba(155, 40, 227, 0.1);
  border-left: 4px solid var(--accent);
  padding: 2rem;
  border-radius: var(--radius-md);
}

.title-main {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.paragraph-descript {
  color: var(--light);
  line-height: 1.7;
}

/* Portfolio Section */
.portfolio-header {
  text-align: center;
  padding: 2rem 0;
}

.portfolio-header h3 {
  font-size: 2.5rem;
  color: var(--white);
  position: relative;
  display: inline-block;
}

.portfolio-header h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--secondary);
}

.container-card {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 2rem;
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.card {
  background-color: var(--dark-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 210, 211, 0.2);
}

.card-img {
  height: 200px;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
  background-color: #1a1a2e;
  /* Default background color while image loads */
}

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

.card-img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 1;
}

.card h2 {
  font-size: 1.5rem;
  padding: 1.5rem 1.5rem 0.5rem;
  color: var(--white);
  margin: 0;
  line-height: 1.3;
}

.card p {
  padding: 0 1.5rem;
  color: var(--gray);
  flex-grow: 1;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card a {
  margin: 0 1.5rem 1.5rem;
  padding: 0.8rem 0;
  background-color: var(--primary);
  color: var(--white);
  text-align: center;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.card a:hover {
  background-color: var(--secondary);
  color: var(--dark);
  transform: translateY(-3px);
}

@media (max-width: 576px) {
  .card-img {
    height: 180px;
  }

  .card h2 {
    font-size: 1.25rem;
    padding: 1.25rem 1.25rem 0.5rem;
  }

  .card p {
    padding: 0 1.25rem;
    font-size: 0.9rem;
  }

  .card a {
    margin: 0 1.25rem 1.25rem;
  }
}