/* Modern Portfolio Stylesheet for Arman */
:root {
    /* Dark theme color palette */
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-alt: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark: #0f0f1a;
    --darker: #0a0a12;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.12);
    --white: #ffffff;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --text-muted: #64748b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --sidebar-width: 280px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    background-attachment: scroll;
    min-height: 100vh;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* SVGs used as icons should maintain their size */
.sidebar svg,
.btn svg,
.social-link svg,
.project-link svg,
.skill-icon,
.skill-logo svg,
.email-icon {
    max-width: none;
    height: auto;
}

/* Vertical Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(15, 15, 26, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.sidebar .brand {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1.5rem;
    transition: transform 0.3s ease;
}

.sidebar .brand:hover {
    transform: scale(1.05);
}

/* Vertical Navigation */
nav.primary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1.5rem;
    flex: 1;
    overflow-y: auto; /* Allow vertical scrolling */
    max-height: 80vh; /* Limit height to prevent overflow */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

nav.primary a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    position: relative;
    transition: all 0.3s ease;
    text-align: left;
    display: block;
    margin-bottom: 0.5rem;
}

nav.primary a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius);
}

nav.primary a:hover::before {
    opacity: 1;
}

nav.primary a:hover {
    color: var(--white);
    transform: translateX(8px);
}

nav.primary a.active {
    background: var(--gradient);
    color: var(--white);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

nav.primary a.active::before {
    opacity: 0;
}

/* Ensure all navigation links are visible in the sidebar */
.sidebar nav.primary a {
    display: block; /* Ensure all links are displayed */
    visibility: visible; /* Ensure links are not hidden */
    opacity: 1; /* Ensure links are fully visible */
}

/* Social Icons in Sidebar */
.sidebar .social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0 1.5rem;
    margin-top: 2rem;
}

.sidebar .social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary);
    transition: all 0.3s ease;
}

.sidebar .social-icons svg {
    width: 18px;
    height: 18px;
}

.sidebar .social-icons a:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow);
}

/* Hide old header */
header {
    display: none;
}

/* Main content with sidebar spacing */
main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
}

/* Mobile responsiveness for sidebar */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 240px;
    }

    body {
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    .sidebar {
        transform: translateX(-100%); /* Ensure sidebar is hidden by default */
        padding-top: 5rem; /* Add top padding to accommodate menu button */
    }

    .sidebar.open {
        transform: translateX(0); /* Show sidebar when open */
    }

    main {
        margin-left: 0; /* Remove left margin for main content */
        padding: 1rem; /* Adjust padding for smaller screens */
        margin-top: 0; /* Remove top margin on mobile */
    }

    .container {
        padding: 0 1rem; /* Adjust container padding */
    }

    nav.primary {
        flex-wrap: nowrap;
        overflow-x: auto; /* Allow horizontal scrolling for navigation */
        scrollbar-width: none; /* Hide scrollbar in Firefox */
        -ms-overflow-style: none; /* Hide scrollbar in IE */
    }

    nav.primary::-webkit-scrollbar {
        display: none; /* Hide scrollbar in WebKit browsers */
    }

    footer {
        margin-left: 0; /* Ensure footer aligns properly */
        padding: 1.5rem 0; /* Adjust padding for smaller screens */
    }

    /* Mobile menu toggle */
    .mobile-menu-toggle {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: var(--gradient);
        color: white;
        border: none;
        padding: 0.75rem;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        transition: all 0.3s ease;
    }

    /* Ensure menu button stays above sidebar when open */
    .sidebar.open ~ .mobile-menu-toggle,
    .mobile-menu-toggle {
        z-index: 1002; /* Always above sidebar (z-index 1000) */
    }

    .mobile-menu-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }

    /* Overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hero section mobile responsiveness */
    .hero {
        padding: 3rem 1rem;
        margin: 1rem auto;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hero .description {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    /* Typography mobile adjustments */
    h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    h2::after {
        width: 40px;
        height: 3px;
    }

    /* Buttons mobile responsiveness */
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    /* Cards mobile adjustments */
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Project cards mobile */
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .project-header h3 {
        font-size: 1.25rem;
    }

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

    .project-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .project-description {
        font-size: 0.95rem;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .project-features h4,
    .project-tech h4 {
        font-size: 1rem;
    }

    .project-features li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }

    /* Skills mobile responsiveness */
    .skills-container {
        gap: 1.5rem;
    }

    .skills-category {
        padding: 1.5rem;
    }

    .skills-category-title {
        font-size: 1.25rem;
    }

    .skills-list {
        gap: 0.75rem;
    }

    .skills-list li {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .skill-icon {
        width: 20px;
        height: 20px;
    }

    /* Stats section mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Contact page mobile */
    .contact-simple .card {
        padding: 1.5rem;
    }

    .contact-card {
        max-width: 100% !important;
    }

    .contact-email {
        margin: 1.5rem 0;
    }

    .email-text {
        font-size: 0.95rem;
        word-break: break-word;
        text-align: center;
    }

    .social-link {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }

    .social-links-wrapper {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .contact-social {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}

/* Small mobile devices (up to 480px) */
@media (max-width: 480px) {
    main {
        padding: 0.75rem;
    }

    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 2rem 0.75rem;
        margin: 0.75rem auto;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero .subtitle {
        font-size: 0.9rem;
    }

    .hero .description {
        font-size: 0.9rem;
        padding: 0;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .card {
        padding: 1.25rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }

    .project-header h3 {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .skills-category {
        padding: 1.25rem;
    }

    .skills-list li {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .mobile-menu-toggle {
        width: 45px;
        height: 45px;
        top: 0.75rem;
        left: 0.75rem;
    }

    .sidebar {
        padding-top: 4.5rem; /* Slightly less padding on very small screens */
    }

    .sidebar .brand {
        font-size: 1.1rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
        margin-top: 0; /* Remove any top margin */
    }

    nav.primary a {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }

    /* Section spacing mobile */
    .section {
        padding: 2rem 0;
    }

    .email-text {
        font-size: 0.95rem;
        word-break: break-word;
        overflow-wrap: break-word;
        text-align: center;
    }

    .social-link {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }

    .social-links-wrapper {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .contact-social {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }

    .sidebar-overlay {
        display: none;
    }
}

/* Main content spacing for fixed header */
main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

@media (max-width: 768px) {
    main {
        margin-top: 0;
        min-height: auto;
    }
}

/* Hero section with dark theme */
.hero {
    padding: 5rem 0;
    text-align: center;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius);
    margin: 2rem auto;
    max-width: 1200px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero .description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* Updated buttons - lighter colors with better hover effects */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    background: #0077B5;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.4);
    transform: translateY(0);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #005885;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 119, 181, 0.6);
    background: #005885;
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(-4px) scale(1.02);
    transition: all 0.1s ease;
}

/* Section styles */
.section {
    padding: 4rem 0;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Cards with dark theme */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

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

/* Stats section with dark theme */
.stats-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    margin: -2rem auto 0;
    position: relative;
    z-index: 10;
    max-width: 1000px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--card-border);
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius);
    background: white;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact page specific styles */
.contact-simple {
    padding: 2rem 0;
}

.contact-card {
    max-width: 500px;
    margin: 0 auto;
}

.contact-email {
    margin: 2rem 0;
}

.email-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.email-icon {
    flex-shrink: 0;
}

.contact-btn {
    display: inline-block;
    text-decoration: none;
}

.contact-social {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links-wrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    color: var(--text);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.social-link:hover::before {
    left: 0;
}

.social-link:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

/* Small utility classes */
.accent-text { color: var(--accent); }

/* Skill bars and interactive elements */
.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* --- Skill cards: new visual style (card/pill tiles) --- */
/* Placed after previous skill rules so these override where needed */
.skill-category .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .skill-category .skills-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.skill-category .skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    height: 72px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.04);
    transition: transform 0.28s cubic-bezier(.2,.9,.3,1), box-shadow 0.28s ease, background 0.28s ease;
    box-shadow: 0 8px 24px rgba(2,6,23,0.45);
    overflow: hidden;
}

.skill-category .skill-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.18); /* darker for better contrast */
    flex-shrink: 0;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.skill-category .skill-logo svg { width: 36px; height: 36px; }

.skill-category .skill-logo img.skill-img {
    width: 70%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Make sure images scale nicely on small screens */
@media (max-width: 900px) {
    .skill-category .skill-logo img.skill-img { width: 72%; }
}
@media (max-width: 480px) {
    .skill-category .skill-logo img.skill-img { width: 76%; }
}

.skill-category .skill-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: inherit;
}

/* hide the original progress bar since the new cards show only name+logo */
.skill-category .skill-bar { display: none !important; }

/* Hover interaction */
.skill-category .skill-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 60px rgba(3,10,30,0.65);
}
.skill-category .skill-item:hover .skill-logo {
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Focus/active accessibility */
.skill-category .skill-item:focus-within,
.skill-category .skill-item:active {
    transform: translateY(-6px);
    outline: none;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s ease-in-out infinite;
}

/* Skills page specific styles */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skills-category {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.skills-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.skills-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.skills-category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skills-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text);
}

.skills-list li:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.skill-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.muted {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}


/* End of stylesheet */

/* Project page specific styles */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-header h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
}

.project-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    background: var(--gradient-alt);
}

.project-status {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.project-features {
    margin-bottom: 1.5rem;
}

.project-features h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.project-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
}

.project-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.project-tech h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .tech-stack {
        gap: 0.4rem;
    }
}

.tech-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid;
}

/* Technology-specific colors - now using unified color scheme */
.tech-tag.java,
.tech-tag.javafx,
.tech-tag.mysql,
.tech-tag.oop,
.tech-tag.cpp,
.tech-tag.algorithms,
.tech-tag.data-structures,
.tech-tag.statistics,
.tech-tag.cli,
.tech-tag.arduino,
.tech-tag.iot,
.tech-tag.c,
.tech-tag.mobile,
.tech-tag.automation,
.tech-tag.python,
.tech-tag.nlp,
.tech-tag.tts,
.tech-tag.github-ai { /* Added for NEXUS project: GitHub AI Models API */
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.tech-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* Lightweight visuals for the About page to improve perceived load speed */
.about-page header {
    /* slightly reduce blur and opacity so the header paints faster */
    backdrop-filter: blur(6px);
    background: rgba(15, 15, 26, 0.92);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.about-page .hero {
    /* reduce heavy effects and vertical padding for faster initial paint */
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 3rem 0;
    margin: 1.5rem auto;
}

/* Responsive fix: allow horizontal scrolling of header nav on narrow screens so all links remain reachable on mobile */
@media (max-width: 900px) {
    nav.primary {
        /* Keep links on one line and allow horizontal scroll if they overflow viewport */
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
        scrollbar-width: none; /* hide Firefox scrollbar */
        -ms-overflow-style: none; /* hide IE/Edge scrollbar */
    }

    /* Make each link not shrink so they remain clickable/padded */
    nav.primary a {
        flex: 0 0 auto;
        white-space: nowrap; /* avoid internal wrapping of link text */
    }

    /* Hide native webkit scrollbar for a cleaner appearance */
    nav.primary::-webkit-scrollbar { display: none; }
}

/* Footer positioning - ensure it's centered and not covered by sidebar */
footer {
    margin-left: var(--sidebar-width);
    padding: 2rem 0;
    background: rgba(15, 15, 26, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

footer .container {
    max-width: none;
    padding: 0 2rem;
}

footer p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile footer positioning */
@media (max-width: 768px) {
    footer {
        margin-left: 0;
        padding: 1.5rem 0;
    }

    footer .container {
        padding: 0 1rem;
    }
}
