:root { --page-gutter: clamp(24px, 5vw, 80px); }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, Helvetica, sans-serif; background: #ffffff; color: #111111; }
nav { padding: 30px var(--page-gutter); display: flex; justify-content: flex-end; align-items: center; }
nav ul { list-style: none; display: flex; gap: 35px; flex-wrap: wrap; }
nav a { text-decoration: none; color: #111111; font-size: 15px; font-weight: 500; transition: opacity 0.2s ease; }
nav a:hover { opacity: 0.5; }

.home-page { min-height: 100svh; display: flex; flex-direction: column; }
.hero { flex: 1; display: flex; align-items: center; padding: 45px var(--page-gutter) 70px; }
.hero > div { width: 100%; }
.hero h1 { font-size: clamp(32px, calc((100vw - 2 * var(--page-gutter)) / 6.5), 200px); line-height: 0.9; font-weight: 700; letter-spacing: -0.035em; }
.hero p { margin-top: 30px; font-size: 18px; line-height: 1.6; letter-spacing: 1px; max-width: none; }
.hero-work-button { display: inline-flex; align-items: center; justify-content: center; margin-top: 30px; min-height: 48px; padding: 14px 28px; border: 1px solid #111111; background: #111111; color: #ffffff; text-decoration: none; font-size: 22px; font-weight: 600; transition: background 0.2s ease; }
.hero-work-button:hover { background: #333333; }
.hero-work-button:focus-visible { outline: 3px solid #185a73; outline-offset: 5px; }

@media (max-width: 800px) {
    :root { --page-gutter: 24px; }
    nav { padding-block: 25px; justify-content: flex-start; }
    nav ul { gap: clamp(12px, 3vw, 18px); }
    nav a { font-size: 13px; }
    .hero { padding-block: 35px 60px; }
    .hero p { margin-top: 24px; font-size: 16px; letter-spacing: 0; max-width: none; }
}

/* =========================
   WORK PAGE
========================= */

.work-header {
    padding: 70px var(--page-gutter);
}

.work-header h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(42px, 11vw, 160px);
    line-height: 0.85;
    letter-spacing: -0.04em;
    font-weight: 700;
    margin: 0 0 30px 0;
}

.work-header p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}


/* PROJECT SECTIONS */

.work-section {
    padding: 0 var(--page-gutter) 100px;
}

.work-section .work-section { padding-inline: 0; }

.section-title {
    margin-bottom: 25px;
}

.section-title h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -1px;
    margin: 0 0 7px 0;
}

.section-title p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    margin: 0;
}


/* IMAGE GRID */

.carousel {
    position: relative;
}

.work-grid {
    --work-columns: 3;
    --work-gap: 18px;
    container-type: inline-size;
    display: flex;
    gap: var(--work-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.work-grid::-webkit-scrollbar {
    display: none;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 40px;
    height: 40px;
    border: 1px solid #dddddd;
    border-radius: 50%;
    background: #ffffff;
    color: #111111;
    cursor: pointer;
}

.left-arrow { left: -20px; }
.right-arrow { right: -20px; }

.arrow:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}

.work-piece {
    flex: 0 0 calc((100% - 36px) / 3);
    width: 100%;
    aspect-ratio: 4 / 5;
    height: calc((100cqw - (var(--work-columns) - 1) * var(--work-gap)) / var(--work-columns) * 5 / 4);
    overflow: hidden;
    cursor: pointer;
    background: #eeeeee;
    scroll-snap-align: start;
}

.work-piece-wide {
    flex: 0 0 auto;
    width: auto;
    aspect-ratio: auto;
    background: transparent;
}

.work-piece-wide img {
    width: auto;
    max-width: none;
    object-fit: contain;
}

.work-piece img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transition: transform 0.4s ease;
}

.work-piece:hover img {
    transform: scale(1.04);
}


/* IMAGE POPUP */

.image-modal {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.9);

    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding: 50px;
    overflow-y: auto;
    color: #ffffff;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease;

    z-index: 9999;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    margin: auto;
}

.modal-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 100px);

    object-fit: contain;
}

.modal-info h2 {
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1;
    margin-bottom: 14px;
    overflow-wrap: anywhere;
}

.modal-category {
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 24px;
}

#modalDescription {
    font-size: 17px;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.modal-details {
    margin-top: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.modal-details div:not([hidden]) {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.modal-details dt { color: #cccccc; }
.modal-details dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 800px) {
    .image-modal { padding: 65px 25px 35px; align-items: flex-start; }
    .modal-content { grid-template-columns: minmax(0, 1fr); gap: 25px; }
    .modal-image img { max-height: 55dvh; }
}

.modal-close {
    position: fixed;

    top: 20px;
    right: 30px;

    border: none;
    background: none;

    color: white;

    font-size: 40px;

    cursor: pointer;
}


/* MOBILE */

@media (max-width: 800px) {

    .work-header {
        padding: 50px var(--page-gutter);
    }

    .work-section {
        padding: 0 var(--page-gutter) 70px;
    }

    .section-title h2 {
        font-size: 30px;
    }

    .work-grid {
        --work-columns: 2;
        --work-gap: 10px;
    }

    .work-piece {
        flex-basis: calc((100% - 10px) / 2);
    }

}


@media (max-width: 500px) {

    .work-grid {
        --work-columns: 1;
    }

    .work-piece {
        flex-basis: 100%;
    }

}

@media (prefers-reduced-motion: reduce) {
    .work-grid { scroll-behavior: auto; }
}

/* =========================
   ABOUT PAGE
========================= */

.about-page {
    padding: 0;
}

.about-page .work-header { padding-bottom: 0; }


/* ABOUT */

.about-heading {
   padding-top: 100px;
    margin-bottom: 120px;
}

.about-heading h1 {
      margin: 0;
    text-align: left;
}


/* LARGE DESCRIPTION */

.about-description {
    margin-bottom: 140px;
}

.about-description h2 {
    margin: 0;
    font-size: clamp(42px, 5.5vw, 80px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
}


/* PARAGRAPH + IMAGE */

.about-content {
    padding: 0 var(--page-gutter) 80px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 100px;
    align-items: start;
}

.about-subheading {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 30px;
}

.about-text p {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    max-width: 600px;
}

.about-image img {
    width: 50%;
    height: auto;
    display: block;
}


/* MOBILE */

@media (max-width: 800px) {

    .about-page {
        padding: 0;
    }

    .about-heading {
        padding-top: 120px;
        margin-bottom: 90px;
    }

    .about-description {
        margin-bottom: 80px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about-text p {
        font-size: 18px;
    }
}

.corner-logo {
    position: fixed;
    right: 0px;
    bottom: 0px;

    width: min(500px, 100vw);
    height: auto;

    opacity: 0.15;

    z-index: 1000;
    pointer-events: none;
}

.contact-details {
    padding: 0 var(--page-gutter) 100px;
    display: grid;
    gap: 48px;
}

.contact-details h2 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #666666;
}

.contact-details a {
    color: #111111;
    font-size: clamp(24px, 4vw, 52px);
    line-height: 1.2;
    text-decoration-thickness: 1px;
    text-underline-offset: 8px;
    overflow-wrap: anywhere;
}

@media (max-width: 800px) {
    .contact-details { padding: 0 var(--page-gutter) 70px; }
}

.resume-intro { padding: 20px var(--page-gutter) 60px; max-width: 950px; }
.resume-intro h2 { font-size: clamp(28px, 5vw, 70px); line-height: 1; letter-spacing: -0.04em; margin-bottom: 30px; }
.resume-intro p { font-size: 18px; line-height: 1.5; max-width: 600px; }
.resume-container { padding: 30px var(--page-gutter) 120px; }
.resume-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 30px; }
.resume-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 14px 22px; border: 1px solid #111111; color: #111111; text-decoration: none; font-size: 14px; font-weight: 600; transition: background 0.2s ease, color 0.2s ease; }
.resume-download { background: #111111; color: #ffffff; }
.resume-download:hover { background: #333333; }
.resume-view:hover { background: #f1f1f1; }
.resume-button:focus-visible, .resume-preview:focus-visible { outline: 3px solid #185a73; outline-offset: 5px; }
.resume-preview { display: block; width: 100%; max-width: 900px; border: 1px solid #dddddd; }
.resume-preview img { display: block; width: 100%; height: auto; }
@media (max-width: 800px) {
    .resume-container { padding-bottom: 80px; }
    .resume-actions { gap: 12px; }
}

/* Show the complete fine art and architectural illustrations. */
.work-piece-art {
    flex: 0 0 auto;
    aspect-ratio: auto;
    width: calc((100cqw - (var(--work-columns) - 1) * var(--work-gap)) / var(--work-columns) * 5 / 4 * var(--art-ratio));
    background: #ffffff;
}
.work-piece-art img { object-fit: contain; }

/* Keep the extracted logos at a smaller, clearer display size. */
.work-piece-logo { background: #ffffff; }
.work-piece-logo img { object-fit: contain; padding: 20%; }

.modal-navigation {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}
.modal-navigation button {
    width: 44px;
    height: 44px;
    border: 1px solid #777;
    border-radius: 50%;
    background: transparent;
    color: white;
    font-size: 20px;
    cursor: pointer;
}
.modal-navigation button:hover { background: #333; }
.modal-navigation button:focus-visible, .modal-close:focus-visible {
    outline: 3px solid white;
    outline-offset: 4px;
}
#modalPosition { color: #ccc; font-size: 14px; }
