html {
    scroll-behavior: smooth;
}

article {   
    max-width: 680px;
    margin: auto;
    padding: 1em;
}

hr {
    border-color: maroon;
}

#title {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: maroon;
    font-size: 42px;
    font-weight: 700;
    margin: 0.15em 0;
    margin-top: 1.25em;
}

#subtitle {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #7a7a7a;
    font-size: 22px;
    margin: 0 0;
    margin-bottom: 0.85em;
}

#inkers {
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

#date {
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    color: #585858;
}

@media screen and (max-width: 600px) {
    #title {
        font-size: 32px;
    }

    #subtitle {
        font-size: 20px;
    }

    #article-info {
        flex-direction: column;
    }

    #article-info-divider {
        display: none;
    }

    #date {
        margin-top: 0.5em;
    }
}

@media screen and (max-width: 440px) {
    #media:has(> :nth-child(6)) a:nth-child(5)::after {
        font-size: 21px !important;
    }
}

#article-info {
    display: flex;
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #242424;
    margin-bottom: 1.25em;
}

#article-info a {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #242424;
    text-decoration: none;
}

#article-info a:hover {
    text-decoration: underline;
}

#article-info-divider {
    margin: 0 0.5em;
}

#media {
    height: 400px;
    width: 100%;
    margin: 0 0 1em 0;
    display: grid;
    gap: 4px;
    grid-auto-flow: row; 
    cursor: pointer;
}

#media a {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

#media a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#media:has(> :nth-child(1):last-child) {
    grid-template-rows: 1fr;
}

#media:has(> :nth-child(2):last-child) {
    grid-template-columns: 1fr 1fr;
}

#media:has(> :nth-child(3):last-child) {
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
}
#media:has(> :nth-child(3):last-child) a:first-child {
    grid-row: span 2;
}

#media:has(> :nth-child(4):last-child) {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

#media:has(> :nth-child(n+5)) {
    grid-template-rows: 1fr 1fr;
    grid-template-columns: repeat(6, 1fr);
}

#media:has(> :nth-child(n+5)) a:nth-child(-n+2) {
    grid-column: span 3;
}

#media:has(> :nth-child(n+5)) a:nth-child(n+3):nth-child(-n+5) {
    grid-column: span 2;
}

#media a:nth-child(n+6) {
    display: none;
}

#media a[data-pswp-type="video"] {
    position: relative;
}

#media a[data-pswp-type="video"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
    z-index: 1;
}

#media a[data-pswp-type="video"]:hover::after {
    background: rgba(0, 0, 0, 0.5);
}


#media a[data-pswp-type="video"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

#media a[data-pswp-type="video"]:hover::before {
    transform: translate(-50%, -50%) scale(1.15); 
    background-color: rgba(0, 0, 0, 0.8);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#media:has(> :nth-child(6)) a:nth-child(5)::after {
    content: "+" attr(data-count);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 1.5rem;
}

#media:has(> :nth-child(6)) a:nth-child(5)::before {
    display: none;
}

#main {
    font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
    color: #242424;
    font-size: 18px;
}

#main p {
    margin: 0;
    line-height: 1.7;
    margin-bottom: 1.8em;
    overflow-wrap: anywhere;
}

#main a {
    font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
    color: #242424;
    font-size: 18px;
}

#inkers-on-duty {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

#inkers-on-duty > a {
    text-decoration: none;
}

.inkers {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 1em 0.5em;
    box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 1px, rgba(0, 0, 0, 0.07) 0px 2px 2px, rgba(0, 0, 0, 0.07) 0px 4px 4px, rgba(0, 0, 0, 0.07) 0px 8px 8px, rgba(0, 0, 0, 0.07) 0px 16px 16px;
}

.inkers:hover {
    animation: 0.25s ease 0s grow;
    animation-fill-mode: forwards;
}

.inkers:not(:hover) {
    animation: 0.25s ease 0s shrink;
    animation-fill-mode: forwards;
}

.inkers > div > h3 {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #353535;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

.inkers > div > p {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #7a7a7a;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    margin-left: 1px;
}

.inkers > img {
    max-width: 55px;
    border-radius: 100%;
}

@keyframes grow {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

@keyframes shrink {
    0% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

#footer-title {
    color: maroon;
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 28px;
    margin-bottom: 0.25em;
}

#footer-buttons {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px 0;
}

#fb-footer-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    color: #1877F2;
    border: 1px solid #1877F2; /* Professional outline style */
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#fb-footer-button:hover {
    background-color: #1877F2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.2);
}
