
:root {
  --bg-primary: #0a0a16;
  --bg-secondary: #10101d;
  --bg-card: #1a1a2e;
  --text-primary: #e0e0ff;
  --text-secondary: #b4b4db;
  --text-muted: #818198;
  --accent-primary: #3DB9FF;
  --accent-secondary: #6366f1;
  --accent-tertiary: #f43f5e;
  --border-color: #2a2a4a;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --font-primary: 'Sora', sans-serif;
  --font-secondary: 'Space Grotesk', sans-serif;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* Added smooth scrolling */
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-secondary);
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  color: var(--text-primary);
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-primary);
  margin: 1rem auto 0;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: var(--font-secondary);
  border: none;
  outline: none;
}

.btn.primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.btn.primary:hover {
  background: #2aa8ff;
  transform: translateY(-2px);
}

.btn.secondary {
  background: transparent;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
}

.btn.secondary:hover {
  background: rgba(61, 185, 255, 0.1);
  transform: translateY(-2px);
}

.btn.tertiary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn.tertiary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-color);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Header & Navigation */
header {
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 10, 22, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
}

.logo::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
  position: absolute;
  bottom: -4px;
  left: 0;
}

.logo:hover::after {
  width: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  position: relative;
}

.nav-links a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
  position: absolute;
  bottom: -4px;
  left: 0;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
#hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-content {
  z-index: 1;
}

.headline {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.subheadline {
  font-size: 1.5rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.bio {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Profile Picture with Glow */
.profile-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  z-index: 5;
}

.profile-picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: url('https://guyknowsai.in/public/pfp.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  box-shadow: 0 0 30px rgba(61, 185, 255, 0.5);
}

.profile-glow {
  position: absolute;
  top: -15px;
  left: -15px;
  width: calc(100% + 30px);
  height: calc(100% + 30px);
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 25px var(--accent-primary), inset 0 0 25px var(--accent-primary);
  opacity: 0.6;
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  0% {
    opacity: 0.3;
    transform: scale(0.95);
  }
  100% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* Cyberpunk Elements for Hero - Optimized Animations */
.cyberpunk-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
}

/* Particle system container */
#particles-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 3;
}

/* Individual particle styling handled in JS */
.particle {
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  position: absolute;
}

.circuit-line {
  position: absolute;
  background: var(--accent-primary);
  opacity: 0.6;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.cl1 {
  width: 2px;
  height: 150px;
  left: 30%;
  top: 10%;
  transform: rotate(30deg);
}

.cl2 {
  width: 120px;
  height: 2px;
  right: 20%;
  top: 40%;
}

.cl3 {
  width: 2px;
  height: 100px;
  right: 40%;
  bottom: 20%;
  transform: rotate(-45deg);
}

.cyber-cube {
  position: absolute;
  width: 60px;
  height: 60px;
  left: 20%;
  top: 30%;
  border: 2px solid var(--accent-secondary);
  transform: rotate(45deg);
  will-change: transform;
  backface-visibility: hidden;
}

.cyber-sphere {
  position: absolute;
  width: 80px;
  height: 80px;
  right: 25%;
  top: 15%;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-primary);
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}

.cyber-chip {
  position: absolute;
  width: 100px;
  height: 50px;
  left: 40%;
  bottom: 25%;
  border: 2px solid var(--accent-tertiary);
  background: rgba(244, 63, 94, 0.1);
  will-change: transform;
  backface-visibility: hidden;
}

.cyber-core {
  position: absolute;
  width: 30px;
  height: 30px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-primary);
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}

.data-stream {
  position: absolute;
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  top: 60%;
  left: 20%;
  will-change: transform;
  backface-visibility: hidden;
}

/* Optimized keyframe animations - faster and more efficient */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--accent-primary);
    opacity: 0.5;
  }
  100% {
    box-shadow: 0 0 12px var(--accent-primary);
    opacity: 0.8;
  }
}

@keyframes dataFlow {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(200%);
    opacity: 0;
  }
}

/* What I Do Section */
#what-i-do {
  padding: 5rem 0;
  background-color: var(--bg-secondary);
  position: relative;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(20px);
}

.service-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-shadow);
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 185, 255, 0.1);
  margin-bottom: 1.5rem;
}

.service-icon svg {
  color: var(--accent-primary);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.feature-list {
  color: var(--text-muted);
}

.feature-list li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.feature-list li::before {
  content: "•";
  color: var(--accent-primary);
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

/* Projects Section */
#projects {
  padding: 5rem 0;
  background-color: var(--bg-primary);
  position: relative;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(20px);
}

.project-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-shadow);
}

.project-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.project-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.project-tag {
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.project-card h3 {
  font-size: 1.3rem;
  padding: 1.5rem 1.5rem 0.5rem;
}

.project-card p {
  color: var(--text-secondary);
  padding: 0 1.5rem 1rem;
}

.project-highlights {
  padding: 0 1.5rem 1.5rem;
}

.project-highlights li {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.2rem;
}

.project-highlights li::before {
  content: "→";
  color: var(--accent-secondary);
  position: absolute;
  left: 0;
}

/* Tech Stack Section */
#tech-stack {
  padding: 5rem 0;
  background-color: var(--bg-secondary);
}

.tech-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.tech-category {
  margin-bottom: 2rem;
}

.tech-category-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
  position: relative;
}

.tech-category-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent-primary);
  margin-top: 0.5rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tag {
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
}

.tech-tag.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tech-tag:hover {
  background: rgba(61, 185, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

/* Blog Section */
#blog {
  padding: 5rem 0;
  background-color: var(--bg-primary);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
}

.blog-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-shadow);
}

.blog-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.blog-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.blog-tag {
  background: var(--accent-secondary);
  color: white;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

.blog-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.blog-link {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}

.blog-link:after {
  content: "→";
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.blog-link:hover:after {
  transform: translateX(5px);
}

/* About Me Section */
#about {
  padding: 5rem 0;
  background-color: var(--bg-secondary);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-info {
  line-height: 1.8;
}

.about-info p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.about-info h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--accent-primary);
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-pill {
  background: var(--bg-primary);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
}

/* Contact Section */
#contact {
  padding: 5rem 0;
  background-color: var(--bg-primary);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.download-btn {
  margin-bottom: 2rem;
}

.contact-email, .contact-website {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.social-link svg {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.social-link:hover {
  background: rgba(61, 185, 255, 0.1);
  border-color: var(--accent-primary);
  transform: translateY(-5px);
}

.social-link:hover svg {
  color: var(--accent-primary);
}

/* Footer */
footer {
  padding: 2rem 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--bg-card);
  margin: 15% auto;
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  box-shadow: var(--card-shadow);
  position: relative;
}

.large-modal {
  max-width: 700px;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.close-modal:hover {
  color: var(--text-primary);
}

.modal h2 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.error-message {
  color: var(--accent-tertiary);
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Admin Panel */
.admin-panel {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  z-index: 90;
}

.admin-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.8rem 1.2rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-btn:hover {
  background: rgba(61, 185, 255, 0.1);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--accent-primary);
    opacity: 0.5;
  }
  100% {
    box-shadow: 0 0 15px var(--accent-primary);
    opacity: 0.8;
  }
}

@keyframes dataFlow {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(200%);
    opacity: 0;
  }
}

/* Media Queries */
@media (max-width: 991px) {
  .hero-container {
    grid-template-columns: 1fr;
  }
  
  .headline {
    font-size: 2.2rem;
  }
  
  .hero-image {
    margin-top: 2rem;
    height: 400px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem 0;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .headline {
    font-size: 2rem;
  }
  
  .service-grid,
  .projects-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-image {
    height: 300px;
  }
}

@media (max-width: 576px) {
  .nav-links {
    display: none;
  }
  
  .headline {
    font-size: 1.8rem;
  }
  
  .hero-container {
    text-align: center;
  }
  
  .cta-buttons {
    justify-content: center;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .modal-content {
    width: 90%;
    padding: 1.5rem;
  }
}
