/* Custom Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #e67e22;
    --dark-color: #1a1b1f;
    /* Deeper dark for background */
    --light-color: #a0e4ff;
    /* Terminal cyan */
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --danger-color: #e74c3c;
    --card-bg: #2c3e50;
    --glow-color: rgba(52, 152, 219, 0.5);
}

/* Typography */
body,
html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    /* Prevent layout shift */
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Fira Code', monospace;
    /* Changed to Fira Code for terminal vibe */
}

/* Animations */
.hover-grow {
    transition: transform 0.3s ease;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1b1f;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading Animation */
.loading-animation {
    width: 100px;
    height: 100px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Custom Card Styles */
.project-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    /* Ensure full height */
}

.project-card .bg-\[\#2c3e50\] {
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.project-card:hover .bg-\[\#2c3e50\] {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--glow-color);
    border-color: var(--primary-color);
}

.project-card img {
    transition: transform 0.5s ease;
}

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

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Fira Code', monospace;
}

.badge-primary {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.badge-secondary {
    background-color: rgba(230, 126, 34, 0.1);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

/* Education & Experience Timeline */
.timeline-item::before {
    content: '';
    /* Glow effect for timeline line handled in container */
}

/* Skill Tags */
.skill-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    border-radius: 4px;
    /* More terminal-like */
    font-size: 0.875rem;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    font-family: 'Fira Code', monospace;
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: #1a1b1f;
    /* Dark text on hover */
    box-shadow: 0 0 10px var(--primary-color);
}

/* Project Filter Buttons */
.project-filter {
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: transparent;
    color: var(--light-color);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
}

.project-filter.active,
.project-filter:hover {
    background-color: var(--primary-color);
    color: #1a1b1f;
    box-shadow: 0 0 15px var(--glow-color);
}

/* Social Media Icons */
.social-icon {
    font-size: 1.5rem;
    color: var(--light-color);
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    text-shadow: 0 0 10px var(--primary-color);
}

/* Dark Mode Styles (Default) */
.dark-mode {
    background-color: var(--dark-color);
    color: var(--light-color);
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing Animation */
.typing-skill {
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        cursor: pointer;
        color: var(--text-primary);
        font-size: 1.5rem;
        padding: 0.5rem;
        z-index: 50;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        /* Use var for theme consistency */
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
        /* Darker shadow */
        z-index: 40;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        width: 100%;
        text-align: center;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        background: rgba(52, 152, 219, 0.1);
        border-radius: 4px;
    }

    .nav-links .social-links {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-color);
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 2rem;
    }

    .social-links a {
        width: auto;
        padding: 0.5rem;
    }

    .theme-toggle {
        margin-top: 1rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
}

/* Terminal Animation Styles */
.typing-section {
    position: relative;
    overflow: hidden;
    font-family: 'Fira Code', monospace;
}

#typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary-color);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.terminal-link {
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-family: 'Fira Code', monospace;
}

.terminal-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-color);
}

.terminal-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    box-shadow: 0 0 8px var(--primary-color);
}

.terminal-link:hover::after {
    transform: scaleX(1);
}

.terminal-nav {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.terminal-nav.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.terminal-ascii-art {
    color: var(--primary-color);
    font-family: monospace;
    white-space: pre;
    margin: 1rem 0;
    line-height: 1.2;
    text-shadow: 0 0 5px var(--glow-color);
}

.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    margin: 0;
    animation: typing 3.5s steps(40, end);
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

/* Navigation Bar */
nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(52, 152, 219, 0.2) !important;
}

/* Theme toggle button styles */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(180deg);
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

/* Theme styles */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1b1f;
    --text-secondary: #4a5568;
    --accent-color: #3182ce;
    --border-color: #e2e8f0;
}

[data-theme="dark"] {
    --bg-primary: #1a1b1f;
    /* Darker background */
    --bg-secondary: #24252b;
    /* Slightly lighter for cards */
    --text-primary: #a0e4ff;
    /* Terminal cyan */
    --text-secondary: #b8c1ca;
    --accent-color: #3498db;
    --border-color: rgba(52, 152, 219, 0.2);
}

/* Common styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    background-image: radial-gradient(circle at 50% 50%, rgba(52, 152, 219, 0.05) 0%, transparent 50%);
}

nav {
    background-color: rgba(26, 27, 31, 0.95);
    /* Semi-transparent background */
    border-color: var(--border-color);
}

.nav-container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* AOS Animation Overrides for subtler effect */
[data-aos] {
    transition-duration: 600ms !important;
    transition-timing-function: ease-out !important;
}

[data-aos="fade-up"] {
    transform: translate3d(0, 20px, 0) !important;
}

[data-aos="fade-down"] {
    transform: translate3d(0, -20px, 0) !important;
}

[data-aos="fade-right"] {
    transform: translate3d(-20px, 0, 0) !important;
}

[data-aos="fade-left"] {
    transform: translate3d(20px, 0, 0) !important;
}