/* ============================================================
   Service: sections.css
   Per-section layout styles + responsive mobile improvements
   ============================================================ */

/* ── Background Canvas ──────────────────────────────────────── */
#background-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
}

/* ── Ambient Glow Blobs ──────────────────────────────────────── */
.glow-blob {
    position: fixed;
    width: min(80vw, 600px);
    height: min(80vw, 600px);
    border-radius: 50%;
    pointer-events: none;
    z-index: -2;
    filter: blur(100px);
    opacity: 0.85;
    transition: background 0.4s ease;
}
.glow-blob-1 {
    top: -10%;
    left: -10%;
    background: var(--glow-blob-1);
    animation: blob-float-1 25s infinite ease-in-out alternate;
}
.glow-blob-2 {
    bottom: -10%;
    right: -10%;
    background: var(--glow-blob-2);
    animation: blob-float-2 25s infinite ease-in-out alternate;
}

@keyframes blob-float-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}
@keyframes blob-float-2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, -50px) scale(1.1); }
}

/* ── Hero Section ───────────────────────────────────────────── */
#home {
    position: relative; width: 100%; min-height: 100svh;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
}

/* ── Projects Section ───────────────────────────────────────── */
#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 2rem;
}

/* ── Project Modal ──────────────────────────────────────────── */
#project-modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 1rem; }
#project-modal.flex { display: flex; }
#project-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); }
#project-modal > div > .relative { position: relative; max-width: 56rem; width: 100%; z-index: 10; max-height: 90vh; overflow-y: auto; }
#project-modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-secondary); font-size: 1.75rem; cursor: pointer; line-height: 1; padding: 0.1rem 0.4rem; border-radius: 0.3rem; transition: color 0.2s; }
#project-modal-close:hover { color: var(--text-primary); }

/* ── Skills Section ─────────────────────────────────────────── */
#skills-container { max-width: 60rem; margin: 0 auto; }

/* ── Certifications Section ─────────────────────────────────── */
#certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
    gap: 1.5rem;
    max-width: 70rem; margin: 0 auto;
}

/* ── Achievements Grid ──────────────────────────────────────── */
#achievements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 48rem; margin: 0 auto;
}
@media (min-width: 640px) {
    #achievements-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ── Education Card ─────────────────────────────────────────── */
.education-card { max-width: 36rem; margin: 0 auto; }

/* ── Footer / Contact ───────────────────────────────────────── */
#copyright { background-color: var(--footer-bg); padding: 1rem; border-top: 1px solid var(--border-color); text-align: center; }
.premium-footer {
    background: linear-gradient(to bottom, transparent, rgba(5, 5, 14, 0.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
body.light-mode .premium-footer {
    background: linear-gradient(to bottom, transparent, rgba(240, 247, 255, 0.95));
}
.footer-nav-link {
    position: relative;
    display: inline-block;
}
.footer-nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
.footer-nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

#footer-3d-canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Footer Styling Enhancements */
.premium-footer h4 {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.light-mode .premium-footer h4 {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.premium-footer ul li {
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.25s ease;
}

.premium-footer ul li:hover {
    transform: translateX(4px);
    color: var(--accent-color);
}

/* Footer Grid Layout */
.footer-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
    text-align: left;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 640px) {
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .footer-links-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid-container {
        grid-template-columns: repeat(12, 1fr);
    }
    .footer-links-grid {
        grid-column: span 8;
    }
    .footer-3d-card {
        grid-column: span 4;
    }
}

/* ── Glow Link ──────────────────────────────────────────────── */
.glow-link { transition: color 0.3s, text-shadow 0.3s; }
.glow-link:hover { color: var(--accent-color) !important; text-shadow: 0 0 20px var(--accent-color); }

/* ──────────────────────────────────────────────────────────────
   MOBILE FIRST RESPONSIVE DESIGN
   ────────────────────────────────────────────────────────────── */

/* ── Base mobile overrides ──────────────────────────────────── */
@media (max-width: 767px) {
    /* Increase section padding on mobile */
    section, footer { padding-left: 1rem !important; padding-right: 1rem !important; }

    /* Hero */
    #home { padding: 6rem 1rem 4rem; }
    #home h1 { font-size: 2.4rem !important; line-height: 1.2; }
    #home p   { font-size: 1rem !important; }
    #hero-cta-container { flex-direction: column; gap: 0.75rem; }
    .download-cv-btn { padding: 0.8rem 1.5rem; font-size: 0.95rem; }

    /* Podcast button on mobile */
    .podcast-btn { padding: 0.7rem 0.9rem; gap: 0.75rem; }
    .podcast-icon { width: 44px; height: 44px; font-size: 0.95rem; }

    /* About */
    #about .grid { grid-template-columns: 1fr !important; }
    #about .md\:col-span-2 { max-width: 240px; margin: 0 auto; }

    /* Projects — 1 col on mobile, disable iframes */
    #projects-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .iframe-scaler { display: none; }
    .project-live-preview .live-badge { display: flex; }
    /* On mobile show static image for live projects */
    .project-live-preview::after {
        content: attr(data-title);
        display: flex; align-items: center; justify-content: center;
        background: linear-gradient(135deg, #0a0a1a, #0a1628);
        color: var(--accent-color); font-size: 0.85rem; font-weight: 600;
        aspect-ratio: 16/9; width: 100%;
    }

    /* Skills grid tighter on mobile */
    .skills-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 1rem; }
    .skill-button { width: 70px; height: 70px; }

    /* Certifications — 1 col on mobile */
    #certifications-grid { grid-template-columns: 1fr; gap: 1.25rem; }

    /* Cert card image smaller on mobile */
    .cert-image-wrap { aspect-ratio: 16/9; }

    /* Contact form */
    #contact-form .flex { flex-direction: column !important; }

    /* Chatbot */
    #chatbot-container { bottom: 1rem; right: 0.75rem; }
    #chatbot-window { width: min(340px, 95vw); height: 420px; right: -0.25rem; }

    /* Mini podcast player */
    .podcast-mini-player { max-width: calc(100vw - 5rem); left: 0.75rem; bottom: 5rem; }

    /* Sidebar */
    #sidebar-menu { width: 85vw; max-width: 300px; }

    /* Toast */
    #form-toast { bottom: 1rem; right: 0.75rem; left: 0.75rem; max-width: unset; }

    /* Navbar */
    #navbar nav { padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* ── Small tablets (480–767px) ──────────────────────────────── */
@media (min-width: 480px) and (max-width: 767px) {
    #home h1 { font-size: 2.8rem !important; }
    #certifications-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablets (768–1023px) ───────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
    #projects-grid { grid-template-columns: repeat(2, 1fr); }
    #certifications-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Large desktop (1280px+) ────────────────────────────────── */
@media (min-width: 1280px) {
    #certifications-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Touch device: disable live iframes ────────────────────── */
@media (hover: none) {
    .iframe-scaler { display: none; }
    .project-live-preview { background: #0a0a1a; }
}

/* ── Navbar 3D Studio Button ───────────────────────────────── */
.navbar-3d-btn {
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.18);
    backdrop-filter: blur(8px);
}

.navbar-3d-btn:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.45);
    transform: translateY(-1px);
}

/* ── Internship Status Badge (PC & Responsive Enhancement) ──── */
.internship-status-badge {
    position: relative;
    overflow: hidden;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.28);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.12), inset 0 0 10px rgba(16, 185, 129, 0.05);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.internship-status-badge::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: left 0.75s ease;
}

.internship-status-badge:hover::before {
    left: 150%;
}

.internship-status-badge:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(52, 211, 153, 0.8);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.38), 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px) scale(1.02);
}

/* Desktop PC Enhancements */
@media (min-width: 1024px) {
    .internship-status-badge {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }
    .internship-status-badge span {
        font-size: 0.75rem !important;
        letter-spacing: 0.12em !important;
    }
}

/* ── 3D Floating Launcher Button ────────────────────────────── */
.porsche-launcher-btn {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(10, 12, 18, 0.95));
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.25);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.porsche-launcher-btn:hover {
    transform: translateY(-3px) scale(1.04);
    border-color: rgba(0, 212, 255, 0.9);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.45);
    color: #00d4ff;
}

.porsche-launcher-btn i {
    color: #00d4ff;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.porsche-launcher-btn:hover i {
    transform: scale(1.15) rotate(-5deg);
}

.launcher-badge {
    background: #00d4ff;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

/* ── 3D Studio Panel Modal UI ───────────────────────────────── */
.porsche-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(5, 6, 12, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.porsche-modal-backdrop.hidden {
    display: none !important;
}

.porsche-modal-container {
    position: relative;
    width: min(1240px, 96vw);
    height: min(800px, 92vh);
    height: min(800px, 92dvh);
    background: #0b0d14;
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 212, 255, 0.15);
}

.porsche-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(11, 13, 20, 0.95));
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    flex-shrink: 0;
}

.header-titles .brand-subtitle {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent-color);
}

.header-titles .model-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-display, sans-serif);
}

.model-title .highlight-spec {
    color: #00d4ff;
    font-size: 0.9rem;
}

.header-specs .spec-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #e2e8f0;
    font-weight: 600;
    transition: all 0.25s ease;
}

.header-specs .spec-pill:hover {
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.1);
}

.close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.close-btn:hover {
    background: #00d4ff;
    border-color: #00d4ff;
    color: #000;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.porsche-canvas-box {
    flex: 1;
    width: 100%;
    min-height: 250px;
    position: relative;
    background: radial-gradient(circle at center, #131722 0%, #07080c 100%);
    overflow: hidden;
}

/* 3D Loader Overlay */
.porsche-loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 12, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    z-index: 10;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.porsche-loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}
.loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(0, 212, 255, 0.15);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: porsche-spin 0.8s linear infinite;
}
@keyframes porsche-spin {
    to { transform: rotate(360deg); }
}
.loader-text {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #00d4ff;
    font-family: monospace;
    text-align: center;
    padding: 0 1rem;
}
.loader-bar-bg {
    width: 180px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}
.loader-bar-fill {
    width: 5%;
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0077ff);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.porsche-controls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    background: rgba(11, 13, 20, 0.95);
    border-top: 1px solid rgba(0, 212, 255, 0.15);
    flex-shrink: 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.group-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #94a3b8;
}

.color-swatches {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.swatch.active, .swatch:hover {
    transform: scale(1.25);
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.btn-grid {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.ctrl-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 0.45rem 0.85rem;
    border-radius: 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-1px);
}

.ctrl-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.rev-action-btn {
    background: linear-gradient(135deg, #00d4ff, #0077ff);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.rev-action-btn:hover {
    background: linear-gradient(135deg, #33e0ff, #1a88ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.6);
}

@media (max-width: 768px) {
    .porsche-modal-backdrop {
        padding: 0.35rem;
    }
    .porsche-modal-container {
        width: 100%;
        height: 96dvh;
        max-height: 96vh;
        border-radius: 1rem;
    }
    .porsche-modal-header {
        padding: 0.65rem 0.9rem;
    }
    .header-titles .model-title {
        font-size: 1.05rem;
    }
    .model-title .highlight-spec {
        font-size: 0.75rem;
        display: block;
    }
    .close-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .porsche-canvas-box {
        flex: 1;
        min-height: 42vh;
    }
    .porsche-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.85rem;
        max-height: 45vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: rgba(8, 10, 16, 0.98);
    }
    .control-group {
        width: 100%;
    }
    .color-swatches {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }
    .btn-grid {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }
    .ctrl-btn {
        white-space: nowrap;
        padding: 0.45rem 0.75rem;
        font-size: 0.72rem;
        flex-shrink: 0;
    }
    .porsche-launcher-btn span.launcher-text {
        display: none;
    }
}


