*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body{
    background-color: #e7dfd8;
    font-family: 'Agrandir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #281f15;
}

@font-face {
    font-family: 'Agrandir';
    src: url('fonts/Agrandir-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.hidden {
    display: none !important;
}

.menu{
    display: flex;
    justify-content: center;
    align-items: center;
    width: min(80%, 1400px);
    margin: 2.5rem auto;
}

.nav-links{
    list-style-type: none;
    display: flex;
    flex: 1;
    justify-content: space-evenly;
}

.nav-links li a {
    color: #281f15;
    text-decoration: none;
    font-size: clamp(1rem, 1.5vw, 1.875rem);
    position: relative;
    transition: color 0.3s ease;
    font-weight: bold;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 0.1875rem;
    bottom: -0.25rem;
    left: 0;
    background-color: #654f3a;
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links li a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-links li a:hover {
    color: #654f3a;
}

.nav-links li a.current {
    color: #281f15 !important;
}

.nav-links li a.current::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 0.1875rem;
    bottom: -0.25rem;
    left: 50%;
    background-color: #8b7d71;
    transform: translateX(-50%) scaleX(1);
    transform-origin: center;
    max-width: 3.75rem;
    min-width: 1.875rem;
}

.content{
    width: min(80%, 1400px);
    margin: 4rem auto;
    display: flex;
    border: 0.125rem solid #b7a99e;
    padding: clamp(1.5rem, 3vw, 3.125rem);
    justify-content: space-between;
    gap: 2rem;
}

.content-text{
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.about-text p {
    margin-bottom: 1em;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.content-image {
    flex: 0 0 auto;
    padding: 0 0 0 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}
.about-img-mobile {
    display: none;
}

.content-image img {
    width: clamp(8rem, 16vw, 18rem);
    height: auto;
    object-fit: contain;
    border: 0.25rem solid #b7a99e;
    display: block;
}

.content-text h1{
    font-size: clamp(1.5rem, 3vw, 3.125rem);
    margin-bottom: 0.5em;
}

.content-text p{
    font-size: clamp(0.9rem, 1.4vw, 1.875rem);
    line-height: 1.6;
}

.contact-text ul {
    list-style: none;
    padding-left: 0;
}

.contact-icon {
    width: 2rem;
    height: 2rem;
    vertical-align: middle;
    margin-right: 0.625rem;
    flex-shrink: 0;
}

.contact-text ul li {
    display: flex;
    align-items: center;
    margin-bottom: 0.9375rem;
}

.contact-text ul li:last-child {
    margin-bottom: 0;
}

.contact-text ul li a {
    color: #281f15;
    font-size: clamp(0.9rem, 1.4vw, 1.875rem);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.3s ease;
    cursor: pointer;
    word-break: break-word;
}

.contact-text ul li a:hover {
    color: #654f3a;
}

.awards-text p {
    margin-bottom: 1.5em;
}

.awards-text p:last-child {
    margin-bottom: 0;
}

.education-text p.year{
    font-weight: bold;
}

.education-block {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 0.125rem solid #b7a99e;
}

.education-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #281f15;
}

.nav-links li {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
    .content, .menu {
        width: 95%;
    }
    .menu {
        padding: 0;
        margin: 0.75rem auto 0.25rem;
        flex-direction: column;
        align-items: flex-start;
        position: relative;
    }
    .content {
        padding: 1.5rem;
        margin: 0.25rem auto 1rem;
        gap: 1rem;
    }
    .content-text h1 {
        font-size: 1.75rem;
    }
    .content-text p,
    .contact-text ul li a {
        font-size: 1rem;
        line-height: 1.5;
    }
    .nav-toggle {
        display: block;
    }
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding: 1rem 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav-links li a {
        font-size: 1rem;
    }
    .nav-links.open {
        max-height: 20rem;
    }
    .nav-links li {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    .nav-links.open li {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .content, .menu {
        width: 95%;
    }
    .nav-toggle {
        font-size: 2.25rem;
    }
    .nav-links {
        padding: 0;
    }
    .nav-links li {
        text-align: right;
        position: relative;
    }

    .nav-links li:first-child {
        margin-top: 0.5rem;
    }

    .nav-links li:last-child {
        margin-bottom: 0.5rem;
    }

    .nav-links li a {
        font-size: 1.25rem;
    }

    .nav-links li a.current::after {
        width: 0.1875rem;
        height: 1rem;
        left: -0.75rem;
        top: 0;
        bottom: auto;
        transform: none;
        max-width: unset;
        min-width: unset;
        background-color: #8b7d71;
    }

    .nav-links li a::after {
        transition: none;
    }

    .menu {
        padding: 0;
        margin: 0.25rem 0.5rem 0.25rem auto;
        align-items: flex-end;
    }
    .content {
        padding: 1rem;
        margin: 0.25rem auto 0.5rem;
        border-width: 0.0625rem;
    }
    .content-image {
        display: none;
    }
    .about-img-mobile {
        display: block;
        float: right;
        width: 7rem;
        border: 0.125rem solid #b7a99e;
        margin-left: 0.75rem;
        margin-bottom: 0.5rem;
    }
    .content-text {
        display: block;
    }
    .content-text h1 {
        font-size: 1.5rem;
    }
    .content-text p,
    .contact-text ul li a {
        font-size: 1rem;
        line-height: 1.4;
    }
    .contact-text ul li {
        margin-bottom: 0.5rem;
    }
    .education-block {
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        border-bottom-width: 0.0625rem;
    }
}

@media (max-width: 360px) {
    .contact-text ul li a {
        font-size: 0.875rem;
    }
}

@media (hover: none) {
    .nav-links li a:hover::after {
        transform: scaleX(0);
    }
    .nav-links li a:hover {
        color: #281f15;
    }
}