@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ====== Design System & Variables ====== */
:root {
    --bg-primary: #06080f;
    --bg-secondary: #0d111d;
    --bg-glass: rgba(13, 17, 29, 0.7);
    --bg-glass-hover: rgba(22, 28, 48, 0.85);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-active: rgba(99, 102, 241, 0.4);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary-color: #6366f1; /* Indigo */
    --secondary-color: #a855f7; /* Purple */
    --accent-color: #d946ef; /* Fuchsia */
    --glow-primary: rgba(99, 102, 241, 0.15);
    --glow-secondary: rgba(168, 85, 247, 0.15);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ====== Reset & Global Styles ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, var(--glow-primary) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, var(--glow-secondary) 0%, transparent 40%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    background: linear-gradient(135deg, #ffffff 40%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 12px auto 0;
    border-radius: 2px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ====== Navigation Navbar ====== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(6, 8, 15, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
}

.navbar.scroll-active {
    padding: 0.9rem 0;
    background: rgba(6, 8, 15, 0.9);
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: var(--transition);
}

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

.nav-links a.active-link {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ====== Buttons ====== */
.btn {
    padding: 12px 28px;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ====== Hero Section ====== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.hero-content .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.25rem;
    max-width: 600px;
}

.cta-buttons {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    color: #ffffff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.social-links a svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--glow-primary) 0%, transparent 60%);
    z-index: -1;
    top: 0;
    left: 0;
}

.hero-image img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    object-position: 53% center; /* Shifts the image content slightly to the right to center your head */
    border-radius: 50%;
    border: 2px solid var(--border-glass);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.03);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

/* ====== About Me Section ====== */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
    position: relative;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.about-content {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.tech-illustration-wrapper {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: 24px;
    padding: 12px;
    background: radial-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(217, 70, 239, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.tech-illustration {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Illustration Animations */
.ill-bg-glow {
    animation: floatGlow 8s ease-in-out infinite alternate;
}
.ill-bg-glow-accent {
    animation: floatGlow 6s ease-in-out infinite alternate-reverse;
}

.ill-terminal {
    transition: var(--transition);
    transform-origin: center;
}
.tech-illustration:hover .ill-terminal {
    stroke: rgba(255, 255, 255, 0.15);
    fill: rgba(13, 18, 30, 0.6);
}

/* Code lines pulsing */
.code-line {
    animation: codePulse 4s ease-in-out infinite;
    transform-origin: left;
}
.c-1 { animation-delay: 0.2s; }
.c-2 { animation-delay: 0.5s; }
.c-3 { animation-delay: 0.8s; }
.c-4 { animation-delay: 1.1s; }
.c-5 { animation-delay: 1.4s; }
.c-6 { animation-delay: 1.7s; }
.c-7 { animation-delay: 2.0s; }
.c-8 { animation-delay: 2.3s; }
.c-9 { animation-delay: 2.6s; }
.c-10 { animation-delay: 2.9s; }
.c-11 { animation-delay: 3.2s; }

/* Network Animations */
.central-node {
    animation: centralPulse 3s ease-in-out infinite;
    transform-origin: 270px 140px;
}
.node-orbit {
    animation: rotateOrbit 15s linear infinite;
    transform-origin: 270px 140px;
}
.sub-node {
    animation: subPulse 4s ease-in-out infinite alternate;
}
.node-group-web {
    transform-origin: 220px 200px;
    animation: floatNode 5s ease-in-out infinite alternate;
}
.node-group-auto {
    transform-origin: 320px 210px;
    animation: floatNode 6s ease-in-out infinite alternate 1s;
}
.node-group-db {
    transform-origin: 260px 270px;
    animation: floatNode 7s ease-in-out infinite alternate 0.5s;
}

/* Pulsing network lines */
.network-line {
    stroke-dashoffset: 0;
    animation: dashStream 30s linear infinite;
}
.l-1 { animation-duration: 8s; }
.l-2 { animation-duration: 10s; }
.l-3 { animation-duration: 6s; }
.l-4 { animation-duration: 7s; }

/* Floating symbols */
.floating-sym {
    animation: symbFloat 6s ease-in-out infinite alternate;
}
.symb-1 {
    animation-duration: 5s;
    transform-origin: 310px 295px;
}
.symb-2 {
    animation-duration: 7s;
    transform-origin: 60px 280px;
}
.symb-3 {
    animation-duration: 8s;
    transform-origin: 290px 90px;
}

/* Keyframes */
@keyframes floatGlow {
    0% { transform: scale(0.9) translate(-5px, -5px); opacity: 0.7; }
    100% { transform: scale(1.1) translate(5px, 5px); opacity: 1; }
}

@keyframes codePulse {
    0%, 100% { opacity: 0.6; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.04); }
}

@keyframes centralPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.4)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.8)); }
}

@keyframes rotateOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes subPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes floatNode {
    0% { transform: translate(0, 0); }
    100% { transform: translate(4px, -6px); }
}

@keyframes dashStream {
    to {
        stroke-dashoffset: -100;
    }
}

@keyframes symbFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
    100% { transform: translateY(-10px) rotate(8deg); opacity: 0.8; }
}

/* Floating Background Particles */
.bg-particle {
    animation: drift 8s ease-in-out infinite alternate;
}
.bp-1 { animation-duration: 9s; animation-delay: 0.5s; transform-origin: 90px 140px; }
.bp-2 { animation-duration: 7s; animation-delay: 1.5s; transform-origin: 330px 100px; }
.bp-3 { animation-duration: 11s; animation-delay: 0.2s; transform-origin: 120px 320px; }
.bp-4 { animation-duration: 6s; animation-delay: 2.5s; transform-origin: 300px 320px; }

@keyframes drift {
    0% { transform: translate(0, 0); opacity: 0.25; }
    100% { transform: translate(12px, -15px); opacity: 0.65; }
}

/* Scanner Laser Line */
.scanner-line {
    animation: scan 5s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes scan {
    0% { transform: translateY(0); opacity: 0.15; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(250px); opacity: 0.15; }
}

/* Terminal Cursor */
.terminal-cursor {
    animation: cursorBlink 1s step-end infinite;
}

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

/* Interactive Hover Enhancements */
.tech-illustration-wrapper:hover .scanner-line {
    animation-duration: 2.5s;
    fill: url(#laserGradHover);
}
.tech-illustration-wrapper:hover .central-node {
    animation-duration: 1.5s;
    stroke: var(--accent-color);
}
.tech-illustration-wrapper:hover .node-orbit {
    animation-duration: 6s;
}
.tech-illustration-wrapper:hover .bg-particle {
    animation-duration: 3s;
}
.tech-illustration-wrapper:hover .ill-terminal {
    stroke: var(--border-glass-active);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
}

.about-text {
    text-align: left;
    width: 100%;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0 0 1.5rem 0;
    max-width: 720px;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin: 2.5rem 0 0 0;
    max-width: 550px;
    width: 100%;
}

.stat {
    flex: 1;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: var(--bg-glass-hover);
}

.stat h4 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.stat p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ====== Skills Section ====== */
.skills {
    padding: 100px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 2.25rem;
    border-radius: 20px;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glass-active);
    box-shadow: var(--shadow);
    background-color: var(--bg-glass-hover);
}

.skill-icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    display: inline-block;
}

.skill-card h3 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
}

.skill-card ul {
    list-style: none;
    padding: 0;
}

.skill-card ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.skill-card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ====== Projects Section & Showcase ====== */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

/* --- Featured Project (ShopX) Section --- */
.featured-project-container {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass-active);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.featured-project-container::before {
    content: 'FEATURED';
    position: absolute;
    top: 20px;
    right: -40px;
    background: linear-gradient(95deg, var(--primary-color), var(--accent-color));
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 45px;
    transform: rotate(45deg);
    letter-spacing: 0.1em;
}

.featured-header {
    margin-bottom: 2.5rem;
}

.featured-header .featured-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.5rem;
}

.featured-header h3 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.featured-header .featured-lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.6;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* Featured Specifications Table */
.featured-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .featured-details {
        grid-template-columns: 1fr;
    }
}

.featured-description-text h4 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.featured-description-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.featured-specs-list {
    background: rgba(6, 8, 15, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
}

.featured-specs-list h4 {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

.featured-specs-list ul {
    list-style: none;
    padding: 0;
}

.featured-specs-list ul li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.featured-specs-list ul li:last-child {
    border-bottom: none;
}

.featured-specs-list ul li span.label {
    color: var(--text-secondary);
    font-weight: 500;
}

.featured-specs-list ul li span.value {
    color: var(--text-primary);
    font-weight: 700;
}

/* Featured Media Section */
.featured-media-header {
    font-size: 1.5rem;
    color: #ffffff;
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
}
@media (max-width: 600px) {
    .featured-video-grid {
        grid-template-columns: 1fr;
    }
}

.featured-video-card {
    background: rgba(6, 8, 15, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.featured-video-card h5 {
    font-size: 1.05rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-glass);
}

.featured-video-wrapper iframe, .featured-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.featured-video-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Featured Screenshot Tab System */
.featured-gallery-section {
    margin-top: 1rem;
}

.featured-gallery-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.featured-gallery-tabs::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.f-tab-btn {
    background: none;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.f-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.f-tab-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.f-gallery-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
    animation: fadeIn 0.4s ease-in-out forwards;
}

.f-gallery-grid.active {
    display: grid;
}

.f-gallery-item {
    background: rgba(6, 8, 15, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.f-gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.f-gallery-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    background: #111;
}

.f-gallery-info {
    padding: 0.75rem;
}

.f-gallery-info h6 {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 0.15rem;
}

.f-gallery-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

.f-zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.f-gallery-item:hover .f-zoom-overlay {
    opacity: 1;
}

.f-zoom-overlay i {
    color: white;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    border-radius: 50%;
}

/* --- Other Projects Grid --- */
.projects-section-header {
    font-size: 1.75rem;
    color: #ffffff;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.projects-grid {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0.5rem 1.5rem 0.5rem; /* Padding for hover transition clearance and scrollbar */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for horizontal project list */
.projects-grid::-webkit-scrollbar {
    height: 6px;
}

.projects-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 10px;
}

.projects-grid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    transition: var(--transition);
}

.projects-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.project-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 0 0 300px; /* Prevent shrinking and lock width to 300px */
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glass-active);
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.15); /* Purple tint shadow */
    background: var(--bg-glass-hover);
}

.project-image {
    height: 160px;
    background: linear-gradient(135deg, rgba(99,102,241,0.07), rgba(168,85,247,0.07));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-card:hover .project-image {
    color: var(--accent-color);
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(168,85,247,0.12));
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tags span {
    font-size: 0.75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-glass);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ====== Testimonials Section ====== */
.testimonials {
    padding: 100px 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    top: 20%;
    right: -10%;
    z-index: 1;
    pointer-events: none;
}

.testimonials .section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-top: -1rem;
    margin-bottom: 3.5rem;
    font-size: 1.1rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    z-index: 2;
    position: relative;
}

.testimonial-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
}

.testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating i {
    color: #f59e0b; /* Amber/gold star color */
    font-size: 0.95rem;
}

.rating span {
    margin-left: 0.5rem;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

.platform-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #14a800; /* Upwork Green */
    background: rgba(20, 168, 0, 0.08);
    border: 1px solid rgba(20, 168, 0, 0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.testimonial-body {
    font-style: italic;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    border-left: 3px solid var(--primary-color);
    padding-left: 1.25rem;
}

.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: auto;
}

.testimonial-footer .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.testimonial-footer .badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-view-feedback {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-view-feedback:hover {
    color: #ffffff;
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Responsiveness for Testimonials */
@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ====== Contact Section ====== */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-info h3 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2.25rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 350px;
    margin: 1.5rem auto 0 auto;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-align: left;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid transparent;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-glass-active);
    transform: translateX(6px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.05);
}

.contact-item i,
.contact-item svg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.contact-item svg {
    padding: 13px;
    fill: currentColor;
}

.contact-item:hover i,
.contact-item:hover svg {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.contact-item h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.contact-item:hover p {
    color: var(--text-primary);
}

.contact-form {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(6, 8, 15, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

/* ====== Footer ====== */
.footer {
    border-top: 1px solid var(--border-glass);
    background: var(--bg-primary);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.footer-section h3 {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 320px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-social a svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: currentColor;
}

.footer-bottom {
    border-top: 1px solid var(--border-glass);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ====== Back to Top Button ====== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: var(--transition);
    z-index: 999;
}

/* ====== Interactive Detailed Modals (on Homepage) ====== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(6, 8, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: modalBGAlpha 0.3s ease;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass-active);
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: var(--text-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-header-banner {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    position: relative;
}

.modal-header-banner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 80%);
    top: 0;
    left: 0;
}

.modal-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-glass-active);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: var(--primary-color);
    position: absolute;
    bottom: -40px;
    left: 2rem;
    box-shadow: var(--shadow-sm);
}

.modal-body {
    padding: 60px 2rem 2.5rem;
}

.modal-title {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.modal-desc-lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.modal-section-title {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.35rem;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.modal-feature-item {
    background: rgba(6, 8, 15, 0.4);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-feature-item i {
    color: var(--primary-color);
}

.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.modal-tech-tag {
    font-size: 0.8rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.1));
    border: 1px solid var(--border-glass);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

.modal-footer-actions {
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

/* ====== Photo Zoom Modal (Generic) ====== */
.img-modal {
    display: none;
    position: fixed;
    z-index: 11000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(6, 8, 15, 0.95);
    backdrop-filter: blur(8px);
}
.img-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 16px;
    border: 2px solid var(--border-glass-active);
    box-shadow: var(--shadow);
    animation: zoom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#img-modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--text-primary);
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.img-modal-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: var(--text-secondary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}
.img-modal-close:hover {
    color: #ffffff;
}

/* Photo modal image change swipe transition animation */
@keyframes fadeScaleIn {
    from {
        opacity: 0.6;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.img-swipe-anim {
    animation: fadeScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Photo Modal Counter */
.img-modal-counter {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 17, 29, 0.6);
    border: 1px solid var(--border-glass);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    z-index: 12000;
    display: none;
}

/* Viewport for zoomed images to support scroll/pan */
.img-modal-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    box-sizing: border-box;
}

.img-modal-content {
    cursor: zoom-in;
    transition: transform 0.2s ease, max-width 0.2s ease, max-height 0.2s ease;
}

.img-modal-content.zoomed {
    max-width: none !important;
    max-height: none !important;
    width: 180% !important; /* Perfect zoom level for desktop screens */
    height: auto !important;
    cursor: zoom-out;
    margin: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Adjust zoom level specifically for portrait phones */
@media (max-width: 576px) {
    .img-modal-viewport {
        padding: 0;
    }
    .img-modal-content.zoomed {
        width: 250% !important; /* Magnify more on mobile to read dashboard text clearly */
    }
}

/* Controls Transition for iOS-style fullscreen */
.img-modal-close,
.img-modal-counter,
#img-modal-caption,
.modal-nav-btn {
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    opacity: 1;
    visibility: visible;
}

.img-modal.controls-hidden .img-modal-close,
.img-modal.controls-hidden .img-modal-counter,
.img-modal.controls-hidden #img-modal-caption,
.img-modal.controls-hidden .modal-nav-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}



/* Lightbox Navigation Buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13, 17, 29, 0.6);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    font-size: 1.5rem;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    backdrop-filter: blur(4px);
}

.modal-nav-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.modal-nav-btn.prev-btn {
    left: 40px;
}

.modal-nav-btn.next-btn {
    right: 40px;
}

@media (max-width: 768px) {
    .modal-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        padding: 0.75rem;
    }
    .modal-nav-btn.prev-btn {
        left: 15px;
    }
    .modal-nav-btn.next-btn {
        right: 15px;
    }
}

/* ====== Animations ====== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes zoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes modalBGAlpha {
    from { background-color: rgba(6, 8, 15, 0); }
    to { background-color: rgba(6, 8, 15, 0.85); }
}
@keyframes modalSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ====== Responsive Breakpoints ====== */

/* Hamburger Menu Icon Transformation & Animations */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Medium Screens (Tablets / Portrait Desktops) */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 2.75rem;
    }
    .hero-content .description {
        margin: 0 auto 2.25rem;
    }
    .cta-buttons {
        justify-content: center;
    }
    .social-links {
        justify-content: center;
    }
    .featured-project-container {
        padding: 2rem;
    }
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .about-text {
        text-align: center;
    }
    .about-stats {
        margin: 2.5rem auto 0 auto;
    }
}

/* Small Screens (Large Phones / Tablets) */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(13, 17, 29, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-glass-active);
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        pointer-events: none;
    }
    .navbar .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }
    .hamburger {
        display: flex;
    }
    .about-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        margin: 2rem auto 0 auto;
        max-width: 450px;
    }
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .skill-card {
        padding: 1.75rem;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Project Detail Subpages */
    .project-detail {
        padding: 100px 0 60px;
    }
    .project-detail .project-hero h1 {
        font-size: 2.25rem;
    }
    .project-detail .features-list {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.25rem;
    }

    /* All Selected Projects Horizontal to Grid Layout */
    .projects-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        overflow-x: visible;
        padding: 1rem 0;
    }
    .project-card {
        flex: unset;
        width: 100%;
    }
}

/* Extra Small Screens (Smartphones) */
@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }
    .hero-content h1 {
        font-size: 2.25rem;
    }
    .subtitle {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    .hero-content .description {
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
    }
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 11px 20px;
        font-size: 0.9rem;
    }
    .hero-image img {
        width: 240px;
        height: 240px;
    }
    
    /* Showcase Headers & Text sizes */
    .featured-header h3 {
        font-size: 1.6rem;
    }
    .featured-header .featured-badge {
        font-size: 0.75rem;
    }
    .featured-header .featured-lead {
        font-size: 0.95rem;
    }
    .projects-section-header {
        font-size: 1.4rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Showcase Actions */
    .showcase-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    .showcase-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .featured-project-container {
        padding: 1.25rem;
        border-radius: 18px;
    }
    .featured-specs-list {
        padding: 1rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    .testimonial-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .btn-view-feedback {
        width: 100%;
        justify-content: center;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        margin: 15px auto;
        border-radius: 18px;
    }
    .modal-header-banner {
        height: 100px;
        padding: 1rem;
    }
    .modal-icon-container {
        width: 60px;
        height: 60px;
        border-radius: 14px;
        bottom: -30px;
        left: 1.25rem;
        font-size: 1.75rem;
    }
    .modal-body {
        padding: 45px 1.25rem 1.75rem;
    }
    .modal-title {
        font-size: 1.5rem;
    }
    .modal-desc-lead {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    .modal-footer-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    .modal-footer-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .contact-modal-content {
        padding: 2.5rem 1.25rem !important;
    }
    
    /* Image modal Zoom mobile optimization */
    .img-modal {
        padding-top: 0;
        overflow: hidden;
        background-color: #000000 !important; /* Pure black iOS-like background */
        backdrop-filter: none;
    }
    .img-modal[style*="display: block"] {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .img-modal-close {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 28px;
        background: rgba(30, 30, 30, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
        color: #ffffff;
        z-index: 13000;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        line-height: 1;
        padding-bottom: 4px;
        transition: background 0.2s, transform 0.2s;
    }
    .img-modal-close:active {
        transform: scale(0.92);
        background: rgba(30, 30, 30, 0.9);
    }
    .img-modal-content {
        max-width: 100% !important;
        max-height: 100vh !important;
        width: 100% !important;
        height: auto !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        object-fit: contain;
        margin: auto 0;
        /* Snapping animation for iOS-style dragging release */
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
    }
    #img-modal-caption {
        position: absolute;
        bottom: 30px;
        left: 16px;
        right: 16px;
        width: calc(100% - 32px);
        background: rgba(13, 17, 29, 0.85);
        backdrop-filter: blur(12px);
        border: 1px solid var(--border-glass);
        border-radius: 16px;
        padding: 14px 18px;
        font-size: 0.9rem;
        line-height: 1.4;
        color: var(--text-primary);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        z-index: 12000;
        text-align: center;
        margin: 0;
        animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes slideUp {
        from { transform: translateY(20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .modal-nav-btn {
        display: none !important;
    }

    
    /* Dedicated Project Detail pages specs table */
    .specs-table td {
        display: block;
        width: 100% !important;
    }
    .specs-table td.label {
        border-bottom: none;
        padding-bottom: 0.25rem;
        font-size: 0.85rem;
    }
    .specs-table td.value {
        padding-top: 0.25rem;
        font-size: 0.9rem;
    }
}

/* Very Small Screens */
@media (max-width: 380px) {
    .hero-image img {
        width: 200px;
        height: 200px;
    }
    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* Custom YouTube video preview link */
.featured-video-link, .video-link {
    text-decoration: none;
    display: block;
    overflow: hidden;
    border-radius: 10px;
}

.video-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: var(--transition);
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 8, 15, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-play-overlay i {
    font-size: 3.5rem;
    color: #ff0000;
    transition: var(--transition);
    text-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
}

.featured-video-link:hover .video-thumbnail-img, .video-link:hover .video-thumbnail-img {
    transform: scale(1.05);
}

.featured-video-link:hover .video-play-overlay, .video-link:hover .video-play-overlay {
    background: rgba(6, 8, 15, 0.2);
}

.featured-video-link:hover .video-play-overlay i, .video-link:hover .video-play-overlay i {
    transform: scale(1.15);
    color: #ff3333;
}

/* ====== Project Detail Pages (Subpages) ====== */
.project-detail {
    padding: 140px 0 80px;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

.project-detail .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: var(--transition);
    font-weight: 600;
}

.project-detail .back-link:hover {
    transform: translateX(-5px);
    color: var(--accent-color);
}

.project-detail .project-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.project-detail .project-hero-icon {
    font-size: 5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.project-detail .project-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.project-detail .project-hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.project-detail .project-content {
    max-width: 900px;
    margin: 0 auto;
}

.project-detail .project-section {
    margin-bottom: 3.5rem;
}

.project-detail .project-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

.project-detail .project-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.project-detail .features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-detail .feature-item {
    padding: 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.project-detail .feature-item:hover {
    transform: translateY(-3px);
    border-color: var(--border-glass-active);
    background: var(--bg-glass-hover);
}

.project-detail .feature-item i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.project-detail .feature-item strong {
    color: #ffffff;
}

.project-detail .tech-stack {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.project-detail .tech-tag {
    padding: 0.5rem 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.project-detail .cta-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 3.5rem;
    justify-content: center;
}

/* ====== Contact Options Modal ====== */
.contact-modal-content {
    max-width: 450px !important;
    text-align: center;
    padding: 3rem 2rem !important;
}

.contact-options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
}

.contact-option-btn svg {
    width: 1.3rem;
    height: 1.3rem;
    fill: currentColor;
}

.contact-option-btn i {
    font-size: 1.3rem;
}

/* LinkedIn button hover */
.linkedin-btn {
    color: #0077b5;
}
.linkedin-btn:hover {
    background: rgba(0, 119, 181, 0.08);
    border-color: #0077b5;
    box-shadow: 0 0 15px rgba(0, 119, 181, 0.2);
}

/* Upwork button hover */
.upwork-btn {
    color: #14a800;
}
.upwork-btn:hover {
    background: rgba(20, 168, 0, 0.08);
    border-color: #14a800;
    box-shadow: 0 0 15px rgba(20, 168, 0, 0.2);
}

/* Email button hover */
.email-btn {
    color: #ea4335; /* Gmail Red */
}
.email-btn:hover {
    background: rgba(234, 67, 53, 0.08);
    border-color: #ea4335;
    box-shadow: 0 0 15px rgba(234, 67, 53, 0.2);
}

/* Waving emoji keyframes & styles */
.wave-emoji {
    display: inline-block;
    animation: wave 2.5s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% { transform: rotate( 0.0deg) }
   10% { transform: rotate(14.0deg) }
   20% { transform: rotate(-8.0deg) }
   30% { transform: rotate(14.0deg) }
   40% { transform: rotate(-4.0deg) }
   50% { transform: rotate(10.0deg) }
   60% { transform: rotate( 0.0deg) }
  100% { transform: rotate( 0.0deg) }
}

.contact-item p {
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 576px) {
    .footer-content {
        text-align: center;
    }
    .footer-section p {
        margin: 0 auto;
    }
    .footer-social {
        justify-content: center;
    }
    .testimonial-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ====== Mobile Responsive Polish ====== */
html {
    scroll-padding-top: 86px;
}

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

.btn {
    min-height: 46px;
    line-height: 1.2;
    text-align: center;
}

.featured-header h3,
.hero-content h1,
.hero-content .description,
.testimonial-body,
.project-content h3,
.modal-title,
.contact-item p,
.footer-section p {
    overflow-wrap: anywhere;
}

.container {
    width: 100%;
}

.hero-content,
.hero-image,
.about-image,
.about-text,
.featured-details,
.featured-description-text,
.featured-specs-list,
.featured-video-card,
.f-gallery-item,
.project-card,
.project-content,
.skill-card,
.testimonial-card,
.contact-item,
.modal-content,
.modal-body {
    min-width: 0;
}

@media (max-width: 992px) {
    body {
        background-attachment: scroll;
    }

    .hero {
        min-height: auto;
        padding: 128px 0 72px;
    }

    .hero .container {
        gap: 2.5rem;
    }

    .about,
    .skills,
    .projects,
    .testimonials,
    .contact {
        padding: 80px 0;
    }

    .featured-video-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-content {
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 76px;
    }

    .navbar {
        padding: 0.9rem 0;
    }

    .navbar .container {
        min-height: 42px;
    }

    .logo a {
        font-size: 1.15rem;
    }

    .navbar .nav-links {
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        padding: 1.35rem 1.25rem 1.5rem;
        gap: 1.1rem;
    }

    .nav-links a {
        display: block;
        padding: 0.45rem 0;
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: clamp(2.15rem, 9vw, 3rem);
    }

    .hero-content .description {
        max-width: 38rem;
    }

    .tech-illustration-wrapper {
        max-width: min(360px, 86vw);
        border-radius: 18px;
    }

    .featured-project-container {
        padding: 1.75rem;
        border-radius: 18px;
    }

    .featured-project-container::before {
        top: 14px;
        right: -46px;
        font-size: 0.62rem;
        padding: 5px 42px;
    }

    .featured-header {
        margin-bottom: 1.75rem;
        padding-right: 1rem;
    }

    .featured-header h3 {
        font-size: clamp(1.65rem, 7vw, 2.2rem);
        line-height: 1.15;
    }

    .featured-grid {
        gap: 2rem;
    }

    .featured-media-header {
        align-items: flex-start;
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .featured-video-card {
        padding: 1rem;
        border-radius: 14px;
    }

    .featured-video-card h5 {
        align-items: flex-start;
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .featured-gallery-tabs {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding: 0 0.25rem 0.65rem;
        scroll-snap-type: x proximity;
    }

    .f-tab-btn {
        scroll-snap-align: start;
        padding: 0.55rem 0.85rem;
        font-size: 0.82rem;
    }

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

    .f-gallery-item img {
        height: 112px;
    }

    .f-gallery-info {
        padding: 0.65rem;
    }

    .projects-section-header {
        align-items: flex-start;
        line-height: 1.25;
    }

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

    .project-content {
        padding: 1.15rem;
    }

    .project-image {
        height: 140px;
    }

    .contact-details {
        max-width: 430px;
    }

    .modal {
        padding: 12px 0;
    }

    .modal-content {
        width: calc(100% - 24px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        margin: 0 auto;
    }

    .modal-footer-actions .btn {
        flex: 1 1 0;
        justify-content: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .img-modal {
        padding-top: 72px;
    }

    .img-modal-content {
        max-height: 68vh;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 18px;
    }

    .section-title {
        font-size: clamp(1.8rem, 8vw, 2.15rem);
        margin-bottom: 2rem;
    }

    .hero {
        padding: 108px 0 56px;
    }

    .hero .container {
        gap: 2rem;
        max-width: 100vw;
        overflow: hidden;
    }

    .hero-content {
        width: 100%;
        max-width: calc(100vw - 36px);
        margin: 0 auto;
    }

    .hero-content h1 {
        margin-bottom: 0.9rem;
        max-width: 100%;
    }

    .hero-content h1 .highlight {
        display: block;
    }

    .subtitle {
        font-size: 1.15rem;
    }

    .hero-content .description {
        line-height: 1.65;
        max-width: 29ch;
    }

    .cta-buttons,
    .showcase-actions {
        width: calc(100vw - 52px);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons .btn,
    .showcase-actions .btn {
        width: calc(100vw - 52px) !important;
        max-width: 100%;
    }

    .social-links {
        gap: 0.75rem;
    }

    .social-links a {
        width: 42px;
        height: 42px;
        border-radius: 9px;
    }

    .hero-image img {
        width: min(230px, 68vw);
        height: min(230px, 68vw);
    }

    .about,
    .skills,
    .projects,
    .testimonials,
    .contact {
        padding: 64px 0;
    }

    .about-content {
        gap: 2rem;
    }

    .about-text h3,
    .contact-info h3 {
        font-size: 1.5rem;
        line-height: 1.25;
    }

    .about-text p,
    .contact-info p,
    .testimonials .section-subtitle {
        font-size: 0.95rem;
    }

    .testimonials .container,
    .testimonials-grid {
        max-width: 100%;
        overflow: hidden;
    }

    .testimonials .section-subtitle {
        max-width: 28ch;
        margin-left: auto;
        margin-right: auto;
    }

    .about-stats {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .stat {
        padding: 1.2rem;
    }

    .skill-card,
    .testimonial-card {
        border-radius: 16px;
        padding: 1.35rem;
        width: calc(100vw - 36px);
        max-width: calc(100vw - 36px);
        overflow: hidden;
    }

    .testimonial-body {
        width: min(100%, 29ch);
        font-size: 0.96rem;
        line-height: 1.55;
    }

    .featured-project-container {
        margin-left: -2px;
        margin-right: -2px;
        padding: 1.15rem;
        margin-bottom: 3rem;
        background: linear-gradient(180deg, rgba(13, 17, 29, 0.92), rgba(6, 8, 15, 0.72));
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
    }

    .featured-project-container::before {
        display: none;
    }

    .featured-header {
        padding-right: 0;
        margin-bottom: 1.35rem;
    }

    .featured-header .featured-badge {
        font-size: 0.7rem;
        letter-spacing: 0.12em;
    }

    .featured-description-text h4,
    .featured-media-header {
        font-size: 1.05rem;
    }

    .featured-header .featured-lead,
    .featured-description-text p {
        line-height: 1.6;
    }

    .featured-details {
        grid-template-columns: minmax(0, 1fr) !important;
        justify-self: stretch;
        width: calc(100vw - 58px) !important;
        max-width: calc(100vw - 58px) !important;
        inline-size: calc(100vw - 58px) !important;
        max-inline-size: calc(100vw - 58px) !important;
    }

    .featured-description-text,
    .featured-specs-list {
        width: calc(100vw - 58px) !important;
        max-width: calc(100vw - 58px) !important;
        inline-size: calc(100vw - 58px) !important;
        max-inline-size: calc(100vw - 58px) !important;
    }

    .featured-grid > *,
    .featured-media-header,
    .featured-video-grid,
    .featured-video-card,
    .featured-video-wrapper,
    .featured-gallery-section,
    .featured-gallery-tabs,
    .f-gallery-grid {
        width: calc(100vw - 58px) !important;
        max-width: calc(100vw - 58px) !important;
        inline-size: calc(100vw - 58px) !important;
        max-inline-size: calc(100vw - 58px) !important;
    }

    .featured-grid {
        gap: 1.35rem;
    }

    .featured-description-text p:nth-of-type(2) {
        display: none;
    }

    .featured-specs-list {
        border-radius: 12px;
        padding: 0.95rem;
    }

    .featured-video-grid {
        gap: 0.9rem;
    }

    .featured-video-card:nth-child(n + 2) {
        display: none;
    }

    .featured-specs-list ul li {
        align-items: flex-start;
        gap: 0.2rem;
    }

    .featured-gallery-tabs {
        border-bottom: 0;
        margin-bottom: 1rem;
    }

    .f-tab-btn {
        border: 1px solid var(--border-glass);
        background: rgba(255, 255, 255, 0.02);
    }

    .f-gallery-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .f-gallery-grid {
        gap: 0.75rem;
    }

    .f-gallery-item:nth-child(n + 5) {
        display: none;
    }

    .f-gallery-item img {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .project-image {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .project-card:hover,
    .skill-card:hover,
    .testimonial-card:hover,
    .f-gallery-item:hover {
        transform: none;
    }

    .contact-details {
        gap: 1rem;
    }

    .contact-item {
        gap: 0.85rem;
        padding: 0.85rem;
        align-items: flex-start;
    }

    .contact-item i,
    .contact-item svg {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    .footer {
        padding: 3rem 0 1.5rem;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 420px) {
    .container {
        padding: 0 14px;
    }

    .logo a {
        font-size: 1.02rem;
    }

    .hero-content h1 {
        font-size: 1.95rem;
        line-height: 1.12;
    }

    .cta-buttons .btn,
    .showcase-actions .btn,
    .modal-footer-actions .btn,
    .contact-option-btn {
        font-size: 0.88rem;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .featured-project-container {
        padding: 1rem;
        border-radius: 16px;
    }

    .featured-specs-list ul li {
        flex-direction: column;
        padding: 0.65rem 0;
    }

    .testimonial-body {
        font-size: 0.98rem;
        padding-left: 0.9rem;
    }

    .modal-body {
        padding: 44px 1rem 1.35rem;
    }

    .modal-features-list {
        grid-template-columns: 1fr;
    }

    .modal-footer-actions {
        flex-direction: column;
    }

    .contact-modal-content {
        padding: 2.25rem 1rem 1.25rem !important;
    }

    .img-modal-content {
        max-width: calc(100% - 24px);
        max-height: 55vh;
    }
}

/* ==========================================================================
   ====== Project Detail Pages (Generic Layout) ======
   ========================================================================== */

/* Video Showcase Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}
.video-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.video-card h3 {
    font-size: 1.1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-glass);
}
.video-wrapper iframe, .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Tabs Gallery */
.gallery-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
    overflow-x: auto;
}
.tab-btn {
    background: none;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}
.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}
.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}
.gallery-content {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    animation: fadeIn 0.4s ease-in-out forwards;
}
.gallery-content.active {
    display: grid;
}
.gallery-item {
    background: rgba(6, 8, 15, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}
.gallery-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    background: #111;
}
.gallery-item-info {
    padding: 0.75rem;
}
.gallery-item-info h4 {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 0.15rem;
}
.gallery-item-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}
.zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.gallery-item:hover .zoom-overlay,
.detail-preview-main:hover::after,
.detail-preview-small:hover::after {
    opacity: 1;
}
.zoom-overlay i {
    color: white;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    border-radius: 50%;
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
}
.specs-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.95rem;
}
.specs-table tr:last-child td {
    border-bottom: none;
}
.specs-table td.label {
    color: var(--text-secondary);
    font-weight: 500;
    width: 30%;
}
.specs-table td.value {
    color: var(--text-primary);
    font-weight: 700;
}

/* Detail Hero Layout */
.detail-page .project-content {
    max-width: 1100px;
}
.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
    padding: 2.25rem;
    border: 1px solid var(--border-glass-active);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(13, 17, 29, 0.88), rgba(6, 8, 15, 0.72));
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}
.detail-hero::before {
    content: '';
    position: absolute;
    inset: -30% -20% auto auto;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.16), transparent 62%);
    pointer-events: none;
}
.detail-hero-copy,
.detail-preview {
    position: relative;
    z-index: 1;
    min-width: 0;
}
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.detail-hero h1 {
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 0.95;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.05em;
}
.detail-hero-lead {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    max-width: 620px;
}
.detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1.75rem 0;
}
.detail-meta-card {
    padding: 0.9rem;
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}
.detail-meta-card strong {
    display: block;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.25;
}
.detail-meta-card span {
    color: var(--text-secondary);
    font-size: 0.78rem;
}
.detail-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}
.detail-preview {
    display: grid;
    gap: 1rem;
}
.detail-preview-main,
.detail-preview-small {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(6, 8, 15, 0.72);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
}
.detail-preview-main::after,
.detail-preview-small::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(6, 8, 15, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.14);
    opacity: 0;
    transform: translateY(6px);
    transition: var(--transition);
    pointer-events: none;
}
.detail-preview-main:hover::after,
.detail-preview-small:hover::after {
    opacity: 1;
    transform: translateY(0);
}
.detail-preview-main img,
.detail-preview-small img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.detail-preview-main img {
    aspect-ratio: 16 / 10;
}
.detail-preview-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.detail-preview-small img {
    aspect-ratio: 4 / 3;
}
.detail-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 1.5rem;
    align-items: start;
}
.detail-overview-card {
    padding: 1.5rem;
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    background: var(--bg-glass);
}
.detail-overview-card h3 {
    margin-bottom: 0.75rem;
    color: #ffffff;
    font-size: 1.1rem;
}
.detail-stack-list {
    display: grid;
    gap: 0.75rem;
}
.detail-stack-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.detail-stack-list div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.detail-stack-list strong {
    color: #ffffff;
    white-space: nowrap;
}
.project-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.project-section-title i {
    color: var(--primary-color);
    font-size: 1.05rem;
}

@media (max-width: 900px) {
    .detail-hero,
    .detail-overview-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 576px) {
    .detail-hero {
        padding: 1.15rem;
        border-radius: 20px;
        gap: 1.35rem;
        margin-bottom: 2.5rem;
    }
    .detail-kicker {
        font-size: 0.72rem;
    }
    .detail-hero h1 {
        font-size: 2.35rem;
        line-height: 1.05;
    }
    .detail-hero-lead {
        font-size: 0.96rem;
        line-height: 1.65;
    }
    .detail-meta,
    .detail-preview-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
    }
    .detail-meta-card {
        padding: 0.7rem;
        border-radius: 12px;
    }
    .detail-meta-card strong {
        font-size: 0.78rem;
    }
    .detail-meta-card span {
        font-size: 0.68rem;
    }
    .detail-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .detail-preview-main,
    .detail-preview-small {
        border-radius: 14px;
    }
    .detail-preview-small img {
        aspect-ratio: 1 / 0.82;
    }
    .detail-overview-card {
        padding: 1.1rem;
    }
    .detail-stack-list div {
        flex-direction: column;
        gap: 0.15rem;
    }
    .gallery-content {
        grid-template-columns: 1fr;
    }
    .gallery-item img {
        height: auto;
        aspect-ratio: 16 / 10;
    }
}
