/* ==========================================================================
   Modern Section Redesign — extends home glass/modality aesthetic sitewide
   ========================================================================== */

:root {
    --glass-surface: rgba(255, 255, 255, 0.06);
    --glass-surface-strong: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-blur: 22px;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-soft: 0 20px 50px rgba(15, 12, 41, 0.08);
    --shadow-elevated: 0 28px 60px rgba(15, 12, 41, 0.14);
    --section-max: 1180px;
}

body.dark {
    --glass-surface: rgba(255, 255, 255, 0.04);
    --glass-surface-strong: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.35);
    --shadow-elevated: 0 32px 70px rgba(0, 0, 0, 0.45);
}

/* Ambient section backgrounds — theme-aware, intro-card gradient feel */
.section {
    background:
        radial-gradient(ellipse 90% 60% at 10% 5%, color-mix(in srgb, var(--skin-color) 18%, transparent), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 10%, color-mix(in srgb, var(--skin-color) 12%, transparent), transparent 50%),
        radial-gradient(ellipse 80% 50% at 50% 100%, color-mix(in srgb, var(--skin-color) 10%, transparent), transparent 58%),
        linear-gradient(160deg, var(--bg-black-900) 0%, var(--bg-black-100) 45%, var(--bg-black-900) 100%) !important;
}

body.dark .section {
    background:
        radial-gradient(ellipse 90% 60% at 10% 5%, color-mix(in srgb, var(--skin-color) 22%, transparent), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 10%, color-mix(in srgb, var(--skin-color) 14%, transparent), transparent 50%),
        radial-gradient(ellipse 80% 50% at 50% 100%, color-mix(in srgb, var(--skin-color) 12%, transparent), transparent 58%),
        linear-gradient(160deg, var(--bg-black-900) 0%, var(--bg-black-100) 40%, var(--bg-black-900) 100%) !important;
}

.section .container {
    padding-bottom: 48px !important;
}

#services.section .container,
.service .container {
    padding-top: 24px !important;
}

#services .section-title {
    margin-bottom: 28px !important;
}

#contact .container {
    padding-bottom: 32px !important;
}

.section:not(#home) .container {
    max-width: var(--section-max);
}
.section:not(#home) .section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section:not(#home) .section-title h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
    display: inline-block;
}

.section:not(#home) .section-title h2::before,
.section:not(#home) .section-title h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.section:not(#home) .section-title h2::after {
    margin-top: 10px;
    width: 18px;
    opacity: 0.65;
}

/* Shared glass panel */
.glass-panel,
.about-card,
.timeline.shadow-dark,
.portfolio-card,
.contact-card,
.service .service-item .service-item-inner {
    background: linear-gradient(145deg, var(--glass-surface-strong), var(--glass-surface)) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border) !important;
    border-image: none !important;
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* About */
.about .about-content .about-text {
    margin-bottom: 8px;
}

.about-card {
    border-radius: var(--radius-xl);
    padding: clamp(28px, 4vw, 48px);
}

.about-card h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    line-height: 1.45;
    letter-spacing: -0.02em;
}

.about-card::after {
    display: none;
}

.about .about-content .personal-info {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-top: 24px;
}

.about-info-row .personal-info {
    margin-top: 0;
    background: linear-gradient(145deg, var(--glass-surface-strong), var(--glass-surface));
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    box-shadow: var(--shadow-soft);
}

.about .about-content .personal-info .info-item p {
    border-bottom-color: var(--glass-border);
    padding: 14px 0;
    font-size: 15px;
}

.skills-block-row .skills {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-top: 28px !important;
}

.skills-section-header {
    text-align: center;
    margin-bottom: 20px;
}

.skills-eyebrow {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--skin-color);
    font-weight: 700;
    margin-bottom: 8px;
}

.skills-title {
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
    color: var(--text-black-900);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.skills-subtitle {
    color: var(--text-black-700);
    font-size: 15px;
    line-height: 1.55;
    max-width: 560px;
    margin: 0 auto;
}

.skills-slider {
    border-radius: 0 !important;
    border: none !important;
    border-image: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow: visible !important;
    position: relative;
}

.skills-slider::after {
    display: none;
}

.skills-slider:hover {
    transform: none !important;
    box-shadow: none !important;
}

.slider-content {
    min-height: 0 !important;
}

.slide-header {
    margin-bottom: 12px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.slide-header:hover {
    transform: none !important;
    box-shadow: none !important;
}

.slide-header h3 {
    font-size: 1.2rem !important;
    letter-spacing: -0.01em;
}

.skill-tools span,
.skill-tools a {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    min-width: 110px;
    margin: 0;
}

.slider-navigation {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    width: 100% !important;
    margin-top: 16px !important;
    padding: 8px 0 4px !important;
    z-index: 2;
}

.skills-slider .slider-pagination {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    position: relative !important;
    width: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    flex: 0 0 auto;
    order: 2;
}

.skills-slider .slider-arrow {
    flex: 0 0 36px;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.skills-slider .slider-arrow.prev-arrow {
    order: 1;
}

.skills-slider .slider-arrow.next-arrow {
    order: 3;
}

.skills-slider .pagination-dot {
    flex: 0 0 12px;
    width: 12px !important;
    height: 12px !important;
    min-width: 12px;
    min-height: 12px;
}

/* Timeline */
.timeline-tabs {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 6px;
    gap: 6px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(12px);
}

.tab-btn {
    flex: 1;
    justify-content: center;
    border: none !important;
    border-image: none !important;
    border-radius: 999px !important;
    padding: 12px 20px !important;
    box-shadow: none !important;
    background: transparent !important;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--skin-color), color-mix(in srgb, var(--skin-color) 80%, white)) !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(var(--skin-color-rgb, 236, 24, 57), 0.35) !important;
}

.tab-btn.active i {
    color: #fff;
}

.about .about-content .timeline {
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    border: 1px solid var(--glass-border);
}

.about .about-content .timeline .timeline-item {
    padding-left: 36px;
    margin-bottom: 28px;
}

.about .about-content .timeline .timeline-text {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    line-height: 1.7;
    font-size: 15px;
}

.about .about-content .timeline .circle-dot {
    width: 14px;
    height: 14px;
    box-shadow: 0 0 0 4px rgba(var(--skin-color-rgb, 236, 24, 57), 0.2);
}

/* Services — bento-style grid */
.service .row {
    gap: 20px 0;
}

.service .service-item {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding-left: 12px;
    padding-right: 12px;
}

.service .service-item .service-item-inner {
    border-radius: var(--radius-lg) !important;
    padding: 36px 28px !important;
    height: 100%;
    text-align: center !important;
}

.service .service-item .service-item-inner .icon {
    margin: 0 auto 24px !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(var(--skin-color-rgb, 236, 24, 57), 0.2), rgba(var(--skin-color-rgb, 236, 24, 57), 0.05)) !important;
}

.service .service-item .service-item-inner .icon .fa {
    line-height: 1 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service .service-item .service-item-inner:hover .icon {
    transform: scale(1.08) !important;
}

.service .service-item .service-item-inner:hover .icon .fa {
    font-size: 32px !important;
}

.service .service-item .service-item-inner h4 {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.service .service-item .service-item-inner p {
    font-size: 14px;
    line-height: 1.65;
    opacity: 0.92;
}

/* Portfolio */
.portfolio-heading h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
    color: var(--text-black-900);
    margin-bottom: 8px;
}

.portfolio-card {
    border-radius: var(--radius-xl) !important;
    padding: clamp(24px, 4vw, 44px) !important;
}

.project-preview {
    gap: clamp(24px, 4vw, 48px);
    align-items: stretch;
}

.project-images {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.main-image {
    height: 320px;
    border-radius: var(--radius-md);
}

.project-info h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
}

.tech-tag {
    background: rgba(var(--skin-color-rgb, 236, 24, 57), 0.1);
    border-color: rgba(var(--skin-color-rgb, 236, 24, 57), 0.2);
    color: var(--text-black-900);
}

.view-project-btn {
    background: linear-gradient(135deg, var(--skin-color), color-mix(in srgb, var(--skin-color) 75%, #6366f1)) !important;
    border-radius: 999px;
    padding: 14px 28px;
}

.slider-nav .nav-btn {
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-surface-strong);
    backdrop-filter: blur(10px);
}

.slider-dots .dot.active {
    width: 28px;
    border-radius: 999px;
}

/* Contact */
.contact-card {
    border-radius: var(--radius-xl) !important;
    padding: clamp(28px, 5vw, 52px) !important;
}

.contact-header .contact-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: -0.02em;
}

.contact .contact-info-item {
    flex: 0 0 50%;
    max-width: 50%;
}

.contact-info-inner {
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    height: 100%;
}

.contact .contact-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(12px);
}

.contact .contact-form .form-item .form-control {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-black-900);
    padding: 14px 18px;
}

.contact .contact-form .form-item .form-control:focus {
    border-color: var(--skin-color);
    box-shadow: 0 0 0 3px rgba(var(--skin-color-rgb, 236, 24, 57), 0.15);
}

/* Modal polish */
.modal-content {
    border-radius: var(--radius-xl) !important;
    border: 1px solid var(--glass-border) !important;
    background: linear-gradient(160deg, var(--bg-black-100), var(--bg-black-900)) !important;
}

.modal-project .detail-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    margin-bottom: 16px;
}

/* Footer — hidden unless contact section is active */
footer {
    display: none;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--skin-color) 6%, transparent)) !important;
    border-top: 1px solid var(--glass-border);
    padding: 28px 0 32px !important;
    margin-top: 0 !important;
    width: 100%;
    justify-content: center;
}

body.footer-visible footer {
    display: flex;
}

footer .container {
    max-width: var(--section-max);
}

footer .row {
    justify-content: center;
    width: 100%;
}

.footer-content {
    flex: 0 0 100%;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    opacity: 0.85;
    font-size: 14px;
}

/* ==========================================================================
   Sidebar Navigation — glass aesthetic, refined brand mark
   ========================================================================== */

.aside {
    position: fixed;
    top: 0;
    height: 100%;
    z-index: 1000;
    background: var(--bg-black-100) !important;
    border-right: 1px solid var(--glass-border) !important;
    box-shadow: 8px 0 32px rgba(15, 12, 41, 0.06);
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 50px 30px 30px !important;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Desktop: persistent sidebar */
@media (min-width: 1200px) {
    .aside {
        left: 0;
        width: 270px;
    }

    .nav-toggler {
        display: none !important;
    }
}

.aside::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 40% at 50% 0%, color-mix(in srgb, var(--skin-color) 14%, transparent), transparent 55%),
        linear-gradient(180deg, var(--bg-black-100) 0%, color-mix(in srgb, var(--bg-black-100) 92%, var(--skin-color)) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

body.dark .aside::before {
    background:
        radial-gradient(ellipse 120% 40% at 50% 0%, color-mix(in srgb, var(--skin-color) 18%, transparent), transparent 55%),
        linear-gradient(180deg, var(--bg-black-100) 0%, color-mix(in srgb, var(--bg-black-100) 88%, var(--skin-color)) 100%);
}

body.dark .aside {
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.25);
}

.aside nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    z-index: 1;
    flex: 1;
}

.aside .logo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex-shrink: 0;
    text-align: center;
}

.aside .logo a,
.aside .logo a.brand-link {
    flex-direction: column;
    gap: 0;
    padding: 10px 15px;
    letter-spacing: 0;
    width: 100%;
}

.aside .logo a::before,
.aside .logo a::after {
    display: none !important;
}

.aside .logo-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.aside .logo-text-line1,
.aside .logo-text-line2 {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    line-height: 1.2 !important;
    -webkit-text-fill-color: initial;
    background: none !important;
    overflow: visible;
}

.aside .logo-text-line1 {
    color: var(--text-black-900);
}

.aside .logo-text-line2 {
    color: var(--skin-color);
    font-weight: 800 !important;
    letter-spacing: 0.14em !important;
}

.aside .logo-text-line1::before,
.aside .logo-text-line2::before {
    display: none;
}

.aside .logo-tagline {
    display: block;
    margin-top: 12px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-black-700);
    opacity: 0.8;
    line-height: 1.5;
    white-space: nowrap;
}

.aside .logo a:hover {
    transform: translateY(-3px);
}

.aside .logo a:hover .logo-text-line1,
.aside .logo a:hover .logo-text-line2 {
    transform: none;
}

.aside .nav {
    margin-top: 50px !important;
    width: 100%;
    flex-shrink: 0;
}

.aside .nav li {
    margin-bottom: 8px;
}

.aside .nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 14px;
    border-bottom: none !important;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-black-700);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.aside .nav li a i {
    width: 18px;
    margin-right: 0;
    text-align: center;
    font-size: 15px;
    color: var(--text-black-700);
    transition: color 0.25s ease, transform 0.25s ease;
}

.aside .nav li a:hover {
    background: var(--glass-surface);
    color: var(--text-black-900);
    transform: translateX(3px);
}

.aside .nav li a:hover i {
    color: var(--skin-color);
    transform: scale(1.08);
}

.aside .nav li a.active {
    background: linear-gradient(135deg, var(--skin-color), color-mix(in srgb, var(--skin-color) 78%, #ffffff));
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(var(--skin-color-rgb, 236, 24, 57), 0.28);
}

.aside .nav li a.active:hover {
    transform: none;
    color: #ffffff !important;
}

.aside .nav li a.active i {
    color: #ffffff !important;
}

.nav-toggler {
    border-radius: 12px !important;
    border: 1px solid var(--glass-border) !important;
    background: linear-gradient(145deg, var(--glass-surface-strong), var(--glass-surface)) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1002;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.nav-toggler:hover {
    border-color: color-mix(in srgb, var(--skin-color) 28%, var(--glass-border)) !important;
    box-shadow: 0 4px 16px rgba(15, 12, 41, 0.1), 0 0 0 1px color-mix(in srgb, var(--skin-color) 12%, transparent) !important;
}

.nav-toggler:active {
    transform: scale(0.96);
}

.nav-toggler:focus {
    outline: none !important;
}

.nav-toggler:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--skin-color) 42%, transparent), var(--shadow-soft) !important;
}

.nav-toggler.open {
    border-color: color-mix(in srgb, var(--skin-color) 32%, var(--glass-border)) !important;
    background: linear-gradient(145deg, color-mix(in srgb, var(--skin-color) 10%, var(--glass-surface-strong)), var(--glass-surface)) !important;
}

.nav-toggler span,
.nav-toggler span::before,
.nav-toggler span::after {
    border-radius: 2px;
    transition: transform 0.3s ease, background 0.3s ease;
}

/* Mobile / tablet: off-canvas sidebar + hamburger */
@media (max-width: 1199px) {
    body:has(.aside.open) footer {
        display: none !important;
    }

    .aside {
        left: -270px;
        width: 270px;
        height: 100vh;
        height: 100dvh;
        min-height: 100%;
        z-index: 1001;
        transition: left 0.3s ease;
    }

    .aside.open {
        left: 0;
    }

    .nav-toggler {
        display: flex !important;
        left: 30px;
        top: 20px;
        height: 40px;
        width: 45px;
    }

    .nav-toggler.open {
        left: 300px;
    }

    .section {
        left: 0;
    }

    .section.open {
        left: 270px;
    }

    /* Center section headings on smaller screens */
    .section-title {
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto;
        margin-right: auto;
        text-align: center !important;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .section-title h2 {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .portfolio .portfolio-heading {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 15px !important;
        padding-right: 15px !important;
        text-align: center;
    }

    .portfolio .portfolio-heading h2 {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        display: inline-block;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .aside {
        padding: 50px 28px 32px !important;
    }

    .aside .logo-text-line1,
    .aside .logo-text-line2 {
        font-size: 20px !important;
    }

    .aside .logo-tagline {
        font-size: 9px;
        margin-top: 14px;
    }

    .aside .nav {
        margin-top: 50px !important;
    }

    .aside .nav li {
        margin-bottom: 10px;
    }

    .aside .nav li a {
        padding: 15px 18px;
        font-size: 16px;
    }

    .about .about-content .personal-info,
    .about .about-content .skills {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .service .service-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .contact .contact-info-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .project-preview {
        flex-direction: column;
    }

    .project-images {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .aside {
        left: -100vw;
        width: 100vw;
    }

    .aside.open {
        left: 0;
    }

    .nav-toggler.open {
        left: 30px;
    }

    .section.open {
        left: 0;
    }

    .service .service-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .timeline-tabs {
        max-width: 100%;
    }

    .tab-btn {
        font-size: 14px;
        padding: 10px 14px !important;
    }
}
