:root {
    --bg-color: #1e1e1e;
    --text-color: #f0f0f0;
    --accent-color: #00ff00;
    --secondary-color: #666;
    --bg-rgb: 26, 26, 26;
    --text-rgb: 224, 224, 224;
    --accent-rgb: 0, 255, 0;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

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

/* Navigation */
.terminal-nav {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--accent-color);
    padding: 1rem 0;
}

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

.terminal-prompt {
    color: var(--accent-color);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1.5rem;
}

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

/* Sections */
section {
    padding: 4rem 0;
}

.terminal-header {
    color: var(--accent-color);
    margin-bottom: 2rem;
}

/* Footer */
.terminal-footer {
    border-top: 1px solid var(--accent-color);
    padding: 1rem 0;
    text-align: center;
}

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

.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent-color);
    padding: 1rem;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.tech-tag {
    display: inline-block;
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 0.2rem 0.5rem;
    margin: 0.2rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.project-links {
    margin-top: 1rem;
}

.project-link {
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 1rem;
}

.project-link:hover {
    text-decoration: underline;
}

/* Project Detail */
.project-detail {
    max-width: 800px;
    margin: 2rem auto;
}

.project-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin: 2rem 0;
}


/* About Section */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

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

.profile-image img {
    width: 100%;
    border-radius: 5px;
    border: 2px solid var(--accent-color);
}

.about-info h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.about-info h4 {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.bio {
    margin-bottom: 2rem;
}

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

.social-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.terminal-container {
    width: 100%;
    max-width: 800px;
    background-color: #1e1e1e;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.terminal-header-bar {
    background-color: #2d2d2d;
    padding: 0.5rem;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.maximize { background-color: #27c93f; }

.terminal-title {
    color: #999;
    font-size: 0.9rem;
}

.terminal-content {
    padding: 1.5rem;
}

.command-line {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.prompt {
    color: var(--accent-color);
}

.command {
    color: var(--text-color);
}

.response {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

/* Typing animation */
.typing {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end);
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color) }
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Skills Section */
.skills {
    padding: 4rem 0;
}

.skills-terminal {
    margin: 2rem auto;
}

.skill-category {
    margin-bottom: 2rem;
}

.skill-header {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.skill-name {
    min-width: 150px;
}

.skill-bar {
    color: var(--accent-color);
    font-family: monospace;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .skill-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Contact Section */
.contact {
    padding: 4rem 0;
}

.contact-terminal {
    margin: 2rem auto;
}

.contact-form {
    padding: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

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

.submit-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

#formResponse {
    margin-top: 1rem;
    padding: 1rem;
    border-left: 2px solid var(--accent-color);
}

#formResponse.success {
    color: #27c93f;
}

#formResponse.error {
    color: #ff5f56;
}


/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(30, 30, 30, 0.95);
    padding: 1rem 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--accent-color);
}

.main-nav.visible {
    transform: translateY(0);
}

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

.nav-brand {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px);  /* Increased from 20px */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);

    
}

/* Stagger child elements animation */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.4s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.6s; }

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(30, 30, 30, 0.95);
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        border-bottom: 1px solid var(--accent-color);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        color: var(--text-color);
        font-size: 1.5rem;
        cursor: pointer;
    }
}

html {
    scroll-behavior: smooth;
}



/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-terminal {
    width: 90%;
    max-width: 600px;
}

.loading-text {
    color: var(--accent-color);
    margin-bottom: 1rem;
    padding: 1rem;
}

.progress-bar {
    margin-top: 1rem;
    height: 4px;
    background: rgba(var(--accent-rgb), 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0;
    background-color: var(--accent-color);
    animation: progress 2s ease-in-out forwards;
}

@keyframes progress {
    from { width: 0; }
    to { width: 100%; }
}

/* Enhanced Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(var(--accent-rgb), 0.1);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    overflow: hidden;
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    background: var(--terminal-bg);
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
}

.project-title {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

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

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

.tech-tag {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    border: 1px solid var(--accent-color);
}

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

.project-link {
    color: var(--accent-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.project-link:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.project-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1000;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--accent-color);
    position: relative;
    transition: background-color 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--accent-color);
    transition: transform 0.3s;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

.menu-toggle.active .hamburger {
    background-color: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active .hamburger::after {
    transform: translateY(-6px) rotate(-45deg);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: rgba(30, 30, 30, 0.95);
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--accent-color);
    }

    .nav-links.active {
        display: flex;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .terminal-container {
        width: 95%;
    }

    .skill-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-form {
        padding: 1rem 0;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1rem;
    }

    .terminal-content {
        padding: 1rem;
    }

    .project-card {
        margin: 0 1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on mobile */
    }
}


/* Theme Variables */
:root {
    /* Dark theme (default) */
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0 ;
    --accent-color: #00ff00;
    --terminal-bg: #1e1e1e;
    --card-bg: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(30, 30, 30, 0.95);
}

[data-theme="light"] {
    --bg-color: #f5f5f5;
    --text-color: #2a2a2a;
    --accent-color: #007acc;
    --terminal-bg: #ffffff;
    --card-bg: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.95);
}

/* Theme Toggle Styles */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 24px;
    position: relative;
    border-radius: 12px;
    background-color: var(--card-bg);
    padding: 2px;
    display: flex;
    align-items: center;
}

.theme-toggle-inner {
    display: flex;
    align-items: center;     /* Added */
    justify-content: center; /* Added */
    width: 20px;
    height: 20px;
    border-radius: 50%;
    
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

[data-theme="light"] .theme-toggle-inner {
    transform: translate(24px, -50%);
}

.theme-toggle-icon {
    position: relative;      /* Added */
    width: 12px;            /* Changed from 100% */
    height: 12px;           /* Changed from 100% */
    display: flex;          /* Added */
    align-items: center;    /* Added */
    justify-content: center; /* Added */
}

.theme-toggle-icon::before {
    content: '🌙';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;        /* Reduced from 12px */
    line-height: 1;         /* Added */
}

[data-theme="light"] .theme-toggle-icon::before {
    content: '☀️';
}

/* Update existing styles to use variables */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.terminal-container {
    background-color: var(--terminal-bg);
    transition: background-color 0.3s ease;
}

/* Add transition to all elements using theme colors */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Update these existing styles */
.main-nav {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--accent-color);
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--accent-color);
}

.terminal-content {
    background-color: var(--terminal-bg);
}

.form-group input,
.form-group textarea {
    background-color: var(--card-bg);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
}

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

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

/* Update section padding */
section {
    padding: 4rem 0;
}

/* Update terminal containers */
.terminal-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Update projects grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Update about section */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Update skills terminal */
.skills-terminal {
    max-width: 800px;
    margin: 2rem auto;
}

/* Update contact form */
.contact-terminal {
    max-width: 600px;
    margin: 2rem auto;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .main-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0 0.75rem;
    }

    section {
        padding: 2rem 0;
    }
}

/* Update hero section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

/* Update footer */
.terminal-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--accent-color);
}

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

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Interactive Elements */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Project Card Hover Effects */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-image {
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

/* Button Hover Effects */
.project-link,
.social-link,
.submit-btn {
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
}

.project-link::before,
.social-link::before,
.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transition: transform 0.3s ease;
    z-index: -1;
}

.project-link:hover::before,
.social-link:hover::before,
.submit-btn:hover::before {
    transform: translateX(100%);
}

/* Terminal Effects */
.terminal-content {
    position: relative;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--accent-color);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.command-line {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.response {
    opacity: 0;
    animation: fadeIn 0.5s ease 0.3s forwards;
}

/* Skill Bar Animation */
.skill-bar {
    position: relative;
    overflow: hidden;
}

.skill-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shine 2s infinite;
}

@keyframes shine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* Form Input Focus Effects */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-color);
    transform: translateY(-2px);
}

/* Loading Screen Refinements */
.loading-screen {
    animation: fadeIn 0.3s ease;
}

.loading-screen.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent-color);
    color: var(--bg-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top .arrow {
    font-size: 1.5rem;
    line-height: 1;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-nav,
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav a,
.footer-social a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover,
.footer-social a:hover {
    color: var(--accent-color);
}

.footer-section p {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-nav,
    .footer-social {
        align-items: center;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }
}

/* Error Page Styles */
.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-message {
    text-align: center;
    margin: 2rem 0;
}

.ascii-art {
    font-family: monospace;
    white-space: pre;
    margin: 2rem 0;
    color: var(--accent-color);
}

.error-links {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.error-links li {
    margin: 0.5rem 0;
}

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

.error-links a:hover {
    color: var(--text-color);
}

/* Loading State for Contact Form */
.submit-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy.loaded {
    opacity: 1;
}

.project-image-container {
    background-color: var(--card-bg);
    position: relative;
}

.project-image-container::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

/* Add these new styles */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 8px;
    z-index: 100;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Update existing styles */
.main-container {
    margin-top: 70px; /* Add space for fixed header */
}

[role="menuitem"] {
    outline: none;
}

[role="menuitem"]:focus {
    box-shadow: 0 0 0 2px var(--accent-color);
}

/* Improve focus styles */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* But remove outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}


/* Hero section styles */
.hero .terminal-container {
    max-width: 800px; /* Increased from default */
    margin: 0 auto;
    width: 100%;
}

/* Make it responsive */
@media (max-width: 850px) {
    .hero .terminal-container {
        max-width: 100%;
        margin: 0 1rem;
    }
}

/* Add these new styles */
.additional-skills {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.additional-skills.visible {
    opacity: 1;
    max-height: 2000px; /* Adjust based on content */
}

.additional-skills.hidden {
    display: none;
}

.expand-skills {
    text-align: left;
    margin: 2rem 0;
    cursor: pointer;
}

.expand-skills button {
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    cursor: pointer;
    padding: 1rem;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    border-radius: 4px;
}

.expand-skills button:hover {
    background: rgba(var(--accent-rgb), 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.expand-skills button:active {
    transform: translateY(0);
}

.expand-skills button::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.expand-skills button.expanded::before {
    transform: rotate(90deg);
}

.expand-skills .prompt {
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Add a subtle pulse animation to draw attention */
@keyframes subtle-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.expand-skills button:not(:hover) {
    animation: subtle-pulse 2s infinite;
}

.hidden {
    display: none;
}

/* Add these new styles */
.certs-category {
    border: 1px solid var(--accent-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    background: rgba(var(--accent-rgb), 0.05);
}

.cert-item {
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
    padding: 0.75rem 0;
}

.cert-item:last-child {
    border-bottom: none;
}

.certs-category .skill-header {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.terminal-separator {
    color: var(--secondary-color);
    margin: 1.5rem 0;
    text-align: left;
    font-family: 'Courier New', monospace;
    opacity: 0.7;
}

.form-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    text-align: center;
}

.form-message.success {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid #00ff00;
}

.form-message.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    border: 1px solid #ff0000;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.element-with-backdrop {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Add performance optimized animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Optimize layout shifts */
.skill-bar {
    contain: layout style;
    height: 20px;
    display: block;
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* Optimize images */
img {
    width: 100%;
    height: auto;
    aspect-ratio: attr(width) / attr(height);
}

/* For other elements using backdrop-filter */
.glass-effect {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    /* Fallback for Safari */
    @supports not (backdrop-filter: blur(10px)) {
        background: rgba(255, 255, 255, 0.9);
    }
}

/* Interactive Projects Section */
.projects-terminal .project-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.projects-terminal .project-entry {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    background-color: rgba(0, 255, 0, 0.05);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.projects-terminal .project-entry:hover {
    background-color: rgba(0, 255, 0, 0.1);
    border-left-color: var(--accent-color);
}

.projects-terminal .project-entry .file-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.projects-terminal .project-entry .project-name {
    font-weight: bold;
    margin-right: 10px;
}

.projects-terminal .project-entry .project-type {
    color: var(--secondary-text-color);
    font-size: 0.8em;
}

.projects-terminal .project-details {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 5px;
}

.projects-terminal .project-detail .detail-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.projects-terminal .project-detail .detail-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}