/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0a0a0a;
  --bg-light: #1a1a1a;
  --text-light: #f5f5f7;
  --text-gray: #86868b;
  --accent: #007aff;
  --accent-light: #409cff;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

#p5-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.special-container {
  max-width: 1400px;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  line-height: 1.1;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  text-align: center;
  width: 100%;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--card-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--accent);
  transform: rotate(15deg);
}

/* Hero Section - FIXED MAGNIFIER */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 20px;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.text-magnifier-container {
  position: relative;
  margin-bottom: 2rem;
  user-select: none;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-title {
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.text-line {
  display: block;
  opacity: 0.9;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}


#magnifier {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 0; /* Changed from 50% to 0 */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  pointer-events: none;
  transition: opacity 0.1s ease;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  
  /* Create four-point star shape */
  clip-path: polygon(
    50% 0%,      /* Top point */
    65% 35%,     /* Right upper */
    100% 50%,    /* Right point */
    65% 65%,     /* Right lower */
    50% 100%,    /* Bottom point */
    35% 65%,     /* Left lower */
    0% 50%,      /* Left point */
    35% 35%      /* Left upper */
  );
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 122, 255, 0.3);
}

/* Work Section */
.work {
  padding: 100px 0;
  background: var(--bg-light);
}

.filter-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-light);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-overlay p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* Special Cards Section (Your requested cards) */
.special-cards {
  padding: 100px 0;
  background: #161616;
  position: relative;
  overflow: hidden;
}

.cards-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 60px;
  padding: 40px 0;
}

.cards-wrapper .box {
  position: relative;
  width: 320px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 30px;
  transition: 0.5s;
}

.cards-wrapper .box::before {
  content: " ";
  position: absolute;
  top: 0;
  left: 50px;
  width: 50%;
  height: 100%;
  text-decoration: none;
  background: #fff;
  border-radius: 8px;
  transform: skewX(15deg);
  transition: 0.5s;
}

.cards-wrapper .box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50px;
  width: 50%;
  height: 100%;
  background: #fff;
  border-radius: 8px;
  transform: skewX(15deg);
  transition: 0.5s;
  filter: blur(30px);
}

.cards-wrapper .box:hover:before,
.cards-wrapper .box:hover:after {
  transform: skewX(0deg);
  left: 20px;
  width: calc(100% - 90px);
}

.cards-wrapper .box:nth-child(1):before,
.cards-wrapper .box:nth-child(1):after {
  background: linear-gradient(315deg, #f4f9fe, #62bbdc);
}

.cards-wrapper .box:nth-child(2):before,
.cards-wrapper .box:nth-child(2):after {
  background: linear-gradient(315deg, #03a9f4, #656565);
}

.cards-wrapper .box:nth-child(3):before,
.cards-wrapper .box:nth-child(3):after {
  background: linear-gradient(315deg, #70726f, #00d0ff);
}

.cards-wrapper .box span {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
}

.cards-wrapper .box span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: 0.1s;
  animation: animate 2s ease-in-out infinite;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.cards-wrapper .box:hover span::before {
  top: -50px;
  left: 50px;
  width: 100px;
  height: 100px;
  opacity: 1;
}

.cards-wrapper .box span::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: 0.5s;
  animation: animate 2s ease-in-out infinite;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  animation-delay: -1s;
}

.cards-wrapper .box:hover span:after {
  bottom: -50px;
  right: 50px;
  width: 100px;
  height: 100px;
  opacity: 1;
}

@keyframes animate {
  0%,
  100% {
    transform: translateY(10px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.cards-wrapper .box .content {
  position: relative;
  left: 0;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  z-index: 1;
  transition: 0.5s;
  color: #fff;
  text-align: center;
}

.cards-wrapper .box:hover .content {
  left: -25px;
  padding: 60px 40px;
}

.cards-wrapper .box .content h2 {
  font-size: 2em;
  color: #fff;
  margin-bottom: 15px;
  font-family: "Space Grotesk", sans-serif;
}

.cards-wrapper .box .content p {
  font-size: 1.1em;
  margin-bottom: 20px;
  line-height: 1.4em;
  color: rgba(255, 255, 255, 0.8);
}

.cards-wrapper .box .content a {
  display: inline-block;
  font-size: 1.1em;
  color: #111;
  background: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.cards-wrapper .box .content a:hover {
  background: #9ac8df;
  border: 1px solid rgba(134, 225, 231, 0.4);
  box-shadow: 0 1px 15px rgba(1, 1, 1, 0.2);
  transform: translateY(-2px);
}

/* About Section */
.about {
  padding: 100px 0;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-tag {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.skill-tag:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Contact Section with your social icons */
.contact {
  padding: 100px 0;
  background: var(--bg-light);
  text-align: center;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-content p {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 3rem;
}

.contact-social {
  margin-top: 3rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-icons li {
  margin: 0 10px;
}

.social-icons li a {
  width: 80px;
  height: 80px;
  background-color: #fff;
  text-align: center;
  line-height: 80px;
  font-size: 35px;
  display: block;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 3px solid #fff;
  z-index: 1;
  transition: all 0.3s ease;
}

.social-icons li a .icon {
  position: relative;
  color: #262626;
  transition: 0.5s;
  z-index: 3;
}

.social-icons li a:hover .icon {
  color: #fff;
  transform: rotateY(360deg);
}

.social-icons li a:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(232, 190, 190);
  transition: 0.5s;
  z-index: 2;
}

.social-icons li a:hover:before {
  top: 0;
}

.social-icons li:nth-child(1) a:before {
  background: #3b5999;
}

.social-icons li:nth-child(2) a:before {
  background: #55acee;
}

.social-icons li:nth-child(3) a:before {
  background: #0077b5;
}

.social-icons li:nth-child(4) a:before {
  background: #96aec0;
}

/* Footer */
.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--card-border);
  color: var(--text-gray);
  font-size: 0.9rem;
  background: var(--bg-dark);
}



/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .magnifier {
    width: 150px;
    height: 150px;
  }

  .magnifier-content {
    font-size: 6rem;
  }

  .cards-wrapper {
    gap: 40px;
  }

  .cards-wrapper .box {
    width: 280px;
    height: 360px;
    margin: 20px;
  }

  .social-icons li a {
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .filter-tabs {
    justify-content: center;
  }

  .cards-wrapper .box {
    width: 250px;
    height: 340px;
  }

  .cards-wrapper .box .content h2 {
    font-size: 1.5em;
  }

  .cards-wrapper .box .content p {
    font-size: 1em;
  }
}
