:root {
    color-scheme: dark;
    
    --bg-primary: #101214;
    --text-primary: #f2f4f5;
    --text-muted: #b3bbc2;
    --accent: #8ce8c3;
    --border-color: #30363d;
    
    --content-width: 75rem
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

:where(a, button):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 5px;
}

.container {
    width: min(var(--content-width), calc(100% - 2rem));
    margin-inline: auto;
}

/* Keyboard shortcut to the page content */
.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
    
    transform: translateY(calc(-100% - 2rem));
}

.skip-link:focus {
    transform: translateY(0);
}

/* Nav */
.site-header {
    border-bottom: 1px solid var(--border-color);
}

.navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    padding-block: 1.25rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: -0.04em;
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding-inline: 0.5rem;
    
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.35em;
}

/* Hero */
.hero {
    padding-block: clamp(5rem, 12vw, 10rem);
    position: relative;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    
    inset: 0;
    background: radial-gradient(
        ellipse 32% 42% at 65% 45%,
        rgb(140 232 195 / 10%) 0%,
        rgb(140 232 195 / 4%) 45%,
        transparent 100%
    );
}

/* Project interaction */
.project-card:hover,
.project-card:focus-within {
    border-color: var(--accent);
}
.hero-eyebrow {
    margin: 0 0 1.5rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 16ch;
    margin: 0;
    
    font-size: clamp(2.5rem, 1.25rem + 5vw, 5.5rem);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.hero h1 span {
    display: block;
    color: var(--accent);
}

.hero-description {
    max-width: 48ch;
    margin: 1.75rem 0 0;
    
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.25rem;
}

/* Reusable link and button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #b0f2d8;
}

.btn-secondary {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

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

/* Selected Work */
.work-section {
    padding-block: 4rem 6rem;
    border-top: 1px solid var(--border-color);
    scroll-margin-top: 2rem;
}

.section-heading {
    max-width: 42rem;
    margin-bottom: 2.5rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading > p:last-child {
    margin: 1rem 0 0;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.project-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}

.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: #171b1f;
}

.project-card .project-link,
.about-intro .project-link {
    padding: 0.625rem 1rem;
    border: 1px solid rgb(140 232 195 / 30%);
    border-radius: 0.5rem;

    background: rgb(140 232 195 / 5%);
    color: var(--text-primary);
    text-decoration: none;
}

.project-card .project-link:hover,
.about-intro .project-link:hover {
    border-color: var(--accent);
    background: rgb(140 232 195 / 12%);
    color: var(--accent);
}

.project-preview {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.project-preview-dark {
    background: #0e1117;
}

.project-preview-light {
    background: #f4f5fa;
}

.project-preview img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.project-content {
    display: flex;
    flex-direction: column;
    align-items: start;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.project-category {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
}

.project-content h3 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.project-description {
    margin: 1rem 0 1.5rem;
    color: var(--text-muted);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    margin-top: auto;
    padding-block: 0.5rem;
    
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

.project-link span[aria-hidden="true"] {
    color: var(--accent);
}

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

.project-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 5px;
    border-radius: 0.25rem;
}

/* About */
.about-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
    
    padding-block: clamp(4rem, 8vw, 6rem);
    border-top: 1px solid var(--border-color);
    scroll-margin-top: 2rem;
}

.about-section h2 {
    max-width: 18ch;
    margin: 0 0 1.5rem;
    
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.about-intro > p:not(.hero-eyebrow) {
    max-width: 55ch;
    margin: 0 0 1.5rem;
    
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.75;
}

.about-intro .project-link {
    margin-top: 0.5rem;
}

.about-skills {
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid rgb(140 232 195 / 18%);
    border-radius: 1rem;
    
    background: 
        radial-gradient(
            ellipse at top right,
            rgb(140 232 195 / 8%),
            transparent 65%
        ),var(--bg-primary);  
    
    box-shadow: 0 12px 32px rgb(0 0 0 / 12%);
}

.about-skills h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.about-skills > p {
    margin: 0.75rem 0 1.5rem;
    color: var(--text-muted);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    
    margin: 0;
    padding: 0;
    list-style: none;
}

.skills-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    
    padding: 0.625rem 1rem;
    border: 1px solid rgb(140 232 195 / 18%);
    border-radius: 999px;
    
    background: rgb(140 232 195 / 5%);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
}

.skills-list li::before {
    content: "";
    flex-shrink: 0;
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    
    background: var(--accent);
    box-shadow: 0 0 8px rgb(140 232 195 / 25%);
}

/* Contact */
.contact-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 2.5rem;
    padding-block: clamp(4rem, 8vw, 6rem);
    border-top: 1px solid var(--border-color);
}

.contact-section h2 {
    max-width: 20ch;
    margin: 0;
    
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.contact-description {
    max-width: 48ch;
    margin: 1.5rem 0;
    
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.75;
}

.contact-card {
    min-width: 0;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid rgb(140 232 195 / 18%);
    border-radius: 1rem;
    background:
            radial-gradient(
                    ellipse at top right,
                    rgb(140 232 195 / 8%),
                    transparent 65%
            ),
            var(--bg-primary);

    box-shadow: 0 12px 32px rgb(0 0 0 / 12%);
}

.contact-card h3 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.contact-card > p {
    margin: 0.75rem 0 1.5rem;
    color: var(--text-muted);
}

.contact-card .contact-email {
    display: inline-block;
    max-width: 100%;
    padding-block: 0.5rem;
    color: #8ce8c3;
    font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    font-weight: 600;
    overflow-wrap: anywhere;
    text-underline-offset: 0.25em;
}

.contact-card .contact-email:hover {
    transform: translateY(-0.25rem);
}

.contact-card .contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;

    margin: 1.5rem 0 0;
    padding: 1rem 0 0;
    list-style: none;
    border-top: 1px solid rgb(140 232 195 / 15%);
}

.contact-card .project-link,
.contact-card .project-link span {
    text-decoration: none;
}

.contact-card .project-link {
    gap: 0.65rem;
    padding: 0.5rem 0;
}

/* footer */
.site-footer {
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    padding-block: 1.5rem;
    
    color: var(--text-muted);
}

.footer-content p {
    margin: 0;
}

.footer-content small {
    font-size: 0.875rem;
}

@media (prefers-reduced-motion: no-preference) {
    .hero::before {
        animation: hero-glow 12s ease-in-out infinite alternate;
    }
    
    .project-card {
        transition:
            transform 200ms ease,
            border-color 200ms ease;
    }
    
    .project-card:hover {
        transform: translateY(-4px);
    }
    
    @keyframes hero-glow {
        from {
            opacity: 0.45;
        }
        
        to {
            opacity: 1;
        }
    }
    
    .btn {
        transition: background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
    }

    .project-link {
        transition: color 180ms ease;
    }

    .project-link span[aria-hidden="true"] {
        transition: color 180ms ease;
    }

    .project-link:hover span[aria-hidden="true"] {
        transform: translate(2px, -2px);
    }
}

@media (min-width: 50rem) {
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card {
        display: flex;
        flex-direction: column;
    }

    .project-content {
        flex: 1;
    }

    .project-card-featured {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }

    .project-card-featured .project-preview {
        aspect-ratio: auto;
        border-bottom: 0;
        border-right: 1px solid var(--border-color);
    }

    .project-card-featured .project-content {
        justify-content: center;
        padding: 3rem;
    }

    .project-card-featured .project-link {
        margin-top: 0;
    }
    
    .about-section {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
        align-items: center;
        gap: 4rem;
    }
    
    .contact-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4rem;
    }
}