:root {
    --primary: #f6f5f3;
    --accent: #515c94;
    --accent-warm: #6876bb;
    --text: #404456;
    --text-dim: #4a4a4a;
    --surface: #ffffff;
    --surface-elevated: #fafafa;
}

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

body {
    font-family: 'IBM Plex Mono', monospace;
    background: url('../img/bkgd.png') top center no-repeat,
                url('../img/footer-bkgd.png') bottom center no-repeat;
    background-size: contain, contain;
    background-attachment: scroll, scroll;
    background-color: var(--primary);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 0;
}

h1, h2, h3 {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.container {
    max-width: 1200px;
    margin: 150px auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    background: transparent;
}

/* Header */
header {
    padding: 4rem 0 8rem;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
}

.header-text {
    flex: 1;
}

.eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

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

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

.tagline {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.intro {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dim);
    max-width: 700px;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.quick-links {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--text);
    color: var(--primary);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--text);
}

.btn-secondary:hover {
    background: var(--text);
    color: var(--primary);
}

/* Remote Work Section */
.remote-work {
    margin: 6rem 0;
    padding: 3rem;
    /*background: var(--surface);*/
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.remote-work h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.remote-work > p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dim);
    margin-bottom: 2rem;
    max-width: 800px;
}

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

.remote-highlight {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    border-left: 3px solid var(--text);
}

.remote-highlight h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Case Studies Carousel */
.case-studies {
    margin: 6rem 0;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    padding: 1rem;
    max-height: 80vh;
    overflow-y: auto;
}

.case-study-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0 auto 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.case-study-image:hover {
    transform: scale(1.02);
}

.case-study-image::after {
    content: '🔍 Click to enlarge';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.case-study-image:hover::after {
    opacity: 1;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-btn {
    background: var(--text);
    color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--accent);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--text);
    width: 30px;
    border-radius: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent);
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 3rem;
    color: var(--text);
}

.count {
    font-size: 0.875rem;
    color: var(--text-dim);
    font-family: 'IBM Plex Mono', monospace;
}

.case-study-grid {
    display: grid;
    gap: 3rem;
}

.case-study {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.case-study-header {
    padding: 1.5rem 2rem;
    background: var(--surface-elevated);
    position: relative;
    overflow: hidden;
}

.case-study-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--text);
}

.case-study-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.meta-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.case-study h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.2;
}

.case-study-intro {
    color: var(--text-dim);
    margin-bottom: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.case-study-body {
    padding: 1.5rem 2rem;
}

.outcomes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.outcome {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--text);
    border-radius: 4px;
}

.outcome-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.outcome-value {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.outcome-description {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.3;
}

.challenge-section {
    margin-top: 1.5rem;
}

.challenge-section h4 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.challenge-section p, .challenge-section ul {
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.challenge-section ul {
    list-style: none;
    padding-left: 0;
}

.challenge-section li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.4rem;
}

.challenge-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text);
    font-size: 0.8rem;
}

.case-study-artifact {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.case-study-artifact img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

/* Footer */
footer {
    position: relative;
    min-height: 400px;
    margin-top: 6rem;
}

footer a {
    color: #6876bb !important;
}

.footer-content {
    position: absolute;
    bottom: 10px;
    right: calc((100vw - 1200px) / 2 + 10px);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    color: #515c94;
    z-index: 100;
}

@media (max-width: 1240px) {
    .footer-content {
        right: 10px;
    }
}

.footer-content h2 {
    margin-bottom: 1rem;
    color: #515c94;
}

.footer-content p {
    color: #515c94;
    max-width: 400px;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.contact-link {
    color: var(--text);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

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

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

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

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 2rem;
    }

    .quick-links {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    .container {
        padding: 0 1rem;
    }

    .section-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

/* Logo */
.logo {
    position: absolute;
    top: 48px;
    left: 1300px;
    max-width: 200px;
    z-index: 500;
    opacity: 0;
    transform: rotate(-6deg) translateY(80px);
    animation: logoFadeInUp 3s ease-out 0.8s forwards;
}

@keyframes logoFadeInUp {
    from {
        opacity: 0;
        transform: rotate(-6deg) translateY(80px);
    }
    to {
        opacity: 1;
        transform: rotate(-6deg) translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--text);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease;
}
