/* 
*
*   hoyikto.com
*   common.css - Global styles
*
*/

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
    font-size: inherit;
    box-sizing: border-box;
}

/* ----------------------------------------- */
/* Common element defaults */
/* ----------------------------------------- */
html {
    width: 100%;
    height: 100%;
    font-family: "Times New Roman", Times, serif; 
    font-size: 14px;
    font-weight: 400;
}

body {
    width: 100%;
    min-width: 1000px;
    max-width: 1400px;
    min-height: 100vh;
    margin: auto;
    /* Added 250px right padding so text does not slide under the new fixed header */
    padding: 20px 250px 6rem 6rem;
}

strong, h1 {
    font-weight: normal;
}

button { 
    all: unset; 
}

em { 
    all: unset; 
    font-style: italic; 
    font-weight: inherit; 
}

a, a:visited, a:active { 
    color: inherit; 
    word-break: break-all; 
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* ----------------------------------------- */
/* Global Navigation (Right-Aligned) */
/* ----------------------------------------- */
header {
    position: fixed;
    top: 4rem;
    right: 4rem;
    width: auto;
    font-size: 1rem;
    line-height: 1.5em;
    text-align: right;
    z-index: 1000;
}

header h1, 
header nav {
    margin: 0;
    padding: 0;
    width: auto;
}

header h1 {
    margin-bottom: 1.5em;
}

header li {
    display: block; /* Stacks the links vertically */
    margin: 0 0 0.5em 0;
}

/* HOYIKTO title interaction */
h1 > a { 
    color: #000; 
    opacity: 0.5; 
    transition: opacity 0.2s ease; 
}

h1 > a:hover { 
    opacity: 1; 
}

/* Link Hover and Active State Highlight */
a:hover, 
a.active {
    color: #900; /* Highlights active and hovered links in red */
    opacity: 1;
}

/* ----------------------------------------- */
/* Common Contents */
/* ----------------------------------------- */
main { 
    /* Removed the 300px left offset so your content aligns normally */
    padding-left: 0; 
    min-height: calc(90dvh - 1rem); 
}

main > h1 { 
    font-size: 35px;
    letter-spacing: 0.02em; 
    line-height: 1.1em; 
    height: fit-content;
    min-height: 100px;
    padding-bottom: 1rem;
}

main > nav {
    width: 100%;
    height: fit-content;
    min-height: 100px;
    padding-bottom: 1rem;
}

main > article {
    line-height: 1.7em;
    padding-bottom: 2rem;
}

main > article h2 { 
    font-weight: normal; 
}

main > article p { 
    margin-bottom: 1.5em; 
}

main > article a:not(:has(> img)) { 
    opacity: 0.5; 
    transition: opacity 0.1s ease; 
}

main > article a:hover { 
    opacity: 1; 
}

footer {
    width: 100%; 
    padding-left: 0; 
}

footer > small { 
    display: inline-block; 
    width: 100%;
    height: 1rem; 
    text-align: left; 
    font-size: 0.7rem; 
}

/* Common Responsive */
.pc { display: inherit; }
.mobile { display: none; }

/* ----------------------------------------- */
/* Mobile */
/* ----------------------------------------- */
@media screen and (max-width: 960px) {
    body { 
        width: 100%; 
        min-width: inherit; 
        max-width: inherit; 
        padding: 2rem 1rem; 
    }
    
    header { 
        position: static; /* Un-fixes the header for mobile */
        text-align: center;
        margin-bottom: 2rem;
    }
    
    header h1, header nav { 
        text-align: center; 
    }
    
    main { padding-left: 0; padding-right: 0; }
    main > h1 { font-size: 28px; min-width: inherit; }
    main > nav { height: 100px; }
    main > article { width: 100%; }
    
    footer { padding-left: 0; }
    footer > small { width: 100%; padding-left: 0; }
    
    .pc { display: none; }
    .mobile { display: inherit; }
}