/* 
======================
    Modern Portfolio Styles
    Theme Support & Animations
======================
*/

/* Loading Message for Portfolio */
.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    font-size: 18px;
    color: var(--text-color);
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* Theme Variables */
:root {
    /* Default Theme (Light) */
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #7209b7;
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --surface-color-alt: #f0f2f5;
    --text-color: #2b2d42;
    --text-color-light: #6c757d;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --header-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #2b2d42;
    --footer-text: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #4361ee, #3a0ca3);
    --gradient-secondary: linear-gradient(135deg, #7209b7, #3a0ca3);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #4cc9f0;
    --secondary-color: #4361ee;
    --accent-color: #7209b7;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --surface-color-alt: #2d2d2d;
    --text-color: #f8f9fa;
    --text-color-light: #adb5bd;
    --card-bg: #1e1e1e;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --header-bg: rgba(30, 30, 30, 0.95);
    --footer-bg: #121212;
    --footer-text: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #4cc9f0, #4361ee);
    --gradient-secondary: linear-gradient(135deg, #7209b7, #4361ee);
}

/* Purple Theme */
[data-theme="purple"] {
    --primary-color: #9d4edd;
    --secondary-color: #7b2cbf;
    --accent-color: #c77dff;
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --surface-color-alt: #f0f2f5;
    --text-color: #240046;
    --text-color-light: #5a189a;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px rgba(155, 78, 221, 0.1);
    --header-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #240046;
    --footer-text: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #9d4edd, #7b2cbf);
    --gradient-secondary: linear-gradient(135deg, #c77dff, #7b2cbf);
}

/* Green Theme */
/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
}

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

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    right: 30px;
    top: 100px;
    z-index: 1100; /* Ensure it's above other elements */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--surface-color-alt);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    position: relative;
    background-color: var(--card-bg); /* Ensure background is visible */
}

/* Color Palette */
.color-palette {
    position: absolute;
    right: 50px;
    top: 0;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    width: 200px;
    padding: 15px;
    visibility: hidden;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
    pointer-events: none;
    z-index: 1000;
    border: 1px solid var(--surface-color-alt); /* Add border for better visibility */
    max-width: calc(100vw - 70px); /* Ensure it doesn't overflow viewport */
}

.theme-btn.purple:hover .color-palette,
.theme-btn.purple.palette-open .color-palette {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.color-palette-header {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid var(--surface-color-alt);
}

.color-option:hover {
    transform: scale(1.15);
}

.custom-color-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.custom-color-input input {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    cursor: pointer;
    background: none;
}

.custom-color-input label {
    font-size: 14px;
    color: var(--text-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
    transition: var(--transition);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-color-light);
    transition: var(--transition);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.primary-btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.secondary-btn {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.2);
}

/* Sections */
section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: max-content; /* Ensure section is at least as tall as its content */
}

section:nth-child(even) {
    background-color: var(--surface-color);
}

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

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

/* Delay Classes */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    padding: 15px 0;
}

#header.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.logo a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30%;
    height: 3px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.logo a:hover::after {
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: var(--transition);
    background-color: var(--text-color);
}

/* Hero Section */
#hero {
    height: 100vh;
    background: var(--background-color);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.1;
    z-index: 0;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-buttons {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: var(--surface-color);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
}

.social-icons a:hover {
    background: var(--gradient-primary);
    transform: translateY(-5px);
}

.social-icons a i {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover i {
    color: white;
}

/* About Section */
#about {
    position: relative;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image .card-3d {
  position: relative;
  overflow: visible;
}

.about-image .card-3d::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  border: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
  z-index: -1;
  opacity: 0.3;
}

.about-image .card-3d-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

/* Ensure the image fits properly within the container */
.about-image .card-3d-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.about-text h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.personal-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.info-item {
    display: flex;
    align-items: center;
}

.info-title {
    font-weight: 600;
    margin-right: 10px;
    color: var(--text-color);
}

.info-value {
    color: var(--text-color-light);
}

/* Skills Section */
.skills-content {
    display: flex;
    gap: 50px;

}

.skill-category {
    flex: 1;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    display: inline-block;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.skills-grid {
    display: grid;
    gap: 25px;
    width: 100%;
}

.skill-item {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    width: 100%;
    height: auto;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.skill-info h4 {
    font-weight: 600;
    font-size: 1.1rem;
}

.skill-bar {
    height: 8px;
    background-color: var(--surface-color-alt);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-level {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    position: relative;
    width: 0;
    transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.skill-level::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Skills Section - Additional dynamic sizing */
#skills {
    display: flex;
    flex-direction: column;
}

#skills .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Additional responsive styling to ensure content visibility */
@media screen and (max-width: 992px) {
    .skills-content {
        overflow: visible;
        margin-bottom: 20px;
    }
    
    .skill-category:last-of-type {
        margin-bottom: 50px; /* This ensures visibility of the last category */
    }
    
    #skills {
        height: auto !important;
        min-height: fit-content;
        padding-bottom: 100px; /* Ensure there's always room at the bottom */
    }
}

/* Portfolio Section */
.portfolio-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: var(--surface-color);
    border: none;
    padding: 10px 25px;
    cursor: pointer;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    color: var(--text-color);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    position: relative;
    background-color: var(--card-bg);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.portfolio-img {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.portfolio-info {
    padding: 25px;
    text-align: center;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.portfolio-info p {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.portfolio-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.portfolio-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--surface-color);
    border-radius: 50%;
    transition: var(--transition);
}

.portfolio-links a:hover {
    background: var(--gradient-primary);
}

.portfolio-links a i {
    color: var(--text-color);
    transition: var(--transition);
}

.portfolio-links a:hover i {
    color: white;
}

/* Portfolio Modal */
.portfolio-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 40px;
    width: 80%;
    max-width: 900px;
    border-radius: var(--border-radius-lg);
    position: relative;
    animation: modalopen 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

@keyframes modalopen {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 30px;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--surface-color);
}

.close-modal:hover {
    background-color: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* Contact Section */
.contact-content {
    display: flex;
    gap: 50px;
    width: 100%;
}

.contact-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.contact-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-text p {
    color: var(--text-color-light);
    margin-bottom: 0;
}

.contact-form {
    flex: 1;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    width: 100%;
    display: block;
    height: auto;
}

/* Ensure slide-in-right animation is properly applied for contact form */
.contact-form.slide-in-right {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.contact-form.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--surface-color-alt);
    border-radius: var(--border-radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--surface-color);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

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

.form-alert {
    padding: 15px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
}

.form-alert.success {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.2), rgba(46, 213, 115, 0.1));
    color: #2ed573;
    border-left: 4px solid #2ed573;
}

.form-alert.error {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(255, 71, 87, 0.1));
    color: #ff4757;
    border-left: 4px solid #ff4757;
}

/* Form Status Messages */
.form-status {
    margin-top: 20px;
    padding: 12px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.form-status .loading {
    color: var(--text-color);
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 10px;
    border-radius: var(--border-radius-sm);
    animation: pulse 1.5s infinite alternate;
}

.form-status .success {
    color: #155724;
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    padding: 10px;
    border-radius: var(--border-radius-sm);
}

.form-status .error {
    color: #721c24;
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 10px;
    border-radius: var(--border-radius-sm);
}

/* Footer */
#footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 70px 0 20px;
    position: relative;
    overflow: hidden;
}

#footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
}

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

.footer-logo h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--footer-text);
    margin-bottom: 0;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient-primary);
    transform: translateY(-5px);
}

.footer-social a i {
    color: var(--footer-text);
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

/* Make sure the last-updated text is visible */
.footer-bottom .last-updated,
.footer-bottom .version-info {
    margin-bottom: 0;
    font-size: 0.8rem;
    opacity: 0.8;
    color: var(--footer-text);
}

.footer-bottom .version-info {
    font-weight: 500;
    color: var(--accent-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    cursor: pointer;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.4);
}

.back-to-top i {
    font-size: 1.2rem;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .about-content,
    .skills-content,
    .contact-content {
        flex-direction: column;
    }

    .about-image {
        margin-bottom: 40px;
    }

    /* Use flexbox and min-height to ensure content is visible */
    .skills-content {
        display: flex;
        flex-direction: column;
        min-height: auto;
    }

    .skill-category {
        width: 100%;
        /* Using padding instead of margin for better spacing */
        padding-bottom: 50px;
    }

    /* Ensure the last skill category has proper spacing */
    .skill-category:last-child {
        padding-bottom: 20px;
    }

    .contact-info {
        margin-bottom: 40px;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .hamburger {
        display: block;
    }

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

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

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

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }

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

    .nav-links li {
        margin: 15px 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

    .personal-info {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

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

    .footer-logo {
        margin-bottom: 20px;
    }

    .modal-content {
        width: 95%;
        padding: 25px;
    }
}

@media screen and (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        margin: 10px 0;
    }

    .theme-switcher {
        top: auto;
        bottom: 100px;
    }
}

/* Animation Keyframes */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

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

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

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

::-webkit-scrollbar-track {
    background: var(--surface-color);
}

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

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

/* Contact Section - Dynamic sizing */
#contact {
    display: flex;
    flex-direction: column;
}

#contact .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Additional responsive styling for contact form */
@media screen and (max-width: 992px) {
    .contact-content {
        overflow: visible;
        margin-bottom: 20px;
    }
    
    .contact-form.scroll-reveal.slide-in-right {
        opacity: 1;
        transform: translateX(0);
        transition-delay: 0.3s;
    }
    
    .contact-form {
        width: 100%;
        margin-bottom: 50px;
    }
    
    #contact {
        height: auto !important;
        min-height: fit-content;
        padding-bottom: 100px; /* Ensure there's always room at the bottom */
    }
}

/* Theme transition */
.theme-transition {
    transition: background-color 0.5s ease, color 0.5s ease;
    animation: themeFadeIn 0.5s ease;
}

@keyframes themeFadeIn {
    0% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Website Creator Button Styles */
.website-creator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    display: flex;
    align-items: center;
}

/* Ensure spacing for the footer bottom */
@media screen and (max-width: 768px) {
    .website-creator {
        bottom: 100px;  /* More space on mobile */
    }
    
    #footer {
        padding-bottom: 50px;
    }
}

.website-creator-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 25px;
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: var(--transition);
}

.website-creator-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.website-creator-btn i {
    font-size: 16px;
    margin-right: 10px;
}

.typed-container {
    display: block;
    white-space: nowrap;
    font-size: 14px;
}

.typed-message {
    display: inline-block;
    position: relative;
}

.typed-message::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typed-message::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

#user-bio, #user-bio-continued {
    margin-bottom: 1rem;
    line-height: 1.7;
}

#user-bio a, #user-bio-continued a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s;
}

#user-bio a:hover, #user-bio-continued a:hover {
    text-decoration: underline;
}

#user-bio code, #user-bio-continued code {
    background: rgba(var(--color-accent-rgb), 0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Consolas', monospace;
}

#user-bio pre, #user-bio-continued pre {
    background: rgba(var(--color-text-rgb), 0.05);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

#user-bio ul, #user-bio-continued ul,
#user-bio ol, #user-bio-continued ol {
    padding-left: 2rem;
    margin: 1rem 0;
}

#user-bio li, #user-bio-continued li {
    margin-bottom: 0.5rem;
}

/* ====================== */
/* Custom Status Indicators */
/* ====================== */

/* Last updated date in footer */
.last-updated {
    font-size: 0.75rem;
    color: var(--text-color-light);
    margin-top: 0.5rem;
    opacity: 0.8;
}

#last-updated-date {
    display: inline-block;
    font-style: italic;
}

/* Availability status indicator */
.availability-status {
    position: relative;
    padding-left: 20px;
}

.availability-status:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #777;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.availability-status.available:before {
    background-color: #4cd137;
    box-shadow: 0 0 8px rgba(76,209,55,0.5);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76,209,55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(76,209,55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76,209,55, 0);
    }
}

/* Profile image loading animation */
.loading-image {
    opacity: 0.7;
    animation: imageLoading 1.5s infinite ease-in-out;
}

@keyframes imageLoading {
    0% { 
        filter: blur(0px);
    }
    50% { 
        filter: blur(2px); 
    }
    100% { 
        filter: blur(0px);
    }
}
