/* Style format:
class {
    display/positioning
    margin/padding
    size
    color/background/border
    effects
}

/* Base stuff */
:root {
    --paper: #ffebd0;
    --text: rgba(0, 0, 0, 0.9);
    --link: rgba(255, 82, 180, 0.4);
}
html {
    background: url("../images/wood_texture.jpg"),
                radial-gradient(circle at bottom right, rgba(26, 40, 76, 0.5), rgba(0, 0, 0, 0) 100%);
    background-blend-mode: overlay;
    background-size: contain;
    background-attachment: scroll;
}
body {
    overflow-x: hidden;
}

/* Global text stuff */
/* Fonts */
@font-face {
    font-family: "Park Lane";
    font-weight: 100;
    src: url("../fonts/Park Lane NF.ttf");
}
@font-face {
    font-family: "Gochi Hand";
    src: url("../fonts/GochiHand-Regular.ttf");
}
@font-face {
    font-family: "Garamond";
    font-weight: 500;
    font-style: normal;
    src: url("../fonts/EBGaramond[wght].ttf");
}
@font-face {
    font-family: "Garamond";
    font-weight: 500;
    font-style: italic;
    src: url("../fonts/EBGaramond-Italic[wght].ttf");
}
@font-face {
    font-family: "Bebas Neue";
    src: url("../fonts/BebasNeue-Regular.ttf");
}
/* Anchor */
a {
    color: var(--text);
    transition: filter 0.25s ease;
}
a:hover {
    /*background-color: rgba(255, 82, 180, 0.4);
    transition: filter 0.25s ease;*/
    animation-name: highlight;
    animation-duration: 0.25s;
    animation-fill-mode: forwards;
    background-size: 200%;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 50%, transparent 50%), 
                      linear-gradient(to right, transparent 50%, var(--link) 50%);
}
@keyframes highlight {
    from {
      background-position: 0;
    }

    to {
      background-position: -100%;
    }
}

/* Positioning utility classes */
.centertext {
    text-align: center;
}
.centerblock {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Lighting effect */
.lighting {
    position: absolute;
    padding: 0;
    margin: 0;
    top: 0;
    left: 0;

    width: 100%;
    height: 150%;

    background: radial-gradient(circle at top left, rgba(255, 230, 187, 0.6), rgba(0, 0, 0, 0) 60%);
    mix-blend-mode: screen;
    pointer-events: none;
}

/* Body flex container */
.flex {
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;

    max-width: 800px;
}

/* Header section */
.pageHeader {
    display: flex;
    flex-wrap: wrap;

    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;

    width: 100%;
    
    filter: drop-shadow(3px 3px 5px var(--text));
}
.pageHeader img {
    width: 100%;
    height: auto;
}
/* Postcard */
.pageHeader .postcard {
    position: relative;
    flex-basis: calc(73% - 15px);

    transform: rotate(1.5deg);
}
.pageHeader .postcard .postcardBase {
    position: relative;
}
.pageHeader .postcard .postcardText {
    position: absolute;
    top: 0;
    left: 0;
}
/* Navigation */
/* Paper sheet (desktop) */
.pageHeader .navPaper {
    display: flex;
    position: relative;
    align-items: end;
    flex-basis: 27%;
    
    font-family: "Gochi Hand";
    transform: rotate(1deg);
}
.pageHeader .navPaper .navText {
    position: absolute;
    bottom: 18px;
    left: 20%;
    
    font-size: 1.5em;
}
.pageHeader .navPaper .navText p {
    margin: 3px auto;
}
/* Paper slips (mobile) */
.pageHeader .navSlips {
    display: none;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    column-gap: 5px;

    width: 100%;

    font-family: "Gochi Hand";
}
.pageHeader .navSlips .navSlip {
    position: relative;
}
.pageHeader .navSlips .navSlip img {
    position: relative;
}
.pageHeader .navSlips .navSlip p {
    position: absolute;
    
    margin: 0;
    
    top: 0;

    font-size: 1.2em;
}
.pageHeader .navSlips .home {
    flex-basis: 80px;
}
.pageHeader .navSlips .home p {
    left: 21px;
    top: 4px;
    
    transform: rotate(4deg);
}
.pageHeader .navSlips .blog {
    flex-basis: 82px;
}
.pageHeader .navSlips .blog p {
    left: 25px;
    top: 3px;
    
    transform: rotate(4deg);
}
.pageHeader .navSlips .projects {
    flex-basis: 85px;
}
.pageHeader .navSlips .projects p {
    left: 17px;
    top: 3px;
    
    transform: rotate(3deg);
}
.pageHeader .navSlips .works {
    flex-basis: 85px;
}
.pageHeader .navSlips .works p {
    left: 22px;
    top: 1.5px;
    
    transform: rotate(-1.5deg);
}
.pageHeader .navSlips .services {
    flex-basis: 102px;
}
.pageHeader .navSlips .services p {
    left: 27px;
    top: 1px;
    
    transform: rotate(-0.5deg);
}
.pageHeader .navSlips .contact {
    flex-basis: 82px;
}
.pageHeader .navSlips .contact p {
    left: 15px;
    top: 3.5px;
    
    transform: rotate(4deg);
}

/* Main content section */
.mainContent {
    display: grid;
    grid-template-rows: auto 1fr auto;
    margin-bottom: 20px;
    padding: 15px 22px 10px;

    aspect-ratio: 0.65;

    color: var(--text);
    background: var(--paper);
    filter: drop-shadow(3px 3px 5px var(--text));
    font-family: "Garamond";
}
.mainContent p:not(.dateline, footer p) {
    margin: 10px auto;
}
.mainContent img {
    filter: grayscale(60%) sepia(40%);
    transition: filter 0.25s;
}
.pSection:hover img {
    filter: none;
    transition: filter 0.25s;
}
hr {
    margin: 0px auto;

    border: 0;
    border-top: 3px solid var(--text);
}
/* Title stuff */
header,
footer {
    margin: 0 3px;
}
.masthead {
    text-align: center;
    
    margin: 0px auto;
    
    font-size: 6em;
    font-weight: 100;

    font-family: "Park Lane";
}
.dateline,
footer p {
    margin: 5px auto;

    width: 100%;
    text-align: center;
}
.dateline .left,
footer p .left {
    float: left;
}
.dateline .right,
footer p .right {
    float: right;
}
/* Article content */
.news > *:not(.splitHalf) {
    margin: 0 3px;
        /* Scary: This gives the newspaper page a 25px total side margin, with a 22px mainContent
        padding and a 3px article content margin. This is a very jank solution to allow update links
        to display an outline box on hover that appears to bleed into the page margins. There may
        be a better way to do this but I have yet to discover it after multiple hours of work. */
}
.headline {
    margin: 10px auto;

    font-weight: 100;

    font-family: "Bebas Neue";
}
article h1 {
    text-align: justify;
    text-align-last: justify;
    text-justify: inter-word;

    font-size: 3.7em;
}
article h2 {
    text-align: center;
    text-align-last: center;

    font-size: 2.5em;
}
article h3 {
    font-size: 1.7em;
}
article hr {
    margin-top: 10px;

    clear: both;
}
.pSection {
    margin-bottom: 10px;
    
    overflow: hidden;
}
.pSection p:first-child {
    margin-top: 0;
}
.splitHalf {
    display: flex;
}
.splitHalf .splitSection {
    flex: 1;
}
.vl {
    margin-top: 5px;
    margin-left: 10px;
    margin-right: 10px;

    width: 3px;

    background-color: var(--text);
}
.shortLine {
    margin-bottom: 10px;

    width: 30%;
}
.responsiveLine {
    display: none;
}
.initialLetter {
    float: left;

    margin-right: 0.4em;

    font-size: 2em;
    
    transform: translate(0.15em, -0.05em) scale(1.5);
}
.imagePlaceholder {
    padding: 0px 10px;

    background-color: var(--text);
    color: var(--paper);
}
/* Updates section */
#updates .update {
    display: block;

    margin: 20px auto;

    width: calc(100% - 6px);
    
    outline: 3px solid transparent;
    transition: outline 0.25s;
}
#updates a:not(.pSection) {
    text-decoration: none;
}
#updates a .headline:after {
    content: " ▸";
}
#updates a:hover .headline {
    animation-name: highlight;
    animation-duration: 0.25s;
    animation-fill-mode: forwards;
    background-size: 200%;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 50%, transparent 50%), 
                      linear-gradient(to right, transparent 50%, var(--link) 50%);
}
#updates a:hover .update {
    outline: 3px solid var(--link);
    transition: outline 0.25s;
}
#updates .preview {
    display: flex;
    align-items: center;
    justify-content: center;
    float: left;
    
    margin-right: 10px;
    
    width: 100px;
    height: 100px;
}

/* Tabletop items */
.tabletop img {
    position: absolute;
    
    filter: drop-shadow(3px 3px 5px var(--text));
}
.tabletop .hover {
    position: absolute;
}
.tabletop .hover img {
    width: 100%;
}
.tabletop .hover .hoverOverlay {
    filter: opacity(0);
    transition: filter 0.25s ease
}
.tabletop .hover:hover .hoverOverlay {
    filter: opacity(1);
    transition: filter 0.25s ease
}

/* Mobile media query */
@media(max-width: 815px) {
    /* Base */
    html {
        font-size: small;
    }
    
    /* Lighting */
    .lighting {
        display: none;
    }
    
    /* Header */
    .pageHeader {
        justify-content: center;
        
        gap: 10px;
        margin-top: 10px;
        margin-bottom: 15px;
    }
    .pageHeader .postcard {
        flex-basis: 98%;
    }
    .pageHeader .navPaper {
        display: none;
    }
    .pageHeader .navSlips {
        display: flex;
    }

    /* Content */
    .mainContent {
        margin-bottom: 0;
        padding-left: 15px;
        padding-right: 15px;
        
        aspect-ratio: 0;
        min-height: calc(155vw - 16px);
    }
    hr {
        border-top: 2px solid var(--text);
    }
    .masthead {
        font-size: 11.5vw;

        text-align: justify;
        text-align-last: justify;
        text-justify: distribute;
    }
    .dateline {
        margin: 2px auto;

        font-size: 0.8em;
    }
    article h1 {
        font-size: 6.8vw;
    }
    article h2 {
        font-size: 6.8vw;
    }
    article h3 {
        font-size: 5vw;
    }
    .splitHalf {
        flex-direction: column;
    }
    .vl {
        display: none;
    }
    .responsiveLine {
        display: inline;
        
        margin-left: auto;
        margin-right: auto;

        width: calc(100% - 6px);
    }

    /* Updates */
    #updates .preview {
        width: 80px;
        height: 80px;
    }
    
    /* Tabletop */
    .tabletop {
        display: none;
    }
}

/* Portrait media query */
@media(orientation: portrait) {
    /* Lighting */
    .lighting {
        height: 100%;
    }
}