:root {
    /* Color Palette - Dark (Default) */
    --bg-color: #0a0b10;
    --surface: #14161f;
    --primary: #10b981; /* Green */
    --secondary: #3b82f6; /* Blue */
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --header-blur: rgba(10, 11, 16, 0.8);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    
    --font-head: 'Inter', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --surface: #f1f5f9;
    --text-main: #0f172a;
    --text-dim: #475569;
    --border: rgba(0, 0, 0, 0.08);
    --header-blur: rgba(255, 255, 255, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 800;
    line-height: 1.2;
}

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

.section {
    padding: 100px 0;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-blur);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    background: var(--gradient);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.nav-list {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    transition: var(--transition);
}

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

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

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
}

.nav-toggle {
    display: none;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-head);
}

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

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

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--surface);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

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

/* Services */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.service-card {
    background: var(--surface);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
}

.card-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.card-icon span {
    font-size: 3rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--surface);
    padding: 4rem;
    border-radius: 24px;
    border: 1px solid var(--border);
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
}

.footer-bottom {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  border: 1px solid #0f172a;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.footer-socials a:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.heart {
  color: #e25555;
  display: inline-block;
  margin: 0 2px;
  cursor: default;
  animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.2); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
  100% { transform: scale(1); }
}

/* 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: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: 2.5rem;
    }
}

.nav-close {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.nav-close span {
    font-size: 2rem; /* Consistent sizing */
    display: block;
}

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

@media (max-width: 768px) {
    .nav-toggle { 
        display: flex;
        align-items: center;
        cursor: pointer;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%; /* Full width for better mobile experience */
        height: 100vh;
        background: var(--surface);
        padding: 5rem 2rem;
        transition: right 0.4s ease-in-out;
        z-index: 1001;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu.show-menu { 
        right: 0; 
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    /* Fixed Positioning for Close Button */
    .nav-close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }

    .projects-grid { grid-template-columns: 1fr; }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}
