/* ==== GLOBAL STYLES & PREMIUM VARIABLES ==== */
:root, [data-theme="light"] {
    --bg-color: #f4f7f6;
    --card-color: #ffffff;
    --text-color: #1a1a1a;
    --secondary-text-color: #555;
    --border-color: #e9e9e9;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --primary-color: #007bff;
    --accent-color: #9c27b0;
    --primary-text: #ffffff;
    --icon-sun: block;
    --icon-moon: none;
}

[data-theme="dark"] {
    --bg-color: #0A0A0A;
    --card-color: #161616;
    --text-color: #f0f0f0;
    --secondary-text-color: #a0a0a0;
    --border-color: #2a2a2a;
    --shadow-color: rgba(0, 123, 255, 0.1);
    --icon-sun: none;
    --icon-moon: block;
}

/* ==== BASE & LAYOUT ==== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px 15px;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.vcard-wrapper {
    width: 100%;
    max-width: 450px;
    margin: auto 0;
    animation: fadeIn 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* ==== KEYFRAME ANIMATIONS ==== */
@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 10px var(--shadow-color), 0 0 20px rgba(0, 123, 255, 0); }
    50% { box-shadow: 0 0 20px var(--shadow-color), 0 0 40px rgba(0, 123, 255, 0.3); }
}

@keyframes gradientShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==== THEME SWITCHER ==== */
.theme-switcher {
    position: fixed; top: 20px; right: 20px; z-index: 1000;
}
#theme-toggle {
    background: var(--card-color); border: 1px solid var(--border-color); border-radius: 50%;
    width: 45px; height: 45px; cursor: pointer; font-size: 1.3rem; color: var(--secondary-text-color);
    display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#theme-toggle:hover { color: var(--primary-color); transform: rotate(20deg) scale(1.15); }
#theme-toggle .fa-sun { display: var(--icon-sun); }
#theme-toggle .fa-moon { display: var(--icon-moon); }

/* ==== PROFILE HEADER ==== */
.profile-header { text-align: center; margin-bottom: 30px; }
.profile-picture-container {
    padding: 5px; border-radius: 50%; margin-bottom: 25px; display: inline-block;
    background: linear-gradient(60deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 200%;
    animation: gradientShimmer 4s ease infinite;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.profile-picture {
    width: 150px; height: 150px; border-radius: 50%;
    object-fit: cover; border: 5px solid var(--bg-color); display: block;
}
.profile-name { margin: 0; font-size: 2.5em; font-weight: 700; line-height: 1.2; }
.profile-title, .profile-subtitle {
    margin: 5px 0 0; font-size: 1.1em; color: var(--secondary-text-color); font-weight: 400;
}

/* ==== ACTION BUTTONS ==== */
.action-buttons { display: flex; gap: 15px; margin-bottom: 35px; }
.action-btn {
    flex: 1; padding: 16px; border-radius: 14px; text-decoration: none;
    font-weight: 600; font-size: 1.05em; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.action-btn.primary {
    background: var(--primary-color); color: var(--primary-text);
    box-shadow: 0 4px 15px var(--shadow-color);
    animation: pulseGlow 5s infinite;
}
.action-btn.secondary {
    background: transparent; color: var(--text-color);
    border: 2px solid var(--border-color);
}
.action-btn:hover { transform: translateY(-4px); box-shadow: 0 8px 25px var(--shadow-color); }
.action-btn.secondary:hover { border-color: var(--primary-color); background-color: var(--card-color); }

/* ==== SOCIAL LINKS ==== */
.social-links { display: flex; justify-content: center; gap: 28px; margin-bottom: 40px; }
.social-icon { font-size: 1.8em; color: var(--secondary-text-color); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.social-icon:hover { color: var(--primary-color); transform: translateY(-5px) scale(1.2); }

/* ==== CARD SECTIONS (About, Projects, etc.) ==== */
.card-section {
    background-color: var(--card-color); border: 1px solid var(--border-color);
    border-radius: 20px; padding: 30px; margin-bottom: 25px; text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.card-section h2 {
    margin-top: 0; margin-bottom: 15px; font-size: 1.6em; font-weight: 700;
    padding-bottom: 8px; position: relative;
}
.card-section h2::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 40px; height: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}
.card-section p { line-height: 1.8; color: var(--secondary-text-color); margin-bottom: 0; }

/* ==== SERVICES ACCORDION STYLING ==== */
.service-accordion {
    display: grid;
    gap: 15px;
    margin-top: 25px;
}
.service-item {
    background-color: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}
.service-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    cursor: pointer;
    user-select: none;
}
.service-icon {
    font-size: 1.6em;
    color: var(--primary-color);
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--card-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.service-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    flex-grow: 1;
}
.service-toggle-icon {
    font-size: 1em;
    color: var(--secondary-text-color);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-body p {
    padding: 0 20px 20px 20px;
    margin: 0;
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--secondary-text-color);
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}
.service-item.is-active .service-body {
    max-height: 500px;
    opacity: 1;
}
.service-item.is-active .service-toggle-icon {
    transform: rotate(180deg);
}

/* ==== PROJECTS SECTION STYLING ==== */
.project-grid { display: grid; gap: 20px; }
.project-card {
    text-decoration: none; color: var(--text-color);
    border-radius: 16px; overflow: hidden;
    background: var(--bg-color); border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 10px 30px var(--shadow-color); }
.project-image-wrapper { height: 200px; overflow: hidden; }
.project-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-image { transform: scale(1.1); }
.project-info { padding: 20px; }
.project-info h3 { margin: 0 0 8px 0; font-size: 1.2em; font-weight: 600; }
.project-info p { font-size: 0.95em; line-height: 1.6; }

/* ==== SCROLL ANIMATION ==== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Staggered delay for scroll animations */
.social-links.animate-on-scroll { transition-delay: 0.1s; }
.about-me.animate-on-scroll { transition-delay: 0.2s; }
.services.animate-on-scroll { transition-delay: 0.3s; }
.projects.animate-on-scroll { transition-delay: 0.4s; }
.booking-form.animate-on-scroll { transition-delay: 0.5s; }