/* ===== CSS Variables ===== */
:root {
  --primary: #3B82F6;
  --primary-dark: #2563eb;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: rgba(0,0,0,0.1);
  --transition: 0.3s ease;
  --font-mono: 'Courier New', Courier, monospace;
}

/* Bluer dark mode to match primary */
[data-theme="dark"] {
  --bg: #0b1220;
  --bg-alt: #131b2e;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --shadow: rgba(0,0,0,0.6);
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(90deg, darkblue, darkgreen);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

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

ul { list-style: none; }

/* ===== Typography ===== */
h1, h2, h3 {
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.5rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  font-family: Arial, Helvetica, sans-serif;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: transparent;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--shadow);
  border-color: var(--primary);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-link {
  background: none;
  color: var(--primary);
  padding: 0;
  border: none;
}

.btn-link:hover {
  gap: 0.8rem;
}

/* ===== Header & Nav ===== */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.logo span { color: var(--primary); }

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text);
  font-weight: 500;
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-alt);
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 70px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}

[data-theme="dark"] .hero-bg {
  opacity: 0.2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
  z-index: 0;
}

[data-theme="dark"] .hero::after {
  background: linear-gradient(180deg, rgba(11,18,32,0.5), rgba(11,18,32,0.8));
}

.hero-content {
  position: relative;
  z-index: 1;
  color: white;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

[data-theme="dark"] .hero-content {
  color: var(--text);
}

.hero-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  margin: 0 auto 2rem;
  object-fit: cover;
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ===== Sections ===== */
.section {
  padding: 80px 0;
}

.page-header {
  padding-top: 150px;
  text-align: center;
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  color: aliceblue;
}

.text-center {
  text-align: center;
  margin-top: 2rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card, .service-card {
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover, .service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
  border-color: var(--primary);
}

.card i, .service-card i {
  color: var(--primary);
  margin-bottom: 1rem;
  width: 40px;
  height: 40px;
}

.service-card img {
  border-radius: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.service-card img:hover {
  transform: scale(1.05);
}

.service-card ul {
  margin-top: 1rem;
}

.service-card li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.service-card li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ===== About Page ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  color: var(--border)
}

.about-img img {
  border-radius: 12px;
  border: 3px solid var(--primary);
  box-shadow: 0 10px 30px var(--shadow);
}

.skill-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.skill-list i {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

/* ===== Stats ===== */
.stats-section {
  background: var(--bg-alt);
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
}

/* ===== Contact Form ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  color: #f8fafc;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.contact-info-code{
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 700;
}

.contact-info i {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.error-msg {
  color: #ef4444;
  font-size: 0.85rem;
  display: none;
  margin-top: 0.3rem;
}

.form-success {
  color: #10b981;
  display: none;
  margin-top: 1rem;
  padding: 12px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
}

/* ===== Footer ===== */
.footer {
  background: #0b1220;
  padding: 60px 0 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h3 {
  margin-bottom: 1rem;
  color: darkgreen;
  text-shadow: 1px 1px 1px darkgreen;
}

.footer a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links img{
  height: 50px;
  width: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: var(--transition);
  box-shadow: 0 5px 20px var(--shadow);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.back-to-top.show {
  display: flex;
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.show {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--primary);
}

/* ===== Custom Cursor ===== */
.cursor, .cursor-follower {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
}

.cursor {
  width: 8px;
  height: 8px;
  background: var(--primary);
}

.cursor-follower {
  width: 30px;
  height: 30px;
  border: 2px solid var(--primary);
  opacity: 0.5;
}

/* ===== Animations ===== */
.animate-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.6s forwards;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg);
    transition: left 0.3s ease;
    border-top: 1px solid var(--border);
  }
  
  .nav.active {
    left: 0;
  }
  
  .nav-list {
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
  
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .cursor,
  .cursor-follower {
    display: none;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .page-header {
    padding-top: 120px;
  }
}