/* =========================================
   Interactive CV — Window Components
   Design: Simple · Modern · Elegant
   ========================================= */

/* ─── Windows Container ──────────────────── */
#windows-container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: calc(100vh - 52px);
}

/* ─── Window Base ────────────────────────── */
.window {
    position: absolute;
    background: #0e1525;
    border: 1px solid rgba(91, 141, 239, 0.18);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(91, 141, 239, 0.06),
        0 20px 60px rgba(0, 0, 0, 0.65),
        0 4px 16px rgba(0, 0, 0, 0.4);
    min-width: 440px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 52px) !important;
    border-radius: 0;
}

.window.active {
    z-index: 100;
    box-shadow:
        0 0 0 1px rgba(91, 141, 239, 0.18),
        0 26px 80px rgba(0, 0, 0, 0.75),
        0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ─── Title Bar ──────────────────────────── */
.window-titlebar {
    background: #162138;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    user-select: none;
    height: 40px;
    border-bottom: 1px solid rgba(91, 141, 239, 0.16);
    flex-shrink: 0;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7a8fad;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.2px;
}

.window.active .window-title {
    color: #e2e8f6;
}

.window-icon { font-size: 15px; }

/* ─── Window Controls (macOS-style dots) ─── */
.window-controls {
    display: flex;
    gap: 7px;
    align-items: center;
}

.window-control-btn {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    transition: filter 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    font-size: 0;
    line-height: 0;
}

.window-control-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.window-controls:hover .window-control-btn::after {
    opacity: 1;
}

.window-control-btn.close    { background: #ef4444; }
.window-control-btn.minimize { background: #fbbf24; }
.window-control-btn.maximize { background: #4ade80; }

.window-control-btn.close::after    { content: '✕'; font-size: 8px; }
.window-control-btn.minimize::after { content: '−'; font-size: 10px; }
.window-control-btn.maximize::after { content: '+'; font-size: 10px; }

.window-control-btn:hover {
    filter: brightness(1.18);
    transform: scale(1.1);
}

/* ─── Menu Bar ───────────────────────────── */
.window-menubar {
    background: #0e1525;
    border-bottom: 1px solid rgba(91, 141, 239, 0.12);
    padding: 0 12px;
    display: flex;
    gap: 2px;
    height: 30px;
    align-items: center;
    flex-shrink: 0;
}

.window-menu-item {
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.15s ease;
    color: #7a8fad;
    font-family: 'Inter', sans-serif;
}

.window-menu-item:hover {
    background: rgba(91, 141, 239, 0.14);
    color: #e2e8f6;
}

/* ─── Window Content ─────────────────────── */
.window-content {
    flex: 1;
    overflow: auto;
    padding: 24px 28px;
    background: #0e1525;
    color: #e2e8f6;
    font-family: 'Inter', -apple-system, sans-serif;
}

.window-content h2 {
    color: #7baeff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(91, 141, 239, 0.18);
    letter-spacing: -0.3px;
}

.window-content h3 {
    font-size: 11px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: #4a607d;
}

.window-content p {
    line-height: 1.72;
    margin-bottom: 14px;
    color: #c8d4e8;
    font-size: 14px;
}

.window-content ul {
    margin-left: 18px;
    margin-bottom: 14px;
}

.window-content li {
    margin-bottom: 6px;
    line-height: 1.65;
    color: #c8d4e8;
    font-size: 14px;
}

/* ─── Status Bar ─────────────────────────── */
.window-statusbar {
    background: #162138;
    border-top: 1px solid rgba(91, 141, 239, 0.14);
    padding: 5px 14px;
    font-size: 11px;
    color: #4a607d;
    display: flex;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

/* ─── Info Section ───────────────────────── */
.info-section {
    background: #162138;
    border: 1px solid rgba(91, 141, 239, 0.16);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.info-label {
    font-weight: 600;
    color: #5b8def;
    margin-bottom: 3px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    font-family: 'Inter', sans-serif;
}

.info-value {
    color: #e2e8f6;
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 10px;
}

.info-value:last-child { margin-bottom: 0; }

/* ─── Skills ─────────────────────────────── */
.skill-category { margin-bottom: 22px; }

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.skill-tag {
    background: rgba(91, 141, 239, 0.1);
    color: #7baeff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid rgba(91, 141, 239, 0.24);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(91, 141, 239, 0.18);
    border-color: rgba(91, 141, 239, 0.48);
}

/* ─── Experience ─────────────────────────── */
.experience-item {
    background: #162138;
    border: 1px solid rgba(91, 141, 239, 0.16);
    border-left: 3px solid #5b8def;
    padding: 18px 20px;
    margin-bottom: 14px;
    border-radius: 0 10px 10px 0;
    transition: border-left-color 0.2s ease;
}

.experience-item:hover {
    border-left-color: #7baeff;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 14px;
}

.experience-title {
    font-weight: 600;
    color: #e2e8f6;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
}

.experience-company {
    color: #7baeff;
    font-size: 13px;
    margin-top: 3px;
    font-weight: 400;
}

.experience-period {
    color: #7baeff;
    font-size: 11px;
    white-space: nowrap;
    background: rgba(91, 141, 239, 0.1);
    padding: 3px 9px;
    border-radius: 5px;
    border: 1px solid rgba(91, 141, 239, 0.26);
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

.experience-description {
    color: #7a8fad;
    line-height: 1.68;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.experience-description ul { color: #7a8fad; }
.experience-description li { color: #7a8fad; font-size: 13px; }

/* ─── Experience Groups (LinkedIn-style) ─── */
.exp-group {
    margin-bottom: 16px;
    border: 1px solid rgba(91, 141, 239, 0.16);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.exp-group:hover { border-color: rgba(91, 141, 239, 0.3); }

.exp-group-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #162138;
    border-bottom: 1px solid rgba(91, 141, 239, 0.1);
}

.exp-group-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(91, 141, 239, 0.1);
    border: 1px solid rgba(91, 141, 239, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.exp-group-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f6;
    font-family: 'Inter', sans-serif;
}

.exp-group-meta {
    font-size: 11px;
    color: #7baeff;
    font-family: 'Inter', sans-serif;
    margin-top: 3px;
}

.exp-roles-list { padding: 4px 0; }

.exp-role-item {
    display: flex;
    gap: 12px;
    padding: 10px 18px;
}

.exp-role-dot-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
    flex-shrink: 0;
    width: 14px;
}

.exp-role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5b8def;
    border: 2px solid #0e1525;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.exp-role-line {
    display: none;
    width: 1px;
    flex: 1;
    min-height: 16px;
    background: rgba(91, 141, 239, 0.2);
    margin-top: 4px;
}

.exp-role-item:not(:last-child) .exp-role-line { display: block; }

.exp-role-body { flex: 1; }

.exp-role-title {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f6;
    font-family: 'Inter', sans-serif;
    margin-bottom: 2px;
}

.exp-role-period {
    font-size: 11px;
    color: #7baeff;
    font-family: 'Inter', sans-serif;
    margin-bottom: 8px;
}

.exp-role-desc {
    color: #7a8fad;
    font-size: 13px;
    line-height: 1.65;
    font-family: 'Inter', sans-serif;
}

.exp-role-desc ul { margin-left: 16px; margin-top: 4px; }
.exp-role-desc li { color: #7a8fad; font-size: 13px; margin-bottom: 4px; }

/* ─── Project Tabs ───────────────────────── */
.project-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(91, 141, 239, 0.22);
    padding-bottom: 0;
}

.project-tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    background: rgba(22, 33, 56, 0.6);
    border: 1px solid rgba(91, 141, 239, 0.16);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: #7a8fad;
    cursor: pointer;
    position: relative;
    bottom: -2px;
    transition: all 0.18s ease;
    letter-spacing: 0.2px;
}

.project-tab:hover {
    color: #c8d4e8;
    background: rgba(22, 33, 56, 0.9);
}

.project-tab.active {
    color: #e2e8f6;
    font-weight: 600;
    background: #0e1525;
    border-color: rgba(91, 141, 239, 0.36);
    border-bottom-color: #0e1525;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Timeline ───────────────────────────── */
.timeline-year-group {
    margin-bottom: 28px;
}

.timeline-year-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.timeline-year-label span {
    font-size: 11px;
    font-weight: 700;
    color: #5b8def;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.timeline-year-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(91, 141, 239, 0.16);
}

.timeline-items {
    border-left: 1px solid rgba(91, 141, 239, 0.18);
    margin-left: 6px;
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-item {
    position: relative;
    padding: 10px 14px;
    background: #162138;
    border: 1px solid rgba(91, 141, 239, 0.12);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5b8def;
    border: 2px solid #0e1525;
}

.timeline-item:hover {
    border-color: rgba(91, 141, 239, 0.32);
}

.timeline-item-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.timeline-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f6;
    font-family: 'Inter', sans-serif;
    flex: 1;
}

.timeline-item-org {
    font-size: 12px;
    color: #7baeff;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-item-desc {
    font-size: 12px;
    color: #7a8fad;
    line-height: 1.6;
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
}

.timeline-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ─── Projects ───────────────────────────── */
.project-card {
    background: #162138;
    border: 1px solid rgba(91, 141, 239, 0.16);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    transition: all 0.25s ease;
}

.project-card:hover {
    border-color: rgba(91, 141, 239, 0.38);
    box-shadow: 0 6px 24px rgba(91, 141, 239, 0.1);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.project-title {
    font-weight: 600;
    color: #e2e8f6;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.tech-badge {
    background: rgba(34, 211, 238, 0.08);
    color: #22d3ee;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.project-description {
    color: #7a8fad;
    line-height: 1.68;
    font-size: 13px;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
}

.project-description a {
    color: #7baeff;
    text-decoration: none;
    font-size: 12px;
}

.project-description a:hover { text-decoration: underline; }

/* ─── Contact ────────────────────────────── */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #162138;
    border-radius: 12px;
    border: 1px solid rgba(91, 141, 239, 0.16);
    transition: all 0.2s ease;
}

.contact-item:hover {
    border-color: rgba(91, 141, 239, 0.38);
    background: #1d2b47;
}

.contact-icon {
    font-size: 18px;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 141, 239, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(91, 141, 239, 0.2);
    flex-shrink: 0;
}

.contact-details { flex: 1; min-width: 0; }

.contact-label {
    font-size: 10px;
    color: #4a607d;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    margin-bottom: 3px;
    font-family: 'Inter', sans-serif;
}

.contact-value {
    color: #7baeff;
    font-weight: 500;
    font-size: 13px;
    word-break: break-all;
    font-family: 'Inter', sans-serif;
}

.contact-value a {
    color: #7baeff;
    text-decoration: none;
}

.contact-value a:hover { text-decoration: underline; }

/* ─── Resize Handle ──────────────────────── */
.window-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(91, 141, 239, 0.4) 50%);
    opacity: 0.5;
    border-radius: 0 0 12px 0;
    transition: opacity 0.2s ease;
}

.window-resize-handle:hover { opacity: 1; }

/* ─── Help / Error ───────────────────────── */
.error-icon {
    font-size: 48px;
    text-align: center;
    margin: 24px 0;
}

.help-content { line-height: 1.8; }

.help-content code {
    background: #162138;
    color: #22d3ee;
    padding: 2px 7px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 12px;
    border: 1px solid rgba(91, 141, 239, 0.18);
}

/* ─── Scrollbar ──────────────────────────── */
.window-content::-webkit-scrollbar {
    width: 5px;
}

.window-content::-webkit-scrollbar-track {
    background: transparent;
}

.window-content::-webkit-scrollbar-thumb {
    background: rgba(91, 141, 239, 0.28);
    border-radius: 3px;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 141, 239, 0.5);
}

/* ─── Certifications ─────────────────────── */
.cert-group {
    margin-bottom: 24px;
    border: 1px solid rgba(91, 141, 239, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.cert-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(91, 141, 239, 0.1);
    border-bottom: 1px solid rgba(91, 141, 239, 0.15);
}

.cert-group-issuer {
    font-size: 12px;
    font-weight: 600;
    color: #7baeff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-group-count {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
}

.cert-list { padding: 8px 0; }

.cert-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(91, 141, 239, 0.07);
    transition: background 0.15s;
}

.cert-item:last-child { border-bottom: none; }
.cert-item:hover { background: rgba(91, 141, 239, 0.07); }

.cert-badge-box {
    min-width: 52px;
    height: 32px;
    background: rgba(91, 141, 239, 0.15);
    border: 1px solid rgba(91, 141, 239, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #7baeff;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.cert-name {
    font-size: 13px;
    color: rgba(255,255,255,0.88);
    font-weight: 500;
    line-height: 1.3;
}

.cert-issuer {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}

/* ─── About Me Profile Header ─────────────── */
.about-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.about-profile-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(91, 141, 239, 0.45);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.about-profile-photo:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(91, 141, 239, 0.5);
}

/* ── Photo Lightbox ── */
#photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
#photo-lightbox.active {
    opacity: 1;
    pointer-events: all;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
}
.lightbox-content {
    position: relative;
    z-index: 1;
}
.lightbox-content img {
    max-width: 88vw;
    max-height: 82vh;
    border-radius: 14px;
    border: 3px solid rgba(91, 141, 239, 0.55);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
    transform: scale(0.82);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block;
}
#photo-lightbox.active .lightbox-content img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: -13px;
    right: -13px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #c0c0c0;
    border: 2px solid #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: background 0.15s;
}
.lightbox-close:hover { background: #e88; }
