/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme color palette */
    --background: hsl(240, 10%, 3.9%);
    --foreground: hsl(0, 0%, 98%);
    --card: hsl(240, 10%, 3.9%);
    --card-foreground: hsl(0, 0%, 98%);
    --primary: hsl(217, 91%, 60%);
    --primary-foreground: hsl(240, 10%, 3.9%);
    --secondary: hsl(240, 4%, 16%);
    --secondary-foreground: hsl(0, 0%, 98%);
    --muted: hsl(240, 5%, 6%);
    --muted-foreground: hsl(240, 5%, 64.9%);
    --accent: hsl(217, 91%, 60%);
    --border: hsl(240, 6%, 10%);
    --card-hover: hsl(240, 5%, 8%);
    
    /* Custom design tokens */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 20px hsl(217 91% 60% / 0.3);
    --radius: 0.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background: hsl(240 10% 3.9% / 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    transition: transform var(--transition-smooth);
}

.nav-logo:hover {
    transform: scale(1.05);
}

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

.nav-link {
    position: relative;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color var(--transition-smooth);
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, hsl(217 91% 60% / 0.1), var(--background), hsl(217 91% 60% / 0.05));
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 64rem;
    margin: 0 auto;
}

.hero-text {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--foreground), var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--muted-foreground);
    font-weight: 300;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 32rem;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: hsl(217, 91%, 55%);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--secondary);
    border-radius: 50%;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: var(--card-hover);
    color: var(--primary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* About Section */
.about {
    padding: 5rem 0;
}

.about-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.section-title {
    font-size: 1.875rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.about-description {
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Main Content */
.main-content {
    padding-top: 6rem;
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 32rem;
    margin: 0 auto;
}

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

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.project-card:hover {
    background: var(--card-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px hsl(0 0% 0% / 0.3);
}

.project-image {
    height: 12rem;
    background: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image {
    color: var(--muted-foreground);
    font-weight: 500;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--secondary);
    color: var(--secondary-foreground);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

.project-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.project-link:hover {
    color: hsl(217, 91%, 70%);
}

/* Contact Page */
.contact-content {
    display: grid;
    gap: 3rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.contact-text {
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--secondary);
    border-radius: var(--radius);
    color: var(--primary);
}

.contact-details h3 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Contact Form */
.contact-form-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
}

.form-input,
.form-textarea {
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 0.875rem;
    transition: var(--transition-smooth);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px hsl(217 91% 60% / 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Socials Grid */
.socials-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 48rem;
    margin: 0 auto;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

.social-card:hover {
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px hsl(0 0% 0% / 0.2);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: var(--secondary);
    color: var(--primary);
}

.social-content {
    flex: 1;
}

.social-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.social-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.social-handle {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.social-arrow {
    color: var(--muted-foreground);
    transition: var(--transition-smooth);
}

.social-card:hover .social-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .hero {
        padding: 1rem;
    }
    
    .about {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

/* Custom animations for icons */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}