:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    --font-serif: Georgia, "Times New Roman", Times, serif;
    --base-size: 16px;
    --scale-xxs: 0.75rem;
    --scale-xs: 0.875rem;
    --scale-sm: 1rem;
    --scale-md: 1.125rem;
    --scale-lg: 1.5rem;
    --scale-xl: 2rem;
    --line-height: 1.6;
    --heading-line-height: 1.15;
    --color-text: #222222;
    --color-muted: #666666;
    --measure: 65ch;
}

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

html {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    color: var(--color-text);
}

body {
    margin: 0;
    padding-top: 5.5rem;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
    font-size: var(--scale-sm);
    line-height: var(--line-height);
    background: #DAE7FF;
    color: var(--color-text);
}

section {
    display: block;
    width: auto;
    padding: 20px;
    margin: 42px auto 32px auto;
    max-width: none;
}

p { margin: 0 0 1rem 0; }
.lead { font-size: var(--scale-md); color: var(--color-muted); margin-bottom: 1rem; }
small, .small { font-size: var(--scale-xs); }

h1,h2,h3 {
    margin: 0 0 0.5rem 0;
    padding: 8px;
    line-height: var(--heading-line-height);
    font-weight: 600;
    color: var(--color-text);
}

h1 { font-size: clamp(1.6rem, 2.6vw + 1rem, 2.5rem); }
h2 { font-size: clamp(1.4rem, 2.2vw + 0.8rem, 2rem); }
h3 { font-size: clamp(1.2rem, 2.0vw + 0.6rem, 1.25rem); }
@media (max-width: 768px) {
    h1 { font-size: clamp(1.2rem, 2vw + 0.8rem, 1.8rem); }
    h2 { font-size: clamp(1rem, 1.7vw + 0.7rem, 1.4rem); }
    h3 { font-size: clamp(0.9rem, 1.2vw + 0.6rem, 1.1rem); }
}

@media (max-width: 520px) {
    h1 { font-size: clamp(1rem, 1.5vw + 0.7rem, 1.3rem); }
    h2 { font-size: clamp(0.9rem, 1vw + 0.6rem, 1.1rem); }
}

.contact-h1 {
    margin: 0 0 0.5rem 0;
    padding: 8px;
    line-height: var(--heading-line-height);
    font-weight: 600;
    color: var(--color-text);
}

.custom-h1 { font-size: clamp(3.6rem, 4.6vw + 3rem, 4.5rem); }
@media (max-width: 768px) {
    .custom-h1 { font-size: clamp(2rem, 2.5vw + 1.5rem, 2.5rem); }
}

a { color: #222222; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace; font-size: 0.875em; }

nav{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 1rem 2rem;
    background: #F2F7FF;
    color: #222222;
    font-family: 'Jacques Francois', serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-radius: 0;
    flex-wrap: wrap;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.nav-name{
    font-weight: 600;
    font-size: var(--scale-lg);
    line-height: 1;
}

.nav-links{
    display: flex;
    gap: 1.25rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

footer{
    width: 90%;
    margin: 16px auto;
    padding: 12px 0;
    text-align: center;
    color: #666;
    font-family: 'Hahmlet', serif;
}

.title{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 90%;
    margin: 24px auto;
    padding: 12px 16px;
    font-family: 'Jacques Francois', serif;
}

.title-details{
    flex: 1 1 50%;
    text-align: left;
}

.title-details img{
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 8px;
    position: relative;
    z-index: 0;
    display: block;
}

.title-details-about img{
    width: 620px;
    max-width: none;
    height: auto;
    border-radius: 8px;
    position: relative;
    z-index: 0;
    display: block;
}


.title-details-right{
    text-align: right;
}

.title-right{
    flex: 0 0 45%;
    display: flex;
    justify-content: flex-end;
}
.title-right img{
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 8px;
    position: relative;
    z-index: 0;
    display: block;
}

.home-img-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
}

/* Title on work page */
.work-title{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 90%;
    margin: 24px auto;
    padding: 12px 16px;
    font-family: 'Jacques Francois', serif;
}
.work-title-wrapper{
    flex: 1 1 50%;
    text-align: left;
}

/* Buttons on home page */
.titlebtn{
    display: flex;
    gap: 0.75rem;
    margin-top: calc(0.75rem + 30px);
    align-items: center;
}
.btn{
    display: inline-block;
    padding: 1.2rem 2rem;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1.75rem;
    text-decoration: none;
    text-align: center;
    color: var(--color-text);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn-primary{
    background: #73BEFF;
    border: 1px solid #222222;
    box-shadow: #222222 2px 2px 0 0;
    color: #222222;
}
.btn-secondary{
    background: #ACD8FF;
    border: 1px solid #222222;
    box-shadow: #222222 2px 2px 0 0;
    color: #222222;
}

/* Dividers */
.page-divider{
    width: calc(100% - 60px);
    height: 2px;
    background: #000000;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-divider{
    width: calc(100% - 12px);
    height: 1px;
    background: #000000;
    margin: 0 auto;
    margin-top: -24px;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.info-grid{
    width: 90%;
    margin: 28px auto 48px auto;
    margin-top: -8px;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 1.15rem;
    font-family: 'Jacques Francois', serif;
}
.info-block{
    flex: 1 1 calc(25% - 1.5rem);
    min-width: 180px;
    padding: 8px 12px;
}
.info-block p{
    margin: 0;
    padding: 8px 0;
    text-align: left;
    color: var(--color-text);
}
.info-block p:first-of-type{
    font-size: 2rem;
    font-weight: 700;
}

/* Grid on about page */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 1fr);
    gap: 4rem;
    column-gap: 4rem;
    min-height: 1000px;
    width: auto;
    margin: 1rem auto;
    padding: 2rem 3.5rem;
    opacity: 0;
    transform: translateX(-60px);
    animation: slideInGrid 0.9s cubic-bezier(0.23, 1, 0.32, 1) 0.1s forwards;
}

.about-section-label {
    font-family: 'Jacques Francois', serif;
    font-size: 2.7rem;
    font-weight: 700;
    color: #222222;
    margin-left: 3.5rem;
    margin-bottom: -2rem;
    margin-top: 1.5rem;
    padding-left: 0.5rem;
    letter-spacing: 0.01em;
    display: block;
    text-align: left;
    max-width: 600px;
}

@media (max-width: 1024px) {
    .about-section-label {
        max-width: 98%;
        transition: all 0.3s ease;
    }
}

@media (max-width: 768px) {
    .about-section-label {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
        font-size: 2.2rem;
        margin-top: 1rem;
        margin-bottom: -1.2rem;
        transition: all 0.3s ease;
    }
}

@media (max-width: 520px) {
    .about-section-label {
        margin-left: 0.25rem;
        padding-left: 0.25rem;
        margin-top: 0.5rem;
        margin-bottom: -0.7rem;
        max-width: 100%;
        transition: all 0.3s ease;
    }
}

.about-grid .grid-item {
    background: #ACD8FF;
    border: 1px solid #222222;
    box-shadow: #222222 2px 2px 0 0;
    border-radius: 18px;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}
.about-grid .grid-item:nth-child(1),
.about-grid .grid-item:nth-child(2) {
    min-height: 500px;
}
.about-grid .grid-item:nth-child(n+3) {
    min-height: 200px;
}

/* Grid on work pages */
.work-grid-updates {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 4rem;
    min-height: 1000px;
    width: auto;
    margin: 1rem auto;
    padding: 2rem 3.5rem;
}
.work-grid-updates .grid-item {
    background: #ACD8FF;
    border: 1px solid #222222;
    box-shadow: #222222 2px 2px 0 0;
    border-radius: 18px;
    padding: 1rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

/* Grid on work-timeline page */
.work-grid-updates.grid1 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 4rem;
    min-height: 1000px;
    margin: 0;
    padding: 0;
    width: 80%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Timeline layout for work-timeline page */
.timeline-layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 900px;
    margin: 0 auto;
    padding: 2rem 0;
    box-sizing: border-box;
}
.timeline-left {
    flex: 0 0 220px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}
.timeline-line {
    width: 6px;
    height: 100%;
    background: #222222;
    border-radius: 3px;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}
.timeline-right {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: flex-end;
    justify-content: flex-start;
}

/* Grid on contact page */
 .contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 4rem;
    min-height: 600px;
    width: 100%;
    width: 600px auto;
    min-width: 400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}
.contact-grid .grid-item {
    background: #ACD8FF;
    border: 1px solid #222222;
    box-shadow: #222222 2px 2px 0 0;
    border-radius: 18px;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

/* Work pages slider */
.slider {
    position: relative;
    width: 60%;
    overflow: hidden;
    background: #ACD8FF;
    border: 1px solid #222222;
    box-shadow: #222222 2px 2px 0 0;
    border-radius: 18px;
    min-height: 60px;
    display: block;
    font-weight: 500;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    gap: 0.5rem;
    transition: box-shadow 0.3s, border-radius 0.3s, transform 0.3s, filter 0.3s;
}

.slider:hover, .slider:focus-within {
    background: #73BEFF;
    box-shadow: 0 8px 32px rgba(34,34,34,0.18), #222222 2px 2px 0 0;
    border-radius: 28px;
    transform: scale(1.025) translateY(-2px);
    filter: brightness(1.04) drop-shadow(0 2px 8px #acd8ff88);
}

.slider-link {
    flex: 1 1 0;
    text-align: center;
    padding: 1rem 0.5rem;
    color: #222222;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: 0.2s, color 0.2s;
    font-family: var(--font-sans);
}
.slider-link.active {
    background: #73BEFF;
    color: #fff;
    cursor: default;
    pointer-events: none;
}
.slider-link:hover, .slider-link:focus {
    background: #73BEFF;
    color: #fff;
}


/* Media Queries */


@media (max-width: 1024px) {
        .titlebtn {
            gap: 0.5rem;
            margin-top: 0.75rem;
            transition: all 0.3s ease;
        }
        .btn {
            padding: 0.7rem 1.1rem;
            font-size: 1.1rem;
            transition: all 0.3s ease;
        }
    .title {
        margin: 12px auto;
        padding: 8px 8px;
        width: 98%;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        transition: all 0.3s ease;
    }
    .title-details img {
        order: 2;
        margin-top: 1rem;
        width: 100%;
        max-width: 550px;
        align-self: center;
        transition: all 0.3s ease;
    }   
    .title-details-about img {
        order: 2;
        margin-top: 1rem;
        width: 100%;
        max-width: 550px;
        align-self: center;
        transition: all 0.3s ease;
    }   
    .contact-grid {
        order: 2;
        width: 100%;
        margin-top: 1.5rem;
        padding: 1rem 0.5rem;
        gap: 2rem;
    }
    .contact-grid .grid-item {
        min-height: 120px;
    }

    .title-right {
        order: 1;
        width: 100%;
        max-width: 550px;
        display: flex;
        justify-content: center;
        transition: all 0.3s ease;
    }
    .work-grid-updates.grid1 {
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: repeat(1, 1fr);
        gap: 2rem;
        min-height: unset;
        width: 500px;
        padding: 1rem 0.5rem;
        transition: all 0.3s ease;
    }
    .work-grid-updates.grid1 .grid-item {
        min-width: 200px;
    }

}


@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }
    nav {
        padding: 1rem 1rem;
        align-items: flex-start;
        transition: all 0.3s ease;
    }
    .slider {
        width: 85%;
        transition: all 0.3s ease;
    }
    section {
        margin: 24px auto 16px auto;
        padding: 12px;
    }
    .info-grid {
        margin: 12px auto 24px auto;
        gap: 0.75rem;
        width: 98%;
    }
    footer {
        margin: 8px auto;
        padding: 8px 0;
        width: 98%;
    }
    .about-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(8, 1fr);
        gap: 2rem;
        column-gap: 0;
        min-height: unset;
        padding: 1rem 0.5rem;
    }
    .about-grid .grid-item {
        min-height: 150px;
    }
    .about-grid .grid-item:nth-child(1),
    .about-grid .grid-item:nth-child(2) {
        min-height: 200px;
    }
    .work-grid-updates {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 2rem;
        min-height: unset;
        padding: 1rem 0.5rem;
        transition: all 0.3s ease;
    }
    .work-grid-updates .grid-item {
        min-height: 200px;
    }

    .work-grid-updates.grid1 {
        min-height: unset;
        min-width: 250px;
        width: 100%;
        padding: 1rem 0.5rem;
        transition: all 0.3s ease;
    }

        .contact-grid {
            width: 100%;
            margin-top: 1.5rem;
            padding: 1rem 0.5rem;
            gap: 2rem;
        }
        .contact-grid .grid-item {
            min-height: 120px;
        }

        .title-details {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
        .title-details img {
            max-width: 450px;
            order: 2;
            margin-top: 1rem;
            width: 100%;
            max-width: 550px;
            align-self: center;
        }   
        .title-details-about img {
            order: 2;
            margin-top: 1rem;
            width: 100%;
            max-width: 450px;
            align-self: center;
        }   
        .work-title {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }

        .title-right {
            width: 100%;
            max-width: 450px;
        }
    }

@media (max-width: 520px) {
    body {
        font-size: 0.9rem;
    }
    .slider {
        width: 100%;
        min-height: 40px;
    }
    section {
        margin: 12px auto 8px auto;
        padding: 6px;
    }
    .title {
        margin: 6px auto;
        padding: 4px 4px;
        width: 100%;
    }
    .work-title {
        margin: 6px auto;
        padding: 4px 4px;
        width: 100%;
    }
    .title-right {
        width: 100%;
        max-width: 350px;
    }
    .info-grid {
        margin: 6px auto 12px auto;
        gap: 0.3rem;
        width: 100%;
    }
    footer {
        margin: 4px auto;
        padding: 4px 0;
        width: 100%;
    }
    .about-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(8, 1fr);
        column-gap: 0;
        min-height: unset;
        padding: 0.5rem 0.25rem;
    }
    .about-grid .grid-item {
        min-height: 100px;
        font-size: 0.95rem;
    }
    .about-grid .grid-item:nth-child(1),
    .about-grid .grid-item:nth-child(2) {
        min-height: 120px;
    }
    .work-grid-updates.grid1 {
        min-height: unset;
        width: 250px;
        transition: all 0.3s ease;
    }
        .titlebtn {
            gap: 0.3rem;
            margin-top: 0.5rem;
        }
        .btn {
            padding: 0.5rem 0.7rem;
            font-size: 0.95rem;
        }
}



/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeInAnim 1.2s ease forwards;
}
@keyframes fadeInAnim {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(40px);
    opacity: 0;
    animation: slideUpAnim 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
@keyframes slideUpAnim {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in {
    opacity: 0;
    transform: translateX(-60px);
    animation: slideInGrid 0.9s cubic-bezier(0.23, 1, 0.32, 1) 0.1s forwards;
}
@keyframes slideInGrid {
    to {
        opacity: 1;
        transform: none;
    }
}