/* Common styles shared across all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #F8F9FA;
    --text-primary: #212529;
    --accent: #007BFF;
    --card-bg: #FFFFFF;
    --text-secondary: #6c757d;
    --hover-accent: #0056b3;
    
    /* Dark mode variables */
    --dark-bg-primary: #1a1a1a;
    --dark-text-primary: #ffffff;
    --dark-card-bg: #2d2d2d;
    --dark-text-secondary: #b3b3b3;
}

/* Dark mode styles */
[data-theme="dark"] {
    --bg-primary: var(--dark-bg-primary);
    --text-primary: var(--dark-text-primary);
    --card-bg: var(--dark-card-bg);
    --text-secondary: var(--dark-text-secondary);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Navigation */
.nav-header {
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.nav-brand:hover {
    color: var(--accent);
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.back-link:hover {
    gap: 0.7rem;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--accent);
    color: white;
}

/* Header Social Icons */
.header-social {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .header-social-link {
    background: rgba(255, 255, 255, 0.1);
}

.header-social-link:hover {
    color: var(--accent);
    background: rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.header-social-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(233, 236, 239, 0.5) 100%);
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero h1 .name {
    display: block;
    font-size: 1.2em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 .roles {
    display: block;
    font-size: 0.7em;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

.hero .role-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.hero .role-link:hover {
    color: var(--accent);
}

.hero .role-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.hero .role-separator {
    color: var(--text-secondary);
    opacity: 0.5;
    margin: 0 0.5rem;
}

.hero .subtitle, .hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.cta-button:hover {
    background: var(--hover-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Floating elements */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.hero::before {
    width: 200px;
    height: 200px;
    background: var(--accent);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.hero::after {
    width: 150px;
    height: 150px;
    background: var(--accent);
    bottom: 10%;
    right: 5%;
    animation-delay: 3s;
}

/* Section Styles */
.work-section, .services-section, .process-section, .about-section, .contact-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-section, .process-section {
    background: var(--card-bg);
    text-align: center;
    transition: background-color 0.3s ease;
}

.contact-section {
    text-align: center;
    background: var(--bg-primary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

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

/* Grid Layouts */
.work-grid, .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

/* Card Styles */
.work-card, .service-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    cursor: pointer;
}

.service-card {
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.work-card:nth-child(1) { animation-delay: 0.1s; }
.work-card:nth-child(2) { animation-delay: 0.2s; }
.work-card:nth-child(3) { animation-delay: 0.3s; }
.work-card:nth-child(4) { animation-delay: 0.4s; }
.work-card:nth-child(5) { animation-delay: 0.5s; }

.work-card:hover, .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.work-card h3, .service-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.service-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.work-card p, .service-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-description {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.work-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.work-card a:hover {
    color: var(--hover-accent);
}

.work-card a::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.work-card:hover a::after {
    transform: translateX(4px);
}

/* Service Features */
.service-features {
    list-style: none;
    margin-bottom: 2rem;
}

.service-features li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.service-features li:hover {
    transform: translateX(5px);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    font-weight: bold;
    color: var(--accent);
}

/* About Content */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.about-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-email {
    font-size: 1.3rem;
    margin: 2rem 0;
    color: var(--text-primary);
}

.contact-email a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: var(--hover-accent);
}

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

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Process Steps */
.process-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

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

.process-step {
    padding: 2rem;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--hover-accent) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease;
}

.process-step:hover .step-number {
    transform: rotate(360deg) scale(1.1);
}

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

.step-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-email {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.footer-email a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-email a:hover {
    opacity: 0.8;
}

/* Intersection Observer animations */
.animate-on-scroll, .animate-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible, .animate-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Common Card Styles - shared across pages */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-grid {
    display: grid;
    gap: 2rem;
    margin-top: 4rem;
}

.card-grid.auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: var(--hover-accent);
}

/* Enhanced card with top accent border */
.card.accent-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.card.accent-border:hover::before {
    transform: translateX(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .work-grid, .services-grid {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .social-link {
        width: 200px;
        justify-content: center;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header-social {
        order: -1;
    }
}