/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Browser UI Theme Support */
/* Scrollbar styling for WebKit browsers */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

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

/* Dark mode scrollbar adjustments */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #404040;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Selection colors */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Focus outline color */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* CSS Variables for Theme Support */
:root {
    /* Light Mode Colors */
    --bg-primary: #fff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #e9ecef;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #fff;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --hero-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --browser-theme-color: #ffffff;
    
    /* Theme colors that stay consistent */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #888;
    --border-color: #404040;
    --nav-bg: rgba(26, 26, 26, 0.98);
    --card-bg: #242424;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --hero-bg: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    --browser-theme-color: #2d2d2d;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px var(--shadow-light);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Navigation Active Link Underline */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    position: relative;
}

/* Sliding underline indicator */
.nav-menu::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.2s ease-out;
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 8px;
    padding-top: 4px;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: opacity 0.3s ease;
}

/* Theme and Language Toggle Container */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle,
.language-toggle {
    margin-left: 0;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-light), inset 0 0 0 2px var(--border-color);
    position: relative;
    box-sizing: border-box;
    /* Disable all browser default button behaviors */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* Force override all possible button states */
.theme-btn:active,
.theme-btn:focus,
.theme-btn:focus-visible,
.theme-btn:focus-within {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 10px var(--shadow-light), inset 0 0 0 2px var(--border-color) !important;
    outline: none !important;
    border: none !important;
    transform: none !important;
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-medium);
    background: var(--primary-gradient);
    color: white;
}

.theme-btn i {
    transition: transform 0.3s ease;
}

.theme-btn:hover i {
    transform: rotate(180deg);
}

/* Theme transition for smooth switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 50px;
    background: var(--hero-bg);
    transition: background 0.3s ease;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    line-height: 1.1;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
    max-width: 500px;
    text-align: justify;
}

.scroll-indicator {
    margin-top: 2.5rem;
}

.scroll-arrow {
    display: inline-block;
    color: var(--primary-color);
    font-size: 2.2rem;
    text-decoration: none;
    animation: bounce 2s infinite;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.scroll-arrow:hover {
    color: var(--primary-dark);
    transform: translateY(-3px);
    opacity: 1;
}

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

/* Desktop: Show scroll indicator in hero-content, hide in hero-social */
.mobile-scroll {
    display: none;
}

.desktop-scroll {
    display: block;
}

/* Hero Social Contact Buttons */
.hero-social {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInRight 1s ease-out 0.3s both;
}

[data-theme="dark"] .hero-social {
    background: rgba(36, 36, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-social:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .hero-social:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.social-text {
    margin-bottom: 1.5rem;
}

.social-text span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.social-btn i {
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Individual social button colors */
.social-btn.whatsapp {
    background: #25D366;
    color: white;
}

.social-btn.whatsapp:hover {
    background: #128C7E;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #d0822b 0%, #c55a34 25%, #bd233b 50%, #ad215e 75%, #9d1680 100%);
    box-shadow: 0 8px 20px rgba(220, 39, 67, 0.4);
}

.social-btn.linkedin {
    background: #0077B5;
    color: white;
}

.social-btn.linkedin:hover {
    background: #005582;
    box-shadow: 0 8px 20px rgba(0, 119, 181, 0.4);
}

.social-btn.github {
    background: #333;
    color: white;
}

.social-btn.github:hover {
    background: #000;
    box-shadow: 0 8px 20px rgba(51, 51, 51, 0.4);
}

.social-btn.email {
    background: #EA4335;
    color: white;
}

.social-btn.email:hover {
    background: #c23321;
    box-shadow: 0 8px 20px rgba(234, 67, 53, 0.4);
}

.hero-image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.image-placeholder {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.image-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

/* Styles for real images when added */
.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Hide placeholder content when real image is used */
.image-placeholder.has-image i,
.image-placeholder.has-image p {
    display: none;
}

.image-placeholder.has-image {
    background: transparent;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg-primary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

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

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.skill-item span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--card-bg);
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.portfolio-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 0;
    box-shadow: none;
}

.portfolio-image .image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.overlay-content {
    text-align: center;
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.overlay-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: none; /* Hide title in overlay */
}

.overlay-content p {
    margin-bottom: 1.5rem;
    display: none; /* Hide description in overlay */
}

.portfolio-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.portfolio-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    position: relative;
}

.portfolio-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

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

/* Portfolio Banner */
.portfolio-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(0);
    transition: all 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3), 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.banner-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    flex: 1;
}

.banner-button {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateX(10px);
    position: relative;
    background: transparent;
    border: none;
}

.portfolio-item:hover .banner-button {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile and portrait mode: always show View Details button */
@media (max-width: 768px), (orientation: portrait) {
    .banner-button {
        opacity: 1;
        transform: translateX(0);
    }
    
    .portfolio-item .banner-button {
        opacity: 1;
        transform: translateX(0);
    }
}

.banner-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

.banner-button:hover::after {
    width: 100%;
}

.portfolio-link-icon {
    display: inline-block;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portfolio-link-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Certificates Section */
.certificates {
    padding: 100px 0;
    background: var(--bg-primary);
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

/* Single certificate item centering */
.certificates-grid:has(.certificate-item:only-child) {
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.certificate-item:only-child {
    max-width: 500px;
    width: 100%;
}

.certificate-item {
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.certificate-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.certificate-image {
    height: 300px;
    position: relative;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.certificate-image .certificate-image-placeholder {
    color: var(--text-secondary);
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.certificate-image .certificate-image-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
    color: var(--primary-color);
}

.certificate-image .certificate-image-placeholder p {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    opacity: 0.8;
}

.certificate-content {
    padding: 25px;
}

.certificate-title {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.certificate-issuer {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.certificate-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.certificate-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: justify;
}

.certificate-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

/* Dark mode adjustments for certificates */
[data-theme="dark"] .certificate-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .certificate-item:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Mobile responsiveness for certificates */
@media (max-width: 768px) {
    .certificates {
        padding: 80px 0;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .certificate-content {
        padding: 20px;
    }
    
    .certificate-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .certificates {
        padding: 60px 0;
    }
    
    .certificate-image {
        height: 280px;
    }
    
    .certificate-content {
        padding: 15px;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
}

/* NIRC Slideshow Styles */
.nirc-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.nirc-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nirc-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.nirc-slide.active {
    opacity: 1;
}

.nirc-prev, .nirc-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 10;
    user-select: none;
}

.nirc-prev {
    left: 15px;
}

.nirc-next {
    right: 15px;
}

.nirc-prev:hover, .nirc-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.nirc-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Mobile adjustments for NIRC slideshow */
@media (max-width: 768px) {
    .nirc-prev, .nirc-next {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .nirc-prev {
        left: 10px;
    }
    
    .nirc-next {
        right: 10px;
    }
    
    .nirc-indicators {
        bottom: 15px;
        gap: 8px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .nirc-prev, .nirc-next {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .nirc-prev {
        left: 8px;
    }
    
    .nirc-next {
        right: 8px;
    }
    
    .nirc-indicators {
        bottom: 12px;
        gap: 6px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* Dark mode adjustments for NIRC slideshow */
[data-theme="dark"] .nirc-prev,
[data-theme="dark"] .nirc-next {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

[data-theme="dark"] .nirc-prev:hover,
[data-theme="dark"] .nirc-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .indicator {
    background: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--bg-primary);
}

.contact-content {
    display: flex;
    justify-content: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Contact section mobile adjustments */
@media (max-width: 480px) {
    .contact-content {
        padding: 0 0.5rem;
        align-items: center;
    }
    
    .contact-info {
        width: 100%;
        align-items: center;
    }
    
    .contact-item {
        max-width: 300px;
        width: 100%;
        margin: 0 auto 1rem auto;
        justify-content: flex-start;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        flex-shrink: 0;
        min-width: 50px;
        min-height: 50px;
    }
    
    .contact-text {
        flex: 1;
    }
    
    .contact-text h4 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .contact-text p {
        font-size: 0.9rem;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    min-width: 60px;
    min-height: 60px;
}

.contact-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.contact-text p {
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.contact-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

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

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Hide horizontal scrollbar */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 70%;
    min-height: auto;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    margin-bottom: 5%; /* Add bottom margin for scrolling space */
    transform: scale(0.7) translateY(-50px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

/* Mobile optimization for modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px; /* Add padding for better mobile experience */
    }
    
    .modal-content {
        margin: 3% auto;
        max-width: 90%;
        border-radius: 10px;
        margin-bottom: 5%; /* More bottom margin on mobile */
    }
    
    .modal-info {
        padding: 1.5rem;
        max-height: none; /* Remove height restrictions */
    }
    
    .modal-info h3 {
        font-size: 1.2rem;
    }
    
    .modal-info p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: 300;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.close:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Dark mode close button */
[data-theme="dark"] .close {
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .close:hover {
    background: var(--primary-color);
    color: white;
}

#modalImage {
    width: 100%;
    height: auto;
    display: block;
}

.modal-info {
    padding: 1.5rem;
    overflow-wrap: break-word; /* Handle long words */
    word-wrap: break-word; /* Legacy support */
}

.modal-info h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    line-height: 1.3;
}

.modal-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
    text-align: justify; /* Better text alignment for long descriptions */
}

/* Language Toggle */
.language-toggle {
    margin-left: 1rem;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px 16px;
    width: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    text-align: center;
    /* Disable all browser default button behaviors */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* Force override all possible button states */
.lang-btn:active,
.lang-btn:focus,
.lang-btn:focus-visible,
.lang-btn:focus-within {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3) !important;
    outline: none !important;
    border: none !important;
    transform: none !important;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.lang-text {
    font-weight: 600;
}

/* Language Toggle Animation */
.lang-btn.switching {
    transform: scale(0.95);
}

.lang-btn.switching .lang-text {
    opacity: 0.7;
}

/* Responsive Design */

/* Small desktop screens - Optimize spacing */
@media (min-width: 1025px) and (max-width: 1199px) {
    .nav-container {
        padding: 0 15px;
        gap: 1.5rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-controls {
        gap: 0.6rem;
    }
}

/* Tablet landscape mode - Fix navigation centering and collision */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-container {
        max-width: none;
        padding: 0 15px;
        gap: 1rem;
    }
    
    .nav-logo a {
        font-size: 1.3rem;
        flex-shrink: 0;
    }
    
    .nav-menu {
        gap: 1.2rem;
        flex: 1;
        justify-content: center;
        margin: 0 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding-bottom: 6px;
        padding-top: 2px;
    }
    
    .nav-controls {
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .theme-btn,
    .lang-btn {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    .lang-btn {
        min-width: 36px;
        border-radius: 18px;
        font-size: 0.7rem;
        font-weight: 600;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        padding: 0 15px;
        position: relative;
        height: 50px;
        align-items: center;
    }
    
    .nav-logo a {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow-light);
        padding: 2rem 0;
        backdrop-filter: blur(10px);
    }

    .nav-menu.active {
        left: 0;
    }

    /* Move nav-controls out of nav-menu and position in top bar */
    .nav-controls {
        position: fixed !important;
        right: 60px !important;
        top: 37px !important; /* Perfect center: 12px padding + 25px (half of 50px container) */
        transform: translateY(-50%) !important; /* Center the 36px height buttons */
        gap: 6px;
        display: flex;
        align-items: center;
        height: 36px; /* Match button height */
        z-index: 1000;
        /* Lock in place completely */
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide controls from mobile menu */
    .nav-menu .nav-controls {
        display: none;
    }

    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1001;
        width: 36px;
        height: 36px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 4px;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: opacity 0.3s ease;
    }

    /* Simple fade animation for burger menu */
    .nav-toggle.active {
        opacity: 0.7;
    }

    .nav-toggle.active .bar {
        opacity: 0.5;
    }

    /* Adjust button sizes for mobile top bar */
    .theme-btn,
    .lang-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.8rem;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0;
        border-width: 1px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        /* Completely lock position */
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        bottom: auto !important;
        right: auto !important;
        transform: none !important;
        transition: none !important;
    }

    .theme-btn {
        overflow: hidden;
        border-radius: 50% !important;
    }

    .lang-btn {
        white-space: nowrap;
        justify-content: center;
        border-radius: 18px !important;
        font-size: 0.7rem;
        font-weight: 600;
        line-height: 1;
        min-width: 36px !important;
    }

    .lang-text {
        line-height: 1;
        text-align: center;
        display: block;
        width: 100%;
        letter-spacing: 0.5px;
    }

    /* Fix theme button icon orientation on mobile */
    .theme-btn i {
        transform: none !important;
        transition: none;
    }

    .theme-btn:hover i,
    .theme-btn:active i,
    .theme-btn:focus i {
        transform: none !important;
    }

    /* Mobile navigation link underlines */
    .nav-menu.active .nav-link::after {
        bottom: 4px;
    }
    
    /* Mobile sliding underline */
    .nav-menu.active::after {
        bottom: 4px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding: 0 20px;
    }

    .hero-title {
        font-size: 2.8rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        max-width: none;
    }

    .hero-social {
        background: rgba(255, 255, 255, 0.9);
        padding: 1.5rem;
        margin: 0 20px;
        margin-bottom: 0;
    }

    [data-theme="dark"] .hero-social {
        background: rgba(36, 36, 36, 0.9);
    }

    /* Mobile scroll indicator positioning */
    .mobile-scroll {
        display: block;
        margin-top: 2rem;
        margin-bottom: 0;
        text-align: center;
    }

    .hero-image .image-placeholder {
        width: 220px;
        height: 220px;
    }

    .image-placeholder i {
        font-size: 2rem;
    }

    .hero-image {
        gap: 1.5rem;
    }

    .contact-content {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        justify-content: center;
        padding: 0 1rem;
    }
    
    .contact-info {
        align-items: center;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .contact-item {
        justify-content: flex-start;
        width: 100%;
        max-width: 350px;
        margin: 0 auto 1.5rem auto;
        text-align: left;
    }

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

    .social-buttons {
        justify-content: center;
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    .social-btn {
        width: 44px;
        height: 44px;
    }

    .social-btn i {
        font-size: 1.1rem;
    }

    .social-text span {
        font-size: 0.9rem;
    }

    /* Mobile: Position scroll indicator below social buttons */
    .desktop-scroll {
        display: none;
    }
    
    .mobile-scroll {
        display: block;
        margin-top: 2rem;
        margin-bottom: 0;
        text-align: center;
    }

    .filter-buttons {
        justify-content: center;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .skills {
        grid-template-columns: 1fr;
    }
}

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

    .hero-container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-social {
        padding: 1.2rem 1.5rem;
        margin: 0 15px;
        width: auto;
        max-width: 320px;
        align-self: center;
    }

    .social-buttons {
        gap: 0.6rem;
    }

    .social-btn {
        width: 40px;
        height: 40px;
    }

    .social-btn i {
        font-size: 1rem;
    }

    .hero-image .image-placeholder {
        width: 200px;
        height: 200px;
    }

    .image-placeholder i {
        font-size: 1.8rem;
    }

    .hero-image {
        gap: 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social-text span {
        font-size: 0.8rem;
    }
}

/* Large Desktop Optimizations */
@media (min-width: 1400px) {
    .hero-container {
        max-width: 1400px;
        padding: 0 60px;
        gap: 8rem;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-description {
        font-size: 1.3rem;
        max-width: 550px;
    }

    .hero-social {
        padding: 2.5rem;
    }

    .social-btn {
        width: 55px;
        height: 55px;
    }

    .social-btn i {
        font-size: 1.4rem;
    }
}

/* Medium Desktop Optimizations */
@media (min-width: 1200px) and (max-width: 1399px) {
    .hero-container {
        gap: 5rem;
        padding: 0 50px;
    }

    .hero-title {
        font-size: 3.8rem;
    }
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .navbar {
    background: rgba(26, 26, 26, 0.98);
    border-bottom: 1px solid #404040;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .image-placeholder {
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .portfolio-item {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .portfolio-item:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .btn-primary {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

[data-theme="dark"] .social-btn:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .theme-btn:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Ensure no gaps in theme button on all themes */
[data-theme="dark"] .theme-btn {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for portfolio items */
.portfolio-item:nth-child(1) { transition-delay: 0.1s; }
.portfolio-item:nth-child(2) { transition-delay: 0.2s; }
.portfolio-item:nth-child(3) { transition-delay: 0.3s; }
.portfolio-item:nth-child(4) { transition-delay: 0.4s; }
.portfolio-item:nth-child(5) { transition-delay: 0.5s; }
.portfolio-item:nth-child(6) { transition-delay: 0.6s; }

/* Certificate items animate together - no staggered delays */

/* Contact items staggered animation */
.contact-item:nth-child(1) { transition-delay: 0.1s; }
.contact-item:nth-child(2) { transition-delay: 0.2s; }
.contact-item:nth-child(3) { transition-delay: 0.3s; }

/* Lightweight mobile touch fixes */
@media (hover: none) and (pointer: coarse) {
    /* Disable transforms on hover for touch devices */
    *:hover {
        transform: none !important;
    }
    
    /* Remove any stuck touch/active states immediately */
    *:active,
    *:focus {
        transition: none !important;
    }
    
    /* Complete lock down for toggle buttons on mobile */
    .nav-controls {
        position: fixed !important;
        right: 60px !important;
        top: 37px !important; /* Perfect center alignment */
        transform: translateY(-50%) !important; /* Center the buttons vertically */
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Specific button position fixes - prevent any movement */
    .theme-btn,
    .theme-btn:hover,
    .theme-btn:active,
    .theme-btn:focus,
    .theme-btn:touch {
        transform: none !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        bottom: auto !important;
        right: auto !important;
        outline: none !important;
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        box-shadow: 0 2px 10px var(--shadow-light), inset 0 0 0 2px var(--border-color) !important;
        transition: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .lang-btn,
    .lang-btn:hover,
    .lang-btn:active,
    .lang-btn:focus,
    .lang-btn:touch {
        transform: none !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        bottom: auto !important;
        right: auto !important;
        outline: none !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3) !important;
        transition: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    /* Disable tap highlight */
    .theme-btn,
    .lang-btn {
        -webkit-tap-highlight-color: transparent !important;
    }
}

/* Go to Top Button */
.go-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Disable browser default styles */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.go-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.go-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* Dark mode styling */
[data-theme="dark"] .go-to-top {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

[data-theme="dark"] .go-to-top:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .go-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Mobile touch fixes for go to top button */
@media (hover: none) and (pointer: coarse) {
    .go-to-top:hover {
        transform: none !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    }
    
    .go-to-top:active {
        transform: none !important;
    }
}

/* Credly Badge Styling */
.certificate-image > div[data-share-badge-id] {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: white !important;
    border-radius: 8px;
}

.certificate-image iframe {
    max-width: 150px !important;
    max-height: 270px !important;
    border: none !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white !important;
}

/* Keep Credly badge light in dark mode */
[data-theme="dark"] .certificate-image > div[data-share-badge-id],
[data-theme="dark"] .certificate-image iframe {
    background: white !important;
    color: #333 !important;
}

/* Responsive adjustments for Credly badge */
@media (max-width: 768px) {
    .certificate-image iframe {
        max-width: 130px !important;
        max-height: 234px !important;
    }
}

@media (max-width: 480px) {
    .certificate-image iframe {
        max-width: 120px !important;
        max-height: 216px !important;
    }
}

/* Hero Content Animation */
.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-social {
    animation: fadeInRight 1s ease-out 0.3s both;
}

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

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

/* ===== MOBILE & TABLET ANIMATION REMOVAL ===== */

/* Remove all social button animations on touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Disable ALL animations and transitions for social buttons */
    .social-btn,
    .social-btn:hover,
    .social-btn:active,
    .social-btn:focus {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Override specific hover effects for each social button */
    .social-btn.whatsapp:hover {
        background: #25D366 !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .social-btn.instagram:hover {
        background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .social-btn.linkedin:hover {
        background: #0077B5 !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .social-btn.email:hover {
        background: #EA4335 !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .social-btn.github:hover {
        background: #333 !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Additional mobile/tablet screen size based rules */
@media (max-width: 1024px) {
    /* Disable social button animations on tablets and mobile */
    .social-btn,
    .social-btn:hover,
    .social-btn:active,
    .social-btn:focus {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    /* Remove hover transforms and scaling effects */
    .social-btn:hover {
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important; /* Keep minimal shadow for visibility */
    }
}

/* Specific mobile devices */
@media (max-width: 768px) {
    /* Complete animation removal for mobile */
    .social-btn {
        transition: none !important;
        animation: none !important;
    }
    
    .social-btn:hover,
    .social-btn:active,
    .social-btn:focus {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* ===== END MOBILE & TABLET ANIMATION REMOVAL ===== */

/* ===== TABLET FOOTER CENTER FIX ===== */

/* Tablet specific footer layout to prevent collision with Go to Top button */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer-content {
        flex-direction: column !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1.2rem !important;
        padding: 0 2rem !important;
        margin-bottom: 0 !important;
    }
    
    .footer-text {
        order: 1;
        margin-bottom: 0.8rem;
        width: 100%;
        text-align: center;
    }
    
    .social-buttons {
        order: 2;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem !important;
        margin: 0 auto !important;
        padding: 0 !important;
        flex-wrap: wrap;
        width: auto;
        max-width: 300px;
    }
    
    .social-btn {
        width: 42px !important;
        height: 42px !important;
        margin: 0 !important;
        flex-shrink: 0;
    }
    
    .social-btn i {
        font-size: 1.05rem;
    }
    
    /* Ensure Go to Top button has enough space */
    .go-to-top {
        bottom: 25px !important;
        right: 25px !important;
        z-index: 1001 !important;
    }
}

/* Tablet portrait mode footer */
@media (min-width: 600px) and (max-width: 768px) {
    .footer-content {
        flex-direction: column !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem !important;
        padding: 0 1.5rem !important;
    }
    
    .footer-text {
        order: 1;
        margin-bottom: 0.5rem;
        width: 100%;
        text-align: center;
    }
    
    .social-buttons {
        order: 2;
        justify-content: center !important;
        gap: 0.8rem !important;
        margin: 0 auto !important;
        flex-wrap: wrap;
        max-width: 280px;
    }
    
    .social-btn {
        width: 40px !important;
        height: 40px !important;
    }
    
    .social-btn i {
        font-size: 1rem;
    }
}

/* ===== END TABLET FOOTER CENTER FIX ===== */


