/**
 * MTV.PJH.IS Stylesheet
 * Minimal design with subtle refinements
 */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    color: #2c2c2c;
    background: #f8f6f1;
    word-wrap: break-word;
    margin: 0;
    padding: 0 9px;
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
}

.main {
    max-width: 60%;
    min-width: 720px;
    margin: 0 auto;
}

.clear {
    width: 100%;
    clear: both;
    float: none;
    display: block;
    height: 0;
}

/* Header */
.header {
    padding: 1.4rem;
    display: flex;
    align-items: baseline;
    position: sticky;
    top: 0;
    background: #f8f6f1;
    z-index: 100;
    justify-content: space-between;
    margin-bottom: 36px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

#logo {
    color: #2c2c2c;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.01em;
}

#logo:hover {
    opacity: 0.8;
}

.nav {
    display: flex;
    margin: 0;
    align-content: baseline;
    flex-shrink: 0;
}

.nav a {
    margin-left: 1rem;
    font-size: 0.8125rem;
    color: #2c2c2c;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: opacity 0.15s ease;
}

.nav a:hover {
    opacity: 0.6;
}

/* Typography */
h1 {
    font-size: 1.5625rem;
    line-height: 36px;
    font-weight: bold;
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

h1 a {
    color: inherit;
    text-decoration: none;
}

h1 a:hover {
    text-decoration: underline;
}

h2, h3, h4, h5, h6 {
    font-size: 1.0625rem;
    font-weight: bold;
    line-height: 24px;
    margin: 48px 0 24px;
}

p, li {
    position: relative;
    margin: 24px 0;
}

blockquote {
    padding: 0 0 0 1.5em;
    color: #2c2c2c;
    opacity: 0.666;
    margin: 24px 0;
    border-left: 1px solid rgba(44, 44, 44, 0.3);
    font-style: italic;
}

/* Links */
a {
    color: #2c2c2c;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(44, 44, 44, 0.4);
    transition: text-decoration-color 0.15s ease, opacity 0.15s ease;
}

a:hover {
    text-decoration-color: currentColor;
    opacity: 0.7;
}

/* Small text */
.small {
    font-size: 0.8125rem;
    color: #2c2c2c;
    font-weight: 500;
}

/* Entry / Post */
.entry {
    margin: 0 0 120px;
}

.entry h1 {
    margin-top: 0;
}

.date {
    margin-top: 10px;
    text-decoration: none;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Tags */
a.tag {
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

a.tag::before {
    content: "·";
    margin: 0 0.6em 0 0.4em;
}

a.tag:hover {
    opacity: 0.8;
}

/* Video Embeds */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 24px 0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
}

/* Images */
img {
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

/* Horizontal Rule */
hr {
    width: 100%;
    margin: 18px auto;
    border: none;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 72px 0 144px;
    font-size: 0.875rem;
    color: #2c2c2c;
    opacity: 0.5;
}

.pagination a {
    margin: 0 1em;
}

/* Previous/Next Navigation */
.adjacent {
    overflow: hidden;
}

.previousEntry,
.nextEntry {
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.33em;
    width: 48%;
    margin: 1em 0 6em 2%;
    color: #2c2c2c;
    display: block;
    float: left;
}

.previousEntry {
    margin: 1em 2% 6em 0;
}

.previousEntry h5,
.nextEntry h5 {
    margin: 0 0 3px 0;
    font-size: 0.8125rem;
    opacity: 0.5;
}

.previousEntry .title,
.nextEntry .title {
    display: block;
    font-size: 1.156rem;
    line-height: 20px;
    color: #2c2c2c;
}

/* Archives */
.search-form {
    margin: 24px 0;
}

#search {
    font-size: 1.2rem;
    padding: 0.5em 1em 0.5em 2.3em;
    border-radius: 3em;
    width: 100%;
    color: #2c2c2c;
    box-sizing: border-box;
    border: 1px solid rgba(44, 44, 44, 0.33);
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='%232c2c2c' d='M7.99,6.928L5.847,4.784c0.289-0.476,0.458-1.033,0.458-1.63C6.305,1.412,4.895,0,3.152,0 C1.411,0,0,1.412,0,3.154c0,1.741,1.412,3.151,3.153,3.151c0.597,0,1.154-0.169,1.63-0.458l2.145,2.146L7.99,6.928z M1.203,3.154 c0.002-1.077,0.874-1.949,1.951-1.951c1.076,0.002,1.948,0.874,1.949,1.951C5.101,4.23,4.229,5.103,3.153,5.103 C2.075,5.103,1.205,4.23,1.203,3.154z'/></svg>") 1em center/0.8em no-repeat;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#search:focus {
    outline: none;
    border-color: #2c2c2c;
    box-shadow: 0 0 0 2px rgba(44, 44, 44, 0.15);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='%232c2c2c' d='M7.99,6.928L5.847,4.784c0.289-0.476,0.458-1.033,0.458-1.63C6.305,1.412,4.895,0,3.152,0 C1.411,0,0,1.412,0,3.154c0,1.741,1.412,3.151,3.153,3.151c0.597,0,1.154-0.169,1.63-0.458l2.145,2.146L7.99,6.928z M1.203,3.154 c0.002-1.077,0.874-1.949,1.951-1.951c1.076,0.002,1.948,0.874,1.949,1.951C5.101,4.23,4.229,5.103,3.153,5.103 C2.075,5.103,1.205,4.23,1.203,3.154z'/></svg>");
}

#search::placeholder {
    color: #2c2c2c;
    opacity: 0.33;
}

/* Tag Cloud */
.tags-cloud {
    margin: 24px 0;
    line-height: 1.8;
}

.tags-cloud a {
    margin-right: 0.5em;
    text-decoration: none;
}

.tags-cloud a:hover {
    text-decoration: underline;
}

/* Archives List */
.archives-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.archives-list li {
    margin: 0 0 6px 0;
    padding: 0;
}

.archives-list a {
    text-decoration: none;
}

.archives-list a:hover {
    text-decoration: underline;
}

.archives-list .small {
    margin-left: 0.5em;
}

/* Hidden state for search filtering */
.archives-list li.hidden {
    display: none;
}

/* Lists */
ul, ol {
    margin-left: 0;
    padding-left: 0;
    list-style-position: outside;
    margin-bottom: 24px;
}

ul {
    list-style: circle;
}

ul ul, ol ul, ol ol, ul ol {
    margin-left: 1.33em;
    margin-bottom: 0;
}

li {
    margin: 0;
}

/* Code */
code {
    font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    margin: 0;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
    line-height: 24px;
    padding: 2px 4px;
}

pre code {
    display: block;
    padding: 12px 18px;
    background-color: rgba(0, 0, 0, 0.02);
    overflow-x: auto;
}

/* Responsive */
@media screen and (max-width: 976px) {
    .main {
        max-width: 600px;
        min-width: 0;
    }
}

@media screen and (max-width: 730px) {
    .header {
        padding-left: 0;
        padding-right: 0;
        max-width: 600px;
        min-width: 0;
    }

    ul, li {
        margin-left: 24px;
    }

    ul ul, ol ul, ol ol, ul ol {
        margin-left: 0;
    }
}

@media screen and (max-width: 400px) {
    .header {
        margin: 9px auto -12px;
        display: flex;
        flex-direction: column;
        padding: 0.25em 0 1em;
    }

    .header #logo,
    .header .nav {
        margin: 0 0 0.5em 0;
    }

    .nav a {
        margin-left: 0;
        margin-right: 1rem;
    }

    .previousEntry,
    .nextEntry {
        width: 100%;
        float: none;
        margin: 1em 0;
    }
}
