/* =============================================================
   MAIN.CSS - Personal Website Styles
   Extracted from inline styles for modularity
   ============================================================= */

/* ===== VIDEO BACKGROUND ===== */
#home {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: 100vw;
    max-width: 100%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
    background: url('../assets/jellyfish.png') no-repeat;
    background-size: cover;
    filter: brightness(2.5);
}

/* ===== HERO HEADING ===== */
.heading h1, .heading p, .heading h3 {
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.heading .hero-subtitle {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #00d2be;
    text-shadow: 0 2px 12px rgba(0, 210, 190, 0.35);
    margin-top: 0.6rem;
}

.heading .hero-subtitle .hero-sep {
    display: inline-block;
    margin: 0 0.65em;
    color: rgba(255, 255, 255, 0.3);
}

/* ===== HERO FLUID BRIDGE (F1 Track Blend) ===== */
.hero-fluid-bridge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(100px, 21vmin, 240px);
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.hero-fluid-glow {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 18%;
    height: 75%;
    background: radial-gradient(ellipse 55% 45% at 50% 100%,
        rgba(77, 208, 225, 0.28) 0%,
        rgba(0, 196, 176, 0.08) 42%,
        transparent 70%);
    animation: heroFluidGlow 7s ease-in-out infinite alternate;
}

@keyframes heroFluidGlow {
    from { opacity: 0.65; transform: scaleX(0.94) translateY(2px); }
    to { opacity: 1; transform: scaleX(1.06) translateY(-2px); }
}

.hero-fluid-svg {
    position: absolute;
    left: -5%;
    width: 110%;
    bottom: 0;
    height: 72%;
    display: block;
}

.hero-wave-back {
    animation: heroWaveDriftA 16s ease-in-out infinite alternate;
    transform-origin: 50% 100%;
}

.hero-wave-front {
    animation: heroWaveDriftB 11s ease-in-out infinite alternate;
    transform-origin: 50% 100%;
}

@keyframes heroWaveDriftA {
    from { transform: translateX(-2.5%) scaleY(1); }
    to { transform: translateX(2.5%) scaleY(1.08); }
}

@keyframes heroWaveDriftB {
    from { transform: translateX(2%) scaleY(1.06); }
    to { transform: translateX(-2%) scaleY(0.98); }
}

.hero-fluid-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background:
        repeating-linear-gradient(90deg,
            transparent 0px,
            transparent 14px,
            rgba(0, 196, 176, 0.04) 14px,
            rgba(0, 196, 176, 0.04) 15px),
        linear-gradient(180deg,
            transparent 0%,
            rgba(6, 9, 13, 0.55) 35%,
            #06090d 100%);
}

@media (prefers-reduced-motion: reduce) {
    .hero-fluid-glow,
    .hero-wave-back,
    .hero-wave-front {
        animation: none;
    }
}

/* ===== BLOG / UPDATES CARDS ===== */
.post-box {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

/* ===== SECTION DIVIDER (Portfolio → Contact) ===== */
.section-divider-trace {
    position: relative;
    height: 64px;
    background: #090c10;
    overflow: hidden;
}

.section-divider-trace::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0,196,176,0.06) 12%,
        rgba(0,196,176,0.22) 35%,
        rgba(0,210,190,0.45) 50%,
        rgba(0,196,176,0.22) 65%,
        rgba(0,196,176,0.06) 88%,
        transparent 100%);
}

.section-divider-trace::after {
    content: '';
    position: absolute;
    top: calc(50% - 4px);
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d2be;
    box-shadow: 0 0 12px 3px rgba(0,210,190,0.4), 0 0 32px 6px rgba(0,210,190,0.15);
    transform: translateX(-50%);
    animation: dividerPulse 3s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(0.85); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

.divider-ticks {
    position: absolute;
    top: calc(50% - 0.5px);
    left: 10%;
    right: 10%;
    height: 1px;
    background: repeating-linear-gradient(90deg,
        transparent 0px,
        transparent 24px,
        rgba(0,196,176,0.1) 24px,
        rgba(0,196,176,0.1) 25px);
}

/* ===== CONTACT SECTION (Dark Theme) ===== */
#contact {
    background: linear-gradient(180deg, #090c10 0%, #0a0d10 100%) !important;
    padding: 0 !important;
}

.contact-wrap {
    max-width: 620px;
    margin: 0 auto;
    padding: 5rem 1.25rem 3.5rem;
}

.contact-wrap h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #f2f6f8;
    margin-bottom: 0.2rem;
    letter-spacing: 0.03em;
}

.contact-wrap .contact-rule {
    width: 56px;
    height: 2px;
    background: #00c4b0;
    border: none;
    margin: 0.75rem 0 2rem;
}

.contact-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    margin-bottom: 2.5rem;
}

.contact-channels a,
.contact-channels span {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    color: #a8b8c4;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.contact-channels a:hover {
    color: #00d2be;
}

.contact-channels .fa {
    font-size: 1rem;
    color: #00c4b0;
    width: 1.1rem;
    text-align: center;
}

/* ===== CONTACT FORM (Dark) ===== */
.contact-form-dark label {
    display: block;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7d8a96;
    margin-bottom: 0.4rem;
}

.contact-form-dark input[type="text"],
.contact-form-dark input[type="email"],
.contact-form-dark textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 196, 176, 0.18);
    border-radius: 3px;
    padding: 0.72rem 0.85rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.88rem;
    color: #e0e8ee;
    margin-bottom: 1.35rem;
    transition: border-color 0.25s, background 0.25s;
    outline: none;
    resize: vertical;
}

.contact-form-dark input[type="text"]:focus,
.contact-form-dark input[type="email"]:focus,
.contact-form-dark textarea:focus {
    border-color: #00c4b0;
    background: rgba(0, 196, 176, 0.06);
}

.contact-form-dark textarea {
    min-height: 130px;
}

.contact-form-dark input[type="text"]::placeholder,
.contact-form-dark input[type="email"]::placeholder,
.contact-form-dark textarea::placeholder {
    color: #4e5c66;
}

.contact-form-dark button[type="submit"] {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #0a0d10;
    background: #00c4b0;
    border: none;
    padding: 0.75rem 2.2rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
}

.contact-form-dark button[type="submit"]:hover {
    background: #00e0ca;
    transform: translateY(-1px);
}

/* ===== FOOTER (Inside Contact) ===== */
#contact .copyrights {
    background: #080b0e;
    border-top: 1px solid rgba(0, 196, 176, 0.08);
}

#contact .footer-links a {
    color: #6b7785;
}

#contact .footer-links a:hover {
    color: #00c4b0;
}

#contact .footer-company-name {
    color: #4a535d;
}

#contact .footer-company-name a {
    color: #7d8a96;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
#blog,
#portfolio,
#contact {
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

#bubble-canvas,
#f1-telemetry-canvas,
#portfolio-canvas {
    will-change: transform;
}

/* ===== GALLERY TITLE OVERLAY ===== */
.gallery-single .gallery-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.85);
    text-align: center;
    z-index: 2;
    pointer-events: none;
    font-size: 16px;
    line-height: 1.3;
    padding: 0 10px;
}

/* ===== FORM RESPONSIVE FIX ===== */
@media (max-width: 600px) {
    form, input, textarea, .formgroup, .formgroup-active, .formgroup-error {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }
    #form {
        padding: 0 15px;
    }
}

/* ===== MERCEDES ACCENT (F1 Teal) ===== */
.update-mercedes .date {
    background: #00D2BE !important;
}

/* ===== UPDATES CAROUSEL ===== */
.updates-carousel .post-box {
    margin: 0 10px 20px;
    background: #fff;
}

.updates-carousel .owl-dots {
    text-align: center;
    margin-top: 20px;
}

.updates-carousel .owl-dot span {
    width: 12px;
    height: 12px;
    margin: 5px;
    background: #ccc;
    display: inline-block;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.updates-carousel .owl-dot.active span {
    background: #1e2a32;
}

.updates-carousel .owl-nav {
    position: absolute;
    top: 40%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.updates-carousel .owl-prev,
.updates-carousel .owl-next {
    pointer-events: auto;
    background: rgba(45, 66, 72, 0.7) !important;
    color: #fff !important;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    line-height: 40px !important;
    text-align: center;
    font-size: 22px !important;
    transition: background 0.3s ease;
}

.updates-carousel .owl-prev:hover,
.updates-carousel .owl-next:hover {
    background: rgba(45, 66, 72, 1) !important;
}

.updates-carousel .owl-prev {
    margin-left: -20px;
}

.updates-carousel .owl-next {
    margin-right: -20px;
}

/* ===== 3D BUBBLE CANVAS ===== */
#bubble-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.heading {
    z-index: 3;
    pointer-events: none;
}

.heading a, .heading button {
    pointer-events: auto;
}

#bubble-click-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

/* ===== ABOUT / F1-ML SECTION ===== */
.f1-ml-section {
    position: relative;
    overflow: hidden;
    margin-top: -1px;
    color: #e8eaed;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
    border-bottom: 1px solid rgba(0, 196, 176, 0.1);
    background-color: #05070a;
    background-image:
        linear-gradient(180deg, #070b10 0%, #0a1016 14%, rgba(6, 8, 11, 0.92) 38%, transparent 62%),
        radial-gradient(ellipse 125% 80% at 50% -18%, #1a2832 0%, #101820 35%, transparent 58%);
}

.f1-ml-name {
    color: #f7f8fa;
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

.f1-ml-tagline {
    color: #00c4b0;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.f1-ml-section .section-title h3 {
    color: #f2f4f7;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.f1-ml-section .section-title p {
    color: #9aa3ad;
    max-width: 44rem;
}

.f1-ml-wrap {
    position: relative;
    min-height: 580px;
}

.f1-ml-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 0;
    pointer-events: none;
    z-index: 1;
}

.f1-ml-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0;
    pointer-events: none;
    z-index: 1;
}

#f1-telemetry-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: auto;
}

.f1-ml-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.f1-ml-content a,
.f1-ml-content button {
    pointer-events: auto;
}

.f1-ml-lead {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #c5ccd4;
    margin-bottom: 1.25rem;
}

.f1-copy-mobile {
    display: none;
}

.f1-copy-desktop {
    display: block;
}

.f1-ml-chips {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.f1-ml-chips li {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #00c4b0;
    border: 1px solid rgba(0, 196, 176, 0.35);
    padding: 0.35rem 0.65rem;
    border-radius: 2px;
    background: rgba(0, 196, 176, 0.06);
}

/* ===== LIGHT SECTIONS (Portfolio / Lower Blocks) ===== */
.section-surface-muted {
    background: linear-gradient(180deg, #dde3e8 0%, #e8ecf0 55%, #eef1f4 100%);
    color: #2a343c;
}

/* Recent Updates: Tall Blend Strip */
#blog.section-surface-muted.section-after-dark {
    --blog-blend: min(520px, 52vh);
    background-color: #eef1f4;
    background-image: linear-gradient(180deg,
        #05070a 0%,
        #0a1016 5%,
        #111920 9%,
        #18242d 12%,
        #1f2f38 15%,
        #273b46 18%,
        #304854 21%,
        #3a5663 24%,
        #456572 28%,
        #517581 32%,
        #5f8690 36%,
        #6f97a0 40%,
        #81a8b0 44%,
        #94b8bf 48%,
        #a9c7cd 52%,
        #bfd5da 56%,
        #d3e2e5 60%,
        #e2ebee 65%,
        #ebf1f3 72%,
        #eef1f4 82%,
        #f1f3f6 100%);
    background-size: 100% var(--blog-blend);
    background-repeat: no-repeat;
    background-position: top center;
}

.section-surface-muted .section-title h3 {
    color: #1e2a32;
}

.section-surface-muted .section-title p {
    color: #5a6670;
}

#blog .section-title h3 {
    color: #f2f6f8;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

#blog .section-title p {
    color: #b8c9d2;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* ===== PORTFOLIO (Interactive Spatial Graph) ===== */
#portfolio.portfolio-graph {
    background: linear-gradient(180deg, #f1f3f6 0%, #8b9ba8 5%, #3a4650 10%, #1a2229 16%, #0d1116 24%, #090c10 100%);
    padding: 0 !important;
    position: relative;
    overflow: hidden;
}

.portfolio-graph-wrap {
    position: relative;
    min-height: 880px;
}

#portfolio-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    cursor: default;
}

.portfolio-graph-ui {
    position: relative;
    z-index: 2;
    pointer-events: none;
    padding: 3.5rem 0 2rem;
}

.portfolio-graph-ui .section-title {
    pointer-events: none;
}

.portfolio-graph-ui .section-title h3 {
    color: #f2f6f8;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.portfolio-graph-ui .section-title p {
    color: #8fa1ad;
}

.portfolio-graph-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    margin-bottom: 1rem;
    pointer-events: auto;
}

.portfolio-graph-filters button {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7d8a96;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,196,176,0.15);
    border-radius: 3px;
    padding: 6px 16px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.portfolio-graph-filters button:hover {
    color: #c0cdd4;
}

.portfolio-graph-filters button.active {
    color: #00d2be;
    border-color: #00c4b0;
    background: rgba(0,196,176,0.1);
}

.portfolio-graph-tooltip {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    background: rgba(6,9,13,0.92);
    border: 1px solid rgba(0,196,176,0.25);
    border-radius: 4px;
    padding: 10px 14px;
    max-width: 240px;
    color: #e0e8ee;
    font-size: 0.82rem;
    line-height: 1.45;
    opacity: 0;
    transition: opacity 0.18s;
    backdrop-filter: blur(8px);
}

.portfolio-graph-tooltip.visible {
    opacity: 1;
}

.portfolio-graph-tooltip strong {
    display: block;
    color: #00d2be;
    font-size: 0.88rem;
    margin-bottom: 3px;
}

.portfolio-graph-tooltip .tt-tags {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.62rem;
    color: #5e6e78;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* =============================================================
   MOBILE RESPONSIVE STYLES (max-width: 768px)
   Desktop layout is completely untouched.
   ============================================================= */

@media (max-width: 768px) {
    /* Mobile: disable heavy backdrop-filter, reduce animation complexity */
    .portfolio-graph-tooltip {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .hero-fluid-glow {
        animation-duration: 14s !important;
    }

    .hero-wave-back {
        animation-duration: 24s !important;
    }

    .hero-wave-front {
        animation-duration: 18s !important;
    }

    .post-box:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    /* --- HERO --- */
    .heading h1 {
        font-size: 32px !important;
        padding: 0 15px;
    }

    .heading .hero-subtitle {
        font-size: 0.72rem;
        letter-spacing: 0.08em;
        padding: 0 10px;
    }

    .heading .hero-subtitle .hero-sep {
        margin: 0 0.35em;
    }

    .heading p {
        font-size: 13px;
        padding: 10px 15px;
    }

    #home {
        min-height: 75vh;
    }

    .hero-fluid-bridge {
        height: clamp(60px, 14vmin, 120px);
    }

    /* --- NAV --- */
    #mainNav {
        background-color: rgba(45,66,72,0.95) !important;
    }

    .navbar-nav {
        padding: 10px 0 !important;
    }

    .navbar-nav .nav-link {
        font-size: 13px !important;
        padding: 8px 15px !important;
    }

    /* --- ABOUT / F1-ML SECTION --- */
    .f1-ml-section {
        padding-top: 1.5rem;
        padding-bottom: 0;
        min-height: 100svh;
    }

    .f1-ml-name {
        font-size: 1.4rem;
    }

    .f1-ml-tagline {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .f1-ml-lead {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }

    .f1-ml-wrap {
        min-height: 100svh !important;
        height: 100svh;
    }

    .f1-ml-content {
        padding-top: 0.9rem;
        padding-bottom: 5.75rem;
    }

    .f1-ml-chips {
        display: none !important;
    }

    .f1-ml-section .section-title {
        margin-bottom: 20px;
    }

    .f1-ml-section .section-title p {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }

    .f1-copy-desktop {
        display: none !important;
    }

    .f1-copy-mobile {
        display: block !important;
    }

    .f1-ml-wrap::before {
        height: 36%;
        background: linear-gradient(
            to bottom,
            rgba(5, 7, 10, 0.98) 0%,
            rgba(8, 12, 17, 0.88) 30%,
            rgba(10, 16, 22, 0.52) 62%,
            rgba(10, 16, 22, 0) 100%
        );
    }

    .f1-ml-wrap::after {
        height: 26%;
        background: linear-gradient(
            to top,
            rgba(5, 7, 10, 0.98) 0%,
            rgba(8, 12, 17, 0.82) 34%,
            rgba(10, 16, 22, 0.42) 64%,
            rgba(10, 16, 22, 0) 100%
        );
    }

    /* --- UPDATES / BLOG --- */
    #blog .section-title h3 {
        font-size: 24px;
    }

    #blog .section-title p {
        font-size: 13px;
    }

    .updates-carousel .owl-prev,
    .updates-carousel .owl-next {
        width: 32px;
        height: 32px;
        line-height: 32px !important;
        font-size: 18px !important;
    }

    .updates-carousel .owl-prev {
        margin-left: -8px;
    }

    .updates-carousel .owl-next {
        margin-right: -8px;
    }

    .post-info h4 {
        font-size: 16px;
    }

    .post-info {
        padding: 0 12px 25px;
        margin-top: 25px;
    }

    .post-info p {
        font-size: 13px;
    }

    /* --- PORTFOLIO GRAPH --- */
    .portfolio-graph-wrap {
        min-height: 700px !important;
    }

    .portfolio-graph-ui {
        padding: 2rem 0 1.5rem;
    }

    .portfolio-graph-ui .section-title {
        margin-bottom: 15px;
    }

    .portfolio-graph-ui .section-title h3 {
        font-size: 24px;
    }

    .portfolio-graph-ui .section-title p {
        font-size: 12px;
        line-height: 1.5;
    }

    .portfolio-graph-filters {
        gap: 0.4rem 0.5rem;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }

    .portfolio-graph-filters button {
        font-size: 0.65rem;
        padding: 7px 14px;
    }

    .portfolio-graph-tooltip {
        max-width: 200px;
        font-size: 0.75rem;
        padding: 8px 10px;
    }

    /* --- DIVIDER --- */
    .section-divider-trace {
        height: 40px;
    }

    /* --- CONTACT --- */
    .contact-wrap {
        padding: 3rem 1rem 2.5rem;
    }

    .contact-wrap h2 {
        font-size: 1.5rem;
    }

    .contact-channels {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-channels a,
    .contact-channels span {
        font-size: 0.76rem;
    }

    .contact-form-dark input[type="text"],
    .contact-form-dark input[type="email"],
    .contact-form-dark textarea {
        font-size: 0.82rem;
        padding: 0.62rem 0.7rem;
    }

    .contact-form-dark textarea {
        min-height: 100px;
    }

    .contact-form-dark button[type="submit"] {
        width: 100%;
        text-align: center;
    }

    /* --- FOOTER --- */
    .copyrights {
        padding: 20px 0;
    }

    .footer-distributed .footer-left {
        text-align: center;
        float: none;
    }

    .footer-distributed .footer-links {
        text-align: center;
    }

    .footer-distributed .footer-links a {
        margin: 0 6px;
        font-size: 12px;
    }

    .footer-distributed .footer-company-name {
        text-align: center;
        font-size: 11px;
    }

    /* --- GENERAL SECTION SPACING --- */
    .section {
        padding: 45px 0;
    }

    .section-title {
        margin-bottom: 35px;
    }

    .section-title h3 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    .section-title p {
        font-size: 13px;
        line-height: 1.6;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* --- SCROLL TO TOP --- */
    .dmtop {
        right: 15px;
        width: 40px;
        height: 40px;
        line-height: 38px;
        font-size: 22px;
    }

    /* --- MODALS --- */
    .modal-dialog {
        margin: 10px;
    }

    .modal-content {
        border-radius: 10px;
    }

    /* --- Portfolio wrap mobile override --- */
    .portfolio-graph-wrap {
        min-height: 740px;
    }
}

/* ===== EXTRA SMALL SCREENS (max-width: 480px) ===== */
@media (max-width: 480px) {
    .heading h1 {
        font-size: 26px !important;
    }

    .heading .hero-subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.06em;
    }

    .f1-ml-name {
        font-size: 1.2rem;
    }

    .f1-ml-tagline {
        font-size: 0.7rem;
    }

    .f1-ml-lead {
        font-size: 0.82rem;
    }

    .portfolio-graph-wrap {
        min-height: 620px !important;
    }

    .contact-wrap h2 {
        font-size: 1.3rem;
    }
}
