﻿:root {
    --primary: #6e45e2;
    --secondary: #88d3ce;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --card-border: rgba(255, 255, 255, 0.1);
    --container-pad: clamp(14px, 3vw, 24px);
    --section-space: clamp(20px, 4vw, 50px);
    --text-base: clamp(0.95rem, 0.25vw + 0.9rem, 1rem);
    --title-space: clamp(32px, 4vw, 56px);
    --page-bg: #1a1a2e;
    --page-text: #f8f9fa;
    --text-muted: rgba(248, 249, 250, 0.7);
    --surface: rgba(255, 255, 255, 0.03);
    --surface-2: rgba(255, 255, 255, 0.05);
    --surface-strong: rgba(26, 26, 46, 0.92);
    --nav-bg: rgba(26, 26, 46, 0.92);
    --section-bg: rgba(0, 0, 0, 0.2);
    --border-soft: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-soft: 0 10px 28px rgba(110, 69, 226, 0.18);
    --shadow-strong: 0 20px 40px rgba(0, 0, 0, 0.25);
    --theme-toggle-bg: rgba(255, 255, 255, 0.06);
    --theme-toggle-border: rgba(255, 255, 255, 0.14);
}

html[data-theme='light'] {
    color-scheme: light;
    --page-bg: #f6f8fc;
    --page-text: #0f172a;
    --text-muted: rgba(15, 23, 42, 0.72);
    --surface: #ffffff;
    --surface-2: rgba(15, 23, 42, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --nav-bg: rgba(255, 255, 255, 0.82);
    --section-bg: rgba(15, 23, 42, 0.04);
    --border-soft: rgba(15, 23, 42, 0.12);
    --border-strong: rgba(15, 23, 42, 0.18);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 20px 40px rgba(15, 23, 42, 0.12);
    --theme-toggle-bg: rgba(15, 23, 42, 0.05);
    --theme-toggle-border: rgba(15, 23, 42, 0.12);
}

#home, #about, #skills, #tools, #projects, #assignments, #gallery, #contact {
    scroll-margin-top: 72px;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--page-bg);
    color: var(--page-text);
    font-size: var(--text-base);
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-x: clip;
}

img,
video,
iframe,
canvas,
svg {
    max-width: 100%;
}

/* ----------- Plexus Background ---------- */
#plexus-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    display: block;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
    radial-gradient(72% 56% at 16% 18%, rgba(110, 69, 226, 0.16), transparent 72%),
    radial-gradient(78% 58% at 84% 86%, rgba(136, 211, 206, 0.14), transparent 74%),
    radial-gradient(65% 46% at 50% 0%, rgba(26, 72, 124, 0.2), transparent 78%),
    linear-gradient(180deg, rgba(4, 8, 20, 0.38), rgba(4, 8, 20, 0.66));
}

html[data-theme='light'] #plexus-bg {
    display: none;
}

html[data-theme='light'] body::before {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    #plexus-bg {
        opacity: 0.65;
    }
}

/* ----------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    transition: padding 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--page-text);
    text-decoration: none;
    letter-spacing: 3px;
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-brand:hover {
    transform: scale(1.06);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 6px 12px;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link:hover {
    color: var(--page-text);
}

.nav-link:hover::after {
    width: 70%;
}

.nav-link.active {
    color: var(--page-text);
}

.nav-link.active::after {
    width: 70%;
}

@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 10px 12px;
    }

    .nav-link:active {
        color: var(--page-text);
        opacity: 0.8;
    }

    .nav-link:active::after {
        width: 70%;
    }
}

.navbar-toggler {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    color: var(--page-text);
    cursor: pointer;
    padding: 6px;
}

.navbar-toggler-icon {
    display: block;
    width: 24px;
    height: 2px;
    position: relative;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.navbar-toggler-icon::before {
    top: -7px;
}

.navbar-toggler-icon::after {
    top: 7px;
}

.navbar-collapse {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-auto {
    margin-left: auto;
}

/* ----------- Buttons ---------- */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.5px;
    pointer-events: auto;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transition: left 0.55s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(110, 69, 226, 0.45);
    color: #fff;
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-primary-custom:active {
    transform: translateY(-1px);
}

/* Mobile touch states size ek */
@media (hover: none) and (pointer: coarse) {
    .btn-primary-custom:active {
        transform: scale(0.98);
        box-shadow: 0 5px 15px rgba(110, 69, 226, 0.3);
    }
}

.btn.download-cv {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 30px;
    background: transparent;
    color: var(--page-text);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--border-strong);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    letter-spacing: 0.5px;
}

.btn.download-cv::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.55s ease;
}

.btn.download-cv:hover {
    transform: translateY(-3px);
    background: var(--surface-2);
    border-color: var(--border-soft);
    box-shadow: var(--shadow-soft);
    color: var(--page-text);
}

.btn.download-cv:hover::before {
    left: 100%;
}

.btn.download-cv:active {
    transform: translateY(-1px);
}

/* Mobile touch states for download button size ek */
@media (hover: none) and (pointer: coarse) {
    .btn.download-cv:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.95);
    }
}

/* ----------- Hero Section ---------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(86px, 10vw, 110px) 0 20px;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    display: flex;
    align-items: center;
}

.row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
}

.col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--text-muted);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.typewriter {
    color: var(--primary);
    font-weight: 600;
}

.text-white-50 {
    color: var(--text-muted);
    line-height: 1.7;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.d-flex {
    display: flex;
}

.gap-3 {
    gap: 14px;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* ----------- Social Icons ---------- */
.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

.social-icon i {
    pointer-events: none;
}

.social-icon:hover {
    background: rgba(110, 69, 226, 0.25);
    border-color: rgba(110, 69, 226, 0.6);
    transform: translateY(-3px);
    color: #fff;
}

.social-icon:active {
    transform: translateY(-1px);
    background: rgba(110, 69, 226, 0.35);
}

/* Mobile touch feedback  social icons */
@media (hover: none) and (pointer: coarse) {
    .social-icon {
        background: var(--surface-2);
    }

    .social-icon:active {
        background: rgba(110, 69, 226, 0.3);
        border-color: rgba(110, 69, 226, 0.6);
        transform: scale(0.95);
    }
}

/* ----------- Neon Terminal ---------- */
.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
}

.neon-terminal {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid rgba(110, 69, 226, 0.5);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(110, 69, 226, 0.2), inset 0 0 40px rgba(110, 69, 226, 0.03);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.neon-screen {
    padding: 20px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.code-line {
    height: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    animation: shimmer 2.5s infinite;
}

.code-line:nth-child(1) { background: rgba(110, 69, 226, 0.5); animation-delay: 0s; }
.code-line:nth-child(2) { background: rgba(136, 211, 206, 0.4); animation-delay: 0.3s; }
.code-line:nth-child(3) { background: rgba(255, 255, 255, 0.1); animation-delay: 0.6s; }
.code-line:nth-child(4) { background: rgba(110, 69, 226, 0.3); animation-delay: 0.9s; }

.neon-cursor {
    width: 10px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
    animation: blink 1s infinite;
    margin-top: 4px;
}

.neon-buttons {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-soft);
    justify-content: flex-end;
}

.neon-button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color);
    box-shadow: 0 0 8px var(--color);
}

/* ----------- Footer ----------    */
footer {
    padding: 0;
    border-top: 1px solid var(--border-soft);
    background: var(--dark);
}

.footer-container {
    display: block;
    max-width: 1320px;
    margin: 0 auto;
    padding: clamp(30px, 4vw, 44px) clamp(18px, 3vw, 34px) 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 1.3fr 1fr 0.85fr;
    gap: clamp(16px, 2vw, 34px);
    align-items: start;
}

.footer-profile {
    padding-right: 8px;
}

.footer-profile-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 14px;
    color: #8b5cf6;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-profile h3 {
    font-size: clamp(1.2rem, 1.7vw, 1.7rem);
    margin-bottom: 6px;
    color: var(--page-text);
}

.footer-role {
    color: var(--text-muted);
    font-size: 1rem;
}

.footer-col {
    min-width: 0;
}

.footer-heading {
    color: var(--page-text);
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.14);
    margin-bottom: 16px;
}

.footer-contact-list {
    display: grid;
    gap: 14px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-contact-item i {
    color: #8b5cf6;
    width: 16px;
    text-align: center;
}

.footer-contact-item:hover {
    color: #dbe5ff;
    transform: translateX(2px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 10px;
}

.footer-link {
    display: block;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1.02rem;
    transition: color 0.22s ease;
}

.footer-link:hover {
    color: whitesmoke;
    transform: translateX(3px);
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8fa0bf;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.footer-social a:hover {
    transform: translateY(-2px);
    color: #f4f7ff;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.16);
}

.footer-divider {
    margin: 28px calc(clamp(18px, 3vw, 34px) * -1) 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.footer-bottom {
    padding: 16px clamp(18px, 3vw, 34px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.copyright {
    color: #8fa0bf;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-bottom {
        justify-content: flex-start;
        padding-left: 0;
        padding-right: 0;
    }

    .footer-divider {
        margin-left: 0;
        margin-right: 0;
    }
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--theme-toggle-border);
    background: var(--theme-toggle-bg);
    color: var(--page-text);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* ----------- Scroll Arrow Buttons ---------- */
.scroll-controls {
    position: fixed;
    right: clamp(12px, 2vw, 22px);
    bottom: clamp(16px, 2.5vw, 28px);
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 12px);
    z-index: 1100;
}

.scroll-control {
    width: clamp(40px, 4.5vw, 46px);
    height: clamp(40px, 4.5vw, 46px);
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface-strong);
    color: var(--page-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.scroll-control:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(110, 69, 226, 0.95), rgba(136, 211, 206, 0.9));
    border-color: transparent;
    color: #fff;
}

.scroll-control:active {
    transform: scale(0.96);
}

.scroll-control:focus-visible {
    outline: 2px solid rgba(136, 211, 206, 0.8);
    outline-offset: 2px;
}

.scroll-control i {
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    pointer-events: none;
}

html[data-theme='light'] .scroll-control {
    background: rgba(255, 255, 255, 0.95);
}

/* Mobile touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .scroll-control {
        width: clamp(42px, 10vw, 48px);
        height: clamp(42px, 10vw, 48px);
    }

    .scroll-control:active {
        transform: scale(0.92);
        background: linear-gradient(135deg, rgba(110, 69, 226, 0.9), rgba(136, 211, 206, 0.85));
        color: #fff;
    }
}

@media (max-width: 1024px) {
    .scroll-controls {
        right: clamp(10px, 2vw, 16px);
        bottom: clamp(12px, 2.5vw, 20px);
        gap: clamp(6px, 1vw, 10px);
    }

    .scroll-control {
        width: clamp(38px, 4vw, 44px);
        height: clamp(38px, 4vw, 44px);
    }
}

@media (max-width: 768px) {
    .scroll-controls {
        right: clamp(8px, 1.8vw, 14px);
        bottom: clamp(10px, 2.3vw, 16px);
        gap: clamp(6px, 0.9vw, 8px);
    }

    .scroll-control {
        width: clamp(36px, 3.8vw, 42px);
        height: clamp(36px, 3.8vw, 42px);
    }
}

@media (max-width: 600px) {
    .scroll-controls {
        right: 8px;
        bottom: 60px;
        gap: 6px;
    }

    .scroll-control {
        width: 38px;
        height: 38px;
    }

    .scroll-control i {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .scroll-controls {
        right: 6px;
        bottom: 55px;
        gap: 4px;
    }

    .scroll-control {
        width: 34px;
        height: 34px;
        border: 0.5px solid var(--border-strong);
    }

    .scroll-control i {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .scroll-controls {
        right: 4px;
        bottom: 50px;
        gap: 3px;
    }

    .scroll-control {
        width: 32px;
        height: 32px;
    }

    .scroll-control i {
        font-size: 0.7rem;
    }
}

.theme-toggle-icon {
    font-size: 0.95rem;
}

.theme-toggle-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

html[data-theme='light'] .hero-subtitle,
html[data-theme='light'] .text-white-50,
html[data-theme='light'] .social-icon,
html[data-theme='light'] .footer-link,
html[data-theme='light'] .copyright,
html[data-theme='light'] .tools-subtitle,
html[data-theme='light'] .card p,
html[data-theme='light'] .info-card-text p,
html[data-theme='light'] .project-content p,
html[data-theme='light'] .flip-back .flip-inner p {
    color: var(--text-muted);
}

html[data-theme='light'] .about-section,
html[data-theme='light'] .tools-section,
html[data-theme='light'] .projects-section,
html[data-theme='light'] .assignments-section {
    background-color: var(--section-bg);
}

html[data-theme='light'] .card,
html[data-theme='light'] .tool-card,
html[data-theme='light'] .info-card {
    background: var(--surface);
    border-color: var(--border-soft);
}

html[data-theme='light'] .project-content,
html[data-theme='light'] .flip-front,
html[data-theme='light'] .flip-back,
html[data-theme='light'] .neon-terminal {
    background-color: var(--surface-strong);
    border-color: var(--border-soft);
}

html[data-theme='light'] .project-tag,
html[data-theme='light'] .project-links a {
    background: var(--surface-2);
    border-color: var(--border-soft);
}

html[data-theme='light'] .project-content h2,
html[data-theme='light'] .section-title,
html[data-theme='light'] .flip-front .flip-inner p,
html[data-theme='light'] .flip-front .flip-inner span,
html[data-theme='light'] .front .inner p,
html[data-theme='light'] .front .inner span {
    color: var(--page-text);
}

html[data-theme='light'] .assign-btn.view-btn {
    background: var(--page-text);
    color: var(--page-bg);
}

html[data-theme='light'] .assign-btn.code-btn {
    background: var(--surface-2);
    color: var(--page-text);
    border-color: var(--border-soft);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

@media (max-width: 991px) {
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .hero-section {
        padding: 120px 0 60px;
        text-align: center;
    }
    .social-icons { justify-content: center; }
    .d-flex.gap-3 { justify-content: center; }
    .neon-terminal {
        max-width: 320px;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .navbar-toggler {
        display: flex;
        grid-column: 3;
        justify-self: end;
    }

    .navbar .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

   

    .navbar-collapse {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
        padding: 16px 0 8px;
        border-top: 1px solid var(--card-border);
        margin-top: 12px;
        grid-column: 1 / -1;
    }

    .navbar-collapse.open { display: flex; }

    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }

    .neon-terminal{
        display: none;
    }

    .nav-link {
        width: 100%;
        padding: 10px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .ms-auto { margin-left: 0; }

    .btn-primary-custom {
        margin-top: 12px;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .theme-toggle {
        width: 100%;
        justify-content: center;
        margin: 12px 0 0;
    }


}

/* ----------- Typewriter Effect ---------- */

.hero-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tw-start {
    display: inline;
    position: static;
}

.typewriter-wrap {
    display: inline-block;
    position: relative;
    color: var(--primary);
    font-weight: 600;
    min-width: 220px;
    height: 1.2em;
    vertical-align: middle;
}

.tw-text {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    width: 0;
}


.tw-text:nth-child(1) {
    animation: typewriter-1 8s steps(18, end) infinite;
}


.tw-text:nth-child(2) {
    animation: typewriter-2 8s steps(13, end) infinite;
}

@keyframes typewriter-1 {
    0%    { width: 0;    opacity: 1; }      /* start: hidden */
    25%   { width: 100%; opacity: 1; }      /* type in */
    37.5% { width: 100%; opacity: 1; }      /* hold */
    50%   { width: 0;    opacity: 1; }      /* erase */
    100%  { width: 0;    opacity: 0; }      /* end: hidden */
}

@keyframes typewriter-2 {
    0%    { width: 0;    opacity: 0; }      /* hidden: wait */
    50%   { width: 0;    opacity: 1; }      /* appear (hidden width) */
    75%   { width: 100%; opacity: 1; }      /* type in */
    87.5% { width: 100%; opacity: 1; }      /* hold */
    100%  { width: 0;    opacity: 0; }      /* erase and hide */
}

/* Mobile size ek*/
@media (max-width: 768px) {
    .hero-subtitle {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: wrap;
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        line-height: 1.4;
        justify-content: center;
    }

    .tw-start {
        font-size: inherit;
        display: inline;
    }

    .typewriter-wrap {
        font-size: inherit;
        min-width: 0;
        height: auto;
        display: inline-block;
    }
}

/*about section*/
.about-section {
    padding: var(--section-space) 0;
    background-color: rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(110, 69, 226, 0.1) 0%, transparent 70%);
    z-index: 0;
    animation: pulse 15s infinite alternate;
}

.about-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
    radial-gradient(circle, rgba(110,69,226,0.4) 1px, transparent 1px),
    radial-gradient(circle, rgba(136,211,206,0.2) 1px, transparent 1px);
    background-size: 60px 60px, 90px 90px;
    background-position: 0 0, 30px 30px;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.about-section .container {
    display: block;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: var(--title-space);
    position: relative;
    display: inline-block;
    z-index: 2;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.about-row {
    display: flex;
    align-items: center;
    gap: clamp(24px, 3vw, 40px);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.about-img-col {
    flex: 0 0 36%;
    max-width: 36%;
}

.about-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 420px;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: 12px;
    bottom: 12px;
    border: 2px solid rgba(110, 69, 226, 0.4);
    border-radius: 22px;
    z-index: 0;
}

.about-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: -12px;
    top: 12px;
    left: 12px;
    border: 2px solid rgba(136, 211, 206, 0.3);
    border-radius: 22px;
    z-index: 0;
}

.about-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(110, 69, 226, 0.15);
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1), box-shadow 0.6s ease;
    transform-style: preserve-3d;
    max-width: 100%;
    height: auto;
}

.about-image:hover {
    transform: scale(1.03) rotateY(4deg) rotateX(2deg);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(110, 69, 226, 0.25);
}

.about-content-col {
    flex: 1;
    min-width: 0;
}

.about-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.about-content h3 {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--secondary);

}

.about-content p {
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 15px;
    line-height: 1.75;
    font-size: 0.95rem;
}

.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

.info-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.info-card:hover {
    background: rgba(110, 69, 226, 0.1);
    border-color: rgba(110, 69, 226, 0.3);
    transform: translateY(-3px);
}

.info-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(110,69,226,0.3), rgba(136,211,206,0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--secondary);
    flex-shrink: 0;
}

.info-card-text h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--light);
}

.info-card-text p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .about-img-col {
        flex: 0 0 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .about-row { flex-direction: column; gap: 40px; }
    .section-title {
        display: block;
        text-align: center;
    }
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 992px) {
    .about-section {
        padding: clamp(36px, 4.5vw, 56px) 0;
    }

    .about-image-wrapper {
        max-width: 360px;
        margin: 0 auto;
    }

    .about-content h2 {
        margin-bottom: 10px;
    }

    .about-content h3 {
        margin-bottom: 22px;
    }

    .about-content p {
        margin-bottom: 18px;
    }

    .info-cards {
        margin-top: 22px;
    }
}

@media (max-width: 500px) {
    .info-cards { grid-template-columns: 1fr; }
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.cube-container {
    width: 100px;
    height: 100px;
    perspective: 800px;
    margin-bottom: 30px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 8s infinite linear;
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(110, 69, 226, 0.2);
    box-shadow: inset 0 0 30px rgba(110, 69, 226, 0.4);
}

.cube-face:nth-child(1) { transform: rotateY(0deg) translateZ(50px); }
.cube-face:nth-child(2) { transform: rotateY(90deg) translateZ(50px); }
.cube-face:nth-child(3) { transform: rotateY(180deg) translateZ(50px); }
.cube-face:nth-child(4) { transform: rotateY(-90deg) translateZ(50px); }
.cube-face:nth-child(5) { transform: rotateX(90deg) translateZ(50px); }
.cube-face:nth-child(6) { transform: rotateX(-90deg) translateZ(50px); }

@keyframes rotate {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

.loading-text {
    margin-top: 30px;
    font-size: 1.2rem;
    color: var(--light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.loading-text::after {
    content: "...";
    display: inline-block;
    width: 0;
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0% { width: 0; }
    100% { width: 3ch; }
}

.progress-container {
    width: clamp(180px, 50vw, 260px);
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: inherit;
    transition: width 0.3s ease;
}
scroll{
    scroll-behavior: smooth;
}


/*skill section*/

.skills-section {
    padding: var(--section-space) 0 clamp(60px, 8vw, 100px) 0;
    position: relative;
}

.skills-section .container {
    display: block;
    position: relative;
    z-index: 1;
}


.cards-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: clamp(16px, 2vw, 24px);
    flex-wrap: wrap;
    padding-bottom: clamp(10px, 1.6vw, 18px);
    max-width: 1200px;
    margin: 0 auto;
}


.card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(22px, 4vw, 42px) clamp(16px, 3vw, 34px);
    border-radius: 16px;
    flex: 1 1 calc(33.333% - 18px);
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(110, 69, 226, 0.2);
    border-color: rgba(110, 69, 226, 0.4);
}

.card-icon {
    width: 50px;
    height: 50px;
    min-width: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(110, 69, 226, 0.3), rgba(136, 211, 206, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--secondary);
    margin-bottom: 12px;
}

.card h2 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 600;
    color: var(--light);
    margin: 0;
}

.card p {
    font-size: clamp(0.88rem, 0.35vw + 0.82rem, 0.96rem);
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.tags span {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 20px;
    background: rgba(110, 69, 226, 0.15);
    border: 1px solid rgba(110, 69, 226, 0.25);
    color: rgba(136, 211, 206, 0.9);
    font-size: clamp(0.78rem, 0.25vw + 0.72rem, 0.88rem);
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.tags span:hover {
    background: rgba(110, 69, 226, 0.28);
    border-color: rgba(110, 69, 226, 0.5);
}

/* -------- Media Queries -------- */
@media (max-width: 900px) {
    .cards-container {
        flex-wrap: wrap;
        gap: clamp(12px, 2vw, 18px);
    }

    .card {
        flex: 1 1 calc(50% - 10px);
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .cards-container {
        gap: clamp(10px, 1.8vw, 14px);
        padding: 0 clamp(8px, 2vw, 12px);
    }

    .card {
        flex: 1 1 100%;
        min-width: 0;
        padding: clamp(16px, 3vw, 24px) clamp(12px, 2.5vw, 18px);
    }

    .card h2 {
        font-size: clamp(1rem, 1.8vw, 1.3rem);
    }

    .card p {
        font-size: clamp(0.8rem, 0.3vw + 0.75rem, 0.88rem);
    }
}

@media (max-width: 600px) {
    .cards-container {
        padding: 0;
        gap: 12px;
    }

    .card {
        flex: 1 1 100%;
        min-width: 0;
        padding: 16px 14px;
    }
}


/*tools section*/

.tools-section {
    padding: var(--section-space) 0;
    position: relative;
    overflow: hidden;
}

.tools-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(110, 69, 226, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.tools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-pad);
    position: relative;
    z-index: 1;
}

.tools-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: clamp(0.86rem, 0.25vw + 0.8rem, 0.95rem);
    text-align: center;
    margin-bottom: clamp(22px, 4vw, 42px);
    margin-top: clamp(-16px, -1.5vw, -8px);
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    padding: 0 clamp(4px, 1.8vw, 16px);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 16px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: clamp(14px, 2.5vw, 20px) clamp(8px, 1.6vw, 12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, background 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(110, 69, 226, 0.5);
    background: rgba(110, 69, 226, 0.08);
    box-shadow: 0 10px 30px rgba(110, 69, 226, 0.15);
}

.tool-card img {
    width: clamp(34px, 4.5vw, 48px);
    height: clamp(34px, 4.5vw, 48px);
    object-fit: contain;
}

.tool-card span {
    font-size: clamp(0.72rem, 0.22vw + 0.68rem, 0.8rem);
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    font-weight: 500;
    line-height: 1.3;
}

/* ---------- Media Queries ---------- */
@media (max-width: 1100px) {
    .tools-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .tools-subtitle {
        margin-top: 0;
        margin-bottom: 16px;
        max-width: 100%;
        line-height: 1.5;
        font-size: clamp(0.8rem, 1.8vw, 0.88rem);
    }

    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .tool-card {
        padding: 12px 8px;
        gap: 8px;
    }

    .tool-card img {
        width: clamp(30px, 3.5vw, 40px);
        height: clamp(30px, 3.5vw, 40px);
    }

    .tool-card span {
        font-size: clamp(0.65rem, 0.2vw + 0.6rem, 0.75rem);
    }
}

@media (max-width: 600px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .tool-card {
        padding: 10px 6px;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .tool-card {
        padding: 8px 4px;
        gap: 6px;
    }

    .tool-card img {
        width: clamp(26px, 3vw, 32px);
        height: clamp(26px, 3vw, 32px);
    }

    .tool-card span {
        font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    }
}

/*project section*/

.projects-section {
    padding: var(--section-space) 0 clamp(60px, 8vw, 100px);
    position: relative;
}

.projects-section .container {
    display: block;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.project-box {
    position: relative;
    width: 100%;
    height: clamp(280px, 32vw, 330px);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: clamp(16px, 2.5vw, 30px) clamp(8px, 1.8vw, 20px);
    transition: 0.5s;
}

.project-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50px;
    width: 50%;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    transform: skewX(15deg);
    transition: 0.5s;
}

.project-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50px;
    width: 50%;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    transform: skewX(15deg);
    transition: 0.5s;
    filter: blur(30px);
}

.project-box:hover::before,
.project-box:hover::after {
    transform: skewX(0deg);
    left: 20px;
    width: calc(100% - 90px);
}

.project-box:nth-child(1)::before,
.project-box:nth-child(1)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box:nth-child(2)::before,
.project-box:nth-child(2)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box:nth-child(3)::before,
.project-box:nth-child(3)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box:nth-child(4)::before,
.project-box:nth-child(4)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box:nth-child(5)::before,
.project-box:nth-child(5)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box:nth-child(6)::before,
.project-box:nth-child(6)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box:nth-child(7)::before,
.project-box:nth-child(7)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box:nth-child(8)::before,
.project-box:nth-child(8)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box:nth-child(9)::before,
.project-box:nth-child(9)::after {
    background: linear-gradient(315deg, #49b7ba, #292fa2);
}

.project-box span {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 5;
    pointer-events: none;
}

.project-box span::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 0;
    border-radius: 8px;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: 0.1s;
    animation: animate 2s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(83, 10, 210, 0.653);
}

.project-box:nth-child(1) span::before {
    background-image: url('../assets/img/projects/finding-latest-tech-gadgets-mobile-phone_670382-105906.webp');
}

.project-box:nth-child(2) span::before {
    background-image: url('../assets/img/projects/blue-board-game-connect-four-showing-winning-strategy_96318-166656-removebg-preview.png');
}

.project-box:nth-child(3) span::before {
    background-image: url('../assets/img/projects/59c26b6c-65cf-417a-8856-d542c0c014b7.webp');
}

.project-box:nth-child(4) span::before {
    background-image: url('../assets/img/projects/Flogo.png');
}

.project-box:nth-child(5) span::before {
    background-image: url('../assets/img/projects/tictactoe.png');
}

.project-box:nth-child(6) span::before {
    background-image: url('../assets/img/projects/bbbbbbbb-removebg-preview.png');
}

.project-box:nth-child(7) span::before {
    background-image: url('../assets/img/projects/psms.png');
}

.project-box:nth-child(8) span::before {
    background-image: url('../assets/img/projects/gym1.jpg');
}

.project-box:nth-child(9) span::before {
    background-image: url('../assets/img/projects/prf1.png');
}

/*podi box deka */
.project-box:hover span::before {
    top: -50px;
    left: 50px;
    width: 100px;
    height: 100px;
    opacity: 1;
}

.project-box span::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 100%; height: 100%;
    border-radius: 8px;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: 0.5s;
    animation: animate 2s ease-in-out infinite;
    box-shadow: 0 5px 15px  rgba(83, 10, 210, 0.653);
    animation-delay: -1s;
}

.project-box:nth-child(1) span::after {
    background-image: url('../assets/img/projects/smartphones-display-store_1111504-30562.webp');
}

.project-box:nth-child(2) span::after {
    background-image: url('../assets/img/projects/71C+Hc2atjL-removebg-preview.png');
}

.project-box:nth-child(3) span::after {
    background-image: url('../assets/img/projects/Gemini_Generated_Image_t4e9rqt4e9rqt4e9.png');
}

.project-box:nth-child(4) span::after {
    background-image: url('../assets/img/projects/hello.jpg.webp');
}

.project-box:nth-child(5) span::after {
    background-image: url('../assets/img/projects/Super_tic-tac-toe_rules_example.png');
}

.project-box:nth-child(6) span::after {
    background-image: url('../assets/img/projects/aaaaaaaaaaa.png');
}

.project-box:nth-child(7) span::after {
    background-image: url('../assets/img/projects/images-removebg-preview.png');
}

.project-box:nth-child(8) span::after {
    background-image: url('../assets/img/projects/gym_management_system.png');
}

.project-box:nth-child(9) span::after {
    background-image: url('../assets/img/projects/prf3.png');
}

.project-box:hover span::after {
    bottom: -50px;
    right: 50px;
    width: 100px;
    height: 100px;
    opacity: 1;
}

.project-content {
    position: relative;
    left: 0;
    padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 32px);
    background: rgba(25, 18, 41, 0.751);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 245, 255, 0.1);
    z-index: 1;
    transition: 0.5s;
    color: #fff;
    width: min(100%, 300px);
    height: min(100%, 300px);
}

.project-box:hover .project-content {
    left: -25px;
    padding: clamp(22px, 4vw, 40px) clamp(18px, 3vw, 32px);
}

.project-tag {
    display: inline-block;
    background: rgba(0, 245, 255, 0.1);
    color: #00F5FF;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 245, 255, 0.2);
    margin-bottom: 14px;
}

.project-content h2 {
    font-size: clamp(1.05rem, 1.2vw + 0.9rem, 1.3rem);
    color: #fff;
    margin-bottom: 10px;
}

.project-content p {
    font-size: clamp(0.84rem, 0.3vw + 0.78rem, 0.9rem);
    color: #73767e;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.project-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 245, 255, 0.08);
    border: 1px solid rgba(0, 245, 255, 0.2);
    color: #00F5FF;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s, border-color 0.3s;
}

.project-links a:hover {
    background: #00F5FF;
    color: #080B14;
    border-color: #00F5FF;
    transform: translateY(-3px);
}

.project-links a.live-link {
    color: #FF2D78;
    border-color: rgba(255, 45, 120, 0.2);
    background: rgba(255, 45, 120, 0.08);
}

.project-links a.live-link:hover {
    background: #FF2D78;
    color: #080B14;
    border-color: #FF2D78;
}

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 1200px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .project-box {
        margin: 8px 0;
        height: clamp(240px, 30vw, 300px);
    }
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .project-box {
        margin: 0;
        height: auto;
        min-height: 240px;
        padding: 4px 0;
        overflow: hidden;
    }

    .project-box::before,
    .project-box::after {
        left: 8px;
        width: calc(100% - 16px);
        transform: skewX(0deg);
    }

    .project-box:hover::before,
    .project-box:hover::after {
        left: 8px;
        width: calc(100% - 16px);
        transform: skewX(0deg);
    }

    .project-box span {
        display: none;
    }

    .project-content {
        width: 100%;
        height: auto;
        min-height: 200px;
    }

    .project-box:hover .project-content {
        left: 0;
        padding: clamp(16px, 2.5vw, 24px) clamp(14px, 2.5vw, 20px);
    }

    .project-content h2 {
        font-size: clamp(0.95rem, 1.5vw, 1.15rem);
        margin-bottom: 8px;
    }

    .project-content p {
        font-size: clamp(0.78rem, 0.3vw + 0.73rem, 0.85rem);
        margin-bottom: 14px;
    }
}

@media (max-width: 600px) {
    .projects-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-box {
        margin: 0;
        height: auto;
        min-height: 220px;
        padding: 0;
        overflow: visible;
    }

    .project-box::before,
    .project-box::after {
        display: none;
    }

    .project-content {
        width: 100%;
        height: auto;
        min-height: auto;
        border-radius: 8px;
        padding: 14px 12px;
    }

    .project-box:hover .project-content {
        left: 0;
        padding: 14px 12px;
    }

    .project-links {
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-links a {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/*assignment section*/
.assignments-section {
    padding: var(--section-space) 0 clamp(60px, 8vw, 100px);
    position: relative;
}

.assignments-section .container {
    display: block;
}

.assign-wrapper {
    width: 100%;
    margin: 0 auto;
    max-width: 80rem;
    padding: 0 var(--container-pad);
    box-sizing: border-box;
}

.assign-cols {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
}

.assign-col {
    width: calc(25% - 2rem);
    cursor: pointer;
}

.flip-container {
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    min-height: 280px;
}

.flip-front,
.flip-back {
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    text-align: center;
    min-height: 280px;
    ;
    color: #fff;
    font-size: 1.5rem;
    border: 1px solid rgba(110, 69, 226, 0.2);
}

.flip-front {
    transform: rotateY(0deg);
    transform-style: preserve-3d;
    background-image: url('../assets/img/assigment/animated_fancy.gif');
    background-color: rgba(26, 26, 46, 0.9);
}

.flip-front::after {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    content: '';
    display: block;
    opacity: 0.55;
    background-color: #0a0a1a;
    backface-visibility: hidden;
    border-radius: 12px;
}

.flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    transform-style: preserve-3d;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: rgba(26, 26, 46, 0.95);
}

.assign-col:nth-child(1) .flip-back {
    background-image: url("../assets/img/assigment/case-1.png");
}

.assign-col:nth-child(2) .flip-back {
    background-image: url("../assets/img/assigment/case-2.gif");
}

.assign-col:nth-child(3) .flip-back {
    background-image: url("../assets/img/assigment/case-3.gif");
}

.flip-back::after {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    content: '';
    display: block;
    opacity: 0.45;
    background-color: #0a0a1a;
    backface-visibility: hidden;
    border-radius: 12px;
}

.assign-col:hover .flip-front,
.assign-col.hover .flip-front {
    transform: rotateY(-180deg);
    transform-style: preserve-3d;
}

.assign-col:hover .flip-back,
.assign-col.hover .flip-back {
    transform: rotateY(0deg);
    transform-style: preserve-3d;
}

.flip-inner {
    transform: translateY(-50%) translateZ(60px) scale(0.94);
    top: 50%;
    position: absolute;
    left: 0;
    width: 100%;
    padding: 2rem;
    box-sizing: border-box;
    perspective: inherit;
    z-index: 2;
}

.flip-front .flip-inner p {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    color: #e2e8f0;
}

.flip-front .flip-inner p::after {
    content: '';
    width: 3rem;
    height: 2px;
    position: absolute;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    display: block;
    left: 0;
    right: 0;
    margin: 0 auto;
    bottom: -0.6rem;
}

.flip-front .flip-inner span {
    color: #4ade80;
    font-size: 0.95rem;
    font-weight: 400;
    margin-top: 0.5rem;
    display: block;
}

.flip-back .flip-inner p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 0.9rem;
}

.back-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.assign-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.view-btn {
    background: #ffffff;
    color: #121326;
}

.code-btn {
    background: rgba(18, 19, 38, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.assign-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.assign-btn:active {
    transform: translateY(0);
    opacity: 0.9;
}

/* ------ Media Queries ------ */
@media (max-width: 64rem) {
    .assign-col {
        width: calc(33.333% - 1.5rem);
    }
}

@media (max-width: 48rem) {
    .assign-wrapper {
        padding: 0 clamp(6px, 2vw, 12px);
    }

    .assign-cols {
        gap: 1.5rem;
    }

    .assign-col {
        width: calc(50% - 0.75rem);
    }

    .flip-container {
        min-height: 260px;
    }

    .flip-front,
    .flip-back {
        min-height: 260px;
    }
}

@media (max-width: 32rem) {
    .assign-wrapper {
        padding: 0 8px;
    }

    .assign-cols {
        gap: 1rem;
        padding: 0.5rem 0;
    }

    .assign-col {
        width: 100%;
        margin: 0;
    }

    .flip-container {
        min-height: 240px;
    }

    .flip-front,
    .flip-back {
        min-height: 240px;
        font-size: 1.2rem;
    }

    .flip-inner {
        padding: 1.5rem 1rem;
    }

    .flip-front .flip-inner p {
        font-size: 1.3rem;
    }

    .back-actions {
        gap: 6px;
    }

    .assign-btn {
        min-width: 64px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 24rem) {
    .assign-cols {
        gap: 0.75rem;
    }

    .flip-container {
        min-height: 220px;
    }

    .flip-front,
    .flip-back {
        min-height: 220px;
    }

    .assign-btn {
        min-width: 56px;
        padding: 5px 8px;
        font-size: 0.7rem;
    }
}

.view-all {
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    display: block;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    border-radius: 30px;
    background: transparent;
    border: 2px solid rgba(110, 69, 226, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.view-all a {
    color: var(--primary);
    font-weight: 100;
    text-decoration: none;
}
.view-all a:hover {
    text-decoration: underline;
}

/*Light mode*/

/* ----------- Light mode global text fixes ---------- */
html[data-theme='light'] body {
    background-color: var(--page-bg);
    color: var(--page-text);
}

html[data-theme='light'] .section-title {
    color: var(--page-text);
}

html[data-theme='light'] .about-content p {
    color: rgba(15, 23, 42, 0.74);
}

html[data-theme='light'] .about-content h3 {
    color: var(--primary);
}

html[data-theme='light'] .info-card-text h5 {
    color: var(--page-text);
}

html[data-theme='light'] .info-card-text p {
    color: var(--text-muted);
}

html[data-theme='light'] .card h2 {
    color: var(--page-text);
}

html[data-theme='light'] .card p {
    color: var(--text-muted);
}

html[data-theme='light'] .tags span {
    background: rgba(110, 69, 226, 0.08);
    border-color: rgba(110, 69, 226, 0.2);
    color: var(--primary);
}

html[data-theme='light'] .tool-card span {
    color: var(--text-muted);
}

html[data-theme='light'] .tool-card {
    background: var(--surface);
    border-color: var(--border-soft);
}

html[data-theme='light'] .tools-subtitle {
    color: var(--text-muted);
}

html[data-theme='light'] .project-content {
    background: var(--surface-strong);
    border-color: var(--border-soft);
}

html[data-theme='light'] .project-content h2 {
    color: var(--page-text);
}

html[data-theme='light'] .project-content p {
    color: var(--text-muted);
}

html[data-theme='light'] .project-tag {
    background: rgba(110, 69, 226, 0.08);
    color: var(--primary);
    border-color: rgba(110, 69, 226, 0.2);
}

html[data-theme='light'] .project-links a {
    background: var(--surface-2);
    border-color: var(--border-soft);
    color: var(--primary);
}

html[data-theme='light'] .project-links a.live-link {
    color: #d4205a;
    border-color: rgba(212, 32, 90, 0.2);
    background: rgba(212, 32, 90, 0.06);
}

html[data-theme='light'] .neon-terminal {
    background: var(--surface-strong);
    border-color: rgba(110, 69, 226, 0.3);
    box-shadow: 0 0 30px rgba(110, 69, 226, 0.08);
}

html[data-theme='light'] .neon-buttons {
    border-top-color: var(--border-soft);
}

html[data-theme='light'] .hero-title {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html[data-theme='light'] .hero-subtitle {
    color: var(--text-muted);
}

html[data-theme='light'] .text-white-50 {
    color: var(--text-muted);
}

html[data-theme='light'] .social-icon {
    background: var(--surface-2);
    border-color: var(--border-soft);
    color: var(--text-muted);
}

html[data-theme='light'] .flip-front {
    background-color: rgba(240, 242, 255, 0.95);
    border-color: var(--border-soft);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
    background-image: url('../assets/img/assigment/animated_second.gif');
}

html[data-theme='light'] .flip-front::after {
    background-color: rgba(255, 255, 255, 0.15);
    opacity: 0.2;
}

html[data-theme='light'] .flip-back {
    border-color: var(--border-soft);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .flip-back::after {
    background-color: rgba(255, 255, 255, 0.25);
    opacity: 0.3;
}

html[data-theme='light'] .flip-front .flip-inner p {
    color: rgb(255, 210, 28);
}

html[data-theme='light'] .flip-front .flip-inner span {
    color: rgb(239, 7, 7);
}

html[data-theme='light'] .flip-back .flip-inner p {
    color: var(--page-text);
}

html[data-theme='light'] .assign-btn.view-btn {
    background: var(--page-text);
    color: var(--page-bg);
}

html[data-theme='light'] .assign-btn.code-btn {
    background: var(--surface-2);
    color: var(--page-text);
    border-color: var(--border-soft);
}

/* ----------- View All button light mode ---------- */
html[data-theme='light'] .view-all {
    border-color: rgba(110, 69, 226, 0.3);
    background: transparent;
}

html[data-theme='light'] .view-all-link {
    color: var(--primary);
}

html[data-theme='light'] .view-all-link:hover {
    background: rgba(110, 69, 226, 0.06);
    border-color: rgba(110, 69, 226, 0.5);
    color: var(--primary);
}

/* ----------- Footer light mode ---------- */
html[data-theme='light'] footer {
    border-top-color: var(--border-soft);
    background: #eef2ff;
}

html[data-theme='light'] .footer-profile-icon {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme='light'] .footer-role,
html[data-theme='light'] .footer-link {
    color: var(--text-muted);
}

html[data-theme='light'] .footer-link:hover {
    color: var(--page-text);
}

html[data-theme='light'] .footer-contact-item {
    color: var(--text-muted);
}

html[data-theme='light'] .footer-contact-item:hover {
    color: var(--page-text);
}

html[data-theme='light'] .footer-social a {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.14);
    color: #64748b;
}

html[data-theme='light'] .footer-divider {
    background: rgba(15, 23, 42, 0.12);
}

html[data-theme='light'] .copyright {
    color: #64748b;
}

/* ----------- Navbar light mode ---------- */
html[data-theme='light'] .navbar {
    background-color: var(--nav-bg);
    border-bottom-color: var(--border-soft);
}

html[data-theme='light'] .navbar-toggler-icon {
    background: var(--page-text);
}

html[data-theme='light'] .navbar-toggler {
    color: var(--page-text);
}

html[data-theme='light'] .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.98);
    border-top-color: var(--border-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html[data-theme='light'] .nav-link {
    color: var(--text-muted);
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .nav-link:hover {
    color: var(--primary);
}

html[data-theme='light'] .btn.download-cv {
    color: var(--page-text);
    border-color: var(--border-strong);
}

html[data-theme='light'] .btn.download-cv:hover {
    background: var(--surface-2);
    box-shadow: var(--shadow-soft);
}

/* ----------- Gallery Section ---------- */
.gallery-section {
    --gallery-zoom: 1;
    padding-block: clamp(40px, 6vw, 72px);
    padding-bottom: clamp(60px, 8vw, 100px);
    position: relative;
    overflow: hidden;
}

.gallery-section .container {
    display: block;
}

.gallery-section .section-title {
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    line-height: 1.3;
    margin-block-end: clamp(22px, 3vw, 34px);
    color: var(--page-text);
}

.gallery-section .tools-subtitle {
    margin-top: 0;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.gallery-section .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(10rem, 22vw, 14rem), 1fr));
    grid-auto-rows: clamp(10rem, 22vw, 14rem);
    grid-auto-flow: dense;
    gap: 0.75rem;
    transform: scale(var(--gallery-zoom));
    transform-origin: top center;
}

.gallery-section .gallery figure {
    container: figure / inline-size;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    border-radius: 10px;
}

.gallery-section .gallery img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    grid-area: 1 / 1 / -1 / -1;
    transition: scale 1s ease-in-out;
}

.gallery-section .gallery figure:hover img {
    scale: 1.125;
}

.gallery-section .gallery figcaption {
    grid-area: 1 / 1 / -1 / -1;
    align-self: end;
    z-index: 1;
    padding: 3em 15% 1em 1em;
    color: #fff;
    font-size: 0.875rem;
    line-height: 1.3;
    background: linear-gradient(transparent 25%, rgb(0 0 0 / 0.75));
    display: none;
}

@container figure (width > 20rem) {
    .gallery-section .gallery figcaption {
        display: block;
    }
}

.gallery-section .gallery figcaption h3 {
    font-size: 1.0625rem;
}

.gallery-section .gallery figcaption p {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .gallery-section .gallery {
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-section .container {
        padding: 0 clamp(8px, 2vw, 12px);
    }

    .gallery-section .section-title {
        font-size: clamp(1.3rem, 4.5vw, 1.7rem);
    }

    .gallery-section .gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 600px) {
    .gallery-section .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        grid-auto-flow: row;
        gap: 0.5rem;
    }

    .gallery-section .gallery figure {
        aspect-ratio: 1 / 1;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .gallery-section .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .gallery-section .gallery figure {
        border-radius: 6px;
    }
}


/* ----------- Contact Section ---------- */
.contact-section {
    padding: clamp(18px, 5vw, 10px) 0 clamp(60px, 8vw, 100px);
    position: relative;
}

.contact-section .container {
    display: block;
}

.contact-subtitle {
    max-width: 640px;
    margin: 0 0 26px;
    color: var(--text-muted);
    font-size: clamp(0.95rem, 0.35vw + 0.85rem, 1.05rem);
    line-height: 1.7;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(16px, 2.2vw, 26px);
}

.contact-panel {
    background: linear-gradient(145deg, var(--surface-2), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: clamp(18px, 2.4vw, 26px);
    box-shadow: var(--shadow-soft);
}

.contact-panel h3 {
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    margin-bottom: 10px;
    color: var(--page-text);
}

.contact-panel p {
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.7;
}

.contact-list {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--page-text);
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 11px 12px;
    transition: transform 0.2s ease, border-color 0.25s ease, background 0.25s ease;
}

.contact-card i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    flex-shrink: 0;
}

.contact-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    background: var(--surface-2);
}

/* Mobile touch states */
@media (hover: none) and (pointer: coarse) {
    .contact-card:active {
        transform: scale(0.98);
        background: var(--surface-2);
        border-color: var(--primary);
    }

    .contact-socials a:active {
        transform: scale(0.95);
        background: rgba(110, 69, 226, 0.15);
    }

    .contact-submit:active {
        transform: scale(0.97);
        box-shadow: 0 5px 15px rgba(110, 69, 226, 0.2);
    }
}

.contact-socials {
    display: flex;
    gap: 10px;
}

.contact-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--page-text);
    border: 1px solid var(--border-soft);
    background: var(--surface);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.25s ease;
}

.contact-socials a:hover {
    color: var(--primary);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: clamp(18px, 2.4vw, 26px);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 10px;
}

.contact-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--page-text);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--page-text);
    padding: 10px 12px;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(110, 69, 226, 0.2);
    outline: none;
}

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

.contact-submit {
    margin-top: 4px;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(110, 69, 226, 0.35);
}

.contact-status {
    min-height: 1.25rem;
    margin: 2px 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.contact-status.is-success {
    color: #10b981;
}

.contact-status.is-error {
    color: #ef4444;

}

@media (max-width: 900px) {
    .contact-section {
        padding: clamp(16px, 4vw, 26px) 0 clamp(60px, 8vw, 100px);
    }

    .contact-subtitle {
        max-width: 100%;
        font-size: clamp(0.9rem, 2vw, 1rem);
        margin-bottom: 20px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: clamp(12px, 2vw, 18px);
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: clamp(14px, 3vw, 20px) 0 clamp(60px, 8vw, 100px);
    }

    .contact-subtitle {
        font-size: clamp(0.85rem, 1.8vw, 0.95rem);
        margin-bottom: 16px;
        line-height: 1.6;
    }

    .contact-layout {
        gap: 10px;
    }

    .contact-panel {
        padding: clamp(14px, 2.2vw, 20px);
        border-radius: 14px;
    }

    .contact-panel h3 {
        font-size: clamp(1.05rem, 1.3vw, 1.3rem);
        margin-bottom: 8px;
    }

    .contact-panel p {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .contact-list {
        gap: 10px;
    }

    .contact-card {
        padding: 10px 11px;
        gap: 8px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .contact-card i {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .contact-socials {
        gap: 8px;
        flex-wrap: wrap;
    }

    .contact-socials a {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .contact-form {
        padding: clamp(14px, 2.2vw, 20px);
        gap: 8px;
        border-radius: 14px;
    }

    .contact-form label {
        font-size: 0.85rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 9px 11px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

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

    .contact-submit {
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

@media (max-width: 600px) {
    .contact-section {
        padding: clamp(12px, 2.5vw, 16px) 0 clamp(60px, 8vw, 100px);
    }

    .contact-subtitle {
        font-size: clamp(0.8rem, 1.5vw, 0.9rem);
        margin-bottom: 12px;
    }

    .contact-panel {
        padding: 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
    }

    .contact-panel h3 {
        font-size: clamp(0.95rem, 3vw, 1.2rem);
        margin-bottom: 6px;
    }

    .contact-panel p {
        font-size: 0.85rem;
        margin-bottom: 10px;
        line-height: 1.5;
    }

    .contact-list {
        gap: 8px;
        margin-bottom: 12px;
    }

    .contact-card {
        padding: 8px 10px;
        gap: 6px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .contact-card i {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .contact-socials {
        gap: 6px;
    }

    .contact-socials a {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .contact-form {
        padding: 12px;
        gap: 6px;
        border-radius: 12px;
    }

    .contact-form label {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 8px 10px;
        font-size: 0.85rem;
        border-radius: 6px;
    }

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

    .contact-submit {
        padding: 9px 12px;
        font-size: 0.85rem;
        border-radius: 6px;
        margin-top: 2px;
    }

    .contact-status {
        font-size: 0.8rem;
        min-height: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: clamp(10px, 2vw, 14px) 0 clamp(55px, 7vw, 90px);
    }

    .contact-subtitle {
        font-size: 0.8rem;
        margin-bottom: 10px;
        line-height: 1.5;
    }

    .contact-layout {
        gap: 8px;
    }

    .contact-panel {
        padding: 10px;
        border-radius: 10px;
    }

    .contact-panel h3 {
        font-size: clamp(0.9rem, 2.8vw, 1.1rem);
        margin-bottom: 4px;
    }

    .contact-panel p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .contact-card {
        padding: 6px 8px;
        gap: 6px;
        font-size: 0.8rem;
    }

    .contact-card i {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .contact-socials {
        gap: 5px;
    }

    .contact-socials a {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .contact-form {
        padding: 10px;
        gap: 5px;
    }

    .contact-form label {
        font-size: 0.75rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 6px 8px;
        font-size: 0.8rem;
        border-radius: 5px;
    }

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

    .contact-submit {
        padding: 8px 10px;
        font-size: 0.8rem;
        border-radius: 5px;
    }
}

@media (max-width: 360px) {
    .contact-section {
        padding: 8px 0 clamp(50px, 6vw, 80px);
    }

    .contact-subtitle {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .contact-panel {
        padding: 8px;
        border-radius: 8px;
    }

    .contact-panel h3 {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }

    .contact-panel p {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .contact-form {
        padding: 8px;
    }

    .contact-form label {
        font-size: 0.7rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 5px 6px;
        font-size: 0.75rem;
    }

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

    .contact-submit {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}

/* ------------ Responsive device ladder ------------ */
@media (max-width: 1200px) {
    .projects-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-section .gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 112px 0 64px;
    }

    .hero-section .container,
    .row {
        flex-direction: column;
    }

    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
    }

    .hero-content {
        text-align: center;
    }

    .hero-subtitle {
        justify-content: center;
    }

    .d-flex.gap-3,
    .social-icons {
        justify-content: center;
    }

    .neon-terminal {
        max-width: 380px;
        margin: 28px auto 0;
    }

    .cards-container {
        justify-content: center;
    }

    .card {
        flex: 1 1 calc(50% - 12px);
        min-width: 220px;
    }

    .tools-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .projects-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assign-col {
        width: calc(50% - 2rem);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        gap: 12px;
    }

    .navbar-brand {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .hero-title {
        font-size: clamp(1.9rem, 7.5vw, 2.5rem);
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: clamp(0.98rem, 3.8vw, 1.15rem);
        flex-wrap: wrap;
        gap: 6px;
    }

    .tw-start {
        font-size: inherit;
    }

    .typewriter-wrap {
        min-width: 0;
        max-width: 100%;
    }

    .text-white-50 {
        font-size: 0.95rem;
    }

    .btn-primary-custom,
    .btn.download-cv,
    .theme-toggle {
        width: 100%;
        justify-content: center;
    }

    .tools-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .project-box {
        height: auto;
        min-height: 0;
        margin: 16px 0;
    }

    .project-content {
        width: 100%;
        height: auto;
        left: 0;
    }

    .project-box:hover .project-content {
        left: 0;
    }

    .project-links {
        flex-wrap: wrap;
    }

    .gallery-section .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .assign-col {
        width: 100%;
        margin: 0;
    }

    .assign-cols {
        gap: 1.25rem;
    }

    .card {
        flex: 1 1 100%;
        min-width: 0;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero-section {
        padding: 85px 0 40px;
    }

    .hero-title {
        font-size: clamp(1.5rem, 7vw, 1.95rem);
        line-height: 1.15;
    }

    .hero-subtitle {
        justify-content: center;
        text-align: center;
        font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    }

    .social-icons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .card {
        min-width: auto;
        padding: clamp(16px, 3vw, 28px) clamp(14px, 2.5vw, 24px);
    }

    .gallery-section .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        grid-auto-flow: row;
        transform: none;
        gap: 0.6rem;
    }

    .gallery-section .gallery figure {
        aspect-ratio: 1 / 1;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.04);
    }

    .gallery-section .gallery img {
        object-fit: cover;
        object-position: center;
    }

    .gallery-section .gallery figcaption {
        display: none;
    }

    .contact-panel,
    .contact-form {
        padding: 14px;
    }

    .contact-socials {
        flex-wrap: wrap;
        gap: 8px;
    }

    .footer-social a {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    :root {
        --container-pad: 12px;
    }

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

    .navbar {
        padding: 12px 0;
    }

    .navbar-brand {
        font-size: clamp(1.1rem, 6vw, 1.35rem);
        letter-spacing: 2px;
    }

    .navbar-collapse {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 10px 12px !important;
        overflow-x: clip !important;
    }

    .hero-section {
        padding: 80px 0 36px;
    }

    .hero-title {
        font-size: clamp(1.4rem, 8vw, 1.85rem);
        line-height: 1.1;
    }

    .hero-subtitle {
        gap: 3px;
        font-size: clamp(0.85rem, 2vw, 0.95rem);
    }

    .typewriter-wrap {
        min-width: 0;
        height: auto;
    }

    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .btn-primary-custom,
    .btn.download-cv {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .tool-card {
        padding: 12px 6px;
    }

    .gallery-section .gallery {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .gallery-section .gallery figure {
        aspect-ratio: 4 / 3;
    }

    .gallery-section .gallery img {
        padding: 4px;
    }

    .project-box {
        margin: 8px 0;
    }

    .project-links {
        gap: 8px;
    }

    .project-links a {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .assign-col {
        width: 100%;
        min-height: 240px;
    }

    .flip-container {
        min-height: 240px;
    }

    .flip-front,
    .flip-back {
        min-height: 240px;
    }

    .assign-btn {
        min-width: 70px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .contact-panel,
    .contact-form {
        padding: 12px;
    }

    .contact-card {
        padding: 8px 10px;
    }

    .contact-socials {
        gap: 6px;
    }

    .contact-socials a {
        width: 36px;
        height: 36px;
    }

}

@media (max-width: 360px) {
    :root {
        --container-pad: 10px;
    }

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

    .navbar-brand {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .hero-title {
        font-size: clamp(1.3rem, 7vw, 1.65rem);
    }

    .hero-subtitle {
        font-size: 0.8rem;
        gap: 2px;
    }

    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .tool-card {
        padding: 10px 4px;
    }

    .nav-link {
        padding: 10px 6px;
        font-size: 0.9rem;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Mobile responsive move :horizontal */
@media (max-width: 768px) {
    .navbar,
    .navbar .container,
    .navbar-collapse,
    .hero-section,
    .hero-section .container,
    .row,
    .projects-section,
    .projects-section .container,
    .project-box,
    .project-content,
    .assignments-section,
    .assignments-section .container,
    .assign-wrapper,
    .gallery-section,
    .gallery-section .container,
    .contact-section,
    .contact-section .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    .project-box:hover .project-content {
        left: 0;
    }
}
