/* ==========================================================================
   Sameera Ayeshmantha - Reusable Component Styles
   ========================================================================== */

/* --- Glassmorphism Header & Navbar --- */
.navbar {
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 18px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    padding: 14px 5%;
    background: rgba(11, 15, 25, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.navbar .logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.navbar .logo span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    font-size: 14.5px;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 22px;
    cursor: pointer;
    padding: 6px;
}

/* --- Buttons --- */
.btn-primary,
.btn-contact {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    padding: 13px 30px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-bounce);
    box-shadow: 0 8px 20px var(--primary-glow);
    cursor: pointer;
    border: none;
}

.btn-primary:hover,
.btn-contact:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.45);
    color: #ffffff;
}

.btn-secondary,
.btn-outline {
    background: var(--surface-color);
    color: var(--text-main);
    padding: 12px 26px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-secondary:hover,
.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    transform: translateY(-3px);
}

.btn-view-all {
    background: var(--surface-color);
    color: var(--text-main);
    padding: 10px 22px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

.btn-view-all:hover {
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* --- Social Dock --- */
.social-dock {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 18px;
    transition: var(--transition-bounce);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(8px);
}

.social-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-6px) rotate(6deg);
    box-shadow: 0 10px 20px var(--primary-glow);
    border-color: var(--primary);
}

/* --- Filter Tabs (Portfolio Categorization) --- */
.portfolio-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 34px;
    justify-content: flex-start;
}

.filter-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 9px 22px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-btn:hover {
    color: var(--text-main);
    border-color: rgba(14, 165, 233, 0.35);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
    transform: translateY(-2px);
}


/* --- Portfolio Grid & Cards --- */
.portfolio-section {
    margin-bottom: 85px;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.portfolio-header .section-title {
    margin-bottom: 0;
}

.portfolio-header .section-subtitle {
    margin-top: 8px !important;
    margin-bottom: 0;
    line-height: 1.5;
}


.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.portfolio-item {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease, border-color 0.5s ease;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(14px);
    will-change: transform;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.slideshow-wrapper {
    position: relative;
    width: 100%;
    height: 285px;
    overflow: hidden;
    background: #000000;
}

.slides-container {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.slides-container a {
    display: block;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.slides-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-item:hover .slides-container img {
    transform: scale(1.04);
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 15, 25, 0.75);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: var(--transition-bounce);
    z-index: 2;
    opacity: 0;
}

@media (hover: none), (max-width: 768px) {
    .slide-btn {
        opacity: 0.92;
    }
}

.portfolio-item:hover .slide-btn {
    opacity: 1;
}

.slide-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.15);
}

.prev-btn { left: 12px; }
.next-btn { right: 12px; }

.slide-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 8px var(--primary);
}

.portfolio-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(11, 15, 25, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    z-index: 4;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.portfolio-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content h4 {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.portfolio-content p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 18px;
    flex: 1;
}

.portfolio-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
    gap: 12px;
}

.tech-tags-mini {
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.tech-tags-mini span {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11.5px;
}

.btn-live {
    color: var(--primary);
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(14, 165, 233, 0.08);
}

.btn-live:hover {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    transform: translateX(3px);
}

/* --- Contact Section & Form --- */
.contact-section {
    margin-bottom: 60px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    background: var(--surface-color);
    padding: 42px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
}

.contact-info-block {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-info-block p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 15px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition-smooth);
}

.info-item:hover {
    transform: translateX(6px);
}

.info-item i {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 18px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition: var(--transition-bounce);
}

.info-item:hover i {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.info-item div h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.info-item div span {
    color: var(--text-muted);
    font-size: 14px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-subtle);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(11, 15, 25, 0.95);
}

textarea.form-control {
    resize: vertical;
    min-height: 130px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px;
    border-radius: var(--radius-md);
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px var(--primary-glow);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.45);
}

.form-alert {
    padding: 15px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alertFadeIn 0.6s ease;
}

@keyframes alertFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-msg {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.error-msg {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-rose);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --- Premium Responsive Footer --- */
.footer {
    background: linear-gradient(180deg, rgba(8, 14, 26, 0.98) 0%, rgba(4, 7, 14, 1) 100%);
    border-top: 1px solid var(--border-subtle);
    padding: 70px 5% 30px;
    margin-top: auto;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), rgba(139, 92, 246, 0.5), transparent);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1.3fr;
    gap: 50px;
    margin-bottom: 45px;
    text-align: left;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 22px;
    position: relative;
    display: inline-block;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.footer-logo span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #34d399;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.22);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
    width: fit-content;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.06);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 22px;
    max-width: 460px;
}

.footer-social-dock {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-links li a {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links li a i {
    font-size: 11px;
    color: var(--primary);
    opacity: 0.7;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.footer-links li a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-links li a:hover i {
    transform: translateX(2px);
    opacity: 1;
}

/* Contact Items Styling */
.footer-contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact-info li {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-icon-box {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.contact-icon-box.icon-whatsapp {
    background: rgba(37, 211, 102, 0.08);
    border-color: rgba(37, 211, 102, 0.22);
    color: #25D366;
}

.footer-contact-info li:hover .contact-icon-box {
    transform: scale(1.08);
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.2);
}

.footer-contact-info li:hover .contact-icon-box.icon-whatsapp {
    border-color: #25D366;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.2);
}

.contact-text-wrap {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.contact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-dim);
    margin-bottom: 2px;
}

.contact-val {
    color: var(--text-main);
    font-size: 13.5px;
    text-decoration: none;
    transition: color 0.25s ease;
    word-break: break-word;
}

.contact-val:hover {
    color: var(--primary);
}

.contact-val.val-whatsapp {
    color: #34d399;
    font-weight: 500;
}

.contact-val.val-whatsapp:hover {
    color: #6ee7b7;
}

/* Bottom Bar */
.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.copyright {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    border: none;
}

.copyright strong {
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Responsive Media Queries --- */

/* 1. Tablets & Medium Screens (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer {
        padding: 55px 5% 25px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }
    .footer-col-brand {
        grid-column: span 2;
        max-width: 700px;
        margin-bottom: 10px;
    }
    .footer-desc {
        max-width: 100%;
    }
}

/* 2. Mobile Screens (<= 768px) */
@media (max-width: 768px) {
    .footer {
        padding: 50px 20px 25px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 38px;
        text-align: center;
    }
    .footer-col {
        align-items: center;
    }
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-desc {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        font-size: 13.5px;
    }
    .footer-status-badge {
        justify-content: center;
        text-align: center;
    }
    .footer-social-dock {
        justify-content: center;
    }
    /* Quick Links in 2 clean columns on mobile for compactness */
    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px 14px;
        width: 100%;
        max-width: 360px;
        text-align: left;
    }
    .footer-links li a {
        padding: 7px 10px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        font-size: 13px;
    }
    .footer-links li a:hover {
        transform: none;
        background: rgba(6, 182, 212, 0.08);
        border-color: rgba(6, 182, 212, 0.2);
    }
    .footer-contact-info {
        width: 100%;
        max-width: 360px;
    }
    .footer-contact-info li {
        justify-content: flex-start;
    }
    .contact-text-wrap {
        text-align: left;
    }
}

/* 3. Small Mobile Phones (<= 480px) */
@media (max-width: 480px) {
    .footer {
        padding: 45px 16px 20px;
    }
    .footer-grid {
        gap: 32px;
    }
    .footer-logo {
        font-size: 21px;
    }
    .footer-status-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    .footer-links {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
    .footer-contact-info {
        max-width: 100%;
    }
    .contact-val {
        font-size: 12.5px;
    }
    .copyright {
        font-size: 12px;
    }
}

/* --- Interactive CV Preview Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--text-main);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* --- Mobile Responsive Rules --- */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 14px 4%;
    }
    .navbar-nav {
        position: fixed;
        top: 65px;
        left: 0;
        width: 100%;
        background: rgba(11, 15, 25, 0.97);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        padding: 24px 6%;
        gap: 16px;
        display: none;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
        max-height: calc(100vh - 65px);
        overflow-y: auto;
        transform: translateY(-8px);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    }
    .navbar-nav.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
    .navbar-nav .nav-link {
        font-size: 16px;
        padding: 8px 0;
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-subtle);
        cursor: pointer;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-control {
        font-size: 16px; /* Eliminates iOS Safari auto-zoom on input focus */
        padding: 13px 15px;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .slideshow-wrapper {
        height: 245px;
    }
    .portfolio-filters {
        gap: 8px;
        margin-bottom: 24px;
        justify-content: center;
    }
    .filter-btn {
        padding: 8px 16px;
        font-size: 12.5px;
    }
    .contact-container {
        padding: 24px 18px;
    }
    .modal-card {
        margin: 12px;
        max-height: 88vh;
    }
    .modal-body {
        padding: 20px 16px;
    }
    .offline-architecture-box {
        padding: 18px 16px;
    }
}

@media (max-width: 420px) {
    .navbar .logo {
        font-size: 17px;
    }
    .btn-contact {
        padding: 8px 14px !important;
        font-size: 12.5px !important;
        gap: 6px;
    }
    .portfolio-badge,
    .portfolio-type-badge {
        font-size: 10.5px;
        padding: 3.5px 9px;
        top: 10px;
    }
    .portfolio-badge { left: 10px; }
    .portfolio-type-badge { right: 10px; }
    .slideshow-wrapper {
        height: 215px;
    }
    .portfolio-content {
        padding: 20px 16px;
    }
    .portfolio-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .portfolio-footer .btn-live,
    .portfolio-footer .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .tech-tags-mini {
        max-width: 100%;
    }
}

/* ==========================================================================
   Online / Offline Project Badges & Showcase Components
   ========================================================================== */
.portfolio-type-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(11, 15, 25, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: var(--transition-smooth);
    letter-spacing: 0.35px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.portfolio-type-badge.badge-live {
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(11, 15, 25, 0.94));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(16, 185, 129, 0.25);
}

.portfolio-type-badge.badge-offline {
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(11, 15, 25, 0.94));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(139, 92, 246, 0.25);
}

.portfolio-type-badge.badge-paused {
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(11, 15, 25, 0.94));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(245, 158, 11, 0.25);
}

.pulse-dot-green {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseDotGlow 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

.pulse-dot-amber {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: pulseDotAmberGlow 2.2s infinite ease-in-out;
}

@keyframes pulseDotGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes pulseDotAmberGlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.85);
        box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
    }
}

/* Secondary Filter / Type Switcher */
.type-filter-group {
    display: inline-flex;
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 4px;
    gap: 4px;
    margin-top: 14px;
}

.type-filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.type-filter-btn:hover {
    color: var(--text-main);
}

.type-filter-btn.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(139, 92, 246, 0.25));
    color: #ffffff;
    border: 1px solid rgba(14, 165, 233, 0.4);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.2);
}

/* Offline Architecture Showcase Box in Details View */
.offline-architecture-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}

.offline-architecture-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.offline-arch-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.offline-arch-header h4 {
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.offline-arch-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.2);
    color: #d8b4fe;
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.demo-paused-notice {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fde68a;
    padding: 14px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    margin-top: 15px;
}

