/**
 * Custom Styles for Utsav Portfolio Theme
 * Modern developer aesthetic with clean typography and smooth animations
 */

/* ==========================================================================
   Global Styles & Variables
   ========================================================================== */

:root {
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-alt: #f0f4f8;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-alt: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    --border-color: #4a5568;
    --card-bg: #2d3748;
    --header-bg: rgba(26, 32, 44, 0.95);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Section Background Overrides for Better Contrast */
.hero-section.has-background-background-color {
    background-color: #ffffff !important;
}

.about-section.has-background-alt-background-color {
    background: linear-gradient(180deg, #f0f4f8 0%, #e8eef5 100%) !important;
}

.skills-section.has-background-background-color {
    background-color: #fafbfc !important;
}

.experience-section.has-background-alt-background-color {
    background: linear-gradient(180deg, #f0f4f8 0%, #e8eef5 100%) !important;
}

.contact-section.has-background-alt-background-color {
    background: linear-gradient(180deg, #e8eef5 0%, #dfe7f0 100%) !important;
}

/* Dark theme section backgrounds */
[data-theme="dark"] .hero-section.has-background-background-color {
    background-color: #0f172a !important;
}

[data-theme="dark"] .about-section.has-background-alt-background-color {
    background: linear-gradient(180deg, #2d3748 0%, #1e2938 100%) !important;
}

[data-theme="dark"] .skills-section.has-background-background-color {
    background-color: #1a202c !important;
}

[data-theme="dark"] .experience-section.has-background-alt-background-color {
    background: linear-gradient(180deg, #2d3748 0%, #1e2938 100%) !important;
}

[data-theme="dark"] .contact-section.has-background-alt-background-color {
    background: linear-gradient(180deg, #1e2938 0%, #16202e 100%) !important;
}

[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .has-background-background-color {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .has-background-alt-background-color {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .has-dark-color,
[data-theme="dark"] .has-text-color {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .has-text-light-color {
    color: var(--text-muted) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] p {
    color: var(--text-secondary) !important;
}

/* Dark mode hero section text visibility */
[data-theme="dark"] .hero-section .has-dark-color {
    color: #ffffff !important;
}

[data-theme="dark"] .hero-section .has-text-color {
    color: #ffffff !important;
}

[data-theme="dark"] .hero-section .has-primary-color {
    color: #60a5fa !important;
}

[data-theme="dark"] .hero-section .has-text-light-color {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .hero-section h1,
[data-theme="dark"] .hero-section .hero-heading,
[data-theme="dark"] .hero-section .wp-block-heading {
    color: #ffffff !important;
}

[data-theme="dark"] .hero-section p,
[data-theme="dark"] .hero-section .hero-subtitle {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .hero-section .hero-label {
    color: #60a5fa !important;
}

/* Force hero heading to be white in dark mode - highest specificity */
[data-theme="dark"] .hero-section .hero-heading.has-dark-color {
    color: #ffffff !important;
}

/* Solid color text for emphasis */
.text-gradient {
    color: #0070f3 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: currentColor !important;
    background-clip: unset !important;
}

[data-theme="dark"] .text-gradient {
    color: #60a5fa !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: currentColor !important;
    background-clip: unset !important;
}

/* Light text for hero heading - maximum specificity */
.text-light,
span.text-light,
.hero-section .text-light,
.hero-section .hero-heading .text-light,
.wp-block-group .hero-heading .text-light,
h1.hero-heading .text-light,
.hero-heading.has-dark-color .text-light {
    color: #1a202c !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: currentColor !important;
    background-clip: unset !important;
}

[data-theme="dark"] .text-light,
[data-theme="dark"] span.text-light,
[data-theme="dark"] .hero-section .text-light,
[data-theme="dark"] .hero-section .hero-heading .text-light,
[data-theme="dark"] .wp-block-group .hero-heading .text-light,
[data-theme="dark"] h1.hero-heading .text-light,
[data-theme="dark"] .hero-heading.has-dark-color .text-light {
    color: #f7fafc !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: currentColor !important;
    background-clip: unset !important;
}

[data-theme="dark"] .chip {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border: 1px solid #4a5568 !important;
}

[data-theme="dark"] .skill-card,
[data-theme="dark"] .experience-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading State */
.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-alt) 25%, var(--bg-secondary) 50%, var(--bg-alt) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Fade-in animation for content */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    background-color: var(--header-bg) !important;
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    margin-left: 1rem;
}

.theme-toggle:hover {
    background-color: var(--bg-alt);
    transform: rotate(180deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle svg {
    transition: var(--transition);
}

.desktop-nav.is-open ~ .mobile-menu-toggle svg {
    transform: rotate(90deg);
}

[data-theme="dark"] .mobile-menu-toggle {
    color: var(--text-primary);
}

/* Navigation styles */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wp-block-navigation a {
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.wp-block-navigation a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--wp--preset--color--primary);
    transition: var(--transition);
}

.wp-block-navigation a:hover::after,
.wp-block-navigation a.active::after {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   About Section - Enhanced Two-Column Layout
   ========================================================================== */

.about-section {
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.05), rgba(121, 40, 202, 0.05));
    border-radius: 50%;
    transform: translate(25%, -25%);
    pointer-events: none;
}

.about-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-content-grid {
        grid-template-columns: 400px 1fr;
        gap: 4rem;
    }
}

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

.profile-image-enhanced {
    position: relative;
    margin: 0 !important;
}

.profile-image-enhanced img {
    border-radius: 20px;
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 6px solid #ffffff;
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

[data-theme="dark"] .profile-image-enhanced img {
    border-color: #2d3748;
}

.profile-image-enhanced:hover img {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

.profile-image-decoration {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
    z-index: 1;
    opacity: 0.6;
}

.about-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
    max-width: 300px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-text-column {
    display: flex;
    flex-direction: column;
}

.about-intro {
    position: relative;
    padding-left: 1.5rem;
    border-left: 4px solid var(--wp--preset--color--primary);
}

.about-text-column p strong {
    color: var(--wp--preset--color--primary);
    font-weight: 600;
}

.about-text-column .wp-block-buttons {
    margin-top: 1rem;
}

.about-text-column .wp-block-button {
    margin-right: 1rem;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .about-content-grid {
        text-align: center;
    }
    
    .about-intro {
        padding-left: 0;
        border-left: none;
        border-top: 4px solid var(--wp--preset--color--primary);
        padding-top: 1rem;
    }
    
    .profile-image-enhanced img {
        max-width: 250px;
    }
    
    .about-stats {
        flex-direction: row;
    }
    
    .about-text-column .wp-block-buttons {
        justify-content: center;
    }
}

.hero-heading {
    background: linear-gradient(135deg, var(--wp--preset--color--dark) 0%, var(--wp--preset--color--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--wp--preset--color--border);
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Button & Link Enhancements
   ========================================================================== */

.wp-block-button__link {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.wp-block-button__link:hover::before {
    width: 300px;
    height: 300px;
}

.wp-block-button__link:active {
    transform: scale(0.95);
}

/* Link hover effects */
a:not(.wp-block-button__link) {
    position: relative;
    transition: var(--transition);
}

a:not(.wp-block-button__link):hover {
    color: var(--wp--preset--color--primary);
}

/* ==========================================================================
   Section Styles
   ========================================================================== */

section[id] {
    scroll-margin-top: 80px;
}

.section-heading {
    position: relative;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
    border-radius: 2px;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */

.skill-card {
    transition: var(--transition);
    height: 100%;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.skill-list {
    list-style: none;
    padding-left: 0;
}

.skill-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.skill-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--wp--preset--color--primary);
    font-weight: bold;
}

/* ==========================================================================
   Experience Section - Horizontal Timeline (Desktop) / Vertical (Mobile)
   ========================================================================== */

/* Horizontal Timeline - Desktop */
.timeline-horizontal {
    position: relative;
    padding: 4rem 2rem;
}

/* Horizontal line connecting experiences */
.timeline-horizontal::before {
    content: '';
    position: absolute;
    top: 120px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
    z-index: 1;
}

.timeline-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-direction: row-reverse; /* Latest on left */
}

.timeline-h-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.timeline-h-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.timeline-h-date {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--wp--preset--color--primary);
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.1), rgba(121, 40, 202, 0.1));
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(0, 112, 243, 0.3);
    white-space: nowrap;
}

.timeline-h-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    width: 100%;
    border: 1px solid var(--border-color);
}

.timeline-h-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.timeline-h-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.timeline-h-card .company {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wp--preset--color--primary);
    margin: 0 0 0.25rem 0;
}

.timeline-h-card .location {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 1rem 0;
}

.timeline-h-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-h-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.timeline-h-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--wp--preset--color--primary);
    font-weight: 700;
}

.timeline-h-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.timeline-h-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
    border: 5px solid var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(0, 112, 243, 0.2);
    transition: var(--transition);
    position: relative;
    z-index: 3;
}

.timeline-h-item:hover .timeline-h-dot {
    transform: scale(1.4);
    box-shadow: 0 0 0 8px rgba(0, 112, 243, 0.3);
}

.timeline-h-year {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

/* Start point marker */
.timeline-h-start {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.timeline-h-start-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 120px;
}

.timeline-h-start-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 4px solid var(--bg-primary);
}

/* Mobile: Vertical Timeline */
@media (max-width: 992px) {
    .timeline-horizontal {
        flex-direction: column;
        align-items: stretch;
        padding: 2rem 1rem;
    }
    
    /* Vertical line for mobile */
    .timeline-horizontal::before {
        top: 0;
        left: 30px;
        right: auto;
        bottom: 0;
        width: 3px;
        height: auto;
    }
    
    .timeline-h-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .timeline-h-content {
        flex: 1;
        align-items: flex-start;
    }
    
    .timeline-h-marker {
        flex-shrink: 0;
        width: 60px;
        align-items: center;
        padding-top: 1rem;
    }
    
    .timeline-h-date {
        margin-bottom: 1rem;
    }
    
    .timeline-h-card {
        margin-bottom: 0;
    }
    
    .timeline-h-year {
        order: -1;
        margin-top: 0;
        margin-bottom: 0.5rem;
    }
    
    .timeline-h-start {
        flex-direction: row;
        gap: 2rem;
        align-items: center;
    }
    
    .timeline-h-start-marker {
        margin-top: 0;
        width: 60px;
    }
}

@media (max-width: 480px) {
    .timeline-h-card h3 {
        font-size: 1.125rem;
    }
    
    .timeline-h-list li {
        font-size: 0.875rem;
    }
}

.experience-card {
    transition: var(--transition);
}

.experience-list {
    list-style: none;
    padding-left: 0;
}

.experience-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.experience-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--wp--preset--color--success);
    font-weight: bold;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */

.project-card {
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-card .wp-block-buttons {
    margin-top: auto;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--wp--preset--color--dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--wp--preset--color--border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.1);
}

.submit-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--wp--preset--color--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.submit-button:hover {
    background-color: var(--wp--preset--color--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.submit-button:active {
    transform: translateY(0);
}

.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.help-list {
    list-style: none;
    padding-left: 0;
}

.help-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.help-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--wp--preset--color--primary);
    font-weight: bold;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--wp--preset--color--border);
}

.wp-block-social-links a {
    transition: var(--transition);
}

.wp-block-social-links a:hover {
    transform: translateY(-3px);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.wp-block-button__link {
    transition: var(--transition);
    text-decoration: none;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    border: 2px solid var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary) !important;
}

.is-style-outline .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--primary) !important;
    color: white !important;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

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

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }

/* Intersection Observer classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Dark Mode (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    body.dark-mode-enabled {
        --wp--preset--color--background: #111827;
        --wp--preset--color--background-alt: #1f2937;
        --wp--preset--color--dark: #f9fafb;
        --wp--preset--color--text: #d1d5db;
        --wp--preset--color--text-light: #9ca3af;
        --wp--preset--color--border: #374151;
    }
    
    body.dark-mode-enabled .site-header {
        background-color: rgba(17, 24, 39, 0.95) !important;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    /* Mobile Navigation */
    .desktop-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-primary);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        box-shadow: var(--shadow-xl);
        overflow-y: auto;
    }
    
    .desktop-nav.is-open {
        transform: translateX(0);
    }
    
    /* Mobile menu backdrop */
    .desktop-nav.is-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    .desktop-nav .wp-block-navigation {
        flex-direction: column;
        align-items: center;
        gap: 2rem !important;
        margin-bottom: 2rem;
    }
    
    .desktop-nav .wp-block-navigation a {
        font-size: 1.5rem;
        font-weight: 600;
    }
    
    .desktop-nav .wp-block-buttons {
        margin-bottom: 1.5rem;
    }
    
    .desktop-nav .theme-toggle {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: auto;
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .hero-heading {
        font-size: 2rem !important;
    }
    
    .section-heading {
        font-size: 2rem !important;
    }
    
    .wp-block-columns {
        flex-direction: column;
    }
    
    .skill-card,
    .project-card {
        margin-bottom: 1.5rem;
    }
    
    .hero-chips {
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .hero-heading {
        font-size: 1.75rem !important;
    }
    
    .section-heading {
        font-size: 1.75rem !important;
    }
    
    .chip {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.75rem !important;
    }
}

/* Form validation states */
.contact-form input:invalid:not(:placeholder-shown),
.contact-form textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.contact-form input:valid:not(:placeholder-shown),
.contact-form textarea:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

.contact-form input:focus:invalid,
.contact-form textarea:focus:invalid {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.contact-form input:focus:valid,
.contact-form textarea:focus:valid {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#form-message {
    display: none;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 500;
}

#form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

#form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

[data-theme="dark"] #form-message.success {
    background-color: #064e3b;
    color: #d1fae5;
}

[data-theme="dark"] #form-message.error {
    background-color: #7f1d1d;
    color: #fee2e2;
}

/* ==========================================================================
   Social Links
   ========================================================================== */

.social-share {
    text-align: center;
    padding: 2rem 0;
}

.social-share-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary);
}

/* ==========================================================================
   Availability Status Badge
   ========================================================================== */

.availability-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid #10b981;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
}

.availability-status.unavailable {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #dc2626;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse-dot 2s ease-in-out infinite;
}

.availability-status.unavailable .status-indicator {
    background: #ef4444;
    animation: none;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

[data-theme="dark"] .availability-status {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

[data-theme="dark"] .availability-status.unavailable {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* ==========================================================================
   Resume Download Button
   ========================================================================== */

.resume-download-btn .button-icon {
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.resume-download-btn .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */

.testimonials-section {
    overflow: hidden;
}

.testimonial-card {
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .testimonials-section .wp-block-columns {
        flex-direction: column;
    }
    
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
}

/* ==========================================================================
   Project Filters
   ========================================================================== */

.project-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary);
}

.filter-btn.active {
    background: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    color: white;
}

.project-card[data-hidden="true"] {
    display: none;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--wp--preset--color--primary);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Keyboard navigation hints */
.keyboard-hint {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 998;
    max-width: 250px;
    box-shadow: var(--shadow-lg);
}

.keyboard-hint.visible {
    opacity: 1;
    visibility: visible;
}

.keyboard-hint kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85em;
    margin: 0 0.25rem;
}

@media (max-width: 768px) {
    .keyboard-hint {
        display: none;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--wp--preset--color--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--wp--preset--color--primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .site-header,
    .site-footer,
    .wp-block-button,
    .contact-form,
    .theme-toggle,
    .mobile-menu-toggle,
    .back-to-top,
    nav {
        display: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    .profile-image-enhanced img {
        border: 2px solid #000;
        border-radius: 10px;
    }
}
