/* =========================================
   Design System & Variables
   ========================================= */
:root {
    /* Colors - Light Mode */
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.5);
    
    /* Accents */
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --gradient-1: #0ea5e9;
    --gradient-2: #8b5cf6;
    
    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    
    /* Transitions & Shadows */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-color: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: rgba(15, 23, 42, 0.6);
    --card-border: rgba(30, 41, 59, 0.5);
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.2);
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-snap-type: y mandatory;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    position: relative;
}

/* Background Blobs */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--gradient-1), transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--gradient-2), transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Typography Utilities */
.gradient-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* =========================================
   Layout & Components
   ========================================= */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    min-height: 100vh;
    padding: 6rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.primary-btn {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.secondary-btn {
    background: transparent;
    border-color: var(--text-main);
    color: var(--text-main);
}

.secondary-btn:hover {
    background: var(--text-main);
    color: var(--bg-color);
    transform: translateY(-2px);
}

.mt-4 { margin-top: 2rem; }

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 5%;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.greeting {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.name {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.role {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.bio {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    animation: morph 8s ease-in-out infinite;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background-color: var(--bg-color);
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* =========================================
   Section Headers
   ========================================= */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-family: var(--font-mono);
}

.section-header .line {
    height: 1px;
    flex: 1;
    background: var(--card-border);
    max-width: 300px;
}

/* =========================================
   Skills Section
   ========================================= */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--accent);
}

.skill-card span {
    font-weight: 600;
    font-family: var(--font-mono);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

/* =========================================
   Projects Section
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 2rem;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.folder-icon {
    font-size: 2.5rem;
    color: var(--accent);
}

.project-links a {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-left: 1rem;
}

.project-links a:hover {
    color: var(--accent);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =========================================
   Contact Section
   ========================================= */
.contact {
    text-align: center;
    align-items: center;
}

.contact-box {
    padding: 4rem 2rem;
    max-width: 600px;
    width: 100%;
}

.contact-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-box p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* =========================================
   Animations
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons {
        justify-content: center;
    }

    .nav-links {
        display: none; /* In a full app, add a hamburger menu */
    }

    .image-wrapper {
        width: 250px;
        height: 250px;
    }
}
