:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-tertiary: #adb5bd;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
    --primary-color: #fff;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #6c757d;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: #2a2a2a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(20, 20, 20, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #fff;
}

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

html {
    scroll-behavior: smooth;
    height: 100%;
    margin: 0;
    overflow: hidden;
    overflow: clip;
    contain: content;
}

/* Cool infinite background scrolling animation. */
/* Background data (Original source: https://subtlepatterns.com/grid-me/) */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Dark background with scrolling grid overlay */
    background-color: #0a0a0a;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0;
    
    -webkit-animation: bg-scrolling-reverse .92s infinite;
    -moz-animation: bg-scrolling-reverse .92s infinite;
    -o-animation: bg-scrolling-reverse .92s infinite;
    animation: bg-scrolling-reverse .92s infinite;
    -webkit-animation-timing-function: linear;
    -moz-animation-timing-function: linear;
    -o-animation-timing-function: linear;
    animation-timing-function: linear;
}

body::before {
    content: "INFINITY";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Exo', sans-serif;
    font-size: clamp(1.5rem, 8vw, 8rem);
    font-weight: 100;
    font-style: normal;
    color: rgba(255, 255, 255, 0.03);
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav.scrolled {
    box-shadow: var(--shadow-md);
}

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

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'JetBrains Mono', monospace;
}


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

.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Animations */
@-webkit-keyframes bg-scrolling-reverse {
    100% { background-position: 50px 50px; }
}
@-moz-keyframes bg-scrolling-reverse {
    100% { background-position: 50px 50px; }
}
@-o-keyframes bg-scrolling-reverse {
    100% { background-position: 50px 50px; }
}
@keyframes bg-scrolling-reverse {
    100% { background-position: 50px 50px; }
}

@-webkit-keyframes bg-scrolling {
    0% { background-position: 50px 50px; }
}
@-moz-keyframes bg-scrolling {
    0% { background-position: 50px 50px; }
}
@-o-keyframes bg-scrolling {
    0% { background-position: 50px 50px; }
}
@keyframes bg-scrolling {
    0% { background-position: 50px 50px; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}


.code-window {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 600px;
    animation: fadeInUp 0.8s ease;
}

.code-header {
    background: var(--bg-tertiary);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

.code-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.code-content {
    padding: 1.5rem;
    background: var(--bg-primary);
}

.code-content pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.code-keyword { color: #c792ea; }
.code-variable { color: #82aaff; }
.code-property { color: #7fdbca; }
.code-string { color: #c3e88d; }
.code-function { color: #ffcb6b; }


/* Section Styles */
section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.section-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

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

.skill-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

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

.skill-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.skill-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.skill-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 200px;
    background: var(--accent-gradient);
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
}

.project-content {
    padding: 1.5rem;
}

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

.project-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(8px);
    border-color: var(--accent-primary);
}

.contact-icon {
    font-size: 1.5rem;
}

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

.form-group {
    position: relative;
}

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

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

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

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease;
}

/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .code-window {
        max-width: 90%;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .nav-logo .logo-text {
        font-size: 1.25rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .code-window {
        max-width: 100%;
    }

    .code-header {
        padding: 0.75rem;
    }

    .code-content {
        padding: 1rem;
    }

    .code-content pre {
        font-size: 0.75rem;
    }

    body::before {
        font-size: 4rem;
    }
}

/* Mobile devices */
@media (max-width: 640px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-logo .logo-text {
        font-size: 1.125rem;
    }

    .hero {
        min-height: 100vh;
        padding: 1rem 0;
    }

    .hero-content {
        padding: 0 0.75rem;
        width: 100%;
    }

    .code-window {
        max-width: 100%;
        border-radius: 8px;
    }

    .code-header {
        padding: 0.625rem;
        gap: 0.75rem;
    }

    .code-dots {
        gap: 4px;
    }

    .code-dots span {
        width: 10px;
        height: 10px;
    }

    .code-title {
        font-size: 0.75rem;
    }

    .code-content {
        padding: 0.875rem;
    }

    .code-content pre {
        font-size: 0.7rem;
        line-height: 1.5;
        overflow-x: auto;
    }

    body::before {
        font-size: 3rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav-container {
        padding: 0.625rem 0.75rem;
    }

    .nav-logo .logo-text {
        font-size: 1rem;
    }

    .hero-content {
        padding: 0 0.5rem;
    }

    .code-header {
        padding: 0.5rem;
    }

    .code-content {
        padding: 0.75rem;
    }

    .code-content pre {
        font-size: 0.65rem;
    }

    body::before {
        font-size: 2rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .nav-logo .logo-text {
        font-size: 0.875rem;
    }

    .code-content pre {
        font-size: 0.6rem;
    }

    body::before {
        font-size: 1.5rem;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    body::before {
        font-size: 2rem;
    }
}

