/* Modern Portfolio Website - Eye-catching Design with Theme Support */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --primary: #6366f1;
  --secondary: #8b5cf6;
  --accent: #ec4899;
  --success: #10b981;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  
  /* Default Dark Theme */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-hover: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.5);
}

/* Light Mode Theme */
body.light-mode {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: rgba(0, 0, 0, 0.1);
  --card-bg: rgba(0, 0, 0, 0.03);
  --card-hover: rgba(0, 0, 0, 0.05);
  --shadow: rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-primary);
  transition: background 0.3s ease;
}

.animated-bg::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Floating particles */
.particle {
  position: fixed;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 20s infinite;
  z-index: -1;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-100px) translateX(100px); }
  50% { transform: translateY(-200px) translateX(-100px); }
  75% { transform: translateY(-100px) translateX(-100px); }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

nav.scrolled {
  background: var(--bg-secondary);
  box-shadow: 0 10px 30px var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  user-select: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

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

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--card-bg);
  border: 2px solid var(--border);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: rotate(20deg) scale(1.1);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
}

.hero-content {
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Hero Image */
.hero-img-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img-bg {
  position: absolute;
  width: 300px;
  height: 300px;
  background: var(--gradient);
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.3;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.5; }
}

.hero-img {
  font-size: 10rem;
  animation: float-gentle 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Section */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text-primary);
}

.section-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 20px;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.skill-card:hover {
  background: var(--card-hover);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.skill-card p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* About Page Improvements */
.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

.about-hero {
  text-align: center;
  margin-bottom: 4rem;
}

.about-avatar {
  width: 150px;
  height: 150px;
  margin: 0 auto 2rem;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  animation: pulse 4s ease-in-out infinite;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-top: 3rem;
}

.about-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 20px;
  height: fit-content;
  backdrop-filter: blur(10px);
}

.about-info-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.about-info-item:last-child {
  border-bottom: none;
}

.about-info-item h4 {
  color: var(--primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.about-info-item p {
  color: var(--text-secondary);
}

.about-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-section-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.about-section-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow);
}

.about-section-card h3 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.about-section-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.interest-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.7rem 1.2rem;
  border-radius: 25px;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.interest-tag:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 20px;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow);
  background: var(--card-hover);
}

.contact-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.contact-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.contact-item p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: var(--primary);
}

.blog-img {
  width: 100%;
  height: 200px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
}

.blog-content {
  padding: 2rem;
}

.blog-date {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.blog-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.blog-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.read-more:hover {
  gap: 0.5rem;
}

/* Admin Styles */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-table {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  overflow-x: auto;
  backdrop-filter: blur(10px);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 1rem;
  border-bottom: 2px solid var(--border);
  color: var(--primary);
  font-weight: 600;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

.status-badge {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-published {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.status-draft {
  background: var(--card-bg);
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* File Upload Styles */
.file-upload-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-upload-input {
  position: absolute;
  left: -9999px;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-secondary);
}

.file-upload-label:hover {
  border-color: var(--primary);
  background: var(--card-hover);
}

.file-upload-label.has-file {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.file-upload-icon {
  font-size: 2rem;
}

.file-upload-text {
  text-align: center;
}

.file-upload-text span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.file-preview {
  margin-top: 1rem;
  text-align: center;
}

.file-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 15px;
  border: 1px solid var(--border);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.modal-close:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s;
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-5px);
}

footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Loading Spinner */
.spinner {
  width: 50px;
  height: 50px;
  margin: 3rem auto;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 3rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
    display: none;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1001;
    box-shadow: 0 5px 20px var(--shadow);
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}
