/* =========================
   CONTACT PAGE
   ========================= */

.contact-page {
    min-height: 100vh;
    overflow: hidden;
}

.contact-main {
    width: min(
        calc(100% - (2 * var(--page-padding))),
        var(--content-width)
    );

    min-height: calc(100vh - 70px);
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 3rem 0;
}

/* =========================
   INTRO
   ========================= */

.contact-intro {
    max-width: 650px;
}

.contact-label,
.contact-item-label {
    display: block;

    margin-bottom: 0.75rem;

    font-family: "Roboto Mono", monospace;
    font-size: 1.5rem;

    color: var(--asiimov-orange);
}

.contact-intro h1 {
    margin: 0 0 1rem;

    font-family: "Roboto Condensed", sans-serif;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.9;
    letter-spacing: -0.04em;
}

.contact-intro p {
    max-width: 48ch;

    margin: 0;

    font-size: 1rem;
    line-height: 1.6;
}

/* =========================
   CONTACT GRID
   ========================= */

.contact-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    border-top: 1px solid var(--asiimov-black);
    border-bottom: 1px solid var(--asiimov-black);

    margin-bottom: 1rem;
}

.contact-item {
    min-height: 110px;
    padding: 1.25rem 1.5rem;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    border-right: 1px solid var(--asiimov-black);
}

.contact-item:first-child {
    padding-left: 0;
}

.contact-item:last-child {
    border-right: none;
}

.contact-item-label {
    margin-bottom: 1rem;
}

.contact-item > a:not(.contact-button) {
    color: var(--asiimov-black);

    font-family: "Roboto Mono", monospace;
    font-size: clamp(0.5rem, 1.75vw, 1.5rem);


    text-decoration: none;
}

.contact-item > a:not(.contact-button):hover {
    color: var(--asiimov-orange);
}

/* =========================
   RESUME BUTTON
   ========================= */

.contact-button {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: fit-content;

    padding: 0.65rem 0.8rem;

    background: var(--asiimov-black);
    color: var(--asiimov-white);

    font-family: "Roboto Mono", monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.contact-button span {
    margin-left: 1rem;
    color: var(--asiimov-orange);
}

.contact-button:hover {
    background: var(--asiimov-orange);
    color: var(--asiimov-black);
}

.contact-button:hover span {
    color: var(--asiimov-black);
}

/* ------------------
   SOCIAL LINKS
------------------- */

.contact-socials { 
    display: flex; 
    align-items: center; 
    gap: 2rem; 
} 
    
.contact-socials > .contact-item-label { 
    margin: 0; 
}

.social-links {

    margin-top: auto;

    width:90%;

    display: flex;

    padding-top: 0.25rem;

    flex-direction: row;

    gap: clamp(.75rem, 1.5vw, 1.5rem);

}

.social-links a {

    color: #111;

    opacity: 0.7;

    filter: grayscale(100%);

    font-size: clamp(2rem, 2vw, 4rem);

    transition:
        opacity .2s ease,
        transform .2s ease;

}


.social-links a:hover {

    opacity: 1;

    transform: translateY(-3px);

}

.social-links img {

    color: #111;

    width: clamp(1.25rem, 2vw, 2rem);

    height: clamp(1.25rem, 2vw, 2rem);

    filter: grayscale(100%);

    opacity: 0.7;

}

/* special treatment for substack since diff CDN */
.social-links a .substack-icon {
    width: clamp(2rem, 2vw, 4rem);
    height: clamp(2rem, 2vw, 4rem);

    display: block;

    opacity: 0.9;
    filter: grayscale(100%) brightness(1);
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {

    .contact-page {
        overflow: auto;
    }

    .contact-main {
        min-height: calc(100vh - 60px);
        padding: 2rem 0;
    }

    .contact-intro {
        margin-bottom: 2.5rem;
    }

    .contact-intro h1 {
        font-size: clamp(3.5rem, 16vw, 6rem);
    }

    .contact-details {
        grid-template-columns: 1fr;
    }

    .contact-item,
    .contact-item:first-child {
        min-height: auto;
        padding: 1.25rem 0;
        border-right: none;
        border-bottom: 1px solid var(--asiimov-black);
    }

    .contact-item:last-child {
        border-bottom: none;
    }

    .contact-socials {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .social-links {
        flex-wrap: wrap;
    }
}

/* SQUARES */

/* =========================
   Perimeter Geometry
========================= */


.perimeter-grid {

    position: fixed;

    inset: 0;

    pointer-events: none;

    z-index: 0;

}



.geo-square {

    position: absolute;

}



/* Orange */

.geo-square.orange {

    background: var(--asiimov-orange);
    opacity: .25;
}



/* Black */

.geo-square.black {

    background: var(--asiimov-black);
    opacity: .12;

}



/* =========================
   Perimeter Geometry
========================= */


/* Left side */

.square-one {

    width: clamp(50px, 7vw, 120px);

    aspect-ratio: 1;

    top: 12%;

    left: -30px;

}


.square-five {

    width: clamp(30px, 5vw, 90px);

    aspect-ratio: 1;

    top: 70%;

    left: 3%;

}



/* Right side */

.square-two {

    width: clamp(80px, 10vw, 180px);

    aspect-ratio: 1;

    top: 22%;

    right: -50px;

}


.square-six {

    width: clamp(40px, 6vw, 100px);

    aspect-ratio: 1;

    bottom: 18%;

    right: 2%;

}



/* Lower left accent */

.square-three {

    width: clamp(25px, 4vw, 70px);

    aspect-ratio: 1;

    bottom: 8%;

    left: -10px;

}



/* Upper right accent */

.square-four {

    width: clamp(60px, 8vw, 130px);

    aspect-ratio: 1;

    top: 5%;

    right: 12%;

}



/* Bottom right */

.square-seven {

    width: clamp(35px, 5vw, 80px);

    aspect-ratio: 1;

    bottom: 5%;

    right: 18%;

}



/* Remove this one from center */

.square-eight {

    width: clamp(25px, 4vw, 60px);

    aspect-ratio: 1;

    top: 45%;

    left: auto;

    right: 4%;

}
