/* ==========================================================================
   S7VEN Design System - Dark Mode Vanilla CSS
   ========================================================================== */

/* --- Variables --- */
:root {
    /* Colors */
    --bg-color: #050514;
    --bg-surface: #0a0b27;
    --bg-glass: rgba(10, 11, 39, 0.4);
    --bg-glass-hover: rgba(16, 18, 59, 0.6);

    --primary: #5757ff;
    --primary-glow: rgba(87, 87, 255, 0.5);
    --primary-hover: #7b7bff;

    --accent: #0200da;
    --highlight: #00e5ff;
    --highlight-glow: rgba(0, 229, 255, 0.4);
    --text-main: #fcfcff;
    --text-muted: #9ba1b8;

    --border-light: rgba(255, 255, 255, 0.08);

    /* Fonts */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Source Code Pro', monospace;

    /* Utilities */
    --transition-fast: 0.2s ease-out;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: auto;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.hero-title span {
    color: var(--highlight);
    text-shadow: 0 0 20px var(--highlight-glow);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

.section-title {
    margin-bottom: 4rem;
    position: relative;
}

.outline-text {
    font-size: clamp(4rem, 8vw, 8rem);
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05);
    font-family: var(--font-mono);
    position: absolute;
    top: -50%;
    left: 0;
    z-index: -1;
    pointer-events: none;
    text-transform: uppercase;
}

.section-title h3 {
    font-size: 2.5rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* --- Layout Grid --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

/* Ambient Background elements */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--accent);
}

.glow-2 {
    bottom: -20%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(87, 87, 255, 0.3);
}

/* --- Components --- */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    border-radius: 100px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(87, 87, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px var(--primary-glow);
    background: var(--primary-hover);
}

.btn-highlight {
    background: var(--highlight);
    color: #000;
    box-shadow: 0 8px 20px var(--highlight-glow);
}

.btn-highlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px var(--highlight-glow);
    background: #00f2ff;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid var(--border-light);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-block {
    width: 100%;
}

/* Bento Card Style */
.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

.bento-card:hover {
    transform: translateY(-8px);
    border-color: rgba(87, 87, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(87, 87, 255, 0.1);
}

/* --- Sections --- */

/* Header */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 20, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

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

.logo img {
    height: 36px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 100px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--highlight);
    border: 1px solid rgba(0, 229, 255, 0.3);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
}

.graphic-wrapper {
    position: relative;
}

.floating-img {
    animation: float 6s ease-in-out infinite;
    max-width: 90%;
    margin: 0 auto;
    filter: drop-shadow(0 20px 30px rgba(2, 0, 218, 0.4));
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.profile-photo {
    max-width: 250px;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-light);
    transform: rotate(-3deg);
    transition: var(--transition-bounce);
}

.profile-photo:hover {
    transform: rotate(0) scale(1.03);
    box-shadow: 0 15px 40px var(--primary-glow);
}

.stats {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
}

.right-stats {
    border-top: none;
    padding-top: 0;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stat-num {
    font-size: 2.5rem;
    color: var(--primary);
    font-family: var(--font-mono);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-bar {
    height: 6px;
    background: var(--bg-color);
    border-radius: 100px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 100px;
}

/* Services (Bento Grid) */
.services-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 1.5rem;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.icon-wrapper.primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
}

.services-bento h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.services-bento p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.arrow-link i {
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}

.arrow-link:hover i {
    transform: translateX(5px);
}

.accent-link {
    color: inherit;
}

.accent-link:hover {
    color: var(--primary);
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(87, 87, 255, 0.3);
}

.item-visual {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.item-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover .item-visual img {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 20, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
    backdrop-filter: blur(4px);
}

.portfolio-item:hover .item-overlay {
    opacity: 1;
}

.view-btn {
    background: #fff;
    color: #000;
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(20px);
    transition: var(--transition-bounce);
}

.portfolio-item:hover .view-btn {
    transform: translateY(0);
}

.item-content {
    padding: 1.5rem;
}

.category-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-family: var(--font-mono);
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.item-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.item-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog Updates */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.contact-info {
    background: linear-gradient(135deg, var(--bg-surface), #0f113a);
    padding: 3rem;
    border-right: 1px solid var(--border-light);
}

.cf-header h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cf-header p {
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.info-blocks {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(87, 87, 255, 0.1);
    padding: 0.8rem;
    border-radius: 50%;
}

.info-item h5 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.info-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contact-form-container {
    padding: 3rem;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(87, 87, 255, 0.15);
}

.form-status {
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    display: none;
    padding: 1rem;
    border-radius: 8px;
}

.form-status.success {
    display: block;
    background: rgba(46, 213, 115, 0.1);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.2);
}

.form-status.error {
    display: block;
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.2);
}

/* Footer */
.footer {
    background: var(--bg-surface);
    padding-top: 4rem;
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
}

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

.footer-logo {
    height: 40px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

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

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border-radius: 50%;
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

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

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.slide-right {
    transform: translateX(50px);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Responsive Layout --- */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
    }

    .hero-subtitle {
        margin: 1.5rem auto 2.5rem;
    }

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

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

    .services-bento {
        grid-template-columns: 1fr 1fr;
    }

    .bento-card[style*="column: span 2"] {
        grid-column: span 2 !important;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info {
        display: none;
    }

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

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .navbar {
        position: absolute;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg-surface);
        flex-direction: column;
        justify-content: center;
        border-left: 1px solid var(--border-light);
        transition: var(--transition-smooth);
        gap: 2rem;
    }

    .nav-links.nav-open {
        right: 0;
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .outline-text {
        font-size: 2.5rem;
        top: -30%;
    }

    .services-bento {
        grid-template-columns: 1fr;
    }

    .bento-card[style*="column: span"] {
        grid-column: span 1 !important;
    }

    .form-group-row {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

/* --- Portfolio Details Layout --- */
.portfolio-details {
    padding-top: 150px;
}

.breadcrumbs {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

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

.project-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 2rem;
}

.portfolio-grid-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* CSS Scroll-Snap Gallery */
.gallery-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    gap: 0;
}

.gallery-wrapper::-webkit-scrollbar {
    height: 8px;
}

.gallery-wrapper::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: 10px;
}

.gallery-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.gallery-item {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    scroll-snap-align: start;
    background: var(--bg-color);
}

.gallery-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
        color: var(--highlight);
    }

    100% {
        opacity: 0.5;
    }
}

/* Info Column */
.info-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.info-list li {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-light);
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-label i {
    color: var(--highlight);
    font-size: 1.1rem;
}

.info-value {
    font-weight: 500;
    font-size: 1.05rem;
}

.project-description h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.project-description p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

@media (max-width: 992px) {
    .portfolio-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Premium Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #03030b;
}

::-webkit-scrollbar-thumb {
    background: #121438;
    border: 2px solid #03030b;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Scroll Progress Bar --- */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--highlight));
    box-shadow: 0 0 8px var(--highlight-glow);
    transition: width 0.1s ease-out;
}

/* --- Portfolio Filtering Controls --- */
.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-2px);
}

/* --- Portfolio Transition & Filter Animations --- */
.portfolio-grid {
    transition: all 0.5s ease;
}

.portfolio-item {
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
}

.portfolio-item.hide {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
}

/* --- About & Skills Restructured Layouts --- */
.about-layout-split {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 3rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.about-photo-wrapper {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.about-bio-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.skills-layout-split {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

/* Bio cards sliding list */
.bio-cards-slider {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    margin-top: 1rem;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.bio-card {
    flex: 0 0 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    scroll-snap-align: start;
    transition: var(--transition-smooth);
}

.bio-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(87, 87, 255, 0.08);
}

.bio-card h5 {
    font-size: 1.1rem;
    color: var(--highlight);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bio-card h5 i {
    font-size: 1.25rem;
}

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

.bio-slider-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.8;
}

.bio-cards-slider::-webkit-scrollbar {
    height: 4px;
}

.bio-cards-slider::-webkit-scrollbar-track {
    background: transparent;
}

.bio-cards-slider::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 10px;
}

.bio-cards-slider::-webkit-scrollbar-thumb:hover {
    background: var(--highlight);
}

/* --- Section Padding Reduction --- */
section {
    padding: 70px 0;
    /* Reduced from 100px */
}

/* --- Responsive carousels & sliders --- */

/* Services (Ecosystem) Mobile slide */
@media (max-width: 768px) {
    .services-bento {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.25rem;
        padding: 0.5rem 0.5rem 1rem 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .services-bento .bento-card {
        flex: 0 0 85% !important;
        scroll-snap-align: start;
        padding: 2rem !important;
    }

    .services-bento::-webkit-scrollbar {
        height: 4px;
    }

    .services-bento::-webkit-scrollbar-thumb {
        background: var(--border-light);
        border-radius: 10px;
    }
}

/* Portfolio Creations Slider */
.portfolio-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.portfolio-item {
    flex: 0 0 calc(25% - 1.125rem);
    /* Default 4 items visible on desktop */
    scroll-snap-align: start;
}

.portfolio-grid::-webkit-scrollbar {
    height: 6px;
}

.portfolio-grid::-webkit-scrollbar-thumb {
    background: #121438;
    border-radius: 10px;
}

.portfolio-grid::-webkit-scrollbar-thumb:hover {
    background: var(--highlight);
}

/* Mobile grids stack adjustments */
@media (max-width: 1200px) {
    .portfolio-item {
        flex: 0 0 calc(33.33% - 1rem);
        /* 3 items */
    }
}

@media (max-width: 992px) {

    .about-layout-split,
    .skills-layout-split {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        text-align: center;
    }

    .about-photo-wrapper {
        margin-bottom: 0;
    }

    .skills-layout-split .stats {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2rem !important;
    }

    .portfolio-item {
        flex: 0 0 calc(40% - 1rem);
        /* 2.5 items, smaller card footprint */
    }

    .item-visual {
        aspect-ratio: 18/9 !important;
        /* Shorter card visual height on tablets */
    }

    .bio-cards-slider {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .skills-layout-split .stats {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .portfolio-item {
        flex: 0 0 75%;
        /* 1 item + peek of next, cleaner scaling */
    }
}

/* --- Premium Scroll-Snapping (All Screen Sizes) --- */
html.home-snap-html {
    scroll-snap-type: y mandatory;
    scroll-behavior: auto;
    scroll-padding-top: 0px;
    /* Snapping sections exactly to 0px viewport top */
}

html.home-snap-html section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    /* ensures no phantom scrolls */
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    padding-top: 105px;
    padding-bottom: 25px;
}

/* Responsive adjustments to prevent clipping on mobile/tablet screen heights */
@media (max-width: 992px) {
    html.home-snap-html section {
        padding-top: 85px !important;
        padding-bottom: 20px !important;
    }
}

@media (max-width: 768px) {
    html.home-snap-html section {
        padding-top: 80px !important;
        padding-bottom: 20px !important;
    }
}

/* Fine-tune specific section elements */
html.home-snap-html section .section-title {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    html.home-snap-html section .section-title {
        margin-bottom: 0.75rem !important;
    }

    .section-title h3 {
        font-size: 1.75rem !important;
    }

    .section-title p {
        font-size: 0.85rem !important;
        margin-top: 0.25rem !important;
    }

    .outline-text {
        font-size: 2rem !important;
        top: -20% !important;
    }
}

html.home-snap-html section.hero {
    padding-top: 110px;
    padding-bottom: 25px;
}

@media (max-width: 992px) {
    html.home-snap-html section.hero {
        padding-top: 95px !important;
        padding-bottom: 20px !important;
    }

    .hero-graphic img {
        max-height: 22vh;
        width: auto;
        object-fit: contain;
    }
}

@media (max-width: 576px) {
    html.home-snap-html section.hero {
        padding-top: 85px !important;
        padding-bottom: 20px !important;
    }

    .hero-graphic {
        display: none !important;
        /* hide graphic on small phones to fit text content cleanly */
    }
}

/* About profile photo scaling on mobile and tablet */
@media (max-width: 992px) {
    .profile-photo {
        max-height: 120px;
        width: auto;
        margin: 0 auto 1.5rem;
    }
}

@media (max-width: 768px) {
    /* About section mobile compactness to fit 100dvh snap height */
    .about-layout-split {
        gap: 1.25rem !important;
    }
    
    .profile-photo {
        max-height: 90px !important;
        margin: 0 auto 0.75rem !important;
    }
    
    .lead {
        font-size: 1.05rem !important;
        line-height: 1.45 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .bio-cards-slider {
        margin-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        gap: 0.85rem !important;
    }
    
    .bio-card {
        flex: 0 0 240px !important;
        padding: 1rem !important;
        border-radius: var(--radius-sm) !important;
    }
    
    .bio-card h5 {
        font-size: 0.95rem !important;
        margin-bottom: 0.35rem !important;
    }
    
    .bio-card p {
        font-size: 0.82rem !important;
        line-height: 1.4 !important;
    }
    
    .bio-slider-hint {
        font-size: 0.7rem !important;
        margin-top: 0.25rem !important;
    }
}

@media (max-width: 576px) {
    .about-layout-split {
        gap: 1rem !important;
    }
    
    .profile-photo {
        max-height: 80px !important;
        margin: 0 auto 0.75rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .bio-cards-slider {
        margin-top: 0.5rem !important;
        gap: 0.75rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .bio-card {
        flex: 0 0 220px !important;
        padding: 0.85rem !important;
        border-radius: var(--radius-sm) !important;
    }
    
    .bio-card h5 {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .bio-card p {
        font-size: 0.78rem !important;
        line-height: 1.35 !important;
    }
}

/* Skills stats bar layout on mobile */
@media (max-width: 768px) {
    .skills-layout-split .stats {
        flex-direction: row !important;
        justify-content: space-around !important;
        gap: 1rem !important;
        width: 100%;
        border-top: none;
        padding-top: 0;
        margin-bottom: 1.5rem !important;
    }
}

/* Skills Bento Card scaling on mobile */
@media (max-width: 768px) {
    .about-skills {
        padding: 1.25rem !important;
    }

    .skill-list {
        gap: 0.75rem !important;
        margin-top: 0.75rem !important;
    }

    .skill-item {
        margin-bottom: 0.5rem !important;
    }

    .skill-info {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem !important;
    }

    .skill-bar {
        height: 4px !important;
    }
}

/* Services (Ecosystem) Slider Carousel */
html.home-snap-html .services-bento {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    -webkit-overflow-scrolling: touch;
}

html.home-snap-html .services-bento .bento-card {
    flex: 0 0 calc(33.333% - 1rem);
    /* 3 items on desktop */
    scroll-snap-align: start;
    padding: 1.75rem;
}

@media (max-width: 992px) {
    html.home-snap-html .services-bento .bento-card {
        flex: 0 0 calc(50% - 0.75rem);
        /* 2 items on tablet */
    }
}

@media (max-width: 768px) {
    html.home-snap-html .services-bento .bento-card {
        flex: 0 0 85% !important;
        /* 1 item on mobile */
        padding: 1.25rem !important;
    }

    html.home-snap-html .services-bento .icon-wrapper {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.5rem !important;
        border-radius: 10px !important;
        margin-bottom: 0.75rem !important;
    }

    html.home-snap-html .services-bento h4 {
        font-size: 1.15rem !important;
        margin-bottom: 0.5rem !important;
    }

    html.home-snap-html .services-bento p {
        font-size: 0.85rem !important;
        margin-bottom: 0.75rem !important;
    }
}

html.home-snap-html .services-bento .icon-wrapper {
    width: 50px;
    height: 50px;
    font-size: 1.75rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

html.home-snap-html .services-bento h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

html.home-snap-html .services-bento p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

html.home-snap-html .services-bento::-webkit-scrollbar {
    height: 6px;
}

html.home-snap-html .services-bento::-webkit-scrollbar-thumb {
    background: #121438;
    border-radius: 10px;
}

html.home-snap-html .services-bento::-webkit-scrollbar-thumb:hover {
    background: var(--highlight);
}

/* Creations Slider Card sizing on mobile */
@media (max-width: 768px) {
    .portfolio-grid .portfolio-item .item-content {
        padding: 1rem !important;
    }

    .portfolio-grid .portfolio-item .item-content h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
    }

    .portfolio-grid .portfolio-item .item-content p {
        font-size: 0.85rem !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }

    .portfolio-grid .portfolio-item .category-tag {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
}

/* Blog (Latest Content) Slider Carousel */
html.home-snap-html .blog-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    -webkit-overflow-scrolling: touch;
}

html.home-snap-html .blog-grid article {
    flex: 0 0 calc(33.333% - 1rem);
    /* 3 items on desktop */
    scroll-snap-align: start;
}

@media (max-width: 992px) {
    html.home-snap-html .blog-grid article {
        flex: 0 0 calc(50% - 0.75rem);
        /* 2 items on tablet */
    }
}

@media (max-width: 768px) {
    html.home-snap-html .blog-grid article {
        flex: 0 0 85%;
        /* 1 item on mobile */
    }

    html.home-snap-html .blog-grid article .item-content {
        padding: 1.25rem !important;
    }

    html.home-snap-html .blog-grid article .item-content h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    html.home-snap-html .blog-grid article .item-content p {
        font-size: 0.85rem !important;
    }
}

html.home-snap-html .blog-grid::-webkit-scrollbar {
    height: 6px;
}

html.home-snap-html .blog-grid::-webkit-scrollbar-thumb {
    background: #121438;
    border-radius: 10px;
}

html.home-snap-html .blog-grid::-webkit-scrollbar-thumb:hover {
    background: var(--highlight);
}

/* Creations Slider Categories nowrap scrollable on mobile */
@media (max-width: 768px) {
    .portfolio-filters {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding: 0.5rem 1rem !important;
        gap: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .portfolio-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
        font-size: 0.85rem !important;
        padding: 0.5rem 1.2rem !important;
    }
}

/* Contact form sizing overrides on mobile */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 1.5rem !important;
    }

    .form-group {
        margin-bottom: 0.75rem !important;
    }

    .form-group label {
        margin-bottom: 0.25rem !important;
        font-size: 0.8rem !important;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }

    .form-group textarea {
        height: 80px !important;
    }

    .contact-wrapper {
        margin-top: 0.5rem !important;
        padding: 0 !important;
        /* Remove duplicate card padding on mobile */
    }
}

/* Footer layout sizing adjustments on mobile */
@media (max-width: 768px) {
    .footer {
        padding-top: 2rem !important;
        margin-top: 2rem !important;
    }

    .footer-container {
        gap: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .footer-expertise {
        display: none !important;
        /* Hide expertise columns to fit on single viewport */
    }

    .footer-bottom {
        padding: 1rem 0 !important;
    }
}

/* Snap target for the complete footer at document end */
html.home-snap-html footer.footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    padding-top: 105px;
    padding-bottom: 25px;
    margin-top: 0 !important;
}

@media (max-width: 992px) {
    html.home-snap-html footer.footer {
        padding-top: 85px !important;
        padding-bottom: 20px !important;
    }
}

@media (max-width: 768px) {
    html.home-snap-html footer.footer {
        padding-top: 80px !important;
        padding-bottom: 20px !important;
    }
}