@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
  --bg-dark: #0a0e17;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --primary: #4cc9f0;
  --secondary: #4361ee;
  --accent: #f72585;
  --text-main: #e0e6ed;
  --text-muted: #94a3b8;
  --gradient-main: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--primary) 100%
  );
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
  --nav-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Outfit", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(
      circle at 15% 50%,
      rgba(67, 97, 238, 0.15) 0%,
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(247, 37, 133, 0.15) 0%,
      transparent 25%
    );
}

/* Base Styles & Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

section {
  padding: 100px 0;
  position: relative;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn.primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  margin-left: 15px;
}

.btn.outline:hover {
  background: rgba(76, 201, 240, 0.1);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: var(--glass-border);
  display: flex;
  align-items: center;
  color: #fff;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo svg {
  height: 32px;
  width: auto;
  stroke: var(--secondary);
  transition: all 0.3s ease;
  overflow: visible;
}

.logo svg .slash {
  stroke: var(--secondary);
  opacity: 0.8;
  transform-origin: center;
  transition: transform 0.4s ease-out;
}

.logo:hover svg {
  stroke: var(--primary);
  filter: drop-shadow(0 0 3px var(--primary));
}

.logo:hover svg .slash {
  transform: rotate(-20deg) scale(1.1);
  stroke: var(--primary);
  filter: drop-shadow(0 0 5px var(--accent));
}

/* Reset polyline transforms */
.logo:hover svg polyline:first-child,
.logo:hover svg polyline:last-child {
  transform: none;
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  position: relative;
}

.nav-links a:not(.btn-nav):hover {
  color: var(--primary);
}

.nav-links a:not(.btn-nav)::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: var(--gradient-main);
  transition: width 0.3s;
}

.nav-links a:not(.btn-nav):hover::after {
  width: 100%;
}

.btn-nav {
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid transparent;
}

.btn-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary);
}

.menu-toggle {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001; /* Ensure it's above the menu */
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle span:nth-child(3) {
  bottom: 0;
}

/* Animation State */
.menu-toggle.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
}

.hero-content {
  z-index: 2;
}

.greeting {
  display: block;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 15px;
  font-weight: 600;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 10px;
  background: linear-gradient(to right, #fff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 25px;
  font-weight: 600;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 40px;
}

/* Hero Visual Animation */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glow-circle {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  opacity: 0.2;
  filter: blur(50px);
  animation: pulse 4s ease-in-out infinite;
}

.hero-image-container {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 50px rgba(76, 201, 240, 0.3),
    inset 0 0 20px rgba(76, 201, 240, 0.2);
  transform: rotate(-3deg);
  animation: floatImage 6s ease-in-out infinite;
  backdrop-filter: blur(5px);
}

@keyframes floatImage {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-20px) rotate(3deg);
  }
}

/* 
.code-card {
  ... removed ...
} 
*/

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--secondary);
  font-size: 1.5rem;
}
/* About Section */
.about-content strong {
  color: var(--secondary);
}
.about-content {
  font-size: 1.25rem;
}
.about-content-p {
  color: var(--primary);
  margin-top: 30px;
}
/* Skills Section */
.skills-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.skill-card {
  background: var(--bg-card);
  border: var(--glass-border);
  padding: 30px 20px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 160px; /* Fixed width for uniform flex items */
}

.skill-card:hover {
  transform: translateY(-10px);
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.skill-card i {
  font-size: 3rem;
  color: var(--primary);
  transition: 0.3s;
}

/* Brand Specific Hover Colors */
.skill-card.brand-html:hover i {
  color: #e34f26;
  transform: scale(1.1);
}

.skill-card.brand-css:hover i {
  color: #1572b6;
  transform: scale(1.1);
}

.skill-card.brand-js:hover i {
  color: #f7df1e;
  transform: scale(1.1);
}

.skill-card.brand-react:hover i {
  color: #61dafb;
  transform: scale(1.1);
}

.skill-card.brand-bootstrap:hover i {
  color: #7952b3;
  transform: scale(1.1);
}

.skill-card.brand-tailwind:hover i {
  color: #38bdf8;
  transform: scale(1.1);
}

.skill-card.brand-nextjs:hover i {
  color: #00ff22;
  transform: scale(1.1);
}

.skill-card.brand-wordpress:hover i {
  color: #21759b;
  transform: scale(1.1);
}

.skill-card.brand-responsive:hover i {
  color: #0ae0ab;
  transform: scale(1.1);
}

.skill-card.brand-search:hover i {
  color: #ffffff;
  transform: scale(1.1);
}

.skill-card.brand-git:hover i {
  color: #f34f29;
  transform: scale(1.1);
}

.skill-card.brand-debug:hover i {
  color: #ff1100;
  transform: scale(1.1);
}

.skill-card.brand-crossbrowser:hover i {
  color: #4285f4;
  transform: scale(1.1);
}

.skill-card.brand-uiux:hover i {
  color: #e91e63;
  transform: scale(1.1);
}

.skill-card.brand-darkui:hover i {
  color: #9ca3af;
  transform: scale(1.1);
}

.skill-card span {
  font-weight: 600;
  font-size: 1.1rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.project-card {
  background: var(--bg-card);
  border-color: var(--primary);
  border: var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-12px);
  background: var(--bg-card-hover);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card h3 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: #fff;
  font-weight: 700;
}

.project-card p {
  color: #a1a1a1;
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 25px;
  flex-grow: 1;
}

.project-links {
  display: flex;
  gap: 25px;
  margin-top: auto;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.project-link i {
  font-size: 1.5rem;
}

.project-link:hover {
  opacity: 0.8;
  transform: translateX(3px);
}

.project-link.demo {
  color: #4361ee;
}

.project-link.demo:hover {
  color: #4cc9f0;
}

/* Contact Section */
.contact-container {
  display: flex;
  justify-content: center;
}

.contact-box {
  background: linear-gradient(
    135deg,
    rgba(20, 26, 40, 0.8),
    rgba(10, 14, 23, 0.9)
  );
  padding: 80px 60px;
  border-radius: 40px;
  text-align: center;
  max-width: 1100px;
  width: 95%;
  border: var(--glass-border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.contact-box h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.contact-box p {
  color: var(--secondary);
  font-size: 1.2rem;
  margin-bottom: 40px;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
  text-align: left;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 20px;
  border: var(--glass-border);
  transition: all 0.3s ease;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-5px);
  border-color: var(--primary);
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
}

.info-text span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-text a,
.info-text p {
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 20px;
}

.main-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn.whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn.whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn.primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.big-btn {
  padding: 16px 48px;
  font-size: 1.2rem;
}

.contact-meta {
  display: flex;
  gap: 25px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px auto 0;
  width: 100%;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 35px;
  border-radius: 20px;
  border: var(--glass-border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: left;
  min-width: 320px;
}

.meta-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 20px rgba(76, 201, 240, 0.1);
}

.meta-item i {
  font-size: 1.4rem;
  color: var(--primary);
  background: rgba(76, 201, 240, 0.1);
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(76, 201, 240, 0.2);
  transition: all 0.3s ease;
}

.meta-item:hover i {
  background: var(--primary);
  color: #fff;
  transform: rotate(-10deg) scale(1.1);
}

.meta-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 5px;
  font-weight: 600;
}

.meta-text p,
.phone-list a {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  transition: color 0.3s ease;
}

.phone-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phone-list a:hover {
  color: var(--primary);
}

.social-links-container {
  width: 100%;
}

.social-links-container h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.social-circles {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-circle {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  border: var(--glass-border);
  transition: all 0.3s ease;
}

.social-circle:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(76, 201, 240, 0.2);
}

/* Footer */
footer {
  padding: 50px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.socials {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.socials a {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: 0.3s;
}

.socials a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.2;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 50px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
    flex-direction: column-reverse; /* Put image on top generally or keep distinct */
    display: flex;
    flex-direction: column;
  }

  .hero-content {
    order: 2;
  }

  .hero-visual {
    order: 1;
    height: 300px; /* Reduced height for mobile */
    display: flex; /* Make it visible */
  }

  .hero-image-container {
    width: 250px;
    height: 250px;
  }

  .glow-circle {
    width: 280px;
    height: 280px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .nav-links {
    display: none; /* Mobile menu logic to be added with JS if needed, hidden for now */
  }

  .menu-toggle {
    display: block;
  }

  .actions {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .btn.outline {
    margin-left: 0;
  }

  /* Contact Section Responsive */
  .contact-box {
    padding: 60px 30px;
    border-radius: 30px;
  }
  .contact-box h2 {
    font-size: 2.2rem;
  }

  .big-btn {
    padding: 14px 34px;
    font-size: 1.1rem;
    width: 100%;
    justify-content: center;
  }

  .meta-item {
    min-width: 100%;
    padding: 15px 25px;
  }
}

@media (max-width: 480px) {
  .contact-box {
    padding: 40px 20px;
    border-radius: 24px;
  }

  .contact-box h2 {
    font-size: 1.8rem;
  }

  .contact-box p {
    font-size: 1rem;
  }

  .meta-item {
    gap: 15px;
    padding: 12px 20px;
  }

  .meta-item i {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .meta-text p,
  .phone-list a {
    font-size: 1rem;
  }
}

/* Utility Classes for JS Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Menu Active State */
@media (max-width: 768px) {
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-bottom: var(--glass-border);
    animation: slideDown 0.3s ease forwards;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Background Animation */
.bg-animation-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.floating-icon {
  position: absolute;
  bottom: -150px;
  color: rgba(255, 255, 255, 0.1);
  opacity: 0;
  animation: floatUp linear forwards;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: var(--max-opacity, 0.1);
  }
  90% {
    opacity: var(--max-opacity, 0.1);
  }
  100% {
    transform: translateY(-120vh) rotate(360deg);
    opacity: 0;
  }
}
