html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    cursor: url('../assets/cursor/Normal.cur'), auto !important;
    /* Letterbox: center the viewport box */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Interaktywne elementy - kursor */
a, button, .education-card, .rozszerz-opis, .expand-description, [role="button"], .robot-sprite, .grid-item, .grid-tile, .info-bar, .core-link, body.portal-hover, body.portal-hover *, a *, #control-gear-btn, #control-gear-btn *, .aperture-btn, .aperture-btn *, input[type="range"] {
    cursor: url('../assets/cursor/Alternate-Link.cur'), pointer !important;
}

/* ══ GLOBAL APERTURE VIEWPORT — Letterbox container ══ */
#aperture-viewport {
    position: relative;
    width: 1920px;
    height: 876px;
    transform-origin: center center;
    overflow: hidden;
    flex-shrink: 0;
}

/* ══ CHAMBER OVERLAY — Audio-visual transition layer ══ */
/* Starts fully opaque (black screen) on each page load.  */
/* aperture-transitions.js fades it in/out on navigation. */
.chamber-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 10000;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1s ease;
}

/* ══ CV MODAL OVERLAY ══ */
#cv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

#cv-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#cv-modal-box {
    background: #000;
    border: 2px solid #00aaff;
    box-shadow: 0 0 30px rgba(0, 170, 255, 0.4);
    padding: 40px 50px;
    text-align: center;
    font-family: 'Orbitron', monospace;
    color: #fff;
    max-width: 500px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#cv-modal-overlay.active #cv-modal-box {
    transform: scale(1);
}

#cv-modal-box h3 {
    color: #00aaff;
    font-size: 20px;
    letter-spacing: 4px;
    margin-bottom: 30px;
    font-weight: 700;
}

.cv-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 35px;
}

.cv-btn {
    background: rgba(0, 170, 255, 0.15);
    border: 1px solid #00aaff;
    color: #00aaff;
    padding: 14px 28px;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-block;
}

.cv-btn:hover {
    background: #00aaff;
    color: #000;
    box-shadow: 0 0 20px #00aaff;
}

#close-cv-modal {
    background: rgba(255, 50, 50, 0.15);
    border: 1px solid #ff3333;
    color: #ff3333;
    padding: 10px 24px;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#close-cv-modal:hover {
    background: #ff3333;
    color: #000;
    box-shadow: 0 0 20px #ff3333;
}

/* ══ GLOBAL APERTURE CONTROL PANEL ══ */
/* ══ GLOBAL APERTURE CONTROL PANEL (Surowy Terminal) ══ */
#aperture-control-panel {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 100000;
    font-family: monospace;
    user-select: none;
}

#control-gear-btn {
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    font-size: 28px;
    transition: transform 0.3s ease, color 0.2s ease;
    cursor: pointer;
    margin-left: auto;
    box-shadow: none;
}

#control-gear-btn:hover,
#aperture-control-panel.open #control-gear-btn {
    background-color: transparent;
    color: #fff;
    transform: rotate(180deg) scale(1.1);
    box-shadow: none;
}

#control-gear-btn i.gear-icon {
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#control-gear-btn:hover i.gear-icon,
#aperture-control-panel.open #control-gear-btn i.gear-icon {
    transform: rotate(360deg);
}

#control-panel {
    position: absolute;
    top: 65px;
    right: 0;
    width: 320px;
    background: #000;
    border: 1px solid #555;
    box-shadow: none;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-15px);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border-radius: 0;
}

#aperture-control-panel.open #control-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    box-shadow: none;
}

.panel-header {
    font-family: monospace;
    font-weight: bold;
    color: #fff;
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #444;
}

.panel-section {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: monospace;
    font-weight: bold;
    font-size: 13px;
    color: #ccc;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Audio Volume Container & Slider */
.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

#volume-value {
    font-family: monospace;
    font-weight: bold;
    font-size: 13px;
    color: #fff;
    min-width: 45px;
    text-align: right;
}

input[type="range"].aperture-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #333;
    border: 1px solid #555;
    border-radius: 0;
    outline: none;
    cursor: pointer;
}

input[type="range"].aperture-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 20px;
    background: #ccc;
    border: 1px solid #fff;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s;
}

input[type="range"].aperture-slider::-webkit-slider-thumb:hover {
    background: #F26622;
}

.aperture-btn {
    background: #000;
    border: 1px solid #555;
    color: #ccc;
    padding: 12px 18px;
    font-family: monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
}

.aperture-btn:hover:not(:disabled) {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: none;
}

.aperture-btn.active {
    background: #0078D7;
    color: #fff;
    border-color: #0078D7;
    box-shadow: none;
}

.aperture-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #444;
}

.btn-group {
    display: flex;
    gap: 12px;
}
