* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(255, 255, 255, 0.02);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #00ff88;
  --accent-glow: rgba(0, 255, 136, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Effects */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(
      ellipse at top,
      rgba(0, 255, 136, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom,
      rgba(102, 126, 234, 0.05) 0%,
      transparent 50%
    );
}

.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  background: radial-gradient(
    circle,
    var(--accent) 0%,
    rgba(0, 255, 136, 0.8) 30%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(0.5px);
  box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(0, 255, 136, 0.5),
    0 0 30px rgba(0, 255, 136, 0.3);
  opacity: 0;
  animation: firefly 15s infinite ease-in-out;
  pointer-events: auto;
}

@keyframes firefly {
  0% {
    transform: translate(0px, 20px) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  15% {
    opacity: 0.3; /* Flicker */
  }
  18% {
    opacity: 1;
  }
  25% {
    transform: translate(-30px, -15px) scale(1);
    opacity: 0.2; /* Dim */
  }
  30% {
    opacity: 1; /* Bright flash */
  }
  35% {
    opacity: 0.1;
  }
  40% {
    transform: translate(20px, -40px) scale(0.7);
    opacity: 1;
  }
  45% {
    opacity: 0.4; /* Dim again */
  }
  50% {
    opacity: 0.9; /* Bright */
  }
  60% {
    transform: translate(-15px, -20px) scale(1.2);
    opacity: 0.6;
  }
  65% {
    opacity: 0.1; /* Very dim */
  }
  70% {
    opacity: 1; /* Flash */
  }
  75% {
    transform: translate(25px, -10px) scale(0.8);
    opacity: 0.9;
  }
  80% {
    opacity: 0.2; /* Dim */
  }
  85% {
    opacity: 0.8; /* Bright */
  }
  90% {
    transform: translate(-10px, 5px) scale(0.6);
    opacity: 0.4;
  }
  95% {
    opacity: 0.1; /* Final dim */
  }
  100% {
    transform: translate(0px, 20px) scale(0.5);
    opacity: 0;
  }
}

.shape::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s infinite ease-in-out;
  opacity: 0.4;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1002;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: "<";
  color: var(--accent);
}

.logo::after {
  content: "/>";
  color: var(--accent);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--text-primary);
}

nav a:hover::after {
  width: 100%;
}

.resume-btn {
  background: transparent;
  border: 1px solid var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: var(--accent);
  transition: all 0.3s ease;
}

.resume-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  color: var(--accent);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1002;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  display: block;
  transform: translateY(0);
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu li {
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.mobile-menu li:last-child {
  border-bottom: none;
}

.mobile-menu a {
  display: block;
  padding: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.mobile-menu a:hover {
  background: var(--bg-card);
  color: var(--accent);
}

/* Main Layout */
#main-section {
  position: relative;
  top: 110px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

main {
  width: 90%;
  position: relative;
  left: 10%;
  z-index: 1001;
}

/* Social Links Sidebar */
#aside-left {
  width: 10%;
  position: fixed;
  height: 100%;
}

#aside-left ul {
  list-style-type: none;
  text-align: center;
  margin: 0;
  padding: 0;
}

#aside-left ul::after {
  content: "";
  display: block;
  width: 1px;
  height: 100px;
  margin: 0px auto;
  background-color: var(--border);
}

#aside-left ul li {
  margin-top: 20px;
}

#aside-left ul li a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

#aside-left ul li i {
  cursor: pointer;
}

#aside-left ul li i:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

#aside-left ul li:last-of-type {
  margin-bottom: 20px;
}

/* Hero Section */
main #about {
  width: 80%;
  padding-left: 30px;
  padding-bottom: 1.5rem;
}

main #about h1 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.2s forwards;
}

main #about h2 {
  font-size: 3.3rem;
  margin: 0;
  color: var(--text-primary);
  text-shadow: 0 1px 1px #607d8b;
  display: inline-block;
  padding-right: 5px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.4s forwards;
}

main #about h3 {
  font-size: 3rem;
  margin: 0;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

main #about p {
  line-height: 1.5;
  width: 80%;
  text-align: left;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeInUp 1s ease 0.8s forwards;
  padding: 2rem;
}

main #about button {
  font-size: 1.2rem;
  font-family: "Inter", sans-serif;
  border: 2px solid var(--accent);
  padding: 10px 15px;
  background: transparent;
  color: white;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 1s ease 1s forwards;
}

main #about button:hover {
  background-color: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Projects Section */
main #projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  padding-bottom: 1.5rem;
  row-gap: 20px;
}

main #projects h1 {
  width: 100%;
  font-size: 2.5rem;
  margin-top: 1rem;
  text-align: center;
}

main #projects article {
  background-color: var(--bg-card);
  text-align: center;
  padding: 1.5rem 2rem;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
  border-top-right-radius: 20px;
  border: 1px solid var(--border);
  width: 23%;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

main #projects article:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px var(--accent-glow);
}

main #projects article img {
  width: 128px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

main #projects article h2 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

main #projects article h3 {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

main #projects article p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

main #projects article button {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  font-size: 1rem;
  margin: 0.25rem;
  color: var(--text-primary);
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

main #projects article button:hover {
  background-color: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.typing-cursor::after {
  content: "|";
  color: var(--accent);
  animation: glow 1s infinite;
}

/* Responsive Design */
@media only screen and (max-width: 1200px) {
  main #projects article {
    width: 30%;
  }
}

@media only screen and (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }

  nav ul {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  main #about h2 {
    font-size: 2.7rem;
  }

  main #about h3 {
    font-size: 2.5rem;
  }

  main #about p {
    width: 100%;
  }

  main #about {
    width: 90%;
  }

  main #projects {
    row-gap: 1rem;
    column-gap: 0.5rem;
  }

  main #projects h1 {
    text-align: center;
  }

  main #projects article {
    width: 47%;
  }
}

@media only screen and (max-width: 650px) {
  main #about h2 {
    font-size: 2.5rem;
  }

  main #about h3 {
    font-size: 2.3rem;
  }

  main #projects article {
    width: 80%;
  }
}

@media only screen and (max-width: 500px) {
  .resume-btn {
    display: none;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00cc6a;
}

/* Skills Section */
main #skills {
  width: 100%;
  padding-bottom: 1.5rem;
  margin: 0 auto;
}

main #skills h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  min-width: 280px;
  flex: 1;
  max-width: 350px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px var(--accent-glow);
}

.skill-category h3 {
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-item:hover {
  background: rgba(0, 255, 136, 0.05);
  border-color: var(--accent);
  transform: scale(1.05);
}

.skill-item i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.skill-item:hover i {
  color: var(--text-primary);
  transform: scale(1.1);
}

.skill-item span {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: color 0.3s ease;
}

.skill-item:hover span {
  color: var(--text-primary);
}

/* Responsive Design for Skills */
@media only screen and (max-width: 768px) {
  .skills-container {
    flex-direction: column;
    align-items: center;
  }

  .skill-category {
    max-width: 100%;
    width: 100%;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media only screen and (max-width: 480px) {
  main #skills {
    width: 95%;
  }

  .skill-category {
    padding: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-item {
    padding: 0.8rem;
  }

  .skill-item i {
    font-size: 1.8rem;
  }
}
