:root {
    --bg-dark: #070a13;
    --bg-darker: #04060c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 59, 48, 0.25);
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --accent-red: #ff3b30;
    --accent-red-glow: rgba(255, 59, 48, 0.15);
    --glass-blur: blur(12px);
}

html {
    scroll-behavior: smooth;
}

html, body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
    width: 100%;
    position: relative;
}

/* Ambient glows */
.ambient-glow-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.cs-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}
.glow-red {
    background: radial-gradient(circle, var(--accent-red) 0%, transparent 70%);
    width: 600px;
    height: 600px;
}
.glow-teal {
    background: radial-gradient(circle, #76ABAE 0%, transparent 70%);
    width: 500px;
    height: 500px;
}

/* Typography */
.font-syne {
    font-family: 'Syne', sans-serif;
}

.gradient-text-red {
    background: linear-gradient(135deg, #ffffff 40%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cs-title-sub {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-red);
    display: inline-block;
    margin-bottom: 1rem;
}

/* Section layouts */
.cs-section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cs-section-header {
    margin-bottom: 4rem;
}

.cs-section-title {
    font-family: 'Syne', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

/* Glassmorphism Header */
.portfolio-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(7, 10, 19, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem 2rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.portfolio-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-brand {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff !important;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.portfolio-brand span {
    color: var(--accent-red);
}

.portfolio-nav {
    display: flex;
    gap: 1.8rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portfolio-nav-link {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: capitalize;
    text-decoration: none;
    transition: all 0.25s ease;
    padding: 0.25rem 0;
}

.portfolio-nav-link:hover {
    color: #ffffff !important;
}

.portfolio-socials {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portfolio-socials a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.15rem;
    transition: color 0.25s ease;
}

.portfolio-socials a:hover {
    color: var(--accent-red);
}

.portfolio-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.portfolio-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Premium Placeholder Boxes */
.premium-placeholder {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 59, 48, 0.02) 100%);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'DM Sans', monospace;
    font-size: 0.85rem;
    padding: 2.5rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
}

.premium-placeholder:hover {
    border-color: var(--accent-red);
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px var(--accent-red-glow);
}

.premium-placeholder i {
    font-size: 2.5rem;
    color: var(--accent-red);
    margin-bottom: 12px;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.premium-placeholder:hover i {
    transform: scale(1.1);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 3.5rem;
}

.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s ease;
}

.stats-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.stats-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stats-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.2rem;
    backdrop-filter: var(--glass-blur);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.bento-card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.bento-card-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0;
}

.bento-span-7 { grid-column: span 7; }
.bento-span-5 { grid-column: span 5; }
.bento-span-6 { grid-column: span 6; }
.bento-span-12 { grid-column: span 12; }

/* Trust Cards (What I Solved) */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
}

.trust-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    transition: all 0.3s ease;
}

.trust-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 59, 48, 0.02);
    transform: translateY(-4px);
}

.trust-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.trust-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: #ffffff;
}

.trust-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Old vs New Section styles */
.comp-container {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
}

.comp-title-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1rem;
}

.comp-title-old {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.comp-title-new {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.25);
    color: var(--accent-red);
}

.comp-connector-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.comp-arrow-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-red);
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.15);
    z-index: 5;
}

.comp-line {
    position: absolute;
    width: 1px;
    height: 80%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.05) 20%, rgba(255, 59, 48, 0.25) 50%, rgba(255, 255, 255, 0.05) 80%, transparent);
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.improvement-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    height: 100%;
    transition: all 0.3s ease;
}

.improvement-pill:hover {
    border-color: rgba(255, 59, 48, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.improvement-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.improvement-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

/* Sticky Columns */
.sticky-wrapper {
    position: sticky;
    top: 120px;
}

.sticky-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.sticky-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.sticky-card-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.sticky-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.sticky-card-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Mobile Layout Pointers */
.mobile-pointers {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    gap: 1.25rem;
}

.pointer-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pointer-item:hover {
    border-color: var(--accent-red);
    transform: translateX(5px);
    background: var(--bg-card-hover);
}

.pointer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.4rem;
}

.pointer-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-red);
}

.pointer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

.pointer-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.45;
}

/* Timeline Flow Scrollable */
.timeline-container {
    position: relative;
    margin-top: 2rem;
}

.timeline-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0.5rem 2.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.timeline-scroll::-webkit-scrollbar {
    height: 6px;
}

.timeline-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.timeline-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.timeline-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

.timeline-node {
    flex: 0 0 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem 1.8rem;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-node:hover {
    border-color: var(--accent-red);
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

.timeline-num {
    font-family: 'Syne', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 59, 48, 0.08);
    position: absolute;
    top: 10px;
    right: 18px;
    line-height: 1;
}

.timeline-icon {
    font-size: 1.5rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.timeline-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.timeline-details {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Design System Showcase */
.ds-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.ds-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.8rem;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ds-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.ds-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

/* Results Cards */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.result-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255, 59, 48, 0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.2rem;
    text-align: center;
    backdrop-filter: var(--glass-blur);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-card:hover {
    border-color: rgba(255, 59, 48, 0.35);
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255, 59, 48, 0.03) 100%);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-red-glow);
}

.result-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    font-size: 1.6rem;
    margin: 0 auto 1.5rem;
}

.result-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.8rem;
}

.result-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Accessible back button */
.back-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 8px 18px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    margin-bottom: 2.5rem !important;
    transition: all 0.3s ease !important;
}

.back-link:hover {
    color: #ffffff !important;
    background: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
    transform: translateX(-5px) !important;
    box-shadow: 0 8px 20px rgba(255, 59, 48, 0.3) !important;
}

.back-link svg {
    transition: transform 0.3s ease !important;
}

.back-link:hover svg {
    transform: translateX(-3px) !important;
}

/* Footer styling alignment */
.portfolio-footer {
    background: var(--bg-darker);
    padding: 4rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
    z-index: 10;
}

.portfolio-footer-logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff !important;
    text-decoration: none;
    margin-bottom: 1rem;
    display: inline-block;
}

.portfolio-footer-logo span {
    color: var(--accent-red);
}

.portfolio-footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.5rem;
}

.portfolio-footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portfolio-footer-socials a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.3rem;
    transition: all 0.25s ease;
}

.portfolio-footer-socials a:hover {
    color: var(--accent-red);
    transform: translateY(-2px);
}

/* CSS Phone Mockup */
.phone-mockup {
    border: 12px solid #232731;
    border-radius: 36px;
    background: var(--bg-darker);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 290px;
    height: 580px;
    margin: 0 auto;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 18px;
    background: #232731;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Responsive Breakpoints */
@media (max-width: 1199px) {
    .trust-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ds-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .cs-section {
        padding: 70px 0;
    }
    .cs-section-title {
        font-size: 2.2rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
    .comp-connector-col {
        padding: 1.5rem 0;
    }
    .comp-arrow-circle {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
    .comp-line {
        width: 80%;
        height: 1px;
        top: 50%;
        left: 10%;
        transform: translateY(-50%);
    }
    .portfolio-header {
        padding: 1rem 1.5rem;
    }
    .portfolio-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(7, 10, 19, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1.5rem;
        gap: 1.2rem;
        z-index: 999;
    }
    .portfolio-nav.mobile-active {
        display: flex;
    }
    .portfolio-socials {
        display: none;
    }
    .portfolio-hamburger {
        display: block;
    }
}

@media (max-width: 575px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .trust-grid {
        grid-template-columns: 1fr;
    }
    .ds-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll Reveal Animation Styles */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Animations */
@keyframes floatLaptop {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes floatMobile {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
    100% { transform: translateY(0px); }
}

.float-laptop {
    animation: floatLaptop 6s ease-in-out infinite;
}

.float-mobile {
    animation: floatMobile 5s ease-in-out infinite;
}

/* Hover Scale Interactions */
.hover-scale {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.hover-scale:hover {
    transform: scale(1.05);
}
