@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-surface: #111827;
    --bg-card: rgba(21, 30, 46, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --color-primary: #10b981; /* Emerald */
    --color-primary-glow: rgba(16, 185, 129, 0.15);
    --color-secondary: #f59e0b; /* Amber */
    --color-secondary-glow: rgba(245, 158, 11, 0.15);
    --text-main: #f9fafb;
    --text-muted: #a5afbc;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Background Gradients & Cyber Grid Animation */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    animation: float-glow-top 18s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 70vh;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.07) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    animation: float-glow-bottom 24s ease-in-out infinite alternate;
}

.main-content::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(16, 185, 129, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.08) 1px, transparent 1px),
        radial-gradient(rgba(16, 185, 129, 0.16) 1.5px, transparent 1.5px);
    background-size: 40px 40px, 40px 40px, 40px 40px;
    background-position: center;
    z-index: -2;
    pointer-events: none;
    animation: grid-drift 20s linear infinite;
    mask-image: radial-gradient(circle at 60% 50%, black 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at 60% 50%, black 40%, transparent 85%);
}

.main-content::after {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(16, 185, 129, 0) 0%,
        rgba(16, 185, 129, 0.03) 10%,
        rgba(16, 185, 129, 0) 20%
    );
    background-size: 100% 600px;
    z-index: -2;
    pointer-events: none;
    animation: scanline-sweep 12s linear infinite;
}

#cyberCanvas {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    width: 100vw;
    height: 100vh;
}

@keyframes float-glow-top {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(80px, 50px) scale(1.25);
        opacity: 1;
    }
    100% {
        transform: translate(-40px, 30px) scale(0.9);
        opacity: 0.6;
    }
}

@keyframes float-glow-bottom {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-70px, -40px) scale(1.2);
        opacity: 0.6;
    }
    100% {
        transform: translate(30px, -20px) scale(0.95);
        opacity: 0.8;
    }
}

@keyframes grid-drift {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 40px 40px, 40px 40px, 40px 40px;
    }
}

@keyframes scanline-sweep {
    0% {
        background-position-y: -600px;
    }
    100% {
        background-position-y: 100%;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navbar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.header.scrolled {
    padding: 12px 0;
    background: rgba(11, 15, 25, 0.9);
    box-shadow: var(--shadow-premium);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition-smooth);
}

.header.scrolled .nav-container {
    height: 60px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary) 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo::before {
    content: '</>';
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-primary-glow);
    padding: 4px 8px;
    border-radius: 6px;
    -webkit-text-fill-color: var(--color-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    margin: 6px 0;
    transition: var(--transition-smooth);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #0b0f19;
}

.btn-primary:hover {
    background: #34d399;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-primary-glow);
    color: var(--color-primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-secondary {
    background: var(--color-secondary-glow);
    color: var(--color-secondary);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Main Layout Padding */
main {
    padding-top: 100px;
}

/* Footer */
.footer {
    background: #070a10;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: auto; /* Push footer to the bottom of main-content flex container */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
}

.footer-logo-desc {
    max-width: 400px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 12px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-link:hover {
    color: var(--color-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-muted);
}

.social-icon:hover {
    color: var(--color-primary);
    background: var(--color-primary-glow);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Modal Popup */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(7, 10, 16, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-premium);
    transform: scale(0.9);
    transition: var(--transition-smooth);
    padding: 32px;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    margin-top: 16px;
}

.modal-header-desc {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.modal-title {
    font-size: 28px;
    line-height: 1.3;
}

.modal-section {
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.modal-section-title {
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
}

.modal-file-list {
    margin-left: 20px;
    margin-bottom: 16px;
}

.modal-file-item {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.code-snippet {
    background: #090c15;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    font-family: monospace;
    font-size: 13.5px;
    color: #e5e7eb;
    overflow-x: auto;
    margin: 12px 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.modal-table th, .modal-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    font-weight: 600;
}

.modal-table tr:last-child td {
    border-bottom: none;
}

.modal-table td {
    color: var(--text-muted);
}

.modal-img-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid var(--border-color);
}

.modal-img {
    width: 100%;
    height: auto;
    display: block;
}

/* CSS Grid layout standard for pages */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Animations helper */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Proof Gallery for Modal */
.proof-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.proof-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.proof-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.proof-img-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.proof-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proof-caption {
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .proof-gallery {
        grid-template-columns: 1fr;
    }
    .proof-img-container {
        height: 150px;
    }
}

/* Original Docx Content Formatting */
.docx-original-content {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.7;
    text-align: justify;
}

.docx-original-content p {
    margin-bottom: 16px;
}

.docx-original-content h1, 
.docx-original-content h2, 
.docx-original-content h3, 
.docx-original-content h4 {
    color: var(--text-main);
    margin-top: 28px;
    margin-bottom: 12px;
}

.docx-original-content h1 { font-size: 24px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.docx-original-content h2 { font-size: 20px; color: var(--color-primary); }
.docx-original-content h3 { font-size: 17px; }
.docx-original-content h4 { font-size: 15px; }

.docx-original-content ul, 
.docx-original-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.docx-original-content li {
    margin-bottom: 8px;
}

.docx-original-content code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13.5px;
    color: var(--color-secondary);
}

.docx-original-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.docx-original-content a:hover {
    color: #34d399;
}

/* PDF Page Container styles */
.pdf-viewer-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.pdf-page-container {
    width: 100%;
    max-width: 680px;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    line-height: 0;
}

.pdf-page {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
}

/* Print Styles for PDF Generation */
@media print {
    :root {
        --bg-main: #0b0f19 !important;
        --bg-surface: #111827 !important;
        --bg-card: rgba(21, 30, 46, 0.9) !important;
        --text-main: #f9fafb !important;
        --text-muted: #9ca3af !important;
    }
    
    html, body {
        background-color: #0b0f19 !important;
        color: #f9fafb !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    @page {
        size: A4;
        margin: 0; /* Removes browser-added header/footer */
    }
    
    body {
        padding: 2cm 1.5cm; /* Custom margins inside the printed PDF page */
    }
    
    .header {
        position: absolute !important; /* Stop fixed position overlay issues */
        top: 0;
        left: 0;
        width: 100%;
    }
    
    .nav-toggle, .btn-primary svg {
        display: none !important; /* Hide interactive icons from print */
    }
    
    main {
        padding-top: 40px !important;
    }
    
    .footer {
        page-break-before: avoid;
    }
}

/* Light Mode Theme */
html.light-theme,
body.light-theme {
    --bg-main: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #1f2937;
    --text-muted: #374151;
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
    --color-primary-glow: rgba(16, 185, 129, 0.08);
    --color-secondary-glow: rgba(245, 158, 11, 0.08);
}

body.light-theme::before {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
}

body.light-theme::after {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
}

body.light-theme .main-content::before {
    background-image: 
        linear-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.05) 1px, transparent 1px),
        radial-gradient(rgba(16, 185, 129, 0.12) 1.5px, transparent 1.5px);
}

body.light-theme .main-content::after {
    background: linear-gradient(
        to bottom,
        rgba(16, 185, 129, 0) 0%,
        rgba(16, 185, 129, 0.02) 10%,
        rgba(16, 185, 129, 0) 20%
    );
}

body.light-theme .header {
    background: rgba(243, 244, 246, 0.8) !important;
}

body.light-theme .header.scrolled {
    background: rgba(243, 244, 246, 0.95) !important;
}

body.light-theme .nav-menu {
    background: rgba(243, 244, 246, 0.98) !important;
}

body.light-theme .btn-secondary {
    background: rgba(0, 0, 0, 0.04);
}

body.light-theme .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .timeline::before {
    background: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .timeline-dot {
    background: var(--bg-main) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-theme ::-webkit-scrollbar-track {
    background: var(--bg-main);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Nav Right Wrapper & Theme Toggle button styles */
.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: var(--transition-smooth);
    position: absolute;
}

body:not(.light-theme) .theme-toggle .sun-icon {
    transform: translateY(0) rotate(0);
    opacity: 1;
}

body:not(.light-theme) .theme-toggle .moon-icon {
    transform: translateY(40px) rotate(90deg);
    opacity: 0;
}

body.light-theme .theme-toggle .sun-icon {
    transform: translateY(-40px) rotate(-90deg);
    opacity: 0;
}

body.light-theme .theme-toggle .moon-icon {
    transform: translateY(0) rotate(0);
    opacity: 1;
}

body.light-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-main);
}

body.light-theme .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .nav-right {
        gap: 16px;
    }
}

/* ==========================================
   APP DASHBOARD LAYOUT STYLES
   ========================================== */

/* Layout Containers */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

/* Sidebar Styling (Desktop) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    z-index: 1000;
    transition: var(--transition-smooth);
    overflow-y: auto;
}

.sidebar-brand {
    margin-bottom: 32px;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 32px;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary);
}

.profile-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.profile-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: var(--transition-smooth);
}

.sidebar-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
}

.sidebar-link.active {
    color: var(--text-main);
    background: var(--color-primary-glow);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.05);
}

.sidebar-link.active svg {
    color: var(--color-primary);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    z-index: 1000;
    transition: var(--transition-smooth);
}

body.light-theme .mobile-header {
    background: rgba(243, 244, 246, 0.8) !important;
}

.mobile-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
}

/* Mobile Drawer Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 10, 16, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    z-index: 1600;
    display: flex;
    flex-direction: column;
    padding: 40px 24px;
    transition: var(--transition-smooth);
}

.mobile-menu-drawer.active {
    right: 0;
}

.mobile-menu-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-profile .profile-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
}

.mobile-menu-profile .profile-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.mobile-menu-profile .profile-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.mobile-menu-link.active {
    color: var(--text-main);
    background: var(--color-primary-glow);
    border-left: 3px solid var(--color-primary);
}

/* Centered Modal for Project Details */
.drawer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.3s, opacity 0.3s;
}

.drawer.active {
    pointer-events: auto;
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 10, 16, 0.8);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.drawer.active .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-premium);
    padding: 40px;
    z-index: 2100;
    transition: var(--transition-smooth);
    transform: scale(0.9);
    opacity: 0;
}

.drawer.active .drawer-content {
    transform: scale(1);
    opacity: 1;
}

.drawer-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    z-index: 10;
}

body.light-theme .drawer-close {
    background: rgba(0, 0, 0, 0.04);
}

.drawer-close:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

body.light-theme .drawer-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.drawer-body {
    margin-top: 16px;
}

/* Hide standard top header */
.header {
    display: none !important;
}

/* Light Mode Footer Theme */
body.light-theme .footer {
    background: #e5e7eb;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .footer-desc,
body.light-theme .footer-link,
body.light-theme .footer-bottom {
    color: #4b5563;
}

body.light-theme .footer-link:hover {
    color: var(--color-primary);
}

body.light-theme .social-icon {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #4b5563;
}

body.light-theme .social-icon:hover {
    color: var(--color-primary);
    background: var(--color-primary-glow);
    border-color: var(--color-primary);
}

/* Adjustments for Print Media */
@media print {
    .sidebar, .mobile-header, .mobile-menu-drawer, .mobile-menu-overlay {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    body::before, body::after, .main-content::before {
        display: none !important;
        content: none !important;
    }
}

/* ==========================================
   Interactive Skills Linkage Section Styles
   ========================================== */
.skills-linkage-section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--color-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: var(--shadow-premium);
}

.skill-card:hover::before {
    opacity: 1;
}

/* Highlight / Fade logic for timeline cards */
.timeline-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s ease !important;
}

.timeline-card.faded {
    opacity: 0.22 !important;
}

.timeline-card.highlighted {
    opacity: 1 !important;
    transform: scale(1.05) translateY(-4px) !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.3) !important;
    background: rgba(16, 185, 129, 0.03) !important;
}

/* Light theme overrides for interactive linkage */
body.light-theme .timeline-card.highlighted {
    background: rgba(16, 185, 129, 0.05) !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15) !important;
}

/* Print support: do not fade out items when printing */
@media print {
    .timeline-card {
        opacity: 1 !important;
        transform: none !important;
        box-shadow: none !important;
    }
}





