/* ==========================================================================
   Daniele Di Rollo - Portfolio Website Styles
   Minimal, performant CSS for a professional portfolio
   ========================================================================== */

/* CSS Custom Properties (Variables) */
:root {
    --color-primary: #1a365d;
    --color-primary-light: #2c5282;
    --color-primary-dark: #0f2544;
    --color-accent: #3182ce;
    --color-accent-hover: #2b6cb0;
    --color-text: #2d3748;
    --color-text-light: #4a5568;
    --color-text-muted: #718096;
    --color-bg: #ffffff;
    --color-bg-alt: #f7fafc;
    --color-bg-dark: #1a202c;
    --color-border: #e2e8f0;
    --color-success: #38a169;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    --radius: 8px;
    --transition: 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover, a:focus {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-primary);
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 3vw, 1.5rem); }

p { margin-bottom: 1rem; }

ul { list-style: none; }

address { font-style: normal; }

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar {
    padding: 0.75rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.logo:hover {
    text-decoration: none;
    color: var(--color-primary-light);
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--color-accent);
    text-decoration: none;
}

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

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

/* Language Flags */
.lang-flags {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid var(--color-border);
}

.lang-flags a {
    display: flex;
    align-items: center;
    padding: 0.25rem;
    border-radius: 4px;
    transition: transform var(--transition);
}

.lang-flags a:hover {
    transform: scale(1.1);
}

.lang-flags a::after {
    display: none;
}

.lang-flags img {
    display: block;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: transform var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: #fff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 5rem 0 2.5rem;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
    display: flex;
    align-items: center;
}

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

.hero-text h1 {
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
}

.tagline {
    font-size: 1.25rem;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Reduce gap between hero and next section (home page) */
.hero + .services {
    padding-top: 3rem;
}

/* Home page About section spacing optimization */
.services + .about {
    padding-bottom: 3rem;
}

.about + .featured-section {
    padding-top: 3rem;
}

/* ==========================================================================
   Section Styles
   ========================================================================== */
section {
    padding: 5rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    background: var(--color-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.about-text p {
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
}

.about-text strong {
    color: var(--color-text);
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-self: start;
}

.credentials, .quick-facts {
    background: var(--color-bg-alt);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

/* Centered section title (full width) */
.section-title-centered {
    text-align: center;
    margin-bottom: 2rem;
}

/* Magazine-style floated image in text - LEFT */
.text-image-float-left {
    float: left;
    margin: 0 25px 20px 0;
    width: 48%;
    max-width: 350px;
    text-align: center;
}

.text-image-float-left img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 0.5rem;
}

.text-image-float-left figcaption {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Magazine-style floated image in text - RIGHT */
.text-image-float {
    float: right;
    margin: 0 0 1.5rem 2rem;
    max-width: 220px;
    text-align: center;
}

.text-image-float img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 0.5rem;
}

.text-image-float figcaption {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .text-image-float,
    .text-image-float-left {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 1.5rem 0;
    }

    .text-image-float-left img,
    .text-image-float img {
        max-width: 300px;
        margin: 0 auto 0.5rem;
        display: block;
    }
}

/* Larger Google Partner badge in credentials */
.credentials .google-partner-badge {
    width: 100%;
    max-width: 180px;
    height: auto;
}

.credentials h3, .quick-facts h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.credentials ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.credentials img {
    width: 80px;
    height: auto;
}

.quick-facts ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.quick-facts ul li:last-child {
    border-bottom: none;
}

.quick-facts strong {
    color: var(--color-accent);
    font-size: 1.1rem;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services {
    background: var(--color-bg-alt);
}

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

.service-card {
    background: var(--color-bg);
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

.service-icon img {
    width: 32px;
    height: 32px;
}

/* Service Image - Full width card images */
.service-image {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-alt);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.service-card > p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.service-card ul {
    margin-top: 1rem;
}

.service-card ul li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.service-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
}

/* Hobby Section */
.hobby-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.hobby-section h3 {
    margin-bottom: 1.5rem;
}

.hobby-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.hobby-content img {
    border-radius: var(--radius);
    width: 180px;
    height: auto;
    object-fit: cover;
}

.hobby-content p {
    color: var(--color-text-light);
    margin: 0;
}

/* ==========================================================================
   Career Section
   ========================================================================== */
.career {
    background: var(--color-bg);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 50%;
    transform: translateX(-5px);
    border: 2px solid var(--color-bg);
}

.timeline-content {
    padding-left: 1rem;
}

.timeline-content time {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.timeline-content p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Achievements */
.achievements {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

.achievements h3 {
    margin-bottom: 1.5rem;
}

.achievement-list {
    display: grid;
    gap: 1.5rem;
}

.achievement-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.achievement-list img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.achievement-list strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.achievement-list p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Skills */
.skills-section {
    margin-top: 3rem;
}

.skills-section h3 {
    margin-bottom: 1rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skills-list li {
    background: var(--color-bg-alt);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    background: var(--color-bg-alt);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-two-col {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.contact-image {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.contact-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    object-fit: contain;
}

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

.contact-item h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.contact-item a,
.contact-item p,
.contact-item address {
    color: var(--color-text);
    font-size: 1rem;
}

/* Contact Header Avatar */
.contact-header-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

/* Contact Social Links */
.contact-social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.contact-social-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition);
}

.contact-social-links a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.contact-social-links svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Contact Form */
.contact-form {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    accent-color: var(--color-accent);
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.contact-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--color-bg-dark);
    color: #a0aec0;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-avatar {
    text-align: center;
    flex-shrink: 0;
}

.footer-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.footer-info p {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.footer-info strong {
    color: #fff;
    font-size: 1.1rem;
}

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

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

.social-links a:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
}

.social-links img {
    width: 20px;
    height: 20px;
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 0.25rem;
}

.footer-bottom a {
    color: #a0aec0;
}

.footer-bottom a:hover {
    color: #fff;
}

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

/* Tablet */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-description {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-sidebar {
        flex-direction: row;
    }

    .credentials, .quick-facts {
        flex: 1;
    }

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

    .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .contact-item {
        flex: 1 1 45%;
    }

    .contact-image {
        order: -1;
    }

    .contact-image img {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1.5rem;
    }

    .nav-menu a::after {
        display: none;
    }

    .hero {
        padding: 5rem 0 2rem;
    }

    .hero-image img {
        max-width: 250px;
    }

    .hero + .services {
        padding-top: 2rem;
    }

    section {
        padding: 3rem 0;
    }

    .about-sidebar {
        flex-direction: column;
        align-items: center;
    }

    .about-avatar {
        width: 200px;
        height: 200px;
    }

    .services + .about {
        padding-bottom: 2rem;
    }

    .about + .featured-section {
        padding-top: 2rem;
    }

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

    .hobby-content img {
        margin: 0 auto;
    }

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

    .footer-avatar {
        order: -1;
    }

    .contact-item {
        flex: 1 1 100%;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .tagline {
        font-size: 1rem;
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .skills-list li {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .nav-toggle,
    .hero-cta,
    .contact-form,
    .social-links {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   Page Header (for inner pages)
   ========================================================================== */
.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 8rem 0 2rem;
    text-align: center;
}

/* Reduce spacing after page-header for about page */
.page-header + .about {
    padding-top: 3rem;
}

.page-header h1 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
    color: #fff;
    text-decoration: none;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Press & Recognition
   ========================================================================== */
.press-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 2rem;
}

.press-logo {
    opacity: 0.6;
    transition: opacity var(--transition), transform var(--transition);
}

.press-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.press-logo img {
    max-height: 50px;
    width: auto;
    filter: grayscale(100%);
    transition: filter var(--transition);
}

.press-logo:hover img {
    filter: grayscale(0%);
}

/* Featured Section - New layout for Featured In */
.featured-section {
    padding: 4rem 0;
    background: var(--color-bg);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .featured-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

.featured-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.featured-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.featured-item img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.featured-item span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* About Photo */
.about-photo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.about-avatar {
    border-radius: 50%;
    width: 280px;
    height: 280px;
    object-fit: cover;
    border: 4px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Certifications Grid
   ========================================================================== */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.cert-card {
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.cert-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cert-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.cert-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.cert-info p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* ==========================================================================
   Clients List
   ========================================================================== */
.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.client-tag {
    background: var(--color-bg-alt);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.client-tag:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

/* ==========================================================================
   Service Detail Pages
   ========================================================================== */
.service-detail {
    padding: 4rem 0;
}

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

.service-detail-content.reversed {
    direction: rtl;
}

.service-detail-content.reversed > * {
    direction: ltr;
}

.service-detail-text h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.service-detail-text p {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.service-detail-text ul {
    margin-top: 1.5rem;
}

.service-detail-text ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-light);
}

.service-detail-text ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
}

.service-detail-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .service-detail-content {
        grid-template-columns: 1fr;
    }

    .service-detail-content.reversed {
        direction: ltr;
    }

    .service-detail-image {
        order: -1;
    }
}

/* ==========================================================================
   Education Section
   ========================================================================== */
.education-list {
    max-width: 800px;
    margin: 2rem auto 0;
}

.education-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
}

.education-year {
    font-weight: 600;
    color: var(--color-accent);
    min-width: 100px;
}

.education-details h4 {
    margin-bottom: 0.25rem;
}

.education-details p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ==========================================================================
   Teaching Section
   ========================================================================== */
.teaching-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.teaching-card {
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.teaching-card time {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.teaching-card h4 {
    margin-bottom: 0.5rem;
}

.teaching-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #1a202c;
        --color-bg-alt: #2d3748;
        --color-bg-dark: #171923;
        --color-text: #e2e8f0;
        --color-text-light: #a0aec0;
        --color-text-muted: #718096;
        --color-border: #4a5568;
        --color-primary: #90cdf4;
        --color-primary-light: #bee3f8;
        --color-primary-dark: #63b3ed;
    }

    .service-card,
    .contact-form,
    .hobby-section,
    .achievements {
        background: var(--color-bg-alt);
    }

    .credentials, .quick-facts {
        background: var(--color-bg);
    }

    .social-links img {
        filter: none;
    }
}

/* ==========================================================================
   Role/Expertise Pages
   ========================================================================== */
.role-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    min-height: 500px;
}

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

.role-hero-text h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.role-hero-text .tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.role-hero-text p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.role-hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.role-hero-image img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 6px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .role-hero {
        min-height: auto;
    }

    .role-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .role-hero-image {
        order: -1;
    }

    .role-hero-image img {
        width: 250px;
        height: 250px;
    }
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--color-bg);
    padding: 0;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-card-image {
    width: 100%;
    background: var(--color-bg-alt);
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}

.feature-card-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius) var(--radius) 0 0;
}

.feature-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: 50%;
}

.feature-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin: 0;
    flex: 1;
}

/* AI Expert page grid - 4 columns */
.features-grid.ai-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .features-grid.ai-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid.ai-grid {
        grid-template-columns: 1fr;
    }
}

/* Technology Stack */
.tech-stack {
    margin-top: 2rem;
}

.tech-category {
    margin-bottom: 2rem;
}

.tech-category h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background: var(--color-bg-alt);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.tech-tag:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

/* Case Studies / Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.project-card-image {
    height: 180px;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-content {
    padding: 1.5rem;
}

.project-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tag {
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Expertise Section with Icons */
.expertise-section {
    padding: 4rem 0;
}

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

.expertise-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.expertise-number {
    width: 48px;
    height: 48px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.expertise-content h4 {
    margin-bottom: 0.5rem;
}

.expertise-content p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Related Links */
.related-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    color: var(--color-text);
    font-weight: 500;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.related-link:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    text-decoration: none;
}

.related-link svg {
    width: 18px;
    height: 18px;
}

/* Stats Section */
.stats-section {
    background: var(--color-primary);
    color: #fff;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Consistent Image Sizing */
.service-icon img,
.feature-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.achievement-list img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: var(--radius);
}

/* Fix press logos consistent sizing */
.press-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.press-logo img {
    max-height: 45px;
    max-width: 120px;
    width: auto;
    object-fit: contain;
}

/* Nav Active State */
.nav-menu a.active {
    color: var(--color-accent);
}

.nav-menu a.active::after {
    width: 100%;
}

/* Dropdown Menu for Role Pages */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 0.25rem;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 180px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-size: 0.9rem;
}

.nav-dropdown-menu a:hover {
    background: var(--color-bg-alt);
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        background: var(--color-bg-alt);
        margin-top: 0.5rem;
        border-radius: 0;
    }
}
