/* ==========================================================================
   REUSABLE UI COMPONENTS
   ========================================================================== */

/* Burger Menu (Alternative backup - Original lines 373-421) */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2500;
    padding: 0;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background: var(--amber);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    position: relative;
    transform-origin: center;
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Window Controls (Original lines 426-541) */
.window-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.window-btn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.hero-content:hover .window-btn,
.card:hover .window-btn,
.pa-project-card:hover .window-btn {
    opacity: 1;
    transform: scale(1);
}

.window-btn.close {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.window-btn.close::before,
.window-btn.close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 2px;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.window-btn.close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.window-btn.close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.window-btn.close:hover::before,
.window-btn.close:hover::after {
    opacity: 1;
}

.window-btn.close:hover {
    background: linear-gradient(135deg, #ff5252, #d84545);
}

.window-btn.minimize {
    background: linear-gradient(135deg, var(--amber), #e6a82e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.window-btn.minimize::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 2px;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.window-btn.minimize:hover::before {
    opacity: 1;
}

.window-btn.minimize:hover {
    background: linear-gradient(135deg, #e6a82e, #d49620);
}

.window-btn.maximize {
    background: linear-gradient(135deg, var(--aqua), #4db896);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.window-btn.maximize::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    border: 2px solid rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.window-btn.maximize:hover::before {
    opacity: 1;
}

.window-btn.maximize:hover {
    background: linear-gradient(135deg, #4db896, #3da07d);
}

/* Buttons (Original lines 644-707) */
.btn {
    display: inline-block;
    padding: 14px 24px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--aqua);
    color: var(--bg-dark);
    border: none;
    box-shadow: inset 0 0 0 2px rgba(230, 225, 207, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 var(--fg), 0 0 20px rgba(94, 201, 165, 0.5);
}

.btn.ghost {
    background: transparent;
    color: var(--aqua);
    box-shadow: inset 0 0 0 2px var(--aqua);
}

.btn.ghost:hover {
    background: rgba(94, 201, 165, 0.1);
}

/* Timeline (Original lines 1527-1608) */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--amber), var(--aqua));
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

.timeline-marker {
    position: absolute;
    left: 12px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 10px var(--amber);
    border: 3px solid var(--bg-dark);
}

.timeline-content {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 0 2px rgba(94, 201, 165, 0.2);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: inset 0 0 0 2px var(--aqua), 0 0 20px rgba(94, 201, 165, 0.2);
    transform: translateX(5px);
}

.timeline-content h3 {
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    color: var(--amber);
    margin-bottom: 10px;
}

.timeline-content ul {
    list-style: none;
    padding: 0;
}

.timeline-content li {
    padding: 8px 0 8px 15px;
    position: relative;
    line-height: 1.4;
    color: var(--fg);
    opacity: 0.9;
}

.timeline-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--aqua);
}

/* Tech Grid & Cards (Original lines 1611-1718) */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.tech-grid.centered-cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.tech-grid.three-cols {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .tech-grid.three-cols {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.tech-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 0 2px rgba(94, 201, 165, 0.2);
    transition: all 0.3s ease;
}

.tech-card:hover {
    box-shadow: inset 0 0 0 2px var(--amber), 0 0 20px rgba(255, 182, 66, 0.2);
    transform: translateY(-5px);
}

.tech-card h3 {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--amber);
    margin: 0 0 15px;
}

.tech-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-card li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(230, 225, 207, 0.05);
    line-height: 1.6;
}

.tech-card li:last-child {
    border-bottom: none;
}

/* Image Containers & Diagrams (Original lines 1749-1897) */
.project-image-container {
    margin: 30px 0;
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 0 2px rgba(94, 201, 165, 0.2);
}

.diagram-container {
    background: var(--bg-light);
    font-family: 'VT323', monospace;
    color: var(--amber);
    padding: 15px;
    box-shadow: inset 0 0 0 2px var(--tech-card-border), 0 6px 18px rgba(0, 0, 0, 0.12);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    text-align: center;
}

.diagram-container:hover {
    box-shadow: inset 0 0 0 2px var(--aqua), 0 0 20px rgba(94, 201, 165, 0.2);
    transform: translateY(-5px);
}

.mermaid-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 15px 0;
    border-radius: var(--border-radius);
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
}

.mermaid-wrapper svg {
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--tech-card-border);
    border-radius: var(--border-radius);
}

.mermaid {
    min-width: 500px;
    display: flex;
    justify-content: center;
}

.project-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-img:hover {
    box-shadow: 0 0 15px rgba(94, 201, 165, 0.3);
}

/* Technical Widgets (Original lines 3014-3164) */
.tech-pdf-viewer {
    width: 100%;
    height: 600px;
    border: 2px solid var(--aqua);
    border-radius: var(--border-radius);
    background: #1a1a1a;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    margin: 20px 0;
    overflow: scroll;
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    border: 1px solid rgba(230, 225, 207, 0.1);
    background: rgba(18, 16, 14, 0.5);
    border-radius: 6px;
    overflow: hidden;
}

.tech-table th {
    background: rgba(255, 182, 66, 0.1);
    color: var(--amber);
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid var(--amber);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tech-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(230, 225, 207, 0.05);
    color: var(--fg);
}

.code-block-wrapper {
    margin: 20px 0;
    border: 1px solid var(--muted-brown);
    border-radius: 6px;
    background: #1d1f21;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.code-block-wrapper pre {
    margin: 0 !important;
    padding: 15px !important;
    overflow-x: auto;
}

.code-block-wrapper code {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
}

/* Modals & Summaries (Original lines 2247-2511, 2791-2921) */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: zoom-out;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.modal-caption {
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--amber);
    padding: 15px 0 0 0;
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--fg);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2100;
    line-height: 1;
}

.summary-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.summary-container {
    background: #121212;
    width: 90%;
    max-width: 800px;
    border: 1px solid #ffb642;
    border-radius: 4px;
    overflow-y: auto;
    max-height: 90vh;
    animation: modalSlide 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalSlide {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(18, 16, 14, 0.95);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--amber);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    gap: 12px;
}

.taskbar-tab {
    flex-shrink: 0;
    background: var(--bg-light);
    border: 1px solid var(--amber);
    color: var(--amber);
    padding: 0 20px;
    height: 35px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.cv-container {
    background: var(--bg-dark);
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    border: 2px solid var(--amber);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlide 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}