@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&family=Noto+Sans+Arabic:wght@300;400;500;700&family=Roboto:wght@300;400;500;700&family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap');

:root {
    --md-sys-color-primary: rgb(146 213 172);
    --md-sys-color-surface-tint: rgb(146 213 172);
    --md-sys-color-on-primary: rgb(0 57 33);
    --md-sys-color-primary-container: rgb(6 82 50);
    --md-sys-color-on-primary-container: rgb(173 242 199);
    --md-sys-color-secondary: rgb(181 204 187);
    --md-sys-color-on-secondary: rgb(33 53 40);
    --md-sys-color-secondary-container: rgb(55 75 62);
    --md-sys-color-on-secondary-container: rgb(209 232 214);
    --md-sys-color-tertiary: rgb(163 205 220);
    --md-sys-color-on-tertiary: rgb(4 53 65);
    --md-sys-color-tertiary-container: rgb(34 76 89);
    --md-sys-color-on-tertiary-container: rgb(191 233 249);
    --md-sys-color-error: rgb(255 180 171);
    --md-sys-color-on-error: rgb(105 0 5);
    --md-sys-color-error-container: rgb(147 0 10);
    --md-sys-color-on-error-container: rgb(255 218 214);
    --md-sys-color-background: rgb(15 21 17);
    --md-sys-color-on-background: rgb(223 228 221);
    --md-sys-color-surface: rgb(15 21 17);
    --md-sys-color-on-surface: rgb(223 228 221);
    --md-sys-color-surface-variant: rgb(64 73 66);
    --md-sys-color-on-surface-variant: rgb(192 201 192);
    --md-sys-color-outline: rgb(138 147 139);
    --md-sys-color-outline-variant: rgb(64 73 66);
    --md-sys-color-shadow: rgb(0 0 0);
    --md-sys-color-scrim: rgb(0 0 0);
    --md-sys-color-inverse-surface: rgb(223 228 221);
    --md-sys-color-inverse-on-surface: rgb(44 50 45);
    --md-sys-color-inverse-primary: rgb(40 106 72);
    --md-sys-color-primary-fixed: rgb(173 242 199);
    --md-sys-color-on-primary-fixed: rgb(0 33 17);
    --md-sys-color-primary-fixed-dim: rgb(146 213 172);
    --md-sys-color-on-primary-fixed-variant: rgb(6 82 50);
    --md-sys-color-secondary-fixed: rgb(209 232 214);
    --md-sys-color-on-secondary-fixed: rgb(11 31 20);
    --md-sys-color-secondary-fixed-dim: rgb(181 204 187);
    --md-sys-color-on-secondary-fixed-variant: rgb(55 75 62);
    --md-sys-color-tertiary-fixed: rgb(191 233 249);
    --md-sys-color-on-tertiary-fixed: rgb(0 31 39);
    --md-sys-color-tertiary-fixed-dim: rgb(163 205 220);
    --md-sys-color-on-tertiary-fixed-variant: rgb(34 76 89);
    --md-sys-color-surface-dim: rgb(15 21 17);
    --md-sys-color-surface-bright: rgb(53 59 54);
    --md-sys-color-surface-container-lowest: rgb(10 15 12);
    --md-sys-color-surface-container-low: rgb(23 29 25);
    --md-sys-color-surface-container: rgb(27 33 29);
    --md-sys-color-surface-container-high: rgb(38 43 39);
    --md-sys-color-surface-container-highest: rgb(49 54 50);

    --m3-shape-corner-extra-small: 4px;
    --m3-shape-corner-small: 8px;
    --m3-shape-corner-medium: 12px;
    --m3-shape-corner-large: 16px;
    --m3-shape-corner-extra-large: 28px;
    --m3-shape-corner-full: 999px;

    /* M3 Easing */
    --m3-easing-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --m3-easing-emphasized: cubic-bezier(0.2, 0.0, 0.0, 1.0);
    /* For entering elements */
    --m3-easing-decelerated: cubic-bezier(0.0, 0.0, 0.2, 1);
    /* For exiting elements */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Roboto', 'Noto Sans Arabic', 'Helvetica Neue', Arial, sans-serif;
    /* Fallback fonts */
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    overflow-x: hidden;
    line-height: 1.6;
    opacity: 0;
    /* Initially hidden for preloader */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Roboto Flex', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}


/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--md-sys-color-background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    flex-direction: column;
    transition: opacity 0.5s var(--m3-easing-decelerated), visibility 0.5s var(--m3-easing-decelerated);
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    width: 80px;
    height: 80px;
    background-image: url(assets/logo.webp);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulseLogo 1.5s infinite ease-in-out;
    margin-bottom: 20px;
}

.loader-dots {
    display: flex;
}

.loader-dots .dot {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: bounceDot 1.4s infinite ease-in-out both;
}

.loader-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

@keyframes bounceDot {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}


/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.06;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    background: linear-gradient(45deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
    will-change: transform, opacity;
}

/* Positioning and sizing for shapes */
.shape-1 {
    width: 180px;
    height: 180px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    mask-image: url(assets/shape/shape-1.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/shape/shape-1.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.shape-2 {
    width: 130px;
    height: 130px;
    top: 60%;
    right: 15%;
    animation-delay: -1s;
    mask-image: url(assets/shape/shape-2.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/shape/shape-2.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.shape-3 {
    width: 90px;
    height: 90px;
    bottom: 20%;
    left: 60%;
    animation-delay: -2s;
    mask-image: url(assets/shape/shape-3.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/shape/shape-3.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.shape-4 {
    width: 70px;
    height: 70px;
    top: 30%;
    right: 5%;
    animation-delay: -3s;
    mask-image: url(assets/shape/shape-4.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/shape/shape-4.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.shape-5 {
    width: 110px;
    height: 110px;
    bottom: 10%;
    left: 15%;
    animation-delay: -4s;
    mask-image: url(assets/shape/shape-5.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/shape/shape-5.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.shape-6 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 5%;
    animation-delay: -5s;
    mask-image: url(assets/shape/shape-6.png);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/shape/shape-6.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.shape-7 {
    width: 100px;
    height: 100px;
    top: 5%;
    right: 20%;
    animation-delay: -6s;
    mask-image: url(assets/shape/shape-1.png);
    /* Reusing shape-1 for shape-7 */
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/shape/shape-1.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.shape-8 {
    width: 60px;
    height: 60px;
    bottom: 5%;
    right: 30%;
    animation-delay: -7s;
    mask-image: url(assets/shape/shape-2.png);
    /* Reusing shape-2 for shape-8 */
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/shape/shape-2.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}


/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 20, 25, 0.8);
    /* Slightly more transparent for more blur effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 0.8rem 2rem;
    /* Slightly less padding */
    transition: background-color 0.3s var(--m3-easing-standard), box-shadow 0.3s var(--m3-easing-standard);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    background-image: url(assets/logo.webp);
    height: 40px;
    width: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s var(--m3-easing-standard);
}

.logo-link:hover .logo,
.logo-link:focus-visible .logo {
    transform: rotate(15deg) scale(1.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    /* M3 label large */
    transition: color 0.3s var(--m3-easing-standard);
    position: relative;
    padding: 0.5rem 0.25rem;
    /* Added horizontal padding for focus */
    border-radius: var(--m3-shape-corner-small);
    /* For focus state */
}

.nav-links a:hover,
.nav-links a.active-link {
    color: var(--md-sys-color-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--md-sys-color-primary);
    transition: width 0.3s var(--m3-easing-standard);
}

.nav-links a:hover::after,
.nav-links a.active-link::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--md-sys-color-on-surface);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    /* For focus state */
    transition: transform 0.2s var(--m3-easing-standard), background-color 0.2s var(--m3-easing-standard);
}

.menu-toggle:hover {
    transform: scale(1.1);
    color: var(--md-sys-color-primary);
}

.menu-toggle .material-icons-round {
    display: block;
}

.language-dropdown {
    position: relative;
    margin-left: 1rem;
    /* Adjust as needed */
}

.language-dropdown .dropdown-toggle {
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface);
    font-size: 1.8rem;
    /* Match menu-toggle size */
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: transform 0.2s var(--m3-easing-standard), background-color 0.2s var(--m3-easing-standard), color 0.3s var(--m3-easing-standard);
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-dropdown .dropdown-toggle:hover {
    transform: scale(1.1);
    color: var(--md-sys-color-primary);
}

.language-dropdown .dropdown-toggle:focus-visible {
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.15);
    outline: none;
    box-shadow: none;
}

.language-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    /* Position below the button */
    right: 0;
    /* Align to the right of the button */
    background: var(--md-sys-color-surface-container-high);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--m3-shape-corner-medium);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s var(--m3-easing-standard), transform 0.2s var(--m3-easing-standard);
}

.language-dropdown .dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.language-dropdown .dropdown-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s var(--m3-easing-standard), color 0.2s var(--m3-easing-standard);
    border-radius: var(--m3-shape-corner-small);
    margin: 0 0.5rem;
}

.language-dropdown .dropdown-menu li a:hover {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.language-dropdown .dropdown-menu li a:focus-visible {
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.1);
    outline: none;
}

/* Adjust navigation for dropdown */
@media (max-width: 768px) {
    .nav-container {
        justify-content: space-between;
        /* Ensure space between logo, menu toggle, and language dropdown */
    }

    .language-dropdown {
        position: static;
        /* Allow it to flow with other nav items */
        margin-left: 0;
        /* Remove margin */
    }

    .language-dropdown .dropdown-menu {
        position: absolute;
        /* Keep it absolute for dropdown behavior */
        top: 100%;
        /* Adjust as needed for mobile layout */
        right: 1.5rem;
        /* Align with right edge of nav */
        left: auto;
        /* Override left:0 if set */
        min-width: unset;
        width: 150px;
        /* Fixed width for mobile dropdown */
    }
}


/* Focus Visible States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
    /* Using a placeholder for RGB conversion */
}

.nav-links a:focus-visible {
    /* Specific for nav links for a softer focus */
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.1);
    outline: none;
    box-shadow: none;
}

.menu-toggle:focus-visible {
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.15);
    outline: none;
    box-shadow: none;
}


/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    font-family: 'Roboto Flex', sans-serif;
    font-size: clamp(3rem, 10vw, 5.5rem);
    /* Slightly adjusted for balance */
    font-weight: 800;
    /* opsz,wght@8..144,800 */
    font-variation-settings: "wght" 800, "GRAD" 0, "opsz" 72;
    /* Example of Roboto Flex use */
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(45deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInUp 1s var(--m3-easing-emphasized) forwards;
}

.hero-subtitle {
    font-family: 'Roboto Flex', sans-serif;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    /* Adjusted */
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 2rem;
    font-weight: 400;
    /* opsz,wght@8..144,400 */
    animation: slideInUp 1s var(--m3-easing-emphasized) 0.2s forwards;
    opacity: 0;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--md-sys-color-on-surface);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    opacity: 0.8;
    animation: slideInUp 1s var(--m3-easing-emphasized) 0.4s forwards;
    opacity: 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 0.85rem 1.85rem;
    /* M3 Large Button */
    border: none;
    border-radius: var(--m3-shape-corner-full);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--m3-easing-standard);
    animation: slideInUp 1s var(--m3-easing-emphasized) 0.6s forwards;
    opacity: 0;
}

.cta-button .material-icons-round {
    font-size: 1.3em;
    transition: transform 0.3s var(--m3-easing-standard);
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    background: var(--md-sys-color-secondary);
}

.cta-button:hover .material-icons-round {
    transform: rotate(-15deg) scale(1.1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Sections */
.about,
.skills,
.projects,
.contact {
    padding: 6rem 2rem;
}

.section-title {
    font-family: 'Roboto Flex', sans-serif;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-weight: 700;
    font-variation-settings: "wght" 700, "opsz" 48;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--md-sys-color-primary);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
    /* More organic shape */
    overflow: hidden;
    background: linear-gradient(45deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
    padding: 8px;
    /* Increased padding */
    cursor: pointer;
    transition: transform 0.4s var(--m3-easing-emphasized), box-shadow 0.4s var(--m3-easing-standard), border-radius 0.4s var(--m3-easing-standard);
}

.photo-container:hover {
    transform: scale(1.08) rotate(3deg);
    border-radius: 50%;
    /* Morph on hover */
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--m3-easing-standard);
    border-radius: inherit;
    /* Inherit parent's border-radius for morphing */
}

.photo-container:hover .photo {
    transform: scale(1.1);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--md-sys-color-primary);
    font-weight: 600;
}

/* Skills Section */
.skills-container {
    max-width: 1200px;
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.skill-card {
    background: var(--md-sys-color-surface-container-high);
    padding: 2.5rem;
    border-radius: var(--m3-shape-corner-extra-large);
    transition: all 0.3s var(--m3-easing-standard);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.skill-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--md-sys-color-primary);
}

.skill-category {
    font-family: 'Roboto Flex', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    font-variation-settings: "wght" 600, "opsz" 24;
    color: var(--md-sys-color-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-category .material-icons-round {
    font-size: 1.4em;
    opacity: 0.8;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    transition: all 0.3s var(--m3-easing-standard);
    font-size: 1rem;
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list li:hover {
    color: var(--md-sys-color-primary);
    padding-left: 1rem;
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.05);
}

/* Projects Section */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
}

.project-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-button {
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface-variant);
    border: 1px solid var(--md-sys-color-outline);
    padding: 0.75rem 1.5rem;
    border-radius: var(--m3-shape-corner-full);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--m3-easing-standard);
}

.tab-button.active,
.tab-button:hover {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border-color: var(--md-sys-color-primary);
    transform: translateY(-2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--m3-shape-corner-extra-large);
    overflow: hidden;
    transition: all 0.3s var(--m3-easing-standard);
    border: 1px solid var(--md-sys-color-outline-variant);
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.03);
}

.project-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-secondary-container) 70%);
}

.project-title {
    font-family: 'Roboto Flex', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    font-variation-settings: "wght" 600, "opsz" 28;
    margin-bottom: 0.5rem;
    color: var(--md-sys-color-on-primary-container);
}

.project-subtitle {
    color: var(--md-sys-color-on-primary-container);
    opacity: 0.85;
    font-size: 0.9rem;
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-description {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--md-sys-color-on-surface-variant);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 0.625rem 1.25rem;
    border-radius: var(--m3-shape-corner-full);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s var(--m3-easing-standard);
}

.project-link .material-icons-round {
    font-size: 1.2em;
    transition: transform 0.3s var(--m3-easing-standard);
}

.project-link:hover {
    background: var(--md-sys-color-secondary);
    transform: translateY(-2px) scale(1.05);
}

.project-link:hover .material-icons-round {
    transform: scale(1.1) rotate(5deg);
}

.status-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--md-sys-color-tertiary);
    color: var(--md-sys-color-on-tertiary);
    padding: 0.5rem 1rem;
    border-radius: var(--m3-shape-corner-medium);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-inactive {
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

/* Contact Section */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 3rem;
    opacity: 0.9;
    color: var(--md-sys-color-on-surface-variant);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
    padding: 0.75rem 1.5rem;
    border-radius: var(--m3-shape-corner-full);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s var(--m3-easing-standard);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.social-link .material-icons-round,
.social-link .fab {
    font-size: 1.2em;
    transition: transform 0.3s var(--m3-easing-standard);
}

.social-link:hover {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    transform: translateY(-3px) scale(1.05);
    border-color: var(--md-sys-color-primary);
}

.social-link:hover .material-icons-round,
.social-link:hover .fab {
    transform: scale(1.15) rotate(-5deg);
}

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--md-sys-color-surface-container-highest);
    /* Darker background */
    color: var(--md-sys-color-on-surface-variant);
    border-top: 1px solid var(--md-sys-color-outline-variant);
    font-size: 0.95rem;
    /* Slightly larger font */
    margin-top: 4rem;
    /* Space from content above */
    border-radius: var(--m3-shape-corner-extra-large) var(--m3-shape-corner-extra-large) 0 0;
    /* Rounded top corners */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    /* Space between elements */
    font-weight: 400;
    transition: all 0.3s var(--m3-easing-standard);
}

.footer-logo {
    background-image: url(assets/logo.webp);
    height: 50px;
    width: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s var(--m3-easing-standard);
}

.footer-logo:hover {
    transform: rotate(15deg) scale(1.1);
}

.footer-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-social-link {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 1.5rem;
    transition: color 0.3s var(--m3-easing-standard), transform 0.3s var(--m3-easing-standard);
}

.footer-social-link:hover {
    color: var(--md-sys-color-primary);
    transform: translateY(-3px) scale(1.1);
}

footer .material-icons-round {
    font-size: 1.1em;
    vertical-align: -0.15em;
    color: var(--md-sys-color-primary);
    transition: transform 0.3s var(--m3-easing-standard);
}

footer .material-icons-round:hover {
    transform: scale(1.3) rotate(10deg);
}

/* Back to Top Button */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    /* FAB style */
    transition: opacity 0.3s var(--m3-easing-standard), transform 0.3s var(--m3-easing-standard), background-color 0.3s var(--m3-easing-standard);
}

#backToTopBtn .material-icons-round {
    font-size: 24px;
    display: block;
}

#backToTopBtn:hover {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    transform: scale(1.1);
}


/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .photo-container {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.7rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        /* Cover full screen */
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--md-sys-color-surface-container-highest);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        transition: transform 0.35s var(--m3-easing-emphasized);
        transform: translateX(-100%);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.8rem;
        padding: 1rem;
    }

    /* Larger for touch */
    .nav-links a::after {
        bottom: 0.5rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
        /* Above mobile nav when closed */
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-subtitle {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .tab-button {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        padding: 10px;
    }

    #backToTopBtn .material-icons-round {
        font-size: 20px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--md-sys-color-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-primary);
    border-radius: var(--m3-shape-corner-full);
    border: 2px solid var(--md-sys-color-surface);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--md-sys-color-secondary);
}

/* Particle animation CSS */
@keyframes particle-burst {
    0% {
        transform: scale(0) translateY(0);
        opacity: 1;
    }

    50% {
        transform: scale(1.2) translateY(-25px) rotate(45deg);
        opacity: 0.8;
    }

    100% {
        transform: scale(0) translateY(-50px) rotate(90deg);
        opacity: 0;
    }
}

.animate-in {
    animation-name: popIn;
    animation-duration: 0.7s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

@keyframes rainbow {
    0% {
        filter: hue-rotate(0deg) saturate(1.5);
    }

    25% {
        filter: hue-rotate(90deg) saturate(1.8);
    }

    50% {
        filter: hue-rotate(180deg) saturate(2);
    }

    75% {
        filter: hue-rotate(270deg) saturate(1.8);
    }

    100% {
        filter: hue-rotate(360deg) saturate(1.5);
    }
}