/* ═══════════════════════════════════════════
   RETRO STYLES - 90s/2000s web aesthetic
   Theme: Charcoal + Crimson (#99003b) + complements
   ═══════════════════════════════════════════ */

/* ── Theme Colors ──────────────────────────
   Background:      #1A1A1A (soft charcoal, not pure black)
   Panels:          #242424 / #2A2A2A
   Primary:         #B3476E (softened crimson)
   Light crimson:   #CC6A8E / #D9809F
   Accent gold:     #E6C86A / #C9A961
   Text:            #E8E8E8 (soft off-white)
   Muted text:      #9E9E9E
   ────────────────────────────────────────── */

body {
    background-color: #1A1A1A;
    color: #E8E8E8;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    margin: 0;
    padding: 8px;
}

/* Links: warm gold, rose on hover */
a {
    color: #E6C86A;
    text-decoration: underline;
}
a:visited {
    color: #C9A961;
}
a:hover {
    color: #D9809F;
}

/* ═══ MAIN LAYOUT TABLE ═══ */
.main-table {
    background-color: #1E1E1E;
    border: 1px solid #7A2A48;
    border-collapse: collapse;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    background-color: #242424;
    border-right: 1px solid #7A2A48;
    padding: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}
.sidebar h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #CC6A8E;
    border-bottom: 1px solid #7A2A48;
    padding-bottom: 4px;
}
.nav-list {
    margin: 0;
    padding-left: 18px;
}
.nav-list li {
    margin-bottom: 4px;
}

/* ═══ MAIN CONTENT ═══ */
.content {
    padding: 16px;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.4;
}
.content h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    color: #D9809F;
    margin: 0 0 12px 0;
    border-bottom: 2px solid #7A2A48;
    padding-bottom: 4px;
}
.content h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: #D9809F;
    margin: 16px 0 8px 0;
}
.content h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #E6C86A;
    margin: 12px 0 6px 0;
}
.content p {
    margin: 0 0 12px 0;
}
.content ul {
    margin: 0 0 12px 0;
    padding-left: 24px;
}

/* ═══ HERO ═══ */
.hero-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 36px;
    font-weight: bold;
    color: #D9809F;
    margin: 0 0 4px 0;
    letter-spacing: 2px;
}
.hero-sub {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #E6C86A;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
}

/* ═══ SERVICE BOXES ═══ */
.service-box {
    border: 1px solid #7A2A48;
    border-collapse: collapse;
    margin: 8px 0 16px 0;
    width: 100%;
}
.service-box td {
    border: 1px solid #333333;
    padding: 10px;
    vertical-align: top;
    color: #E8E8E8;
}
.service-num {
    width: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    background-color: #7A2A48;
    color: #F0F0F0;
    font-family: Arial, Helvetica, sans-serif;
}
.service-body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* ═══ INFO BOX (table-based layout) ═══ */
.info-box {
    border: 1px solid #7A2A48;
    border-collapse: collapse;
    margin: 8px 0 16px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    width: 100%;
}
.info-box td {
    border: 1px solid #333333;
    padding: 6px 10px;
    color: #E8E8E8;
}
.info-label {
    background-color: #7A2A48;
    color: #F0F0F0;
    font-weight: bold;
    width: 120px;
}

/* FAQ questions stand out from the answers */
.faq-q {
    color: #E6C86A;
}

/* ═══ HORIZONTAL RULE ═══ */
hr {
    border: none;
    border-top: 1px solid #7A2A48;
    border-bottom: 1px solid #B3476E;
    margin: 16px 0;
}

/* ═══ FOOTER ═══ */
.footer {
    background-color: #7A2A48;
    color: #F0F0F0;
    margin-top: 6px;
    border: 1px solid #B3476E;
}
.footer a {
    color: #E6C86A;
}

/* ═══ TINY TEXT ═══ */
.tiny {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #9E9E9E;
}
.footer .tiny {
    color: #CCCCCC;
}

/* ═══ BUTTONS (classic raised) ═══ */
.btn {
    background-color: #7A2A48;
    border: 2px outset #B3476E;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    padding: 4px 12px;
    cursor: pointer;
    color: #F0F0F0;
    font-weight: bold;
}
.btn:hover {
    background-color: #9E3A5F;
}
.btn:active {
    border-style: inset;
}

/* ═══ FORMS (soft dark inputs) ═══ */
input, textarea, select {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    border: 2px inset #7A2A48;
    background-color: #2A2A2A;
    color: #E8E8E8;
    padding: 3px;
}
input:focus, textarea:focus, select:focus {
    border-color: #B3476E;
    outline: none;
}

/* ═══ CAROUSEL BUTTONS (project media carousel) ═══ */
.carousel-btn {
    background-color: #7A2A48;
    border: 2px outset #B3476E;
    color: #F0F0F0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: bold;
    width: 36px;
    height: 36px;
    cursor: pointer;
    flex-shrink: 0;
}
.carousel-btn:hover {
    background-color: #9E3A5F;
}
.carousel-btn:active {
    border-style: inset;
}
.carousel-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ═══ ABOUT ME (home page) ═══ */
.about-wrap {
    overflow: hidden; /* clear the floated photo */
}
.about-photo {
    float: left;
    width: 300px;
    max-width: 100%;
    margin: 0 20px 10px 0;
    border: 1px solid #333333;
    border-radius: 4px;
}
.project-desc {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #B0B0B0;
    margin: 4px 0 0 0;
}

/* ═══ 3D MODEL VIEWER ═══ */
.viewer-box {
    position: relative;
    width: 100%;
    /* 626px = 600px canvas + 26px title bar, so the 3D view keeps
       the exact height/aspect it had before the title bar existed */
    height: 626px;
    background-color: #1E1E1E;
    border: 1px solid #7A2A48;
    margin: 8px 0;
}

/* Window-style title bar showing the model name */
.viewer-titlebar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 26px;
    line-height: 26px;
    padding: 0 10px;
    background-color: #7A2A48;
    border-bottom: 1px solid #B3476E;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;
    color: #F0F0F0;
    z-index: 3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewer-stage {
    position: absolute;
    top: 26px;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Spinning wheel in the center of the viewer - a single ring, shown
   only while the model is loading, then removed */
.viewer-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-radius: 50%;
    border: 3px solid rgba(230, 200, 106, 0.3);
    border-top-color: #E6C86A;
    animation: viewer-spin 1.2s linear infinite;
    pointer-events: none;
    z-index: 2;
}
.viewer-spinner.busy {
    display: block;
}

@keyframes viewer-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ═══ MY WORK PROJECT GRID ═══ */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0;
}
.project-card {
    display: block;
    width: 240px;
    background-color: #161616;
    border: 1px solid #7A2A48;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.project-card:hover {
    border-color: #B3476E;
}
.project-card-img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid #333333;
}
.project-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    font-size: 13px;
}
.project-card-body {
    padding: 8px 10px;
}
.project-card-body h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #F0F0F0;
}
.project-card-body .tiny {
    margin: 6px 0 0 0;
}

/* ═══ PROJECT DETAIL VIEW ═══ */
/* Toolbar + status overlaid on the 3D view so the detail page
   never needs to scroll to see the model. */
.viewer-buttons {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 4;
}
.viewer-status {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 4;
    background-color: rgba(0, 0, 0, 0.65);
    padding: 2px 6px;
    margin: 0;
}
.project-media {
    margin: 12px 0;
    text-align: center;
}
.project-pdf {
    display: block;
    width: 100%;
    height: 75vh;
    min-height: 480px;
    margin: 12px auto;
    border: 1px solid #333333;
    background: #ffffff;
}
.model-launch {
    text-align: center;
    padding: 48px 0;
}
.model-launch .project-desc {
    margin-bottom: 18px;
}
.btn-load-model {
    font-size: 1.1em;
    padding: 12px 28px;
}

/* ═══ PROJECT MEDIA CAROUSEL ═══ */
.media-carousel {
    position: relative;
    background-color: #000000;
    border: 1px solid #7A2A48;
    padding: 8px 0;
    margin: 12px 0;
    /* Clip at the carousel level too - some browsers don't clip
       transformed flex children at the track's overflow box. */
    overflow: hidden;
}
.media-track {
    display: grid;
    width: 100%;
    /* All slides share one grid cell (grid-area: 1/1 below) so they STACK:
       every slide is inside the viewport at page load and gets painted.
       Slides are revealed with opacity, which never needs the browser to
       rasterize off-screen content (transform-track carousels show black
       boxes on some GPUs for exactly that reason). The grid row height is
       the tallest slide, so the box always fits. */
}
.media-slide {
    grid-area: 1 / 1;
    min-width: 0;
    text-align: center;
    /* Side gutters keep wide (16:9) media clear of the arrow buttons */
    padding: 0 52px;
    /* hidden-but-painted: opacity 0 keeps the slide in the paint tree (a
       visibility/display toggle skips painting entirely and can reveal
       black). pointer-events off so hidden slides never eat clicks. */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.media-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.media-slide img,
.media-slide video {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    margin: 0 auto;
    border: 1px solid #333333;
    background: #000;
    /* keep the 1px border inside the slide so the image can never
       overflow into the neighboring slide / track edge */
    box-sizing: border-box;
}
.media-caption {
    margin: 6px 0 2px 0;
}
.media-carousel .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
.media-carousel .carousel-prev {
    left: 8px;
}
.media-carousel .carousel-next {
    right: 8px;
}
.carousel-dots {
    text-align: center;
    margin-top: 8px;
}
.carousel-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #B3476E;
    background-color: transparent;
    cursor: pointer;
}
.carousel-dot.active {
    background-color: #7A2A48;
}
