:root {
    color-scheme: light dark;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: #0b1519;
    color: #ffffff;
    scroll-behavior: smooth;
}

/* Base Body Framework */
body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ------------------------------ SECTION 1: HERO BANNER (FULL VIEWPORT) ------------------------------ */
.hero-section {
    height: 100vh; /* Fixed max-height. Kills the jerk. Stops Section 2 from peeking. */
    width: 100%;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    display: block; /* Removed flex so the sticky child works natively */
    position: relative;
}

.main-content {
    height: 100svh; /* Locks content perfectly to the initial safe visible area */
    width: 100%;
    box-sizing: border-box; /* Ensures the 20px padding doesn't break the height */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    
    /* THE MAGIC ANTI-JERK BUFFER */
    position: -webkit-sticky;
    position: sticky;
    top: 0;
}

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 24px;
    opacity: 1;
}

.designer-name {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 36px;
}

h1 {
    font-size: 2.8rem;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.subtext {
    margin-top: 14px;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.mobile-text,
.mobile-subtext {
    display: none;
}

/* Scroll Prompt Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.5); /* Muted for visual elegance - going against WCAG contrast value 0.75 */
    font-size: 0.75rem;
    cursor: pointer;
}

.bouncing-arrow {
    font-size: 1.2rem;
    display: inline-block;
    animation: bounce 2s infinite;
    margin-top: 4px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

/* ------------------------------ SECTION 2: PORTFOLIO WORKS ------------------------------ */
.portfolio-section {
    padding: 100px 0;
    background-color: #0b1519;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    max-width: 850px;
    margin: 0 auto 60px auto;
    font-weight: 300;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

.portfolio-card {
    grid-column: span 2;
}

.portfolio-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.portfolio-card:nth-child(5) {
    grid-column: 4 / span 2;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: rgba(0,0,0,0.2);
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Overlay Activation On Hover */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 32, 39, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-view-pdf {
    color: #ffffff;
    background: #203a43;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.portfolio-card-details {
    padding: 24px;
}

.portfolio-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #8bdcff;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.portfolio-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.portfolio-card-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin-bottom: 0;
}

/* ------------------------------ HOVER EFFECTS (DESKTOP/MOUSE ONLY) ------------------------------ */
@media (hover: hover) and (pointer: fine) {
    .portfolio-card:hover {
        transform: translateY(-6px);
        border-color: rgba(139, 220, 255, 0.4);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    }

    .portfolio-card:hover .portfolio-img {
        transform: scale(1.04);
    }

    .portfolio-card:hover .card-overlay {
        opacity: 1;
    }
}

/* ------------------------------ SECTION 3: WORK PHILOSOPHY ------------------------------ */
.philosophy-section {
    padding: 100px 0 140px 0;
    background: linear-gradient(180deg, #0b1519 0%, #0d212a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 15px;
    margin-top: 20px;
}

.philosophy-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 35px 30px;
    border-radius: 16px;
    transition: background-color 0.3s;
}

.philosophy-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.icon-box {
    font-size: 2rem;
    color: #8bdcff;
    margin-bottom: 20px;
}

.philosophy-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.philosophy-card p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ------------------------------ SECTION 4: LET'S CONNECT ------------------------------ */
.connect-section {
    padding: 70px 0 90px 0;
    /* background-color: #0d212a; */
    background-color: #09161b;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.connect-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.connect-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 550px;
    margin: 0 auto 32px auto;
    font-weight: 300;
    line-height: 1.5;
}

.connect-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-connect {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 30px;
    letter-spacing: 0.2px;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.cv-link {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-2px);
}

.linkedin-link {
    color: #8bdcff;
    background: rgba(139, 220, 255, 0.05);
    border: 1px solid rgba(139, 220, 255, 0.15);
}

.linkedin-link:hover {
    background: rgba(139, 220, 255, 0.1);
    border-color: #8bdcff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 220, 255, 0.1);
}

/* ------------------------------ NATIVE SCROLL MODAL FOR PDFS ------------------------------ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(5, 12, 15, 0.95);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    touch-action: none; /* NEW: Kills native browser pinch/scroll on the overlay */
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Expanded wrapper to capture 100% full screen view area */
.modal-wrapper {
    background-color: #0f2027;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(1.02);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active .modal-wrapper {
    transform: scale(1);
}

/* Sleek high-density header row to save maximal vertical viewport space */
.modal-header {
    padding: 12px 24px;
    background-color: #0b1519;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Prevents header from compressed shifting */
}

/* --- NEW: Modal Header Action Buttons --- */
.modal-action-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-download-btn {
    background: rgba(139, 220, 255, 0.05);
    color: #8bdcff;
    border: 1px solid rgba(139, 220, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-download-btn:hover {
    background: rgba(139, 220, 255, 0.15);
    border-color: #8bdcff;
    color: #ffffff;
    transform: translateY(-1px);
}

/* MATCHING ICON THICKNESS WITH CROSS BUTTON */
.modal-download-btn i {
    -webkit-text-stroke: 0.6px; 
}

#pdf-modal-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.2px;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem; /* Kept the smaller, proportionate size */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.15s ease;
    -webkit-text-stroke: 1px; /* NEW: Maked the icon bolder */
}

.close-modal-btn:hover {
    color: #ffffff;
    background-color: #dc3545; /* Clean red exit indicator on hover */
    border-color: transparent;
}

.modal-body {
    flex: 1;
    background-color: #1a1a1a;
    position: relative;
    width: 100%;
    height: 100%;
}

/* ------------------------------ POPUP CONTACT CARD (RIGHT CLICK) ------------------------------ */
#contact-card {
    position: fixed;
    background: rgba(15, 32, 39, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 14px;
    padding: 16px 18px;
    z-index: 9999;
    display: none;
    width: 255px;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.2s ease;
}

.card-title {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.card-text {
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.card-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #8bdcff;
    text-decoration: none;
    transition: all 0.15s ease;
}

#contact-card.show {
    transform: scale(1);
    opacity: 1;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.divider {
    color: rgba(255, 255, 255, 0.5); /* Muted for visual elegance - going against WCAG contrast value 0.6 */
    font-size: 0.85rem;
    font-weight: 300; /* NEW: Makes the pipe symbol render thinner */
}

.card-link:last-child {
    opacity: 0.75;
    font-size: 0.825rem;
}

.linkedin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding-top: 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    opacity: 0.85;
    letter-spacing: 0.2px;
}

.linkedin-icon {
    font-size: 15px;
    opacity: 0.85;
    transition: all 0.15s ease;
}

.linkedin:hover { color: #ffffff; }
.linkedin:hover .linkedin-icon { opacity: 1; transform: translateX(1px); }

.card-link:hover {
    text-decoration: underline;
    opacity: 1;
    transform: translateY(-1px);
    transition: all 0.15s ease;
}

.divider-line {
    height: 1px;
    margin: 8px 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.13), transparent);
}

/* ==============================
   BACK TO TOP BUTTON
============================== */

.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(18, 28, 36, 0.85);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        visibility 0.3s ease,
        background 0.3s ease;
    z-index: 999;
    border: 1px solid rgba(255,255,255,0.08);
}

.back-to-top:hover {
    background: rgba(35, 50, 62, 0.95);
    transform: translateY(0px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ------------------------------ FOOTER ------------------------------ */
footer {
    text-align: center;
    padding: 30px 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5); /* Muted for visual elegance - going against WCAG contrast value 0.65 */
    background-color: #0d212a;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {

    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }

    .desktop-subtext {
        display: none;
    }

    .mobile-subtext {
        display: block;
    }

    h1 {
        font-size: 2.0rem;
        line-height: 1.45;
        letter-spacing: 0px;
        max-width: 285px;
        margin: 0 auto;
    }

    .subtext {
        font-size: 1.05rem;
        line-height: 1.7;
        max-width: 320px;
        margin: 18px auto 0 auto;
        padding: 0 10px;
    }

    .logo {
        width: 105px;
        margin-bottom: 20px;
    }

    .designer-name {
        font-size: 0.95rem;
        margin-bottom: 32px;
        letter-spacing: 1.8px;
    }

    .scroll-indicator {
        bottom: 26px;
    }

    .section-title {
        font-size: 1.85rem;
    }

    .section-subtitle {
        font-size: 1rem;
        max-width: 500px;
        margin: 0 auto 50px auto;
        padding: 0 16px;
    }

    .portfolio-section,
    .philosophy-section {
        padding: 60px 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-card {
        grid-column: span 1 !important;
    }

    .portfolio-card:nth-child(4),
    .portfolio-card:nth-child(5) {
        grid-column: span 1 !important;
    }

    /* CHANGED: Maximized modal real estate on small screens */
    .modal-wrapper {
        width: 100%;
        height: 100vh;
        height: 100dvh;
    }

    /* NEW: Forced the iframe to ignore JavaScript scaling on mobile screens */
    #pdf-viewer {
        width: 100% !important;
        margin: 0 !important;
    }

    .back-to-top {
        bottom: 55px; /* Moves the button exactly up from its default 28px position */
    }
}

/* Blocked printing and Save as PDF */
@media print {
    body {
        display: none !important;
    }
}