/* GENERAL SETTINGS */
:root {
    --brown: #604838;
    --dark: #2d211b;
    --beige: #e8ded3;
    --cream: #f7f4ef;
    --white: #fffdf9;
    --text: #292622;
    --muted: #716b65;
    --line: #ded5cb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: "DM Sans", sans-serif;
    background: var(--white);
    color: var(--text);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

section {
    scroll-margin-top: 20px;
}

h1, h2, .logo {
    font-family: "Playfair Display", serif;
}

.eyebrow {
    color: var(--brown);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    padding: 38px 28px;
    background: var(--dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.logo {
    font-size: 27px;
    line-height: 1.3;
}

.logo span {
    display: block;
    color: #c7b4a3;
    font-family: "DM Sans", sans-serif;
    font-size: 9px;
    letter-spacing: 4px;
    margin-top: 7px;
}

.sidebar-line {
    width: 38px;
    height: 1px;
    background: #8b7563;
    margin: 30px 0 20px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    color: #c9beb4;
    font-size: 13px;
    padding: 7px 0 7px 13px;
    position: relative;
    transition: 0.3s;
}

.nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    border: 1px solid #a18a78;
    border-radius: 50%;
    transform: translateY(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: white;
    padding-left: 18px;
}

.nav-link.active::before {
    background: #d7c2ae;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.social-links a {
    width: 29px;
    height: 29px;
    border: 1px solid #725b4b;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 10px;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--brown);
}

.sidebar-note {
    margin-top: auto;
    font-family: "Playfair Display", serif;
    font-style: italic;
    color: #c9b4a1;
    font-size: 17px;
    line-height: 1.5;
}

/* MAIN LAYOUT */
main {
    margin-left: 220px;
}

.section {
    padding: 75px clamp(30px, 5vw, 75px);
}

h2 {
    font-size: clamp(29px, 3vw, 40px);
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 18px;
}

h2 span {
    color: var(--brown);
}

/* HERO */
.hero {
    min-height: 610px;
    padding: 65px clamp(30px, 5vw, 75px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 25px;
    background: var(--cream);
}

.hero-content {
    max-width: 490px;
}

.hello {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 23px;
    color: var(--brown);
    margin-bottom: -12px;
}

.hero h1 {
    font-size: clamp(48px, 5.5vw, 78px);
    font-weight: 500;
    letter-spacing: -2px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero h1 span {
    color: var(--brown);
}

.hero h3 {
    font-size: 15px;
    margin-bottom: 17px;
}

.description {
    font-size: 14px;
    color: var(--muted);
    max-width: 400px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 12px;
    border: 1px solid var(--brown);
    transition: 0.3s;
}

.btn-dark {
    background: var(--brown);
    color: white;
}

.btn-dark:hover {
    background: var(--dark);
}

.btn-outline {
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--beige);
}

.hero-image {
    min-height: 400px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-shape {
    position: absolute;
    bottom: 0;
    width: 80%;
    height: 95%;
    border-radius: 48% 48% 0 0;
    background: #ded0c3;
}

.profile-photo {
    position: relative;
    z-index: 1;
    width: 76%;
    height: 390px;
    object-fit: cover;
    object-position: center 35%;
    border-radius: 48% 48% 0 0;
    filter: saturate(0.8);
}

.image-quote {
    position: absolute;
    right: -10px;
    top: 22%;
    z-index: 2;
    color: var(--brown);
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 17px;
    transform: rotate(5deg);
}

/* ABOUT */
.about {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 55px;
    background: var(--white);
}

.about-image {
    position: relative;
    padding: 15px 20px 30px 0;
    max-width: 330px;
    width: 100%;
    margin: auto;
}

.about-image::before {
    content: "";
    position: absolute;
    inset: 30px 0 10px 25px;
    background: var(--beige);
}

.about-image img {
    position: relative;
    width: 100%;
    height: 300px;
    object-fit: cover;
    filter: saturate(0.8);
}

.photo-caption {
    position: absolute;
    right: 10px;
    bottom: 0;
    z-index: 2;
    background: var(--white);
    padding: 5px 12px;
    color: var(--brown);
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 13px;
}

.about-content > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 14px;
}

.personal-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.personal-info span {
    font-size: 11px;
    padding-right: 12px;
    border-right: 1px solid var(--line);
}

.personal-info span:last-child {
    border: none;
}

/* SKILLS */
.skills {
    background: #eee7df;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading > p:last-child {
    font-size: 13px;
    color: var(--muted);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.skill-card {
    min-height: 125px;
    padding: 17px 8px;
    background: var(--white);
    border: 1px solid #e5dcd2;
    text-align: center;
    transition: 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px #2d211b12;
}

.skill-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    font-size: 17px;
    font-weight: bold;
}

.html {
    background: #b95e3e;
    color: white;
}

.css {
    background: #397aa8;
    color: white;
}

.js {
    background: #e4c65d;
    color: #272522;
}

.php {
    background: #7775a9;
    color: white;
    border-radius: 50%;
    font-size: 13px;
}

.mysql {
    color: #417a9c;
    font-size: 27px;
}

.skill-card h3 {
    font-size: 12px;
}

.skill-card p {
    color: var(--muted);
    font-size: 10px;
}

/* PROJECTS */
.projects {
    background: var(--cream);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.project-card {
    overflow: hidden;
    border: 1px solid #e3dbd2;
    background: var(--white);
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px #2d211b12;
}

.project-card > img {
    width: 100%;
    height: 165px;
    object-fit: cover;
    background: var(--beige);
}

.project-content {
    padding: 18px;
}

.project-category {
    font-size: 8px;
    letter-spacing: 1px;
    color: #8c7969;
}

.project-content h3 {
    font-family: "Playfair Display", serif;
    font-size: 21px;
    line-height: 1.3;
    margin: 12px 0 8px;
}

.project-content p {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 17px;
}

.project-link {
    color: var(--brown);
    font-weight: 700;
    font-size: 11px;
}

.project-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* CERTIFICATES */
.certificates {
    background: var(--dark);
    color: var(--white);
}

.certificates .eyebrow {
    color: #c5a98f;
}

.certificates .section-heading > p:last-child {
    color: #c6b8ab;
}

.certificates-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.certificate-card {
    padding: 9px;
    background: #3a2b23;
    border: 1px solid #705b4b;
}

.certificate-card img {
    width: 100%;
    aspect-ratio: 1.4;
    object-fit: cover;
    background: var(--beige);
}

.certificate-card h3 {
    padding: 10px 2px 3px;
    font-size: 11px;
    text-align: center;
    font-weight: 500;
}

/* EXPERIENCE */
.experience {
    background: var(--white);
}

.timeline {
    border-left: 1px solid var(--line);
    padding-left: 25px;
}

.timeline-item {
    display: flex;
    gap: 17px;
    margin-bottom: 27px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-number {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--beige);
    color: var(--brown);
    font-size: 11px;
}

.timeline-item h3 {
    font-size: 14px;
    margin-bottom: 3px;
}

.timeline-item p {
    color: var(--muted);
    font-size: 12px;
}

.timeline-item small {
    color: #8c7969;
    letter-spacing: 1.5px;
    font-size: 9px;
}

/* CONTACT */
.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    align-items: center;
    background: #eee5dc;
}

.contact h2 {
    font-size: clamp(32px, 4vw, 48px);
}

.contact-intro > p:last-child {
    color: var(--muted);
    font-size: 13px;
}

.contact-details {
    border-top: 1px solid #d6c8ba;
}

.contact-details a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #d6c8ba;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.contact-details a span {
    color: var(--brown);
    font-size: 9px;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}

.contact-details a:hover {
    color: var(--brown);
}

/* FOOTER */
footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 22px 5%;
    background: #211914;
    color: #d5c9bd;
    font-size: 10px;
}

footer a:hover {
    color: white;
}

/* MOBILE HEADER */
.mobile-header,
.mobile-nav {
    display: none;
}

#backToTop {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 200;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--brown);
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* TABLETS */
@media (max-width: 1100px) {
    .sidebar {
        width: 190px;
        padding: 30px 22px;
    }

    main {
        margin-left: 190px;
    }

    .section {
        padding: 55px 30px;
    }

    .hero {
        grid-template-columns: 1fr 1fr;
    }

    .skills-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MOBILE */
@media (max-width: 760px) {
    .sidebar {
        display: none;
    }

    main {
        margin-left: 0;
    }

    .mobile-header {
        position: sticky;
        top: 0;
        z-index: 150;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 13px 22px;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
    }

    .mobile-header > a {
        font-family: "Playfair Display", serif;
        font-size: 23px;
    }

    .mobile-header button {
        padding: 5px 12px;
        background: transparent;
        border: 1px solid var(--line);
        color: var(--dark);
        font-size: 20px;
        cursor: pointer;
    }

    .mobile-nav {
        position: sticky;
        top: 62px;
        z-index: 140;
        display: none;
        grid-template-columns: repeat(2, 1fr);
        padding: 12px 22px;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
    }

    .mobile-nav.open {
        display: grid;
    }

    .mobile-nav a {
        padding: 8px;
        font-size: 12px;
    }

    .mobile-nav a:hover {
        background: var(--beige);
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 35px;
    }

    .hero-image {
        grid-row: 1;
        min-height: 310px;
    }

    .profile-photo {
        height: 300px;
        width: 65%;
    }

    .image-shape {
        height: 95%;
        width: 70%;
    }

    .image-quote {
        right: 2%;
    }

    .hero h1 {
        font-size: 58px;
    }

    .about {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image {
        width: 80%;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .project-card > img {
        height: 220px;
    }

    .contact {
        grid-template-columns: 1fr;
    }
}

/* SMALL PHONES */
@media (max-width: 480px) {
    .section {
        padding: 45px 20px;
    }

    .hero h1 {
        font-size: 49px;
    }

    .hero-buttons {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-card:last-child {
        grid-column: span 2;
    }

    .certificates-container {
        grid-template-columns: 1fr;
    }

    .certificate-card img {
        aspect-ratio: 1.7;
    }

    .personal-info {
        gap: 8px;
    }

    .personal-info span {
        font-size: 10px;
    }

    .contact-details a {
        font-size: 10px;
    }

    footer {
        flex-direction: column;
        gap: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        transition-duration: 0.01ms !important;
    }
}