/* Root variables for color theming */
:root{
    --color-accent: #5eead4;
    --color-highlght: #e2e8f0;
    --background-accent: rgba(45, 212, 191, .1);
}

html{
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body{
    background: #0f172a;
    color: #94a3b8;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: repeat(1, minmax(0,1fr));
    gap: 6rem;
}

#logo-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: #0f172a;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

#logo-splash img {
    max-width: min(45vw, 280px);
    max-height: min(45vh, 280px);
    width: auto;
    height: auto;
}

#logo-splash.fade-out {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
}

#corner-logo {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    width: 72px;
    padding: 0.5rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

#corner-logo img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 1023px) {
    header {
        position: relative;
        padding-top: 5rem;
    }
    #corner-logo {
        position: absolute;
        top: 2rem;
        left: 1rem;
        right: auto;
        width: 56px;
        padding: 0.35rem;
        z-index: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    #logo-splash {
        display: none;
    }
}

p::selection, 
h1::selection, 
h2::selection, 
h3::selection, 
h4::selection, 
h5::selection, 
h6::selection {
    background: var( --color-accent );
    color:#0f172a;
}

.underlay{
    position: fixed;
    background: #172554;
    inset: 0;
    opacity: 0.15;
}

header,
main,
footer{
    position: relative;
    z-index: 10;
}

header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 430px;
}

header h1,
header h4,
.lighttext {
    color: var(--color-highlght);
}

header a{
    text-decoration: none;
}

header h1{
    font-weight: 600;
}

header h4{
    font-weight: 400;
}

nav a {
    font-size: 0.9rem;
    display: none;
}

.social-link-container{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-link{
    font-size: 1.5rem;
    color: inherit;
    text-decoration: none;
}

.social-link:hover{
    color: var(--color-highlght);

}

main {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

section h2,
.experience-card h3{
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 500;
}

.sticky-header{
    position: sticky;
    top: 0;
    padding: 1rem 0rem;
}

.sticky-header h2{
    position: relative;
    z-index: 2;
}

.sticky-header::before{
    content: '';
    position: absolute;
    inset: 0;
    background: #101a31;
    opacity: 0.9;
}

.about-content{
    display: flex;
    flex-direction: column;
    gap: 1rem
}
.about-content p{
    font-size: 1.1rem;
}

.anchor-text {
    color: var(--color-highlght);
    text-decoration: none;
    transition-duration: 1000ms;
}

.anchor-text:hover{
    color: var(--color-accent);
}

.experience-contents,
.projects-contents{
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.experience-card,
.project-card{
    display: grid;
    grid-template-columns: repeat(1, minmax(0,1fr));   
}

.experience-card{
    gap: 0.5rem;
}

.project-card{
    gap: 0.5rem;
}

.card-column{
    display: flex;
    flex-direction: column;
    gap:0.75rem;
}

.tenure {
    opacity: 0.7;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.experience-card p{
    font-size: 0.9rem;
}

.card-header{
    font-weight: 500;
    font-size: 1rem;
}

.anchor-icon{
    padding-left: 0.5rem;
}

.tag-container{
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--color-accent);
}

.tag{
    border-radius:1rem;
    padding: 0.25rem 0.5rem;
    background: rgba(45, 212, 191, .1)
}

.tag p{
    font-size: 0.8rem;
}

.project-image-container{
    max-width: 200px;
    overflow: hidden;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    order: 2;
    border-radius: 0.75rem;
}

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

.project-stat-link{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.project-archive-link{
    position: relative;
    margin-right: auto;
}

.project-archive-link span{
    transition-duration: 500ms;
}

.project-archive-link:hover span{
    padding-left: 0.5rem;
}

.project-archive-link::after{
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    bottom: 0;
    background: transparent;
    transition-duration: 500ms;
}


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

footer{
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding-bottom: 2rem;
}

.footer-heading {
    color: var(--color-highlght);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.footer-section p {
    line-height: 1.6;
    font-size: 0.85rem;
}

.footer-credits {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
}

.footer-credits p {
    font-size: 0.75rem;
    opacity: 0.8;
}

footer p {
     font-size: 0.9rem;
}

.scroll-to-top {
    text-decoration: none;
    color: var(--color-accent);
    background: var(--background-accent);
    padding: 0 0.75rem;
    aspect-ratio: 1/1;
    display: grid;
    place-items: center;
    border-radius: 100%;
    overflow: hidden;
    transition-duration: 200ms;
}

.scroll-to-top:hover {
    opacity: 0.6;
}

/* ─── Legal pages (privacy.html, terms.html) ─────────────────────────────── */

body.legal-page {
    display: block;
    padding: 2rem;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    line-height: 1.6;
}

.legal-container h1 {
    color: var(--color-highlght);
    margin-bottom: 0.5rem;
    font-size: 2.3rem;
    font-weight: 600;
}

.legal-container .last-updated {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    opacity: 0.8;
}

.legal-container h2 {
    color: var(--color-highlght);
    margin-top: 0.75rem;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.legal-container section {
    margin-bottom: 0.85rem;
}

.legal-container p,
.legal-container li {
    margin-bottom: 0.4rem;
    color: #94a3b8;
    font-size: 0.95rem;
}

.legal-container ul {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-container strong {
    color: var(--color-highlght);
}

.back-link {
    color: var(--color-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: opacity 300ms ease;
    font-size: 0.9rem;
}

.back-link:hover {
    opacity: 0.8;
}

.back-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
    border-radius: 2px;
    opacity: 1;
}

@media (max-width: 640px) {
    .legal-container {
        padding: 2rem 1rem;
    }

    .legal-container h1 {
        font-size: 1.8rem;
    }

    .legal-container h2 {
        font-size: 1rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────────── */

@media (min-width: 640px){
    .project-card,
    .experience-card{
        grid-template-columns: repeat(4, minmax(0,1fr));
    }

    .card-column,
    .experience-card{
        grid-column: span 3 / span 3;
    }

    .project-image-container{
        order: 0;
    }

    header{
        max-width: unset;
    }

    header h1{
        font-size: 3rem;
    }
    
    header h4{
        font-size: 1.3rem;
    }

    header p {
        max-width: 300px;
    }
    .social-link-container{
        gap: 1.5rem;
    }

    .social-link-container i {
        font-size: 2rem;
    }
    
}

@media (min-width: 1024px){
    body{
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 1rem;
        padding: 6rem;
        padding-top: 0;
    }

    header{
        position: sticky;
        top: 0;
        margin-left: auto;
        height: 100vh;
        padding-bottom: 6rem;
    }

    header h1{
        font-size: 3rem;
    }
    
    header h4{
        font-size: 1.3rem;
    }

    header p {
        max-width: 300px;
    }

    nav a{
            display: flex;
            flex-direction: column;
            font-size: 1.1rem;
    }

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

    .social-link-container{
        gap: 1.5rem;
    }

    .social-link-container i {
        font-size: 2rem;
    }

    header,
    main {
        padding-top: 6rem;
        max-width: 600px;
        width: 100%;
    }

    main{
        margin-right: auto;
    }

    .sticky-header{
        display: none;
    }

    footer{
        grid-column: span 2 / span 2;
        flex-direction: column;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
        align-items: center;
    }

    .footer-content {
        max-width: 100%;
    }

    .footer-credits {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    

}