:root {
    --bg: light-dark(hsl(0, 0%, 100%), hsl(0, 0%, 5%));
    --bg-highlight: light-dark(hsl(215, 40%, 98%), hsl(215, 47%, 11%));

    --text: light-dark(hsl(0, 0%, 25%), hsl(0, 0%, 75%));
    --text-heading: light-dark(hsl(0, 0%, 10%), hsl(0, 0%, 92%));

    --text-muted: light-dark(hsl(215, 16%, 46%), hsl(0, 0%, 63%));

    --dark-bg: hsl(215, 47%, 11%);
    --dark-text: hsl(215, 27%, 84%);
    --dark-text-heading: hsl(0, 0%, 95%);

    --light: light-dark(hsl(215, 32%, 91%), hsl(215, 32%, 30%));
    --accent: light-dark(hsl(201, 96%, 37%), hsl(201, 70%, 45%));
    --success: hsl(160, 84%, 39%);

    --card-highlight: light-dark(hsl(204, 100%, 97%), hsl(204, 100%, 12%));
    --card-border-radius: 0.5rem;

    --text-width: 72ch;
    --viewport-padding: 1.5rem;
    --card-single-border-width: 4px;
    --section-spacing: 4rem;
}

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

body {
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

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

h1,
h2,
h3,
h4 {
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-wrap: balance;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.25rem;
}

hr {
    border: 0;
    height: 1px;
    background: var(--light);
    margin-block: 2rem;
    width: 7rem;
}

ul {
    list-style: none;
}

blockquote {
    position: relative;
    background: var(--bg-highlight);
    padding: 2rem;
    margin-left: 2.1rem;
    border-radius: var(--card-border-radius);
    margin-top: 2rem;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.25rem;
    font-style: italic;
    position: relative;
    z-index: 1;
}

blockquote::before {
    content: "“";
    position: absolute;
    top: 0;
    left: -3rem;
    font-size: 10rem;
    line-height: 1;
    color: var(--accent);
    font-family: Georgia, 'Times New Roman', Times, serif;
    opacity: 0.3;
}

.accent {
    color: var(--accent);
}

/* Layout Utilities */
.container {
    max-width: 75rem;
    margin-inline: auto;
    padding-inline: var(--viewport-padding);
}

.text-container {
    max-width: var(--text-width);
}

section,
.text-container {
    padding-block: var(--section-spacing);
}

nav:has(.button) {
    margin-top: var(--section-spacing);
}

.section-title {
    padding-bottom: 2rem;
}

/* Header */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 1rem;
    position: relative;
}

.logo {
    margin-top: -3px;
    white-space: nowrap;
}

.logo span {
    display: block;
}

.logo:hover {
    color: inherit;
}

.logo-top {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    line-height: 1.4;
}

.logo-bottom {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-heading);
    text-transform: uppercase;
    line-height: 1;
}

nav {
    flex-grow: 1;
    padding-inline: 1rem;
    text-align: center;
}

nav ul {
    display: flex;
    gap: 0.5rem;
    justify-content: space-evenly;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    list-style: none;
}

nav li:first-child {
    display: none;
}

nav a {
    display: block;
    padding-inline: 1rem;
    padding-block: 0.5rem;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-switch a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 0.5rem;
}

.lang-switch a:hover {
    color: var(--accent);
}

.lang-switch a.active {
    color: var(--text);
}

/* Burger Menu Base Styles */
.menu-toggle {
    display: none;
}

.menu-button-container {
    display: none;
}

.menu-wrapper {
    display: flex;
    flex-grow: 1;
    align-items: center;
}

/* Sections */
.bg-highlight {
    background-color: var(--bg-highlight);
}

.dark {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

.dark h2 {
    color: var(--dark-text-heading);
}

/* Hero */
.hero {
    background-color: #070e15;
    background-position: center;
    background-repeat: no-repeat;
    background-size: auto 100%;
    backdrop-filter: brightness(0.1);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--dark-text-heading);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.4;
    letter-spacing: -0.01em
}

.hero:not(.hero-title) h1 {
    margin: 0;
}

.hero .title-line-1 {
    margin-left: -3rem;
}

.hero .title-line-2 {
    margin-left: 8rem;
}

.hero .subline {
    font-size: 1.2rem;
    color: var(--dark-text);
    filter: brightness(1.05);
    max-width: 40rem;
    margin: 0 auto 2rem;
}

/* Text Content */
.text-container :is(h1, h2, h3, hr) {
    margin-top: 2rem;
}

.text-container p {
    margin-bottom: 1.25rem;
}

.text-container li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.text-container li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0.2rem;
    top: -0.1rem;
    line-height: 1;
}

ul.compact-list {
    margin-block: 1rem;
}

.compact-list li {
    margin-block: 0.1rem;
    padding-left: 1.5rem;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--accent) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--card-border-radius);
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-block: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    line-height: 1.4;
    border: 1px solid hsla(0, 0%, 100%, 0.1);
}

/* Experience Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    list-style: none;
}

.card {
    border: 1px solid var(--light);
    border-radius: var(--card-border-radius);
    padding: 2rem;
    hyphens: auto;
    hyphenate-limit-chars: auto 4 4;
}

.card p:first-of-type {
    margin-bottom: 0.9rem;
}

.highlight-card {
    border-color: var(--accent);
    background-color: var(--card-highlight);
}

.card-header {
    border-bottom: 2px solid var(--bg-highlight);
    padding-bottom: 1rem;
    margin-bottom: 0.7rem;
}

.year {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Workflow Timeline */
.timeline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    list-style: none;
    counter-reset: timeline-counter;
}

.timeline li {
    flex: 1;
    counter-increment: timeline-counter;
    display: flex;
    flex-direction: column;
}

.timeline a {
    display: flex;
    background-color: light-dark(var(--bg), var(--card-highlight));
    padding: 1.5rem;
    border-top: 4px solid var(--text-muted);
    cursor: pointer;
    flex-direction: column;
    flex-grow: 1;
}

.timeline a:hover {
    box-shadow: 0 10px 15px -3px light-dark(hsla(0, 0%, 0%, 0.1), hsla(0, 0%, 0%, 0.9));
}

.timeline a:hover ::before {
    color: var(--accent);
}

.timeline h3 {
    white-space: nowrap;
}

.timeline h3::before {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--light);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    content: counter(timeline-counter, decimal-leading-zero);
}

.timeline-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.timeline-cta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.timeline-cta::before {
    content: "→";
    font-size: 1.2em;
    transition: transform 0.2s ease;
}

.timeline a:hover .timeline-cta::before {
    transform: translateX(5px);
}

/* Philosophy */
.grid-2-1 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.tick-card {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-highlight);
    border-left: var(--card-single-border-width) solid var(--success);
}

.tick-card::before {
    content: "✓";
    margin-right: 1.25rem;
    font-size: 2rem;
    font-weight: bold;
    align-self: center;
}

/* Hero Overlap Card */
.hero-overlap-card {
    --hero-overlap-card-padding-inline: calc(var(--viewport-padding) + 0.5rem);
    position: relative;
    display: flex;
    align-items: center;
    margin-top: -3rem;
    margin-inline: auto;
    padding: var(--hero-overlap-card-padding-inline);
    max-width: calc(var(--text-width) + (var(--card-single-border-width) + var(--hero-overlap-card-padding-inline) - var(--viewport-padding)) * 2);
    background-color: var(--bg-highlight);
    border-left: var(--card-single-border-width) solid var(--success);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    z-index: 0;
}

.hero-overlap-card h2 {
    font-size: 1.25rem;
    line-height: 1.28;
    margin-top: 0;
}

.hero-overlap-card p:last-of-type {
    margin-bottom: 0;
}

div.hero-overlap-card::before {
    content: "🎯";
    position: absolute;
    bottom: -11rem;
    right: -12rem;
    font-size: 20rem;
    filter: grayscale(1);
    opacity: 0.12;
    z-index: -1;
}

/* Tech Stack */
.tech-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-text-heading);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;

    font-size: 0.9rem;
    color: var(--dark-text);
    line-height: 1.4;
}

.tech-grid > div {
    background: hsla(0, 0%, 100%, 0.05);
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: background-color 0.2s;
}

.tech-grid > div:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tech-grid img {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    width: 100%;
    height: 80px;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;

    background: white;
    filter: grayscale(100%);
    opacity: 0.95;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.tech-grid > div:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Footer */
footer {
    display: flex;
    flex-direction: column;
    text-align: center;
    background: var(--bg-highlight);
    padding-top: 5rem;
    padding-bottom: 3rem;
}

footer img {
    width: 6rem;
    margin-bottom: 2rem;
}

.contact-subline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    max-width: 32rem;
    margin-inline: auto;
}

address {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 3rem;
    font-style: normal;
}

.email {
    color: var(--text-heading);
    font-size: clamp(1rem, calc(4vw + 0.5rem), 1.6rem);
    font-weight: 700;
}

.phone {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 2rem;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text-muted);
}

.footer-links a {
    padding-inline: 0.4rem;
}

.footer-links a:not(:last-child) {
    border-right: 1px solid var(--text-muted);
}

.legal-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 30rem;
    margin-inline: auto;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.3rem;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--accent);
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    color: white;
    filter: brightness(1.2);
}

@media (max-width: 800px) {
    nav ul {
        flex-direction: column;
    }

    nav li:first-child {
        display: unset;
    }

    h1,
    h2 {
        font-size: 1.8rem;
        padding-inline-end: 0.5rem;
    }

    .hero .title-line-2 {
        margin-left: 5rem;
    }

    .grid-3 {
        gap: 1rem;
    }

    .grid-2-1 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline {
        flex-direction: column;
    }

    .timeline a {
        border-top: none;
        border-left: var(--card-single-border-width) solid var(--text-muted);
    }
}

@media (max-width: 480px) {
    :root {
        --viewport-padding: 1rem;
        --section-spacing: 3rem;
    }

    .section-title {
        padding-bottom: 1.5rem;
    }

    header .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .hero-overlap-card {
        margin-top: 3rem;
        padding-block: 2rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

    .logo {
        text-align: start;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .hero:not(.hero-title) {
        padding-block: 3rem;
    }

    .hero :is(.title-line-1, .title-line-2) {
        margin: unset;
    }

    .hero > * {
        align-self: center;
    }

    blockquote {
        margin-left: unset;
        margin-top: 2.5rem;
        padding-top: 3rem;
        font-size: 1.2rem;
    }

    blockquote::before {
        top: -2.2rem;
        left: 0;
    }

    /* Burger Menu Base Styles */
    .menu-button-container {
        --stroke-width: 4px;
        --burger-width: 30px;

        display: flex;
        height: 2rem;
        width: var(--burger-width);
        margin-inline-end: 0.75rem;
        cursor: pointer;
        flex-direction: column;
        justify-content: center;
    }

    .menu-button {
        position: relative;
        display: block;
        height: var(--stroke-width);
        width: var(--burger-width);
        background-color: var(--text-heading);
        transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
        border-radius: calc(var(--stroke-width) / 2);
    }

    .menu-button::before,
    .menu-button::after {
        content: '';
        position: absolute;
        display: block;
        height: var(--stroke-width);
        width: var(--burger-width);
        background-color: var(--text-heading);
        transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
        border-radius: calc(var(--stroke-width) / 2);
    }

    .menu-button::before {
        margin-top: calc(var(--stroke-width) * -2);
    }

    .menu-button::after {
        margin-top: calc(var(--stroke-width) * 2);
    }

    .menu-wrapper {
        position: absolute;
        display: none;
        z-index: 1000;
        top: 100%;
        left: 0;
        right: 0;
        gap: 1rem;
        padding: 1rem;
        flex-direction: column;
        background-color: var(--bg);
        border-bottom: 1px solid var(--light);
        box-shadow: 0 20px 25px -5px hsla(0, 0%, 0%, 0.1), 0 10px 10px -5px hsla(0, 0%, 0%, 0.04);
    }

    .menu-toggle:checked ~ .menu-wrapper {
        display: flex;
    }

    .menu-toggle:checked + .menu-button-container .menu-button {
        background: hsla(0, 0%, 100%, 0);
    }

    .menu-toggle:checked + .menu-button-container .menu-button::before {
        margin-top: 0px;
        transform: rotate(405deg);
    }

    .menu-toggle:checked + .menu-button-container .menu-button::after {
        margin-top: 0px;
        transform: rotate(-405deg);
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }

    div.hero-overlap-card::before {
        opacity: 0.2;
    }

    .tech-grid img {
        opacity: 0.8;
    }

    blockquote::before {
        opacity: 0.6;
    }

    footer img {
        filter: invert(0.9);
    }
}

/* Scroll Animations */
.fade-in-section > :is(div, li) {
    opacity: 0;
    transition: opacity 0.5s ease-in, transform 0.5s ease-in;
}

.fade-in-section.is-visible > * {
    opacity: 1;
}

.timeline.fade-in-section.is-visible > *:nth-child(1) { transition-delay: 0.1s; }
.timeline.fade-in-section.is-visible > *:nth-child(2) { transition-delay: 0.25s; }
.timeline.fade-in-section.is-visible > *:nth-child(3) { transition-delay: 0.4s; }
.timeline.fade-in-section.is-visible > *:nth-child(4) { transition-delay: 0.55s; }

.tech-grid.fade-in-section.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.tech-grid.fade-in-section.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.tech-grid.fade-in-section.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.tech-grid.fade-in-section.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
.tech-grid.fade-in-section.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
.tech-grid.fade-in-section.is-visible > *:nth-child(6) { transition-delay: 0.3s; }
.tech-grid.fade-in-section.is-visible > *:nth-child(7) { transition-delay: 0.35s; }
.tech-grid.fade-in-section.is-visible > *:nth-child(8) { transition-delay: 0.4s; }

.lang-switch {
    display: none;
}
