/* Jessica Radziszewska Portfolio - Design System */

:root {
    --cream: #F5F1E8;
    --beige: #E8DCC4;
    --brown: #8B7355;
    --dark-brown: #5C4A3A;
    --black: #1a1a1a;
    --white: #ffffff;
    --gold: #B8956A;
    
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
    
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--cream);
    color: var(--black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

/* Animated Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.25;
}

.pattern-svg {
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: transform 0.1s ease-out;
}

#connectionCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Ensure content is above background */
nav,
.hero,
.section,
.footer {
    position: relative;
    z-index: 1;
}

::selection {
    background: var(--gold);
    color: var(--white);
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
    width: 100%;
}

.container-narrow {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
    width: 100%;
}

.section {
    padding: clamp(80px, 12vw, 140px) 0;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: clamp(20px, 3vh, 30px) clamp(24px, 5vw, 80px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    transition: all 0.4s var(--ease);
}

.nav.scrolled {
    background: rgba(245, 241, 232, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: clamp(15px, 2vh, 20px) clamp(24px, 5vw, 80px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 500;
    color: var(--black);
    transition: opacity 0.3s var(--ease);
}

.nav-logo:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--dark-brown);
    transition: color 0.3s var(--ease);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s var(--ease);
}

.nav-link:hover {
    color: var(--black);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--black);
    transition: all 0.3s var(--ease);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: clamp(120px, 15vh, 180px) 0 clamp(60px, 10vh, 100px);
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 8vw, 100px);
    align-items: center;
}

.hero-label {
    font-size: 0.8125rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brown);
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.7;
    color: var(--dark-brown);
    margin-bottom: 40px;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    background: var(--black);
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.btn-primary:hover {
    background: var(--dark-brown);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    background: transparent;
    color: var(--black);
    font-size: 0.9375rem;
    font-weight: 400;
    border: 1px solid var(--brown);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.btn-secondary .arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease);
}

.btn-secondary:hover {
    background: var(--beige);
    border-color: var(--dark-brown);
}

.btn-secondary:hover .arrow {
    transform: translateX(4px);
}

.hero-image {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: 2px;
}

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

.hero-badge {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: 2px;
}

.badge-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brown);
    margin-bottom: 4px;
}

.badge-value {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--black);
    font-weight: 500;
}

/* Section Connectors */
.section::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -2px;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeInConnector 0.6s ease forwards;
    animation-delay: 0.3s;
}

.section:first-of-type::before {
    display: none;
}

@keyframes fadeInConnector {
    to {
        opacity: 0.3;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 64px;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -32px;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    transform: translateX(-50%);
}

.section-label {
    font-size: 0.8125rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brown);
    font-weight: 500;
    display: block;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.section-intro {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.7;
    color: var(--dark-brown);
}

/* Services Grid */
.services-section {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    width: 100%;
}

.service-card {
    padding: 40px 32px;
    background: var(--cream);
    border-radius: 2px;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, transparent 50%, rgba(184, 149, 106, 0.05) 50%);
    transition: all 0.4s var(--ease);
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.4s var(--ease);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.service-card:hover::before {
    width: 120px;
    height: 120px;
    opacity: 1;
}

.service-card:hover::after {
    width: 60px;
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--brown);
}

.service-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 16px;
}

.service-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--dark-brown);
    margin-bottom: 24px;
}

.service-list {
    list-style: none;
}

.service-list li {
    font-size: 0.875rem;
    color: var(--brown);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.service-list li::before {
    content: '→';
    position: absolute;
    left: 0;
}

/* Expertise Section */
.expertise-section {
    background: var(--beige);
}

.expertise-content {
    max-width: 700px;
}

.expertise-title {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.15;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.expertise-text {
    margin-bottom: 48px;
}

.expertise-text p {
    font-size: clamp(1rem, 1.5vw, 1.0625rem);
    line-height: 1.8;
    color: var(--dark-brown);
    margin-bottom: 24px;
}

.expertise-highlights {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.highlight-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.highlight-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.highlight-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--gold);
}

.highlight-content h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 8px;
}

.highlight-content p {
    font-size: 0.9375rem;
    color: var(--dark-brown);
    line-height: 1.6;
}

/* Current Work */
.current-work-section {
    background: var(--white);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.work-card {
    padding: 40px;
    background: var(--cream);
    border-radius: 2px;
    border-left: 3px solid var(--gold);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(184, 149, 106, 0.15);
    border-radius: 50%;
    transition: all 0.4s var(--ease);
}

.work-card::after {
    content: '';
    position: absolute;
    top: 35px;
    right: 35px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(184, 149, 106, 0.1);
    border-radius: 50%;
    transition: all 0.4s var(--ease);
}

.work-card:hover::before {
    transform: scale(1.1);
    border-color: rgba(184, 149, 106, 0.25);
}

.work-card:hover::after {
    transform: scale(1.2);
    border-color: rgba(184, 149, 106, 0.2);
}

/* Career Timeline */
.timeline-section {
    background: linear-gradient(to bottom, var(--white) 0%, var(--beige) 50%, var(--white) 100%);
    position: relative;
}

.timeline {
    position: relative;
    padding: 60px 24px 60px 140px;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 4px;
    box-shadow: 0 0 20px rgba(184, 149, 106, 0.3);
    border-radius: 2px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--gold) 10%,
        var(--gold) 90%,
        transparent
    );
}

.timeline-item {
    position: relative;
    padding-left: 0;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    width: 100%;
    max-width: 100%;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-marker {
    position: absolute;
    left: -62px;
    top: 8px;
    width: 24px;
    height: 24px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    background: var(--cream);
    z-index: 2;
    transition: all 0.15s ease-out;
    transform-origin: center center;
}

.timeline-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    transition: all 0.4s var(--ease);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(184, 149, 106, 0.1);
}

.timeline-item:hover .timeline-marker::before {
    transform: translate(-50%, -50%) scale(1.5);
}

.timeline-content {
    background: var(--white);
    padding: 32px 40px;
    border-radius: 2px;
    border-left: 3px solid var(--beige);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s ease-out, opacity 0.15s ease-out;
    position: relative;
    transform-origin: left center;
    width: 100%;
    max-width: 100%;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(184, 149, 106, 0.03) 40%,
        rgba(184, 149, 106, 0.03) 60%,
        transparent 60%
    );
    pointer-events: none;
}

.timeline-item:hover .timeline-content {
    border-left-color: var(--gold);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.timeline-item.timeline-focused .timeline-content {
    border-left-color: var(--gold);
    border-left-width: 4px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
}

.timeline-item.timeline-focused .timeline-marker {
    border-width: 4px;
    box-shadow: 0 0 0 12px rgba(184, 149, 106, 0.15);
}

.timeline-year {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 8px;
    line-height: 1.3;
}

.timeline-company {
    font-size: 1.0625rem;
    color: var(--dark-brown);
    font-weight: 500;
    margin-bottom: 16px;
}

.timeline-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--dark-brown);
    margin-bottom: 20px;
}

.timeline-positions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-position {
    padding: 16px 20px;
    background: var(--cream);
    border-radius: 2px;
    border-left: 2px solid var(--gold);
}

.timeline-position strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--black);
    margin-bottom: 6px;
}

.timeline-position p {
    font-size: 0.875rem;
    color: var(--dark-brown);
    line-height: 1.6;
    margin: 0;
}

.timeline-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.highlight-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--beige);
    color: var(--brown);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.3s var(--ease);
}

.highlight-tag:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
}

/* Timeline Responsive */
@media (max-width: 768px) {
    .timeline {
        padding: 40px 0 40px 0;
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .timeline::before {
        left: max(20px, env(safe-area-inset-left));
        width: 3px;
        box-shadow: 0 0 15px rgba(184, 149, 106, 0.25);
        border-radius: 2px;
    }
    
    .timeline-marker {
        left: -36px;
        width: 18px;
        height: 18px;
        border-width: 3px;
    }
    
    .timeline-marker::before {
        width: 6px;
        height: 6px;
    }
    
    .timeline-marker::after {
        display: none;
    }
    
    .timeline-item {
        padding-left: 48px;
        margin-bottom: 48px;
        width: 100%;
    }
    
    .timeline-content {
        padding: 20px;
        border-left-width: 2px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .timeline-title {
        font-size: 1.375rem;
        line-height: 1.25;
    }
    
    .timeline-year {
        font-size: 0.75rem;
    }
    
    .timeline-company {
        font-size: 0.9375rem;
    }
    
    .timeline-description {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    .timeline-position {
        padding: 14px 16px;
    }
    
    .timeline-position strong {
        font-size: 1rem;
    }
    
    .timeline-position p {
        font-size: 0.8125rem;
    }
}

.work-header {
    margin-bottom: 16px;
}

.work-header h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 8px;
}

.work-role {
    font-size: 0.875rem;
    color: var(--brown);
    font-weight: 500;
}

.work-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--dark-brown);
    margin-bottom: 20px;
}

.work-timeline {
    font-size: 0.8125rem;
    color: var(--brown);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* About Section */
.about-section {
    background: var(--cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: clamp(48px, 8vw, 100px);
    align-items: center;
}

.about-image {
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: 2px;
}

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

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

.about-text p {
    font-size: clamp(1rem, 1.5vw, 1.0625rem);
    line-height: 1.8;
    color: var(--dark-brown);
    margin-bottom: 20px;
}

.about-credentials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
    padding: 32px 0;
    border-top: 1px solid var(--beige);
    border-bottom: 1px solid var(--beige);
}

.credential-item strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--black);
    margin-bottom: 8px;
}

.credential-item p {
    font-size: 0.9375rem;
    color: var(--dark-brown);
    margin-bottom: 4px;
}

.credential-item span {
    font-size: 0.875rem;
    color: var(--brown);
}

.about-links, .social-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--white);
    border: 1px solid var(--beige);
    border-radius: 2px;
    font-size: 0.9375rem;
    transition: all 0.3s var(--ease);
}

.social-link:hover {
    background: var(--beige);
    border-color: var(--brown);
}

/* Contact Section */
.contact-section {
    background: var(--white);
}

.contact-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.contact-title {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.2;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.contact-description {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.7;
    color: var(--dark-brown);
    margin-bottom: 48px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 32px;
    background: var(--cream);
    border-radius: 2px;
    text-align: left;
    transition: all 0.3s var(--ease);
}

.contact-link svg {
    flex-shrink: 0;
}

.contact-link strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--black);
    margin-bottom: 4px;
}

.contact-link span {
    font-size: 0.9375rem;
    color: var(--dark-brown);
}

.contact-link:hover {
    background: var(--beige);
    transform: translateY(-2px);
}

.contact-note {
    padding-top: 32px;
    border-top: 1px solid var(--beige);
}

.contact-note p {
    font-size: 0.9375rem;
    color: var(--brown);
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 60px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s var(--ease);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .hero-image {
        max-width: 500px;
        margin: 0 auto;
        order: -1;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .credentials-compact {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .nav {
        padding: 16px 24px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .nav.scrolled {
        padding: 12px 24px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(245, 241, 232, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transform: translateX(100%);
        transition: transform 0.3s var(--ease);
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-link {
        font-size: 1.5rem;
        font-family: var(--font-serif);
        padding: 12px 24px;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1000;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Hero Section Mobile */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero-container {
        padding: 0 24px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .hero-image {
        max-width: 100%;
    }
    
    .hero-badge {
        bottom: 16px;
        left: 16px;
        right: 16px;
        padding: 16px 20px;
    }
    
    /* Sections Mobile */
    .section {
        padding: 60px 0;
    }
    
    .container,
    .container-narrow {
        padding: 0 24px;
    }
    
    .section-header {
        margin-bottom: 48px;
    }
    
    .section-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    /* Services Grid Mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        width: 100%;
    }
    
    .service-card {
        padding: 28px 24px;
        width: 100%;
        max-width: 100%;
    }
    
    /* Expertise Mobile */
    .expertise-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .highlight-item {
        gap: 16px;
    }
    
    .highlight-icon {
        width: 32px;
        height: 32px;
    }
    
    /* Work Grid Mobile */
    .work-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        width: 100%;
    }
    
    .work-card {
        padding: 28px 24px;
        width: 100%;
        max-width: 100%;
    }
    
    /* About Mobile */
    .about-text p {
        font-size: 1rem;
    }
    
    .about-credentials {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 0;
    }
    
    .social-link {
        width: 100%;
        justify-content: center;
    }
    
    /* Contact Mobile */
    .contact-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .contact-link {
        padding: 20px 24px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 48px 0 24px;
    }
    
    .footer-content {
        gap: 24px;
    }
    
    .footer-social {
        display: flex;
        justify-content: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
    }
    
    .service-list li {
        font-size: 0.875rem;
    }
    
    .timeline-highlights {
        gap: 8px;
    }
    
    .highlight-tag {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .section-header::after {
        width: 30px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .timeline-title {
        font-size: 1.375rem;
    }
    
    .nav-logo {
        font-size: 1rem;
    }
    
    /* Optimize container padding on very small screens */
    .container,
    .container-narrow {
        padding: 0 20px;
    }
    
    .hero-container {
        padding: 0 20px;
    }
}

/* Mobile Background Optimization */
@media (max-width: 768px) {
    .bg-pattern {
        opacity: 0.15;
        will-change: transform;
    }
    
    .pattern-svg {
        transform: scale(1.5);
    }
    
    /* Reduce decorative animations on mobile for better performance */
    .service-card::before,
    .service-card::after,
    .work-card::before,
    .work-card::after {
        display: none;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    /* Better touch targets - minimum 44x44 for accessibility */
    .btn-primary,
    .btn-secondary,
    .nav-link,
    .contact-link,
    .social-link {
        min-height: 44px;
        padding: 16px 24px;
    }
    
    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    
    /* Smoother scrolling on iOS */
    html {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        -webkit-tap-highlight-color: rgba(184, 149, 106, 0.2);
    }
    
    /* Improve mobile text readability */
    .hero-description,
    .service-description,
    .timeline-description,
    .work-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Optimize animations for mobile */
    * {
        transition-duration: 0.2s !important;
    }
    
    /* Better mobile spacing */
    .hero-badge {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .nav.scrolled {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}
