/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #0f172a;
    --accent-color: #60a5fa;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --border-color: #475569;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, font-weight 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--accent-color);
}

.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--accent-color);
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
    background: var(--accent-color);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Creative Coding Background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 58, 138, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(96, 165, 250, 0.05) 0%, transparent 50%);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2360a5fa' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

/* Floating Code Elements */
.floating-code {
    position: absolute;
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
    animation: float 20s infinite linear;
}

.floating-code:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.floating-code:nth-child(2) {
    top: 25%;
    right: 15%;
    animation-delay: 5s;
    animation-duration: 30s;
}

.floating-code:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 10s;
    animation-duration: 35s;
}

.floating-code:nth-child(4) {
    bottom: 20%;
    right: 25%;
    animation-delay: 15s;
    animation-duration: 40s;
}

.floating-code:nth-child(5) {
    top: 50%;
    left: 5%;
    animation-delay: 20s;
    animation-duration: 45s;
}

.floating-code:nth-child(6) {
    top: 60%;
    right: 10%;
    animation-delay: 25s;
    animation-duration: 50s;
}

.floating-code:nth-child(7) {
    top: 35%;
    left: 15%;
    animation-delay: 30s;
    animation-duration: 55s;
}

.floating-code:nth-child(8) {
    top: 45%;
    right: 35%;
    animation-delay: 35s;
    animation-duration: 60s;
}

.floating-code:nth-child(9) {
    bottom: 40%;
    left: 35%;
    animation-delay: 40s;
    animation-duration: 65s;
}

.floating-code:nth-child(10) {
    bottom: 15%;
    left: 45%;
    animation-delay: 45s;
    animation-duration: 70s;
}

.floating-code:nth-child(11) {
    top: 70%;
    right: 45%;
    animation-delay: 50s;
    animation-duration: 75s;
}

.floating-code:nth-child(12) {
    top: 80%;
    left: 25%;
    animation-delay: 55s;
    animation-duration: 80s;
}

.floating-code:nth-child(13) {
    top: 10%;
    right: 30%;
    animation-delay: 60s;
    animation-duration: 85s;
}

.floating-code:nth-child(14) {
    top: 90%;
    right: 5%;
    animation-delay: 65s;
    animation-duration: 90s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.1;
    }
    75% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.1;
    }
}

/* Matrix Rain Effect */
.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Contact Section Matrix Rain */
#contactMatrixRain {
    opacity: 0.8;
}

.matrix-column {
    position: absolute;
    top: -100%;
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.1;
    animation: matrixFall linear infinite;
    text-shadow: 0 0 5px var(--accent-color);
}

@keyframes matrixFall {
    0% {
        top: -100%;
        opacity: 0.1;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        top: 100vh;
        opacity: 0.1;
    }
}

/* Enhanced Floating Code Elements */
.floating-code {
    position: absolute;
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
    animation: float 20s infinite linear;
    text-shadow: 0 0 8px var(--accent-color);
    filter: blur(0.5px);
}

.floating-code:hover {
    opacity: 0.4;
    filter: blur(0px);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Glowing Grid Pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 58, 138, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(96, 165, 250, 0.05) 0%, transparent 50%),
        linear-gradient(90deg, transparent 98%, rgba(96, 165, 250, 0.03) 100%),
        linear-gradient(0deg, transparent 98%, rgba(96, 165, 250, 0.03) 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 50px 50px, 50px 50px;
    z-index: 1;
}

/* Interactive Particles */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2360a5fa' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
    animation: particleFloat 30s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Pulse Effect for Hero */
.hero {
    animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
    0%, 100% {
        box-shadow: inset 0 0 0 rgba(96, 165, 250, 0);
    }
    50% {
        box-shadow: inset 0 0 100px rgba(96, 165, 250, 0.05);
    }
}

/* Enhanced Code Animation */
.code-animation {
    position: relative;
    z-index: 3;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(96, 165, 250, 0.3);
    box-shadow: 
        0 0 20px rgba(96, 165, 250, 0.2),
        inset 0 0 20px rgba(96, 165, 250, 0.1);
}

.code-line {
    text-shadow: 0 0 5px rgba(96, 165, 250, 0.5);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.btn-loading {
    display: none;
}

.btn-loading i {
    margin-right: 0.5rem;
}

/* Form loading and success states */
.contact-form.form-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.contact-form.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 12px;
    z-index: 1;
}

.contact-form.form-success {
    animation: formSuccessPulse 0.6s ease-in-out;
    border: 2px solid #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

@keyframes formSuccessPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
}

/* Enhanced form field animations */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-group input:valid,
.form-group textarea:valid {
    border-color: #10b981;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

/* Enhanced field validation states */
.form-group input.field-valid,
.form-group textarea.field-valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group input.field-invalid,
.form-group textarea.field-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.field-valid:focus,
.form-group textarea.field-valid:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-group input.field-invalid:focus,
.form-group textarea.field-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Loading spinner animation */
.btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Form validation states */
.form-group {
    position: relative;
}

.form-group input:invalid:not(:placeholder-shown) + .field-error,
.form-group textarea:invalid:not(:placeholder-shown) + .field-error {
    display: block;
}

.field-error {
    display: none;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Code Animation */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-animation {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 
        var(--shadow),
        0 0 20px rgba(96, 165, 250, 0.1),
        inset 0 0 20px rgba(96, 165, 250, 0.05);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.8;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.code-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.05), transparent);
    transform: translateX(-100%);
    animation: scanLine 3s ease-in-out infinite;
}

@keyframes scanLine {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.code-line {
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.2rem 0;
    border-left: 2px solid transparent;
}

.code-line:hover {
    border-left-color: var(--accent-color);
    background: rgba(96, 165, 250, 0.05);
    padding-left: 0.5rem;
}

/* Animation delays are now handled by JavaScript typing effect */

/* fadeInUp animation removed - replaced with typing effect */

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* About Section Background Effects */
.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(30, 58, 138, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.04) 0%, transparent 50%);
    z-index: 1;
}

.about::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2360a5fa' fill-opacity='0.02'%3E%3Ccircle cx='40' cy='40' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
    animation: particleFloat 40s infinite linear;
}

/* About Section Floating Code */
.about-code {
    color: var(--accent-color);
    opacity: 0.08;
    animation: floatAbout 25s infinite linear;
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    z-index: 1;
    pointer-events: none;
    text-shadow: 0 0 6px var(--accent-color);
    filter: blur(0.3px);
}

.about-code:nth-child(1) {
    top: 12%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 30s;
}

.about-code:nth-child(2) {
    top: 25%;
    right: 15%;
    animation-delay: 5s;
    animation-duration: 35s;
}

.about-code:nth-child(3) {
    bottom: 30%;
    left: 12%;
    animation-delay: 10s;
    animation-duration: 40s;
}

.about-code:nth-child(4) {
    bottom: 20%;
    right: 18%;
    animation-delay: 15s;
    animation-duration: 45s;
}

.about-code:nth-child(5) {
    top: 65%;
    left: 8%;
    animation-delay: 20s;
    animation-duration: 50s;
}

.about-code:nth-child(6) {
    top: 75%;
    right: 10%;
    animation-delay: 25s;
    animation-duration: 55s;
}

@keyframes floatAbout {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.08;
    }
    25% {
        opacity: 0.15;
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
        opacity: 0.08;
    }
    75% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.08;
    }
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.skills {
    margin-top: 3rem;
}

.skills h3 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.skill-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Center the last two projects when there are exactly 5 projects */
.projects-grid:has(.project-card:nth-child(5)) {
    justify-items: center;
}

.projects-grid:has(.project-card:nth-child(5)) .project-card:nth-child(4),
.projects-grid:has(.project-card:nth-child(5)) .project-card:nth-child(5) {
    max-width: 400px;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.project-image {
    height: 200px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.project-placeholder {
    font-size: 3rem;
    color: var(--accent-color);
}

.project-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.status-tag {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-tag.in-progress {
    background: #f59e0b;
    color: #1f2937;
    border: 1px solid #d97706;
}

.status-tag.released {
    background: #10b981;
    color: #ffffff;
    border: 1px solid #059669;
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
}

.project-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 20%, 
        var(--accent-color) 50%, 
        var(--border-color) 80%, 
        transparent 100%);
    margin: 1.5rem 0;
    border-radius: 1px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.project-card:hover .project-divider {
    opacity: 1;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 20%, 
        var(--accent-color) 50%, 
        var(--primary-color) 80%, 
        transparent 100%);
    transform: scaleX(1.05);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    margin-top: auto;
}

.tech-tag {
    background: var(--primary-color);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    color: var(--primary-light);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* Contact Section Background Effects */
.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 75%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(30, 58, 138, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 45% 45%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
    z-index: 1;
}

.contact::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='70' height='70' viewBox='0 0 70 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2360a5fa' fill-opacity='0.04'%3E%3Ccircle cx='35' cy='35' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
    animation: particleFloat 35s infinite linear;
}

/* Contact Section Floating Code */
.contact-code {
    color: var(--accent-color);
    opacity: 0.15;
    animation: floatContact 30s infinite linear;
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    z-index: 1;
    pointer-events: none;
    text-shadow: 0 0 8px var(--accent-color);
    filter: blur(0.2px);
}

.contact .floating-code:nth-child(1) {
    top: 12%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 35s;
}

.contact .floating-code:nth-child(2) {
    top: 22%;
    right: 15%;
    animation-delay: 6s;
    animation-duration: 40s;
}

.contact .floating-code:nth-child(3) {
    bottom: 28%;
    left: 18%;
    animation-delay: 12s;
    animation-duration: 45s;
}

.contact .floating-code:nth-child(4) {
    bottom: 18%;
    right: 22%;
    animation-delay: 18s;
    animation-duration: 50s;
}

.contact .floating-code:nth-child(5) {
    top: 65%;
    left: 8%;
    animation-delay: 24s;
    animation-duration: 55s;
}

.contact .floating-code:nth-child(6) {
    top: 75%;
    right: 10%;
    animation-delay: 30s;
    animation-duration: 60s;
}

.contact .floating-code:nth-child(7) {
    top: 42%;
    left: 28%;
    animation-delay: 36s;
    animation-duration: 65s;
}

.contact .floating-code:nth-child(8) {
    top: 52%;
    right: 32%;
    animation-delay: 42s;
    animation-duration: 70s;
}

@keyframes floatContact {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.08;
    }
    25% {
        opacity: 0.15;
    }
    50% {
        transform: translateY(-18px) rotate(180deg);
        opacity: 0.08;
    }
    75% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.08;
    }
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.contact-info h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    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-method i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 40px;
}

.contact-method h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-method p {
    color: var(--text-secondary);
    margin: 0;
}

.contact-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    transform: translateX(5px);
}

.contact-link:hover i {
    color: var(--primary-color);
}

.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: -100%; /* Start hidden below viewport */
    left: 0;
    width: 100%;
    z-index: 999;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    /* Add gradient mask for fade effect */
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.4) 25%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.8) 75%,
        rgba(0, 0, 0, 1) 100%
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.4) 25%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.8) 75%,
        rgba(0, 0, 0, 1) 100%
    );
}

.footer.footer-visible {
    bottom: 0; /* Slide up to bottom of viewport */
    animation: footerSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer.footer-pinned {
    bottom: 0; /* Keep pinned at bottom */
}

@keyframes footerSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--accent-color);
}

/* Add bottom padding to body when footer is visible to prevent content overlap */
body.footer-visible {
    padding-bottom: 120px; /* Adjust based on footer height */
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-secondary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Mobile footer adjustments */
    .footer {
        padding: 1.5rem 0;
    }
    
    body.footer-visible {
        padding-bottom: 100px; /* Smaller padding for mobile */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Smooth scrolling and animations */
@media (prefers-reduced-motion: no-preference) {
    .project-card,
    .skill-tag,
    .btn,
    .social-link {
        transition: all 0.3s ease;
    }
}

/* Focus styles for accessibility */
.nav-link:focus,
.btn:focus,
.social-link:focus,
.project-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.about-content,
.projects-grid,
.contact-content {
    animation: fadeIn 0.8s ease-out;
}
