/* 1. SETUP & VARIABLES */
:root {
  --primary-color: #3182ce;
  --secondary-color: #764ba2;
  --dark-bg: #1a202c;
  --section-dark-bg: #1a1a1a;
  --section-light-bg: #1a202c;
  --card-bg: #2a2a2a;
  --text-color: #e4e6ea;
  --text-secondary: #b0b3b8;
  --border-color: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--dark-bg);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3%;
}

img {
  max-width: 100%;
  height: auto;
}

/* 2. NAVIGATION */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(26, 32, 44, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 0.8% 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-color);
  height: auto;
}

#navbar.scrolled {
  background: rgba(26, 32, 44, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

#navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  padding: 0 2%;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

#nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

#nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding: 5px 0;
  font-size: 1rem;
}

#nav-links a:hover {
  color: var(--primary-color);
}

#nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

#nav-links a:hover::after {
  width: 100%;
}

/* 3. HERO SECTION */
.hero {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 60px 20px;
}

.hero-content {
  animation: fadeInUp 1s ease;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 0;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 0;
  opacity: 0.95;
}

.hero-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  aspect-ratio: 1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 0;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.cta-button:active {
  transform: translateY(0px) scale(0.95);
}

/* 4. GENERAL SECTION STYLING */
section {
  padding: 80px 0;
  background: var(--section-dark-bg);
}

section:nth-child(even) {
  background: var(--section-light-bg);
}

.section-title {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 50px;
  position: relative;
  z-index: 5;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
  z-index: 10;
}

/* 5. ABOUT SECTION */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  width: 280px;
  height: 280px;
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 0 auto;
  animation: float 6s ease-in-out infinite;
  overflow: hidden;
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-text p {
  margin-bottom: 20px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* SKILLS */
#skills {
  background: radial-gradient(#000000 0%, hsl(0, 0%, 0%) 50%, #1a202c 100%);
  overflow: hidden;
  position: relative;
  padding: 80px 40px;
}

.skills-container {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  padding: 40px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  background: transparent;
  justify-items: center;
  align-items: center;
  width: 100%;
}

.skill-item {
  width: 130px;
  height: 130px;
  aspect-ratio: 1;
  background: rgba(42, 42, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.skill-item:hover {
  transform: translateY(-10px) scale(1.08);
  background: rgba(42, 42, 42, 0.95);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.skill-icon {
  width: 50px;
  height: 50px;
  aspect-ratio: 1;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: white;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-item:hover .skill-icon {
  transform: scale(1.1) rotateY(10deg);
}

.skill-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: center;
  transition: color 0.3s ease;
}

.skill-item:hover .skill-name {
  color: white;
}

/* Skill color themes */
.skill-item.javascript:hover {
  border-color: #f7df1e;
  box-shadow: 0 15px 40px rgba(247, 223, 30, 0.3);
}
.skill-item.html:hover {
  border-color: #e34f26;
  box-shadow: 0 15px 40px rgba(227, 79, 38, 0.3);
}
.skill-item.css:hover {
  border-color: #1572b6;
  box-shadow: 0 15px 40px rgba(21, 114, 182, 0.3);
}
.skill-item.react:hover {
  border-color: #61dafb;
  box-shadow: 0 15px 40px rgba(97, 218, 251, 0.3);
}
.skill-item.nodejs:hover {
  border-color: #68a063;
  box-shadow: 0 15px 40px rgba(104, 160, 99, 0.3);
}
.skill-item.git:hover {
  border-color: #f05032;
  box-shadow: 0 15px 40px rgba(240, 80, 50, 0.3);
}
.skill-item.java:hover {
  border-color: #ed8b00;
  box-shadow: 0 15px 40px rgba(237, 139, 0, 0.3);
}
.skill-item.mysql:hover {
  border-color: #2496ed;
  box-shadow: 0 15px 40px rgba(36, 150, 237, 0.3);
}

/* 7. PROJECTS SECTION */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  margin: 0 auto;
  width: 100%;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(49, 130, 206, 0.4);
  border-color: var(--primary-color);
}

.project-image {
  height: 200px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  margin-top: 12px;
}

.project-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tag {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.project-links {
  display: flex;
  gap: 20px;
}

.project-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  cursor: pointer;
}

.project-link:hover {
  color: var(--secondary-color);
}

.project-link:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* 8. CONTACT & FOOTER */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 0;
  flex-wrap: wrap;
}

.contact-item {
  text-align: center;
  transition: transform 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-8px);
}

.contact-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(49, 130, 206, 0.2);
}

.contact-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 15px 35px rgba(49, 130, 206, 0.4);
}

.contact-icon:active {
  transform: scale(0.95);
}

.contact-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.contact-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  transition: filter 0.3s ease;
}

.contact-icon:hover img {
  filter: brightness(1.2);
}

footer {
  background: var(--card-bg);
  color: var(--text-secondary);
  text-align: center;
  font-size: 50%;
  border-top: 1% solid var(--border-color);
  height: 2%;
}
/* 9. ANIMATIONS & HELPERS */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 10. RESPONSIVE DESIGN & HAMBURGER MENU */
#hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

#hamburger-btn .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-color);
  transition: all 0.3s ease-in-out;
}

@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .about-content {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

  .hero {
    padding: 50px 20px;
  }

  .hero-content {
    gap: 25px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .about-image {
    width: 250px;
    height: 250px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .skills-container {
    padding: 30px;
  }

  #skills {
    padding: 60px 20px;
  }

  .projects-grid {
    gap: 30px;
    grid-template-columns: 1fr;
  }

  .contact-info {
    gap: 100px;
  }

  #hamburger-btn {
    display: block;
  }

  #nav-links {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100vh;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  }

  #nav-links.active {
    left: 0;
  }

  #hamburger-btn.active .bar:nth-child(2) {
    opacity: 0;
  }

  #hamburger-btn.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  #hamburger-btn.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 480px) {
  #navbar .container {
    flex-wrap: wrap;
  }

  section {
    padding: 50px 0;
  }

  .hero {
    padding: 40px 15px;
  }

  .hero-content {
    gap: 20px;
  }

  .hero-image {
    width: 150px;
    height: 150px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .skill-item {
    width: 100px;
    height: 100px;
    gap: 8px;
    padding: 15px;
  }

  .skill-name {
    font-size: 0.8rem;
  }

  .projects-grid {
    gap: 20px;
    padding: 0 10px;
  }

  .project-content {
    padding: 20px;
  }

  .contact-info {
    gap: 30px;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }
}
