/* ----  Global Styles ---- */

/*  Font  */
@font-face {
    font-family: 'Poppins';
    src: url('../assets/fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f4f4f4;
    padding-top: 130px;
    overflow-x: hidden;
    position: relative;
}

/*  Variables  */
:root {
    /* Colors */
    --primary: #4a148c;
    --primary-light: #6a1b9a;
    --primary-dark: #2980b9;
    --secondary: #ff7043;
    --secondary-light: #ff8a65;
    --text-dark: #333333;
    --text-muted: #4a5568;
    --text-light: #ffffff;
    --bg-light: #f4f4f4;
    --bg-white: #ffffff;
    --bg-dark: #1e1e2f;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 50px;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
    --spacing-xxl: 60px;
}

/* ----  Preloader ---- */
#preloader{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 9999;
}

.preloader-card{
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

#preloader > img,
.preloader-card > img{
  width: clamp(72px, 10vmin, 110px);
  height: auto;
  object-fit: contain;
  border: 0;
  box-shadow: none;
}

/* ----  Navbar ---- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 130px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    user-select: none;
    font-family: 'Poppins', sans-serif;
}

.logo-link {
    display: block;
    margin-left: -40px;
    z-index: 1010;
    position: relative;
    cursor: pointer;
    outline: none;
}

.logo-link:focus,
.logo-link:active {
    outline: none;
    box-shadow: none;
    border: none;
}

.navbar .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 400px;
    height: 280px;
    overflow: visible;
    filter: drop-shadow(0 2px 8px rgba(255, 221, 87, 0.2));
    transition: filter 0.3s ease;
    position: relative;
    z-index: 1010;
    background: url("../assets/Images/logo.svg") no-repeat center center;
    background-size: contain;
    will-change: filter;
    contain: layout paint;
}

.navbar .logo:hover {
    filter: drop-shadow(0 3px 10px rgba(255, 221, 87, 0.4));
}

.nav-links-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    text-align: center;
    padding-left: 200px;
    padding-right: 200px;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 40px;
    justify-content: center;
}

.navbar li {
    margin: 0;
}

.navbar ul a {
    color: var(--text-light);
    font-size: 0.7em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar ul a:hover {
    color: #ffdd57;
}

.cv-button {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.cv-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.download-cv {
    margin-right: 70px;
}

.hamburger {
    display: none;
    cursor: pointer;
    margin-right: 50px;
    margin-left: 24px;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: white;
}

.navbar a:focus,
.cv-button:focus,
.logo-link:focus {
    outline: none;
}

.navbar *:focus,
.navbar *:active {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

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

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

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

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

body.menu-open {
    overflow: hidden;
}

/* ----  Navbar Media Queries ---- */
@media screen and (max-width: 299px) {
    .navbar {
        height: 80px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger {
        display: block;
        margin-right: 13px;
        margin-left: auto;
    }
    
    .nav-links-container {
        position: fixed;
        left: -100%;
        top: 80px;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: var(--bg-dark);
        transition: left 0.3s ease, height 0.3s ease;
        flex-direction: column;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .nav-links-container.active {
        left: 0;
        height: calc(100vh - 80px);
        padding: 0;
        overflow: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .logo-link {
        margin-right: 0;
        margin-left: 0;
    }
    
    .navbar .logo {
        width: 150px;
        height: 75px;
        background-size: 140px;
        margin-left: -22px;
        margin-right: -18px;
    }
    
    .navbar ul {
        flex-direction: column;
        gap: 20px;
        margin: 0;
        padding: 0;
        width: 100%;
        text-align: center;
    }
    
    .navbar ul a {
        padding: 10px;
        display: block;
        text-align: center;
        font-size: 0.85em;
    }
    
    .download-cv {
        display: none;
    }
    
    .nav-links-container.active li {
        animation: slideIn 0.3s ease forwards;
        opacity: 0;
    }
    
    .nav-links-container.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links-container.active li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links-container.active li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links-container.active li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links-container.active li:nth-child(5) { animation-delay: 0.5s; }
    .nav-links-container.active li:nth-child(6) { animation-delay: 0.6s; }
    .nav-links-container.active li:nth-child(7) { animation-delay: 0.7s; }
    
    .nav-links-container.active .download-cv-mobile {
        display: block;
        width: 80%;
        margin: 20px auto 0;
        animation: slideIn 0.3s ease forwards;
        animation-delay: 0.8s;
        opacity: 0;
    }
}

@media screen and (min-width: 300px) and (max-width: 399px) {
    .navbar {
        height: 80px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    .hamburger {
        display: block;
        margin-right: 0px;
        margin-left: 0;
        order: 2;
    }
    
    .nav-links-container {
        position: fixed;
        left: -100%;
        top: 80px;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: var(--bg-dark);
        transition: left 0.3s ease, height 0.3s ease;
        flex-direction: column;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .nav-links-container.active {
        left: 0;
        height: calc(100vh - 80px);
        padding: 0;
        overflow: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .logo-link {
        margin-left: 0;
        order: 1;
    }
    
    .navbar .logo {
        width: 150px;
        height: 75px;
        background-size: 140px;
        margin-left: -22px;
        margin-right: -18px;
    }
    
    .navbar ul {
        flex-direction: column;
        gap: 20px;
        margin: 0;
        padding: 0;
        width: 100%;
        text-align: center;
    }
    
    .navbar ul a {
        padding: 10px;
        display: block;
        text-align: center;
        font-size: 0.85em;
    }
    
    .download-cv {
        display: block;
        margin-right: 0;
        order: 3;
        margin-left: 20px;
    }

    .cv-button {
        padding: 8px 16px;
        font-size: 8px;
    }
    
    .nav-links-container.active li {
        animation: slideIn 0.3s ease forwards;
        opacity: 0;
    }
    
    .nav-links-container.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links-container.active li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links-container.active li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links-container.active li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links-container.active li:nth-child(5) { animation-delay: 0.5s; }
    .nav-links-container.active li:nth-child(6) { animation-delay: 0.6s; }
    .nav-links-container.active li:nth-child(7) { animation-delay: 0.7s; }
    
    .nav-links-container.active .download-cv-mobile {
        display: none;
    }
}

@media screen and (min-width: 400px) and (max-width: 767px) {
    .navbar {
        height: 80px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    .hamburger {
        display: block;
        margin-right: 20px;
        margin-left: 0;
        order: 2;
    }
    
    .nav-links-container {
        position: fixed;
        left: -100%;
        top: 80px;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: var(--bg-dark);
        transition: left 0.3s ease, height 0.3s ease;
        flex-direction: column;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .nav-links-container.active {
        left: 0;
        height: calc(100vh - 80px);
        padding: 0;
        overflow: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .logo-link {
        order: 1;
    }
    
    .navbar .logo {
        width: 150px;
        height: 75px;
        background-size: 168px;
        margin-left: 38px;
        margin-right: 0px;
    }
    
    .navbar ul {
        flex-direction: column;
        gap: 20px;
        margin: 0;
        padding: 0;
        width: 100%;
        text-align: center;
    }
    
    .navbar ul a {
        padding: 10px;
        display: block;
        text-align: center;
        font-size: 0.9em;
    }
    
    .download-cv {
        display: block;
        margin-right: 0;
        order: 3;
        margin-left: 20px;
    }

    .cv-button {
        padding: 10px 18px;
        font-size: 10px;
    }
    
    .nav-links-container.active li {
        animation: slideIn 0.3s ease forwards;
        opacity: 0;
    }
    
    .nav-links-container.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links-container.active li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links-container.active li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links-container.active li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links-container.active li:nth-child(5) { animation-delay: 0.5s; }
    .nav-links-container.active li:nth-child(6) { animation-delay: 0.6s; }
    .nav-links-container.active li:nth-child(7) { animation-delay: 0.7s; }
    
    .nav-links-container.active .download-cv-mobile {
        display: none;
    }
}

@media screen and (min-width: 768px) and (max-width: 980px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        height: 90px;
    }
    
    .logo-link {
        order: 1;
    }
    
    .navbar .logo {
        width: 200px;
        height: 80px;
        background-size: 200px;
        margin-left: 40px;
        margin-right: 53px;
    }
    
    .hamburger {
        display: block;
        margin: 0;
        order: 2;
        margin-right: 120px;
    }
    
    .download-cv {
        margin: 0;
        order: 3;
    }
    
    .nav-links-container {
        position: fixed;
        left: -100%;
        top: 90px;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: var(--bg-dark);
        transition: left 0.3s ease, height 0.3s ease;
        flex-direction: column;
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .nav-links-container.active {
        left: 0;
        height: 100vh;
        padding: 0;
        overflow: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .navbar ul {
        flex-direction: column;
        gap: 20px;
        margin: 0;
        padding: 0;
    }
    
    .navbar ul a {
        padding: 10px;
        display: block;
        text-align: center;
        font-size: 1em;
    }
    
    .cv-button {
        padding: 12px 22px;
        font-size: 13px;
    }
    
    .nav-links-container.active li {
        animation: slideIn 0.3s ease forwards;
        opacity: 0;
    }
    
    .nav-links-container.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links-container.active li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links-container.active li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links-container.active li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links-container.active li:nth-child(5) { animation-delay: 0.5s; }
    .nav-links-container.active li:nth-child(6) { animation-delay: 0.6s; }
    .nav-links-container.active li:nth-child(7) { animation-delay: 0.7s; }
}

@media screen and (min-width: 981px) {
    .hamburger {
        display: none;
    }
    
    .navbar {
        display: flex;
        padding: 0 30px;
        justify-content: space-between;
    }
    
    .logo-link {
        flex: 0 0 auto;
        margin-left: -40px;
        z-index: 1010;
    }
    
    .navbar .logo {
        width: 186px;
        height: 100px;
        background-size: 232px;
        margin-left: 40px;
    }
    
    .nav-links-container {
        flex: 0 1 auto;
        position: absolute;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto;
        width: 100%;
        z-index: 0;
        padding-left: 400px;
        padding-right: 400px;
    }
    
    .navbar ul {
        flex-direction: row;
        gap: 30px;
        justify-content: center;
        margin-left: 25px;
    }
    
    .navbar ul a {
        font-size: 0.7em;
    }
    
    .cv-button {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .download-cv {
        flex: 0 0 auto;
        margin-left: auto;
        margin-right: 20px;
        position: relative;
        z-index: 1010;
    }
}

@media screen and (min-width: 1201px) {
    .navbar .logo {
        width: 450px;
        height: 220px;
        margin-left: -60px;
    }
    
    .navbar ul {
        margin-left: 20px;
        gap: 30px;
    }
    
    .navbar ul a {
        font-size: 0.9em;
    }
    
    .cv-button {
        font-size: 16px;
    }
    
    .download-cv {
        margin-right: 30px;
    }
    
    .nav-links-container {
        padding-left: 500px;
        padding-right: 500px;
    }
}

*:focus {
    outline: none !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .cv-button:hover,
    .navbar .logo:hover,
    .hamburger.active .bar:nth-child(1),
    .hamburger.active .bar:nth-child(3),
    .nav-links-container.active li {
        transform: none !important;
        animation: none !important;
    }
}

/* ----  Home ---- */
#Home {
    width: 100%;
    height: 100vh;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

#home-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

#home-container canvas {
    background-color: rgb(22, 12, 32) !important;
    transition: background-color 15s ease-out;
}

#Home::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,.5), rgba(0,0,0,.7));
    z-index: -1;
}

.jumbotron {
    background-color: transparent;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.centerize {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.jumbotron h1 {
    font-size: clamp(1.8em, 5vw, 3.5em);
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,.6);
    animation: fadeInDown 0.8s ease-out;
    color: red;
    font-weight: 600;
    letter-spacing: 1.5px;
    line-height: 1.3;
    text-transform: capitalize;
    text-align: center;
    position: relative;
}

.jumbotron h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: width .3s ease, box-shadow .3s ease;
}

.jumbotron h1:hover::after {
    width: 80px;
    box-shadow: 0 0 8px rgba(255,255,255,.6);
}

.jumbotron p {
    font-size: clamp(.9em, 3vw, 1.3em);
    margin: 15px 0 30px 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,.5);
    animation: fadeIn 1s ease-out;
    color: #f0f0f0;
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
}

.jumbotron .btn {
    margin: 10px;
    padding: clamp(8px, 2vw, 12px) clamp(16px, 3vw, 25px);
    border: 2px solid #fff;
    border-radius: var(--radius-full);
    color: #fff;
    background-color: transparent;
    text-decoration: none;
    font-size: clamp(.9em, 2vw, 1.1em);
    font-weight: bold;
    text-transform: uppercase;
    transition: all .25s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,.3);
    display: inline-block;
    text-align: center;
    cursor: pointer;
}

.jumbotron .btn:hover {
    color: #ffd700;
    background-color: #fff;
    border-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,.4);
    -webkit-text-stroke: .5px black;
}

.social {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2vw, 15px);
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.8s;
    flex-wrap: wrap;
}

[class^="icon-"] {
    width: clamp(35px, 5vw, 40px);
    height: clamp(35px, 5vw, 40px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.8s;
}

.icon-white-bg { 
    background-color: white; 
}

.icon-black-bg { 
    background-color: black; 
}

.icon-yellow-bg { 
    background-color: #ffdc52; 
}

[class^="icon-"]:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0,0,0,.3);
}

.social-icon {
    width: clamp(20px, 3vw, 24px);
    height: clamp(20px, 3vw, 24px);
    transition: transform .3s ease;
}

#typed-output {
    color: white;
    font-size: clamp(18px, 4vw, 24px);
    font-family: 'Dancing Script', cursive;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----  Home Media Queries ---- */
@media screen and (max-width: 1285px) {
    .jumbotron { 
        max-width: 1000px; 
    }
}

@media screen and (max-width: 980px) {
    .jumbotron { 
        max-width: 800px; 
    }
    
    #Home {
        margin-top: -40px;
    }
}

@media screen and (max-width: 768px) {
    #Home {
        background-position: center center;
        margin-top: -50px;
    }
    
    .jumbotron {
        max-width: 600px;
        padding: 15px;
    }
    
    .centerize { 
        padding: 0 15px; 
    }
}

@media (max-width: 576px) {
  #Home{
    height: auto;
    min-height: 68vh;
    padding: 16px 0 56px;
    margin-top: 0;
    position: relative;
    margin-top: -50px;
  }

  #Home::after{
    content: "";
    display: block;
    height: clamp(24px, 8vh, 64px);
  }

  .jumbotron{ padding: 0 12px; }

  .jumbotron h1{
    margin: 6px 0 8px;
    font-size: clamp(1.4rem, 6.5vw, 2rem);
    white-space: nowrap;
    line-height: 1.2;
    letter-spacing: .5px;
  }

  .jumbotron p{
    margin: 6px 0 10px;
    font-size: clamp(0.7rem, 3vw, 0.9rem);
    line-height: 1.35;                     
    letter-spacing: .2px;
    max-width: 520px;
    margin-top: 13px;
    margin-bottom: 20px;
  }

  .social{ margin-top: 10px; gap: 10px; }
  [class^="icon-"]{ width: 32px; height: 32px; }

  #home-container { backface-visibility: hidden; transform: translateZ(0); }
  #home-container canvas { background-color: rgb(10,5,20) !important; transition: none !important; }

}

:target{ scroll-margin-top: 84px; }

@media screen and (max-width: 480px) {
    #Home {
        width: 100%;
        margin-top: -50px;
    }
    
    .jumbotron {
        max-width: 100%;
        padding: 10px;
    }
    
    .centerize { 
        padding: 0 10px; 
    }
    
    .social { 
        gap: 8px; 
    }
}

@media screen and (max-width: 400px) {
    #Home {
        margin-top: -60px;
    }
}

@media screen and (min-height: 1000px) {
    .centerize {
        justify-content: flex-start;
        padding-top: 5vh;
    }
}

@media screen and (max-height: 600px) {
    
    .jumbotron p { 
        margin: 10px 0 20px 0; 
    }
    
    .social { 
        margin-top: 10px; 
    }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .jumbotron h1, 
    .jumbotron p {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .jumbotron h1,
    .jumbotron p,
    .social,
    [class^="icon-"],
    .jumbotron .btn:hover,
    [class^="icon-"]:hover {
        animation: none !important;
        transform: none !important;
    }
    
    .jumbotron h1:hover::after {
        width: 60px;
        box-shadow: none;
    }
}

/* ----  About ---- */
#about {
    padding: 80px 0;
    background: linear-gradient(135deg, #e8f0fe, #f5f9ff);
    min-height: 100vh;
    min-width: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

#about::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(232,240,254,.8), rgba(245,249,255,.8));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#about::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 10% 30%, rgba(41,128,185,.05) 0, transparent 70px),
        radial-gradient(circle at 90% 70%, rgba(41,128,185,.05) 0, transparent 70px);
    pointer-events: none;
}

.about-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1000px;
    width: 90%;
    gap: 40px;
    padding: 0 30px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

.about-image {
    flex: 0.8;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    animation: fadeInUp 1s ease-out forwards;
    width: 40%;
    max-width: 380px;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    background: rgba(41,128,185,.1);
    border-radius: var(--radius-xl);
    z-index: -1;
    transition: all .3s ease;
}

.about-image img {
    content: url("../assets/Images/Andres.webp");
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 3px solid #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 15px 30px rgba(41,128,185,.1);
    transition: all .4s ease;
    position: relative;
}

.about-image img::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, 
                 rgba(41,128,185,0) 0%,
                 rgba(41,128,185,.2) 100%);
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
    z-index: 1;
}

.about-image:hover img {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(41,128,185,.15);
}

.about-image:hover img::before {
    opacity: 1;
}

.about-image:hover::after { 
    transform: translate(5px, 5px);
    background: rgba(41,128,185,.15);
}

.about-details {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: rgba(255,255,255,.95);
    padding: 35px;
    border-radius: var(--radius-xl);
    box-shadow: 0 15px 30px rgba(41,128,185,.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeInUp 1s ease-out .3s forwards;
    opacity: 0;
    transition: transform .3s ease, box-shadow .3s ease;
    max-width: 550px;
}

.about-details:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 35px rgba(41,128,185,.12);
}

.about-details h2 {
    font-size: clamp(2em, 4vw, 2.5em);
    margin-bottom: 40px;
    color: var(--primary-dark);
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 20px;
    text-align: center;
    margin: 0 0 40px 0;
    line-height: 1.3;
}

.about-details h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-dark);
    border-radius: 2px;
    transition: width .3s ease;
}

.about-details h2:hover::after {
    width: 100px;
}

.about-details p {
    font-size: clamp(.95em, 2vw, 1.1em);
    line-height: 1.6;
    margin-bottom: 15px;
    color: #445668;
    font-weight: 400;
    text-align: justify;
}

.about-details strong { 
    color: var(--primary-dark); 
    font-weight: 500; 
    position: relative;
}

.about-details strong::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(41,128,185,.2);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform .3s ease;
}

.about-details strong:hover {
    transform: translateY(-1px);
}

.about-details p:first-of-type {
    border-bottom: 1px solid rgba(41,128,185,.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
}

.about-details p:first-of-type::after {
    content: '';
    position: absolute;
    height: 1px;
    width: 60px;
    bottom: -1px;
    right: 0;
    background: linear-gradient(90deg, rgba(41,128,185,0), rgba(41,128,185,.3));
}

.about-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    align-self: center;
}

.about-social a {
    padding: 8px 16px;
    background: rgba(232,240,254,.8);
    border-radius: var(--radius-full);
    color: var(--primary-dark);
    text-decoration: none;
    font-size: .5em;
    font-weight: 500;
    transition: all .3s ease;
    border: 1px solid rgba(41,128,185,.2);
    position: relative;
    overflow: hidden;
}

.about-social a:hover {
    background: var(--primary-dark);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(41,128,185,.2);
}

.about-social a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 0 0;
}

.about-social a:active::after {
    animation: ripple .5s ease-out;
}

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

@keyframes ripple {
    0% { transform: scale(0) translate(-50%, -50%); opacity: 1; }
    100% { transform: scale(40) translate(-50%, -50%); opacity: 0; }
}

/* ----  About Media Queries ---- */
@media screen and (min-width: 1100px) {
    .about-container {
        max-width: 1000px;
        gap: 50px;
    }
    
    .about-image {
        padding-right: 10px;
        width: 34%;
        max-width: 340px;
    }
    
    .about-details {
        flex: 1;
        max-width: 650px;
        max-height: 550px;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .about-container { 
        max-width: 90%;
        width: 90%;
        padding: 0 20px;
        gap: 30px;
    }
    
    .about-image {
        width: 30%;
        max-width: 280px;
        padding-right: 0;
    }
    
    .about-details {
        width: 70%;
        max-width: none;
        padding: 30px;
        min-height: 480px;
    }
    
    .about-details h2 {
        font-size: 2.1em;
        margin-bottom: 30px;
    }
    
    .about-details p {
        font-size: 1em;
    }
}

@media screen and (max-width: 768px) {
    .about-container { 
        flex-direction: column;
        align-items: center;
        max-width: 90%;
        width: 90%;
    }
    .about-image {
        width: 65%;
        max-width: 320px;
        margin-bottom: 30px;
        justify-content: center;
    }
    .about-image img {
        max-width: 100%;
    }
    .about-details { 
        width: 100%; 
        max-width: 100%;
        padding: 25px;
        font-size: 0.95em;
        margin: 0 auto;
    }
    .about-details h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    .about-details p {
        margin-bottom: 12px;
    }
}

@media screen and (min-width: 481px) and (max-width: 767px) {
    .about-container { 
        max-width: 90%;
        width: 90%;
    }
    
    .about-image {
        width: 70%;
        max-width: 350px;
    }
    
    .about-details {
        width: 100%;
        max-width: 100%;
        padding: 25px;
    }
}

@media screen and (min-width: 300px) and (max-width: 480px) {
    #about { 
        padding: 50px 0; 
        min-width: auto; 
    }
    
    .about-container { 
        max-width: 95%;
        width: 95%;
        padding: 0 10px;
    }
    
    .about-image {
        width: 80%;
        max-width: 240px;
        margin-bottom: 25px;
    }
    
    .about-image::after {
        top: 12px;
        left: 12px;
        right: -12px;
        bottom: -12px;
    }
    
    .about-image img {
        border-width: 2px;
    }
    
    .about-details { 
        width: 85%;
        max-width: 100%;
        padding: 20px;
        font-size: 0.9em;
    }
    
    .about-details h2 {
        font-size: 1.5em;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    
    .about-details p {
        line-height: 1.5;
        margin-bottom: 12px;
        font-size: 0.95em;
    }
    
    .about-social { 
        gap: 8px; 
        margin-top: 15px;
    }
    
    .about-social a { 
        padding: 6px 12px;
        font-size: .6em;
    }
}

@media screen and (max-width: 380px) {
    #about { 
        min-width: 100%; 
        padding: 40px 0;
    }
    .about-container {
        max-width: 95%;
        width: 95%;
        padding: 0;
    }
    .about-image {
        width: 85%;
        max-width: 240px;
        margin-bottom: 25px;
    }
    .about-image::after {
        top: 10px;
        left: 10px;
        right: -10px;
        bottom: -10px;
    }
    .about-image img {
        border-width: 2px;
    }
    .about-details {
        width: 100%;
        padding: 18px;
        font-size: 0.9em;
    }
    .about-details h2 {
        font-size: 1.6em;
        margin-bottom: 18px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .about-image,
    .about-details,
    .about-image:hover img,
    .about-details:hover,
    .about-social a:hover {
        transform: none;
    }
    
    .about-image:hover::after,
    .about-details h2:hover::after,
    .about-details strong:hover,
    .about-social a:active::after {
        transform: none;
    }
}

/* ----  Experience ---- */
#experience {
    background-color: var(--bg-light);
    padding: 60px 20px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

#experience h2 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 2.6em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    margin-top: 0;
    line-height: 1.3;
}

#experience h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: width .3s ease;
}

#experience h2:hover::after {
    width: 100px;
}

.timeline-past, .timeline-present {
    font-weight: bold;
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.timeline-past::before, .timeline-present::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary) 20%, var(--primary) 80%, transparent);
    opacity: .6;
}

.timeline {
    position: relative;
    list-style: none;
    padding-top: 40px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    height: calc(100% + 10px);
    width: 2px;
    background: linear-gradient(to bottom, transparent, #aaa 5%, #aaa 95%, transparent);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin: 60px auto;
    padding: 15px 20px;
    background-color: var(--bg-white);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 40%;
    text-align: center;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    z-index: 2;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.timeline-item:before {
    content: attr(data-year);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: var(--text-light);
    font-size: 1em;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
}

.timeline-item:hover::before {
    transform: translateX(-50%) scale(1.1);
    box-shadow: var(--shadow-md);
}

.timeline-item h3 {
    color: var(--primary);
    font-size: 1.2em;
    margin-bottom: 10px;
    transition: color .3s ease;
    font-weight: 600;
    line-height: 1.3;
}

.timeline-item:hover h3 {
    color: var(--primary-dark);
}

.timeline-item p {
    color: var(--text-muted);
    font-size: .9em;
    margin-top: 8px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.flag {
    font-size: 1.1em;
    display: inline-block;
    vertical-align: middle;
    margin-top: -3px;
    line-height: 1;
    transform: scale(1);
    transition: transform .2s ease;
}

.timeline-item:hover .flag {
    transform: scale(1.2);
}

.timeline-item p br { display: none; }

/* ----  Experience Media Queries ---- */
@media screen and (max-width: 1024px) {
    .timeline-item { width: 45%; }
}

@media screen and (max-width: 768px) {
    .timeline::before { left: 50%; }
    .timeline-item {
        width: 80%;
        margin: 60px auto;
    }
    .timeline-item:before,
    .timeline-item:hover:before {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media screen and (max-width: 500px) {
    #experience {
        padding: 50px 15px;
    }
    #experience h2 { 
        font-size: 2.2em; 
        margin-bottom: 25px;
    }
    .timeline-past, .timeline-present { 
        font-size: 1.6em; 
        margin-bottom: 15px;
    }
    .timeline {
        padding-top: 30px;
    }
    .timeline-item {
        width: 85%;
        padding: 15px;
        margin: 50px auto;
        font-size: 0.95em;
    }
    .timeline-item:before {
        width: 45px;
        height: 45px;
        line-height: 45px;
        font-size: 0.95em;
        top: -35px;
    }
    .timeline-item h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    .timeline-item p {
        font-size: 0.85em;
        line-height: 1.4;
        margin-top: 6px;
        margin-bottom: 6px;
    }
    .flag { font-size: 1em; }
}

@media screen and (max-width: 380px) {
    #experience {
        padding: 40px 15px;
        min-width: auto;
    }
    #experience h2 { 
        font-size: 2em; 
        margin-bottom: 20px;
    }
    .timeline-past, .timeline-present { 
        font-size: 1.5em; 
        margin-bottom: 12px;
    }
    .timeline {
        padding-top: 25px;
    }
    .timeline-item {
        width: 80%;
        padding: 12px;
        margin: 45px auto;
        font-size: 0.9em;
        border-width: 1px;
    }
    .timeline-item:before {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 0.9em;
        top: -30px;
    }
    .timeline-item h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    .timeline-item p {
        font-size: 0.8em;
        line-height: 1.3;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    .flag { font-size: 0.9em; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .timeline-item:hover,
    .timeline-item:hover::before,
    .timeline-item:hover .flag {
        transform: none;
    }
    
    #experience h2:hover::after {
        width: 60px;
    }
}

/* ----  Education ---- */
#education {
    background: url('../assets/Images/clouds.webp') center/cover no-repeat fixed;
    min-height: 80vh;
    width: 100%;
    margin: 0;
    padding: 60px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

#education::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74,20,140,.9), rgba(74,20,140,.7));
    z-index: 0;
    transition: background .5s ease;
}

#education:hover::before {
    background: linear-gradient(135deg, rgba(74,20,140,.85), rgba(74,20,140,.75));
}

#education h2 {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: clamp(1.8em, 5vw, 2.6em);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    margin-top: 0;
    line-height: 1.3;
}

#education h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: width .3s ease, box-shadow .3s ease;
}

#education h2:hover::after {
    width: 80px;
    box-shadow: 0 0 8px rgba(255,255,255,.6);
}

.education-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 40px 20px;
}

.education-item {
    background-color: rgba(255,255,255,.95);
    border: 2px solid rgba(255,255,255,.1);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 30px);
    margin: 20px auto;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);    
    position: relative;
    transition: all .3s ease;
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,.2);
    background-color: var(--bg-white);
    border-color: rgba(74,20,140,.3);
}

.education-item::before {
    content: '🎓';
    font-size: clamp(1.5em, 4vw, 2em);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    background-image: linear-gradient(145deg, var(--primary), var(--primary));
    color: var(--text-light);
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all .3s ease, background-image .3s ease;
}

.education-item:hover::before {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 12px rgba(161, 123, 35, 0.4), 0 0 15px rgba(253, 216, 118, 0.3);
    background-image: linear-gradient(145deg, #e8c872, #f7e3a8);
}

.education-item h3 {
    color: var(--primary);
    font-size: clamp(1.1em, 3vw, 1.3em);
    margin-bottom: 10px;
    margin-top: 15px;
    font-weight: 600;
    transition: transform .3s ease;
    line-height: 1.3;
}

.education-item:hover h3 {
    transform: scale(1.02);
}

.education-item p {
    color: var(--text-muted);
    font-size: clamp(.9em, 2vw, 1em);
    line-height: 1.6;
    margin-bottom: 8px;
}

.education-item p:last-child {
    color: var(--primary-dark);
    font-weight: 500;
    font-size: clamp(.85em, 2vw, .95em);
    transition: color .3s ease;
}

.education-item:hover p:last-child {
    color: #4a1699;
}

/* ----  Education Media Queries ---- */
@media screen and (max-width: 768px) {
    #education {
        background-attachment: scroll;
        background-position: center center;
        min-height: 70vh;
        padding: 40px 0;
    }
    .education-container { padding: 30px 15px; }
    .education-item { width: 80%; }
}

@media screen and (max-width: 480px) {
    #education {
        background-size: cover;
        min-height: 60vh;
        padding: 30px 0;
    }
    .education-container { padding: 20px 10px; }
    .education-item {
        width: 90%;
        margin: 30px auto;
    }
}

@supports (-webkit-touch-callout: none) {
    #education { background-attachment: scroll; }
}

@media screen and (orientation: portrait) {
    #education { background-position: center center; }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
    #education {
        min-height: auto;
        padding: 40px 0;
    }
    .education-container { padding: 30px 15px; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    #education::before,
    .education-item,
    .education-item::before,
    .education-item h3,
    .education-item p:last-child,
    #education h2::after {
        transition: none !important;
    }
    
    .education-item:hover,
    .education-item:hover::before,
    .education-item:hover h3 {
        transform: none !important;
        box-shadow: var(--shadow-lg) !important;
    }
    
    #education h2:hover::after {
        width: 60px !important;
        box-shadow: none !important;
    }
}

/* ----  Skills ---- */
#skills-modal {
    background-color: #fdfdfd;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    transition: transform .3s ease, box-shadow .3s ease;
    font-family: 'Poppins', sans-serif;
}

#skills-modal:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#skills-modal h2 {
    color: var(--primary);
    text-align: center;
    font-size: 2.6em;
    margin-bottom: 30px;
    text-transform: uppercase;
    position: relative;
    font-weight: bold;
    line-height: 1.3;
    margin-top: 0;
}

#skills-modal h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: width .3s ease;
}

#skills-modal h2:hover::after {
    width: 100px;
}

.skills-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.skills-filter .skill-filter-btn {
    padding: 10px 25px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
    background: none;
    color: var(--primary);
    font-weight: bold;
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.skills-filter .skill-filter-btn.active {
    background-color: var(--primary);
    color: var(--text-light);
}

.skills-filter .skill-filter-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 0 0;
}

.skills-filter .skill-filter-btn:focus::after {
    animation: ripple .5s ease-out;
}

@keyframes ripple {
    0% { transform: scale(0) translate(-50%, -50%); opacity: 1; }
    100% { transform: scale(40) translate(-50%, -50%); opacity: 0; }
}

.skill-row {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    transition: transform .3s ease, box-shadow .3s ease;
}

.skill-row:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 8px rgba(0,0,0,.08);
    border-left: 3px solid var(--primary);
}

.skill-name {
    flex: 2;
    font-weight: bold;
    color: var(--text-dark);
    min-width: 150px;
}

.skill-bar-container {
    flex: 5;
    height: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    margin: 0 15px;
    position: relative;
    overflow: visible;
}

.years-container, .year-divisions {
    position: absolute;
    top: -25px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
}

.year-label {
    font-size: 11px;
    color: #666;
    transform: translateX(-50%);
    position: absolute;
}

.year-division {
    width: 1px;
    height: 100%;
    border-left: 1px dashed #999;
    position: relative;
}

.progress-segments {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
}

.segment {
    height: 100%;
    flex: 1;
    transition: background-color .3s ease;
}

.segment.active {
    background-color: #28a745;
}

.segment.inactive {
    background-color: #e9ecef;
}

.skill-row:hover .segment.active {
    background-color: #219a3a;
}

.skill-xp {
    flex: 1;
    text-align: right;
    color: #666;
    font-weight: bold;
    min-width: 80px;
}

.more-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius-full);
    margin-top: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.more-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.hidden-skills, .language-skills { display: none; }
.language-skills .skill-level { color: var(--primary); font-weight: bold; }

/* ----  Skills Media Queries ---- */
@media (min-width: 900px) {
    #skills-modal {
        margin: 20px auto;
        padding: 40px;
        width: 800px;
    }
    
    .skill-row { margin-bottom: 15px; }
    .skill-bar-container { flex: 5; margin: 0 20px; }
    .skill-name { flex: 2; min-width: 150px; }
    .skill-xp { flex: 1; min-width: 100px; }
}

@media (min-width: 769px) and (max-width: 899px) {
    #skills-modal {
        margin: 20px;
        width: auto;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 768px) {
    #skills-modal {
        padding: 20px;
        margin: 30px;
        background-color: #f5f5f5;
        width: auto;
        max-width: calc(100% - 60px);
    }
    
    .skill-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        margin-bottom: 10px;
        box-shadow: none;
    }
    
    .skill-name, .skill-xp {
        font-weight: bold;
        min-width: auto;
        flex: none;
        margin: 0;
    }
    
    .skill-xp { text-align: right; }
    
    .skill-bar-container,
    .years-container,
    .year-label,
    .year-divisions,
    .year-division,
    .progress-segments { display: none; }
    
    .skills-filter {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .skills-filter .skill-filter-btn {
        padding: 8px 20px;
        font-size: 14px;
        flex: 1;
        max-width: 200px;
    }
    
    #skills-modal h2 {
        font-size: 2em;
        margin-bottom: 20px;
    }
    
    .more-btn {
        width: 100%;
        margin-top: 15px;
        padding: 12px;
    }
    
    .language-skills .skill-row {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .language-skills .skill-level { text-align: right; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    #skills-modal:hover,
    .skill-row:hover,
    .more-btn:hover,
    .skills-filter .skill-filter-btn:focus::after {
        transform: none !important;
        animation: none !important;
    }
    
    #skills-modal h2:hover::after {
        width: 60px !important;
    }
    
    .skill-row:hover {
        border-left: none !important;
    }
    
    .skill-row:hover .segment.active {
        background-color: #28a745 !important;
    }
}

/* ----  Certifications ---- */
#certifications {
    background: var(--bg-light);
    padding: 40px 10px;
    margin: 0;
    margin-top: 20px;
    text-align: center;
    color: var(--text-dark);
    min-height: 100vh;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

#certifications h2 {
    color: var(--primary-light);
    margin-bottom: 30px;
    font-size: 2.6em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    display: inline-block;
    z-index: 1;
}

#certifications h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--primary-light);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
    transition: width .3s ease;
}

#certifications h2:hover::after {
    width: 100px;
}

.certifications-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 25px;
    position: relative;
    z-index: 1;
    row-gap: 25px;
}

.certification-item {
    background: var(--bg-white);
    border: none;
    border-radius: var(--radius-xl);
    padding: 25px 15px 15px;
    margin: 15px 5px;
    box-shadow: var(--shadow-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: calc(100% - 10px);
    height: 280px;
    justify-self: center;
    transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .certification-item {
        transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, height .3s ease, max-width .3s ease;
    }
}

.certification-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background-color: #fefaf7;
}

.certification-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.certification-item:hover::after {
    transform: scaleX(1);
}

.certification-item::before {
    content: '🏆';
    background: #ff7043;
    color: var(--text-light);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: background .3s ease, transform .3s ease;
    z-index: 2;
}

.certification-item:hover::before {
    background: var(--secondary-light);
    transform: translateX(-50%) rotate(10deg);
}

.certification-header {
    margin-top: 45px;
    margin-bottom: 5px;
}

.year {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
    letter-spacing: .5px;
    transition: transform .3s ease;
}

.certification-item:hover .year {
    transform: scale(1.05);
}

.certification-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    width: 100%;
    padding: 0 10px;
}

.certification-content h3 {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    transition: color .3s ease;
    line-height: 1.3;
    max-height: 4em;
    overflow: hidden;
}

.certification-item:hover .certification-content h3 {
    color: var(--secondary);
}

.provider {
    font-size: 1em;
    color: #555;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.4;
}

.validate-link {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-light);
    background: #8e24aa;
    padding: 10px 0;
    border-radius: var(--radius-full);
    display: block;
    width: 90%;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: all .3s ease-in-out;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin: 0 auto 15px;
}

.validate-link::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,.3) 0%, transparent 70%);
    transform: translate(-100%, -100%);
    opacity: 0;
    transition: transform .5s, opacity .5s;
    z-index: 1;
}

.validate-link:hover::before {
    transform: translate(0, 0);
    opacity: 1;
}

.validate-link:hover {
    background: #a048bd;
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(142, 36, 170, 0.3);
}

.certificate-filters {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 15px 10px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    overflow: hidden;
}

.certificate-filters h3 {
    color: #8e24aa;
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 8px;
    padding-left: 5px;
    padding-right: 5px;
}

.filter-buttons::-webkit-scrollbar {
    height: 0;
    width: 0;
    display: none;
}

.filter-btn {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    padding: 6px 10px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    min-width: 55px;
    max-width: 55px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--secondary-light);
    color: var(--text-light);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #8e24aa;
    color: var(--text-light);
    border: 2px solid #8e24aa;
    box-shadow: 0 4px 8px rgba(142, 36, 170, 0.3);
}

.certificate-pagination {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
}

.pagination-info {
    font-size: 0.95em;
    color: var(--text-dark);
    font-weight: 500;
}

.pagination-nav {
    display: flex;
    gap: 10px;
}

.pagination-btn {
    background: var(--bg-light);
    color: var(--text-dark);
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    min-width: 110px;
    position: relative;
    overflow: hidden;
}

.pagination-btn:hover:not(:disabled) {
    background: #8e24aa;
    color: var(--text-light);
    transform: translateY(-2px);
}

.pagination-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-certificates {
    grid-column: 1 / -1;
    padding: 30px;
    text-align: center;
    font-size: 1.2em;
    color: var(--text-dark);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ----  Certifications Media Queries ---- */
@media screen and (max-width: 1024px) {
    .certifications-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .certification-item {
        width: 100%;
        max-width: 300px;
    }
}

@media screen and (max-width: 980px) {
    .certifications-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .certification-item {
        width: 90%;
        min-width: 280px;
        height: 260px;
        padding: 20px 12px 15px;
        margin: 0 auto;
    }
    
    .certification-item::before {
        width: 45px;
        height: 45px;
        font-size: 20px;
        top: 9px;
    }
    
    
    .certification-content h3 {
        font-size: 1.1em;
    }
    
    .provider {
        font-size: 0.9em;
        margin-bottom: 15px;
    }
    
    .validate-link {
        padding: 8px 0;
        font-size: 0.9em;
        margin-bottom: 10px;
    }
}



@media screen and (max-width: 930px) {
    .certifications-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certification-item {
        width: 90%;
        height: 240px;
        max-width: 280px;
    }
}

@media screen and (max-width: 768px) {
    #certifications h2 { font-size: 1.8em; }
    
    .certifications-container {
        gap: 15px 20px;
        padding: 10px 15px;
    }
    
    .certification-item { 
        width: 90%;
        height: 240px;
        max-width: 280px;
    }
    
    
    .certificate-pagination { 
        flex-direction: column; 
        gap: 10px; 
    }
    
    .pagination-info { 
        margin-bottom: 10px; 
    }
    
    .pagination-btn { 
        padding: 6px 12px; 
        font-size: 0.85em; 
    }
}

@media screen and (max-width: 630px) {
    .certifications-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 10px 20px;
    }
    
    .certification-item {
        min-width: min-content;
        height: 200px;
        padding: 15px 10px 10px;
    }
    
    .year {
        font-size: 1em;
    }
    
    .certification-content h3 {
        font-size: 0.9em;
    }
    
    .provider {
        font-size: 0.8em;
    }
    
    .validate-link {
        padding: 6px 0;
        font-size: 0.8em;
    }
    
    .pagination-btn { 
        padding: 5px 10px; 
        font-size: 0.8em; 
        min-width: 90px;
    }
}

@media (max-width: 576px){
  #certifications h2{
    color: var(--primary);
    font-size: 2em !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    margin: 0 0 30px;
    position: relative;
    display: inline-block;
  }
  #certifications h2::after{
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
    transition: width .3s ease, box-shadow .3s ease;
  }
  #certifications h2:hover::after{
    width: 100px;
    box-shadow: 0 0 8px rgba(var(--primary-rgb,74,111,165), .3);
  }
}


@media screen and (max-width: 500px) {
    #certifications { padding: 20px 5px; }
    #certifications h2 { font-size: 2em !important; }
    
    .certifications-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 10px 20px;
    }

    .certification-item {
        padding: 12px 8px;
        margin: 0 auto;
        width: 90%;
        height: 175px;
        max-width: 220px;
    }
    
    .certification-item::before {
        width: 35px;
        height: 35px;
        font-size: 14px;
        top: 10px;
    }
    
    .certification-header {
        margin-top: 40px;
    }
    
    .year { 
        font-size: 0.9em;
        margin-bottom: 3px; 
    }
    
    .certification-content h3 { 
        font-size: 0.7em;
        margin-bottom: 3px;
        line-height: 1.2;
    }
    
    .provider {
        font-size: 0.75em;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    
    .validate-link {
        padding: 5px 0;
        font-size: 0.75em;
        letter-spacing: 0.5px;
        width: 85%;
        margin-bottom: 5px;
    }
    
    .certificate-filters h3 { font-size: 1.2em; }
    .filter-btn { padding: 5px 10px; font-size: 0.85em; }
    .certificate-pagination { flex-direction: column; gap: 10px; }
    .pagination-info { margin-bottom: 10px; }
}

@media screen and (max-width: 480px) {
    .pagination-btn { 
        padding: 4px 8px; 
        font-size: 0.75em; 
        min-width: 80px;
    }
}

@media screen and (max-width: 400px) {
    .certification-item {
        height: 200px;
    }

    .certifications-container {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
        padding: 10px 20px;
    }
    
    .filter-buttons { gap: 0px; }
    .filter-btn { 
        padding: 4px 8px; 
        font-size: 0.75em;
        margin-bottom: 5px;
    }
    .pagination-btn { padding: 6px 12px; font-size: 0.85em; }
}

@media screen and (max-width: 399px) {
    .certification-item {
        height: 190px;
        padding: 10px 5px;
    }

    .certificate-filters {
        padding: 24px 15px 0 15px;
    }
    
    .certification-content h3 { 
        font-size: 0.8em;
    }
    
    .provider {
        font-size: 0.7em;
        margin-bottom: 10px;
    }
    
    .validate-link {
        padding: 4px 10px;
        font-size: 0.65em;
    }
    
    .certificate-filters h3 { font-size: 1.1em; }
    .filter-btn { 
        padding: 3px 6px; 
        font-size: 0.7em;
        min-width: 20px;
        gap: 0px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .certification-item:hover,
    .filter-btn:hover,
    .pagination-btn:hover:not(:disabled),
    .validate-link:hover {
        transform: none;
    }
    
    .certification-item:hover::after,
    .certification-item:hover::before,
    .certification-item:hover .year,
    .validate-link:hover::before {
        transform: none;
    }
}

/* ----  Projects ---- */
.section {
    padding: 40px 0;
    text-align: center;
    min-height: 100vh;
    background: var(--bg-light);
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 20px 20px;
    opacity: .5;
    pointer-events: none;
}

#projects h2 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 2.6em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    z-index: 1;
    line-height: 1.3;
    margin-top: 0;
}

#projects h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
    transition: width .3s ease, box-shadow .3s ease;
}

#projects h2:hover::after {
    width: 100px;
    box-shadow: 0 0 8px rgba(var(--primary-rgb, 74,111,165),.3);
}

#filter-container {
    margin: 20px auto;
    max-width: 300px;
    text-align: center;
    position: relative;
    z-index: 1;
}

#filter-container label {
    margin-right: 10px;
    font-weight: 500;
    color: var(--text-dark);
    transition: color .3s ease;
}

#filter-container:focus-within label {
    color: var(--primary);
}

#category-filter {
    padding: 8px 15px;
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-sm);
    font-size: 1em;
    background-color: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    font-family: 'Poppins', sans-serif;
}

#category-filter:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 74,111,165),.2);
    outline: none;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.project {
    text-decoration: none;
    color: inherit;
    display: grid;
}

.project div {
    background-color: var(--bg-white);
    padding: 15px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 3px solid transparent;
    position: relative;
}

.project div::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 0;
    border-radius: var(--radius-md);
    background-color: rgba(var(--primary-rgb, 74,111,165),.03);
    z-index: -1;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    transform: translateY(5px);
}

.project div:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-bottom: 3px solid var(--primary-light);
}

.project div:hover::before {
    opacity: 1;
    transform: translateY(8px);
}

.project h3 {
    margin: 0 0 5px;
    font-size: 1.1em;
    font-weight: 600;
    transition: color .3s ease;
    line-height: 1.3;
}

.project div:hover h3 {
    color: var(--primary);
}

.project p {
    margin: 0;
    font-size: .85em;
    color: #666;
    line-height: 1.6;
}

/* ----  Projects Media Queries ---- */
@media screen and (max-width: 1024px) {
    .projects-container { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 768px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 15px;
    }
    #projects h2 { font-size: 2em; }
    .project div {
        padding: 12px;
        min-height: 70px;
    }
}

@media screen and (max-width: 480px) {
    .section { padding: 20px 0; }
    .projects-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    .project div {
        padding: 12px;
        min-height: 100px;
        width: 80%;
        justify-self: center;
        margin: 0 auto;
    }
    .project h3 { font-size: .95em; }
    .project p { font-size: .75em; }
    #filter-container { margin: 15px auto; }
}

@media (hover: hover) {
    .project div:hover { transform: translateY(-2px); }
}

/* ----  Projects Modal ---- */
.project-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none; 
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.modal-content {
    background-color: #272634;
    padding: 42px;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    text-align: center;
    transform: translateY(30px);
    opacity: 0;
    animation: modalSlideIn 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes modalSlideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 22px;
    top: 18px;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
    border: none;
}

.close-modal:hover {
    color: #333;
    background-color: transparent;
    transform: rotate(90deg);
}

.modal-content h2 {
    margin: 0 0 24px 0;
    color: #ffffff;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.modal-content p {
    margin-bottom: 34px;
    color: #cccccc;
    line-height: 1.7;
    text-align: left;
    font-size: 17px;
}

.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 14px;
}

.modal-btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.github-btn {
    background-color: #5d3b8b;
    color: white;
}

.github-btn:hover {
    background-color: #6d4c9b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(93, 59, 139, 0.3);
}

.demo-btn {
    background-color: #4ccea8;
    color: white;
}

.demo-btn:hover {
    background-color: #45bd9a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(76, 206, 168, 0.3);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 28px 20px;
        max-width: 90%;
        margin: 0 16px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .close-modal {
        right: 12px;
        top: 12px;
        font-size: 30px;
        padding: 8px;
    }
    
    .modal-content h2 {
        font-size: 24px;
        padding-right: 30px;
    }
}

@media (max-width: 576px){
  #certifications{
    min-height: auto !important;
    padding-bottom: 12px !important;
    margin-bottom: 0 !important;
  }

  .certificate-pagination{
    margin-top: 12px !important;
  }

  #projects.section{
    padding-top: 50px !important;
  }
}

@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #1e1e2f;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .close-modal {
        color: #aaa;
    }
    
    .close-modal:hover {
        color: #fff;
        background-color: transparent;
    }
    
    .modal-content h2 {
        color: #f0f0f0;
    }
    
    .modal-content p {
        color: #bbb;
    }
    
    .github-btn {
        background-color: #6a1b9a;
    }
    
    .github-btn:hover {
        background-color: #4a148c;
    }
    
    .demo-btn {
        background-color: #2ecc71;
    }
    
    .demo-btn:hover {
        background-color: #27ae60;
    }
}

.message-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-weight: 500;
    animation: slideInRight 0.3s cubic-bezier(0.19, 1, 0.22, 1), fadeOut 0.5s ease 2.5s forwards;
    max-width: 300px;
}

.message-popup.info {
    background-color: #2980b9;
    color: white;
}

.message-popup.success {
    background-color: #2ecc71;
    color: white;
}

.message-popup.error {
    background-color: #e74c3c;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .project div:hover,
    .modal-btn:hover,
    .close-modal:hover {
        transform: none !important;
    }
    
    .project div:hover::before {
        transform: none !important;
        opacity: 0 !important;
    }
    
    #projects h2:hover::after {
        width: 60px !important;
        box-shadow: none !important;
    }
}

/* ----  Contact ---- */
.floating-contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    -webkit-tap-highlight-color: transparent;
}

.floating-contact-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-light);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.floating-contact-btn:active {
    transform: scale(0.95);
    background-color: var(--primary-dark, var(--primary-light));
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.contact-modal {
    background-color: #fff;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal-overlay.active .contact-modal {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.close-modal {
    background-color: transparent !important;
    border: none;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.2s ease;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: -10px;
    -webkit-tap-highlight-color: transparent;
}

.close-modal:hover, 
.close-modal:active, 
.close-modal:focus {
    color: #999;
    background-color: transparent !important;
    transform: rotate(90deg);
    outline: none;
    box-shadow: none;
}

.modal-body {
    padding: 30px;
}

#contact-form .form-group {
    margin-bottom: 20px;
}

#contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 15px;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(74, 20, 140, 0.1);
}

#contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.submit-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 20, 140, 0.3);
}

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

.submit-btn:disabled {
    background-color: var(--primary-light);
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#form-status {
    text-align: center;
    margin: 15px 0;
    font-weight: 500;
    min-height: 24px;
    font-size: 14px;
}

.form-group .required {
    color: #ff7043;
    margin-left: 2px;
}

input:invalid, textarea:invalid {
    border-color: #ff7043;
}

.message-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-weight: 500;
    animation: slideInRight 0.3s cubic-bezier(0.19, 1, 0.22, 1), fadeOut 0.5s ease 2.5s forwards;
    max-width: 300px;
}

.message-popup.success {
    background-color: #2ecc71;
    color: white;
}

.message-popup.error {
    background-color: #e74c3c;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ----  Media Queries ---- */
@media (max-width: 768px) {
    .floating-contact-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    #contact-form input,
    #contact-form textarea {
        padding: 10px 12px;
    }
    
    .submit-btn {
        padding: 12px 16px;
    }
}

@media (prefers-color-scheme: dark) {
    .contact-modal {
        background-color: var(--bg-dark);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .modal-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background-color: rgba(255, 255, 255, 0.02);
    }
    
    .modal-header h3 {
        color: var(--text-light);
    }
    
    .close-modal:hover {
        background-color: transparent;
        color: var(--text-light);
    }
    
    #contact-form label {
        color: #ddd;
    }
    
    #contact-form input,
    #contact-form textarea {
        background-color: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: var(--text-light);
    }
    
    #contact-form input:focus,
    #contact-form textarea:focus {
        background-color: rgba(255, 255, 255, 0.08);
        border-color: var(--primary-light);
        box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.3);
    }
}

/* ----  Footer ---- */
footer {
    background: var(--bg-dark);
    color: var(--text-light);
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
                transparent 0%, 
                var(--primary-light, #5a8dd6) 50%, 
                transparent 100%);
    opacity: .4;
}

footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(255,255,255,.03) 0, transparent 60px);
    pointer-events: none;
    opacity: .5;
}

footer p {
    margin: 8px 0;
    font-size: clamp(.85em, 2vw, .95em);
    font-weight: 300;
    letter-spacing: .5px;
    color: var(--text-light);
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 2px 5px;
    border-radius: 4px;
    transition: all .3s ease;
    position: relative;
    display: inline-block;
}

footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--text-light);
    transition: width .3s ease, box-shadow .3s ease;
}

footer a:hover {
    color: #fff;
    transform: translateY(-1px);
}

footer a:hover::after {
    width: 100%;
    box-shadow: 0 0 5px rgba(255,255,255,.5);
}

/* ----  Media Queries ---- */
@media screen and (max-width: 768px) {
    footer { padding: 25px 0; }
}

@media screen and (max-width: 480px) {
    footer { padding: 20px 0; }
    footer p { margin: 6px 0; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    footer a:hover {
        transform: none !important;
    }
    
    footer a:hover::after {
        transition: none !important;
        box-shadow: none !important;
    }
}