:root {
    --primary-color: #FF8C00;
    --background-dark: #0A192F;
    --card-dark: #1F2937;
    --text-dark: #F3F4F6;
    --background-light: #E6F0FA;
    --card-light: #F9FAFB;
    --text-light: #000000;
    --header-bg-dark: #111827;
    --header-bg-light: #FFFFFF;
    --gray-dark: #9CA3AF;
    --gray-light: #374151;
    --card-border-dark: #374151;
    --card-border-light: #D1D5DB;
    --blur-amount: 20px;
    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.15);
}

html {
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme {
    --background-dark: var(--background-light);
    --card-dark: var(--card-light);
    --text-dark: var(--text-light);
    --header-bg-dark: var(--header-bg-light);
    --gray-dark: var(--gray-light);
    --card-border-dark: var(--card-border-light);
}

html.light-theme .text-gray-200, html.light-theme .text-gray-300, html.light-theme .text-gray-500 {
    color: var(--gray-light) !important;
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .bubbly-btn:not(:hover) {
    color: var(--text-light) !important;
    background-color: var(--card-light);
    border: 1px solid var(--card-border-light);
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .bubbly-btn:hover {
    color: #FFFFFF !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color);
    transition: background-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .toggle-details:not(:hover) {
    background: var(--card-light);
    color: var(--text-light);
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .toggle-details:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transition: background-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .theme-toggle:not(:hover) {
    background: var(--card-light);
    color: var(--text-light);
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .theme-toggle:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transition: background-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme #back-to-top:not(:hover) {
    background: var(--card-light);
    color: var(--text-light);
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme #back-to-top:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transition: background-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--background-dark);
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 400;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

p, li, h1, h2, h3, h4, h5, h6, span, div {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.parallax-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 0%, #1E3A8A 0%, #0A192F 70%);
    transition: background 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Ccircle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.8)"/%3E%3Ccircle cx="30" cy="40" r="0.7" fill="rgba(255,255,255,0.6)"/%3E%3C/svg%3E') repeat;
    background-size: 80px 80px;
    opacity: 0.4;
    animation: twinkle 18s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

html.light-theme .parallax-background {
    background: radial-gradient(circle at 80% 20%, #FFD700 0%, #87CEEB 50%, #E6F0FA 100%);
}

html.light-theme .parallax-background::before {
    display: none;
}

.parallax-background .star {
    position: absolute;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.4);
    animation: fall 15s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    will-change: transform;
    pointer-events: none;
}

@keyframes fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

html.light-theme .parallax-background .cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 12px 6px rgba(255, 255, 255, 0.3);
    animation: drift 80s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
    will-change: transform;
    pointer-events: none;
}

@keyframes drift {
    0% { transform: translateX(-100vw) scale(0.8); }
    50% { transform: translateX(0) scale(1); }
    100% { transform: translateX(100vw) scale(0.8); }
}

.nav-link {
    position: relative;
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: var(--gray-dark);
    cursor: pointer;
    font-weight: 700;
    font-size: 1.125rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html.light-theme .nav-link {
    color: var(--gray-light);
}

html.light-theme .nav-link:hover {
    color: var(--text-light);
}

.animated-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animated-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bubbly-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
    font-weight: 600;
    font-size: 1.1rem;
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
    margin: 0 0.5rem;
    padding: 0.75rem 1.5rem;
}

.bubbly-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3);
}

.bubbly-btn:active {
    transform: scale(0.95);
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bubbly-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease-in-out;
}

.bubbly-btn:active::after {
    animation: ripple-effect 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes ripple-effect {
    to {
        transform: translate(-50%, -50%) scale(25);
        opacity: 0;
    }
}

#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-color: var(--header-bg-dark);
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
    z-index: 50;
    pointer-events: auto;
}

html.light-theme #mobile-menu {
    background-color: var(--header-bg-light);
}

.modal {
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.is-visible, .modal.show {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

html.light-theme .modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal > div {
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
}

#main-header {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 50;
    pointer-events: auto;
    background-color: var(--header-bg-dark);
    border-bottom: 1px solid var(--card-border-dark);
}

#main-header.scrolled {
    background-color: var(--header-bg-dark);
    box-shadow: var(--shadow-soft);
}

#main-header.hide {
    transform: translateY(-100%);
}

#main-header h1 {
    font-size: 1.25rem;
}

#changing-text {
    min-height: 4rem;
    white-space: normal;
    overflow: hidden;
    position: relative;
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 1.5rem;
    line-height: 1.5;
}

#changing-text::after {
    content: '';
    position: absolute;
    width: 0.5px;
    height: 100%;
    background-color: var(--primary-color);
    margin-left: 4px;
    animation: blink-cursor 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes blink-cursor {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

html.light-theme #changing-text {
    color: var(--gray-light);
}

.linkedin-hover:hover, .linkedin-contact:hover { color: #0A66C2; }

.youtube-hover:hover, .youtube-contact:hover { color: #FF0000; }

@keyframes pulse-brand-color {
    0% { transform: scale(1); filter: brightness(100%); }
    50% { transform: scale(1.05); filter: brightness(120%); }
    100% { transform: scale(1); filter: brightness(100%); }
}

.whatsapp-pulse { animation: pulse-brand-color 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; color: #25D366 !important; }

.email-pulse { animation: pulse-brand-color 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; color: #3498db !important; }

.linkedin-pulse { animation: pulse-brand-color 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; color: #0A66C2 !important; }

.youtube-pulse { animation: pulse-brand-color 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; color: #FF0000 !important; }

.error-message {
    color: #EF4444;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
    opacity: 0;
}

.error-message.active { display: block; opacity: 1; role: alert; }

.input-error { border-color: #EF4444 !important; }

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.3) !important;
}

input[type="checkbox"]:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.3) !important;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s ease;
    z-index: 5;
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
    border-radius: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.timeline-item:hover {
    transform: translateX(5px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.35rem;
    top: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--card-dark);
    transition: transform 0.4s ease;
}

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

.timeline-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.timeline-content.show {
    max-height: calc(100vh + 500px);
    opacity: 1;
}

html.light-theme .timeline-content {
    color: var(--gray-light);
}

.badge {
    padding: 0.35rem 0.75rem;
    background: rgba(255, 140, 0, 0.2);
    color: #fff;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.75rem;
    transition: transform 0.4s ease;
    backdrop-filter: blur(5px);
}

.badge:hover {
    transform: scale(1.05);
}

html.light-theme .badge {
    background: rgba(255, 140, 0, 0.1);
    color: var(--text-light);
}

.toggle-details {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: var(--card-dark);
    color: white;
    border-radius: 50%;
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    z-index: 15;
    pointer-events: auto;
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
}

.toggle-details:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transform: scale(1.1);
}

.toggle-details.active {
    transform: rotate(180deg);
}

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card-dark);
    color: #fff;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s ease;
    z-index: 1000;
    cursor: pointer;
    pointer-events: auto;
    font-size: 1.25rem;
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

#back-to-top:hover {
    transform: scale(1.1);
}

.theme-toggle, .lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: var(--card-dark);
    color: var(--text-dark);
    border-radius: 50%;
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s ease;
    cursor: pointer;
    z-index: 100;
    pointer-events: auto;
    margin-left: 0.5rem;
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
}

.theme-toggle {
    width: auto;
    padding: 0 0.5rem;
    border-radius: 9999px;
}

.theme-toggle:hover, .lang-toggle:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.25rem;
}

html.light-theme .theme-toggle [data-lucide="moon"] { display: none; }

html.light-theme .theme-toggle [data-lucide="sun"] { display: inline; }

.theme-toggle [data-lucide="sun"] { display: none; }

html.light-theme #main-header h1 {
    color: var(--text-light);
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .timeline-item {
    background-color: var(--card-light);
    border-color: var(--card-border-light);
}

html.light-theme .about-section .flex {
    background-color: var(--card-light);
    border-color: var(--card-border-light);
}

html.light-theme .certifications-section .grid > div {
    background-color: var(--card-light);
    border-color: var(--card-border-light);
}

html.light-theme .projects-section .project-card {
    background-color: var(--card-light) !important;
    border-color: var(--card-border-light);
}

html.light-theme .contact-form {
    background-color: var(--card-light);
    border-color: var(--card-border-light);
}

html.light-theme .modal > div {
    background-color: var(--card-light);
    border-color: var(--card-border-light);
}

html.light-theme .form-input {
    background-color: #F3F4F6;
    border-color: var(--card-border-light);
    color: var(--text-light);
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .skill-badge {
    background-color: #E5E7EB;
    color: var(--text-light);
    transition: background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme #home h2 {
    color: var(--text-light);
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme #home a:not(:hover) {
    color: var(--text-light);
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .timeline-item h3 {
    color: var(--text-light);
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .certifications-section h3 {
    color: var(--text-light);
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .contact-form label {
    color: var(--text-light);
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme footer {
    color: var(--gray-light);
    transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html.light-theme .contact-form label[for="not-a-bot"] {
    color: var(--gray-light);
}

html.light-theme .timeline-content p, html.light-theme .timeline-content li {
    color: var(--text-light) !important;
}

html.light-theme .certifications-section p {
    color: var(--gray-light) !important;
}

html.light-theme .projects-section p {
    color: var(--gray-light) !important;
}

html.light-theme .skill-item .expanded-content p {
    color: var(--gray-light) !important;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #FFFFFF;
    font-size: 1.2rem;
    margin-top: 1rem;
    animation: pulse 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

#welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#welcome-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.welcome-emoji {
    font-size: 10rem;
    animation: bounce 3s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

.welcome-text {
    font-size: 2rem;
    color: #FFFFFF;
    margin: 2rem 0;
    text-align: center;
    animation: fadeIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

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

#welcome-btn {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
}

#welcome-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 16px rgba(255, 140, 0, 0.3);
}

main.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

main {
    opacity: 0;
    transform: translateY(20px);
}

header.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

header {
    opacity: 0;
    transform: translateY(-20px);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--header-bg-dark);
    border: 1px solid var(--card-border-dark);
    border-radius: 0.5rem;
    min-width: 120px;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--shadow-soft);
}

.lang-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

html.light-theme .lang-dropdown {
    background: var(--header-bg-light);
    border-color: var(--card-border-light);
}

.lang-option {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.3s ease;
}

.lang-option:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

html.light-theme .lang-option {
    color: var(--text-light);
}

.certifications-section .grid > div {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
    border-radius: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.certifications-section .grid > div:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.certifications-section img {
    width: 120px;
    height: auto;
    object-fit: contain;
    transition: none;
}

.certifications-section img:hover {
    transform: none;
}

.skill-badge {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease, background-color 0.3s ease, color 0.3s ease;
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
    border-radius: 9999px;
    margin: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.skill-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #FFFFFF;
}

html.light-theme .skill-badge:hover {
    color: #000000 !important;
}

.social-icon {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.4s ease;
    padding: 0.5rem;
    background: transparent !important;
    border: none !important;
    margin: 0 0.5rem;
}

.social-icon:hover {
    transform: scale(1.2) rotate(10deg);
}

.icon-pulse {
    animation: pulse-brand-color 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.about-section .flex, .certifications-section .grid > div, .timeline-item, .contact-form {
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    box-shadow: var(--shadow-soft);
    border-radius: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.about-section .flex:hover, .certifications-section .grid > div:hover, .timeline-item:hover, .contact-form:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.header-title-img {
    height: 1.5rem;
    width: auto;
    margin-right: 0.5rem;
}

.logo-section {
    text-align: center;
    padding: 1rem 0;
}

.logo-section img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    animation: subtleAnimation 1.5s ease-in-out forwards;
    opacity: 0;
}

@keyframes subtleAnimation {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.form-input {
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    transition: border-color 0.3s ease;
}

.contact-form {
    border-radius: 1rem;
}

h2 {
    font-size: 3.5rem !important;
}

h3 {
    font-size: 2.5rem !important;
}

p, li {
    font-size: 1.1rem !important;
    font-weight: 500;
    margin-bottom: 1rem;
}

footer {
    background: var(--header-bg-dark);
    border-top: 1px solid var(--card-border-dark);
    padding: 2rem 0;
}

html.light-theme footer {
    background: var(--header-bg-light);
    border-top: 1px solid var(--card-border-light);
}

footer p {
    margin-bottom: 1rem;
}

/* ========================================
   LINE 1300: SKILLS & EXPERTISE SECTION - NEW LAYOUT
   ======================================== */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Reduced gap for mobile, increased for desktop */
    margin: 2.5rem auto 0;
    max-width: 800px;
    padding: 0 1rem;
}

/* Enhanced cohesive hover effect for skill cards */
.skill-item {
    /* Existing styles preserved */
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    /* Add unified animation trigger */
    will-change: transform, box-shadow;
}

.skill-item::before {
    /* Existing tint preserved, enhanced for readability */
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,140,0,0.08), rgba(255,140,0,0.04)); /* Subtle orange tint for better readability */
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    border-radius: 1.5rem;
    z-index: 1; /* Ensure it sits behind text */
}

.skill-item:hover::before {
    opacity: 1;
}

.skill-item:hover {
    /* Cohesive single animation: card lift with subtle scale */
    transform: translateY(-8px) scale(1.02); /* Reduced from -12px/1.03 for smoother cohesion */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); /* Slightly softer shadow */
    border-color: var(--primary-color);
    /* Ensure consistent timing across card */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skill-badge {
    /* Existing styles preserved */
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    color: var(--text-dark);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Unified transition timing */
    margin-bottom: 0.75rem;
    position: relative; /* For pop-up layering */
    z-index: 2; /* Above tint */
    /* Remove separate hover; tie to card hover */
}

.skill-badge i {
    /* Existing styles preserved */
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--primary-color);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Unified timing */
}

/* Pop-up animation for pill-shaped skill name on card hover */
.skill-item:hover .skill-badge {
    /* Single pop-up: quick scale and lift for emphasis */
    transform: translateY(-4px) scale(1.08);
    color: #FFFFFF; /* High contrast for readability over tint */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Subtle shadow for depth */
}

.skill-item:hover .skill-badge i {
    /* Icon pops slightly more for visual pop */
    transform: scale(1.1);
    color: #FFFFFF; /* Match text for cohesion */
}

/* Ensure expanded content readability on hover */
.skill-item:hover .expanded-content {
    color: var(--text-dark); /* Maintain high contrast */
    transition: color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.expanded-content {
    padding-top: 1rem;
    border-top: 1px dashed var(--card-border-dark);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-dark);
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-height: none;
    overflow: visible;
}

html.light-theme .expanded-content {
    color: var(--gray-light);
}

/* Light theme adjustments for readability */
html.light-theme .skill-item::before {
    background: linear-gradient(135deg, rgba(255,140,0,0.06), rgba(255,140,0,0.02)); /* Lighter tint */
}

html.light-theme .skill-item:hover .skill-badge {
    color: var(--text-light); /* Dark text on light theme for contrast */
    text-shadow: 0 1px 2px rgba(255, 140, 0, 0.3); /* Orange glow instead */
}

html.light-theme .skill-item:hover .skill-badge i {
    color: var(--primary-color); /* Keep orange icon */
}

/* ========================================
   VISIT PROJECT BUTTON - MODERN STYLE
   ======================================== */
.projects-section .visit-project-btn, .view-credential-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF4500 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
}

.projects-section .visit-project-btn:hover, .view-credential-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.4);
    background: linear-gradient(135deg, #FF4500 0%, var(--primary-color) 100%);
}

.projects-section .visit-project-btn:active, .view-credential-btn:active {
    transform: scale(0.95);
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.projects-section .visit-project-btn::after, .view-credential-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease-in-out;
}

.projects-section .visit-project-btn:active::after, .view-credential-btn:active::after {
    animation: ripple-effect 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

html.light-theme .projects-section .visit-project-btn, html.light-theme .view-credential-btn {
    background: linear-gradient(135deg, #FFE4D6 0%, white 100%);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.2);
}

html.light-theme .projects-section .visit-project-btn:hover, html.light-theme .view-credential-btn:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF4500 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
}

html.light-theme .projects-section .visit-project-btn::after, html.light-theme .view-credential-btn::after {
    background: rgba(0, 0, 0, 0.4);
}

/* ========================================
   PROJECTS SECTION - FIXED LAYOUT WITH GRID AND PROPER SPACING
   ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid: side-by-side on large, stack on small */
    gap: 2rem; /* Proper, consistent gap between cards */
    margin-top: 2rem; /* Space from title */
}

.project-card {
    background: var(--card-dark);
    border: 1px solid var(--card-border-dark);
    border-radius: 1rem;
    overflow: hidden; /* Ensure rounded corners on images */
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.project-container {
    display: flex;
    flex-direction: column; /* Stack image and details vertically for better mobile flow */
    gap: 1rem; /* Space between image and details */
    align-items: flex-start;
}

.project-image {
    width: 100%; /* Full width on all screens */
    height: auto;
    aspect-ratio: 16/9; /* Consistent aspect ratio to prevent layout shift */
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease; /* Subtle hover for images */
}

.project-image:hover {
    transform: scale(1.02); /* Light zoom on hover */
}

.project-details {
    flex: 1;
    padding: 0 0.5rem; /* Light padding for text breathing room */
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr); /* Force 2 columns on tablet+ */
        gap: 2.5rem; /* Slightly larger gap on larger screens */
    }
    .project-container {
        flex-direction: row; /* Side-by-side image and details on larger screens */
        align-items: center;
    }
    .project-image {
        flex: 0 0 40%; /* Image takes 40% width */
        max-width: 200px; /* Cap image size */
    }
    .project-details {
        flex: 1;
        padding-left: 1rem;
    }
}

@media (max-width: 640px) {
    .projects-grid {
        gap: 1.5rem; /* Smaller gap on mobile to save space */
        padding: 0 0.5rem; /* Prevent edge clipping */
    }
    .project-card {
        padding: 1rem; /* Reduce padding on mobile */
    }
    .project-details h3 {
        font-size: 1.5rem !important; /* Smaller heading on mobile */
    }
    .project-details p {
        font-size: 0.95rem !important; /* Adjust text size */
    }
}

/* ========================================
   REST OF ORIGINAL STYLES (unchanged)
   ======================================== */
.profile-container {
    overflow: hidden;
    position: relative;
    width: 256px;
    height: 256px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-container:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
}

.profile-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

html.light-theme .profile-container {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html.light-theme .profile-container:hover {
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.2);
}

.projects-section h3 {
    color: #FFFFFF !important;
}

.projects-section p {
    color: #D1D5DB !important;
}

html.light-theme .projects-section h3 {
    color: #111827 !important;
}

html.light-theme .projects-section p {
    color: #374151 !important;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
}

.logo {
    width: 250px;
    height: auto;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    animation: coolIntro 1.6s ease-out forwards;
}

@keyframes coolIntro {
    0% { opacity: 0; transform: translateY(40px) scale(0.9); }
    60% { opacity: 1; transform: translateY(-8px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

[dir="rtl"] .skill-badge i { margin-right: 0; margin-left: 0.75rem; }

.timeline-item img {
    width: 120px;
    height: auto;
    object-fit: contain;
    transition: none;
}

.timeline-item img:hover { transform: none; }

i[data-lucide] {
    width: 1.25em;
    height: 1.25em;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: background-color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 20px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + label:before {
    transform: translateX(20px);
}

html.light-theme .toggle-switch label { background-color: var(--primary-color); }

html.light-theme .toggle-switch input:not(:checked) + label:before { transform: translateX(20px); }

html.light-theme .toggle-switch input:checked + label { background-color: #ccc; }

html.light-theme .toggle-switch input:checked + label:before { transform: translateX(0); }

.project-container {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 1rem;
}

.project-container img {
    max-width: 50%;
    height: auto;
    border-radius: 0;
    cursor: pointer;
    border: none;
    box-shadow: none;
    transition: none;
}

.project-container img:hover {
    transform: none;
}

.project-details {
    flex: 1;
}

@media (max-width: 768px) {
    .project-container {
        flex-direction: column;
    }
    .project-container img {
        max-width: 100%;
    }
}

#image-modal {
    transition: opacity 0.3s ease;
}

#image-modal.show {
    opacity: 1;
    pointer-events: auto;
}

#close-image-modal {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#close-image-modal:hover {
    transform: scale(1.2);
}

/* Consolidated and Optimized Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
    .logo-section img {
        max-height: 150px;
    }

    .skills-grid {
        gap: 1rem; /* Proper gap on mobile */
        padding: 0 0.5rem; /* Add padding to prevent edge clipping */
    }

    .skill-item {
        padding: 0.75rem; /* Reduced padding to fix overflow */
        margin: 0; /* Ensure no extra margins */
        border-radius: 1rem; /* Slightly smaller radius for fit */
    }

    .skill-badge {
        font-size: 1rem; /* Smaller font to prevent overflow */
        padding: 0.5rem 1rem; /* Reduced padding */
        margin: 0.25rem; /* Smaller margin */
        flex-wrap: wrap; /* Allow wrapping if text is long */
        justify-content: center;
    }

    .skill-badge i {
        font-size: 1.25rem; /* Smaller icon */
        margin-right: 0.5rem;
    }

    .skill-item:hover {
        transform: translateY(-4px) scale(1.01); /* Less dramatic on mobile */
    }

    .skill-item:hover .skill-badge {
        transform: translateY(-2px) scale(1.05);
    }

    .expanded-content {
        font-size: 0.85rem; /* Smaller text to fit */
        padding-top: 0.5rem;
        line-height: 1.5;
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Ensure single column on small tablets */
    }

    .certifications-section .grid {
        grid-template-columns: 1fr;
    }

    /* Reformat Certifications for Mobile: Collapse by default, show only logo, title, and button */
    .certifications-section .grid > div {
        padding: 1rem;
        gap: 0.5rem; /* Tighter spacing */
        min-height: auto; /* Allow natural height */
    }

    .certifications-section .grid > div p,
    .certifications-section .grid > div .description,
    .certifications-section .grid > div .details {
        display: none; /* Hide full description and details */
    }

    .certifications-section img {
        width: 80px; /* Smaller logo for mobile */
        height: auto;
    }

    .certifications-section h3 {
        font-size: 1.2rem !important; /* Smaller title */
        margin: 0.25rem 0;
    }

    .view-credential-btn {
        display: block !important; /* Ensure button is visible */
        font-size: 0.8rem; /* Small button */
        padding: 0.4rem 0.8rem; /* Compact padding */
        margin-top: 0.5rem;
        width: auto;
        align-self: center;
    }

    #about .flex {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 1rem;
    }

    h2 {
        font-size: 2.5rem !important;
    }

    h3 {
        font-size: 1.8rem !important;
    }

    p, li {
        font-size: 0.95rem !important;
    }

    #about h2 {
        font-size: 2.5rem !important; /* Scale down About Me heading */
    }

    #about h3 {
        font-size: 1.8rem !important; /* Scale down About Me subheadings */
    }

    #about p {
        font-size: 1rem !important; /* Scale down About Me text */
        line-height: 1.6;
    }

    .timeline-item {
        padding: 1rem;
    }

    .skills-grid {
        padding: 0 0.5rem;
    }

    .certifications-section .grid > div {
        padding: 0.75rem;
        gap: 0.25rem; /* Even tighter for small screens */
    }

    /* Additional Certifications tweaks for very small screens */
    .certifications-section img {
        width: 60px;
    }

    .certifications-section h3 {
        font-size: 1rem !important;
    }

    .view-credential-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .projects-section .project-card {
        padding: 1rem;
    }

    .contact-form {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 2rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    p, li {
        font-size: 0.9rem !important;
    }

    .bubbly-btn {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .view-credential-btn, .visit-project-btn {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
    }

    .skills-grid {
        gap: 0.75rem;
    }

    .profile-container {
        width: 200px;
        height: 200px;
    }

    #about h2 {
        font-size: 2rem !important; /* Further scale for very small screens */
    }

    #about h3 {
        font-size: 1.5rem !important;
    }

    #about p {
        font-size: 0.95rem !important;
    }

    /* Further reduce Skills cards to prevent overflow */
    .skill-item {
        padding: 0.5rem; /* Even smaller padding */
    }

    .skill-badge {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .skill-badge i {
        font-size: 1rem;
        margin-right: 0.4rem;
    }

    .expanded-content {
        font-size: 0.8rem;
        padding-top: 0.4rem;
    }

    .certifications-section .grid > div {
        padding: 0.5rem;
        gap: 0.2rem;
    }

    .certifications-section img {
        width: 50px;
    }
}

@media (max-width: 360px) {
    h2 {
        font-size: 2rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    p, li {
        font-size: 0.85rem !important;
    }

    .skills-grid {
        gap: 0.5rem;
    }

    .profile-container {
        width: 180px;
        height: 180px;
    }

    .theme-toggle {
        margin-left: 0.25rem;
    }

    #about h2 {
        font-size: 1.8rem !important;
    }

    #about p {
        font-size: 0.9rem !important;
    }

    .skill-badge {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .expanded-content {
        font-size: 0.75rem;
    }

    .certifications-section .grid > div {
        padding: 0.4rem;
    }

    .certifications-section h3 {
        font-size: 0.9rem !important;
    }

    .view-credential-btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 1024px) {
    .skills-grid {
        gap: 1rem;
    }

    .certifications-section .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1440px) {
    .container {
        max-width: 1280px;
    }
}

#about {
    max-width: 100%;
}

#about .container {
    max-width: none;
}

#about h2 {
    font-size: 4rem !important;
}

#about h3 {
    font-size: 3rem !important;
}

#about p {
    font-size: 1.25rem !important;
    line-height: 1.8;
}

#about .flex {
    padding: 1rem;
}
