/* ============================================================ 0. Tokens */
:root {
    --background: #c9d400;
    --foreground: #373737;
    --page: #ffffff;
    --muted-foreground: #666666;
    --nav: #111111;
    --nav-foreground: #eeeeee;
    --nav-hover: #f9f9f9;
    --nav-hover-foreground: #373737;
    --link: #1982d1;
    --border: #dddddd;
    --primary: #1982d1;
    --primary-foreground: #ffffff;

    --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --gutter: 7.6%;
}

/* ============================================================ 1. Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--background);
    background-image: url("../images/bg.png");
    background-repeat: repeat;
    background-position: left top;
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.625;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover,
a:focus,
a:active {
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #111111;
    font-weight: bold;
    line-height: 1.3;
    margin: 0 0 0.6em;
}

ul,
ol {
    margin: 0 0 1.625em;
    padding-left: 1.5em;
}

p {
    margin: 0 0 1.625em;
}

/* ============================================================ 2. Accessibility */
.skip-link.screen-reader-text {
    position: fixed;
    top: -100px;
    left: 0;
    z-index: 1000000;
    padding: 0.75em 1.2em;
    background: var(--nav);
    color: var(--nav-foreground);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    overflow: hidden;
    position: absolute !important;
    word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
    top: 0;
    left: 0;
    clip: auto;
    clip-path: none;
    height: auto;
    width: auto;
}

/* ============================================================ 3. Page card */
body {
    padding: 2rem 1rem;
}

#page.site {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--page);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

/* ============================================================ 4. Header / branding / hero */
.site-branding {
    padding: 1.5rem var(--gutter) 0;
}

.hero-link {
    display: block;
    line-height: 0;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================================ 5. Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, #252525, #0a0a0a);
    color: var(--nav-foreground);
}

.main-navigation .menu-toggle {
    display: none;
}

.main-navigation ul#primary-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 calc(var(--gutter) - 0.6em);
    font-size: 12px;
}

.main-navigation ul#primary-menu li {
    position: relative;
    flex-shrink: 0;
}

.main-navigation ul#primary-menu > li > a {
    display: block;
    color: var(--nav-foreground);
    line-height: 3.333em;
    padding: 0 0.75em;
    white-space: nowrap;
    text-decoration: none;
}

.main-navigation ul#primary-menu > li > a:hover,
.main-navigation ul#primary-menu > li > a:focus {
    background: var(--nav-hover);
    color: var(--nav-hover-foreground);
    text-decoration: none;
}

.main-navigation ul#primary-menu > li.current-menu-item > a {
    font-weight: bold;
}

.main-navigation .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 240px;
    background: var(--nav-hover);
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
    z-index: 20;
    display: none;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu,
.main-navigation .menu-item-has-children.focus > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    border-bottom: 1px dotted var(--border);
}

.main-navigation .sub-menu li:last-child {
    border-bottom: 0;
}

.main-navigation .sub-menu a {
    display: block;
    color: #444444;
    padding: 0.6em 1.2125em;
    line-height: 1.4;
    text-decoration: none;
}

.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu a:focus {
    background: #efefef;
    text-decoration: none;
}

.lang-switcher {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
    gap: 5px;
    padding: 0 calc(var(--gutter) - 0.6em) 0 0.4em;
}

.lang-switch {
    display: block;
    line-height: 0;
    opacity: 0.7;
}

.lang-switch:hover,
.lang-switch:focus,
.lang-switch.is-active {
    opacity: 1;
    text-decoration: none;
}

.lang-switch img {
    display: block;
    width: 20px;
    height: 12px;
}

/* ============================================================ 6. Content area */
#primary.site-main {
    padding: 2rem var(--gutter);
}

.hentry {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.625em;
    margin-bottom: 1.625em;
}

.hentry:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.entry-header {
    margin-bottom: 1em;
}

.entry-title {
    font-size: 26px;
    line-height: 1.3;
    color: #222222;
}

.entry-title a {
    color: #222222;
}

.entry-title a:hover,
.entry-title a:focus {
    color: var(--link);
    text-decoration: none;
}

.entry-meta {
    font-size: 0.875em;
    color: var(--muted-foreground);
    margin-top: 0.4em;
}

.entry-meta .byline {
    margin-left: 0.5em;
}

.post-thumbnail {
    display: block;
    margin-bottom: 1.625em;
}

.entry-content,
.entry-summary {
    line-height: 1.625;
}

.entry-content > *:last-child,
.entry-summary > *:last-child {
    margin-bottom: 0;
}

.entry-summary .more-link-wrap {
    clear: both;
    margin-top: 1em;
}

.more-link {
    color: var(--link);
    font-weight: 500;
}

.more-link:hover,
.more-link:focus {
    text-decoration: underline;
}

.entry-footer {
    margin-top: 1em;
    font-size: 0.8125em;
    color: var(--muted-foreground);
}

.entry-footer span {
    margin-right: 0.75em;
}

.page-links {
    clear: both;
    margin-top: 1.625em;
}

.page-links a {
    display: inline-block;
    margin: 0 0.25em;
    padding: 0.2em 0.6em;
    border: 1px solid var(--border);
}

/* ============================================================ 7. Core WP image alignment / captions / galleries */
.alignleft {
    float: left;
    margin: 0.3em 1.625em 1.625em 0;
}

.alignright {
    float: right;
    margin: 0.3em 0 1.625em 1.625em;
}

.aligncenter {
    display: block;
    margin: 0 auto 1.625em;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.625em;
}

.wp-caption img {
    display: block;
    margin: 0;
}

.wp-caption-text,
.gallery-caption {
    font-size: 0.8125em;
    color: var(--muted-foreground);
    padding: 0.5em 0;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 1.625em;
}

/* ============================================================ 8. Pagination */
.posts-navigation,
.post-navigation,
.comment-navigation {
    margin-top: 1.625em;
    padding-top: 1.625em;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 1em;
}

.nav-subtitle {
    display: block;
    font-size: 0.75em;
    color: var(--muted-foreground);
    text-transform: uppercase;
}

.nav-title {
    color: var(--link);
}

/* ============================================================ 9. Sidebar / widgets */
#secondary.widget-area {
    margin-top: 2em;
    padding-top: 2em;
    border-top: 1px solid var(--border);
}

.widget {
    margin-bottom: 1.625em;
}

.widget-title {
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.75em;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    border-bottom: 1px dotted var(--border);
    padding: 0.4em 0;
}

/* ============================================================ 10. Forms */
.search-form {
    display: flex;
    gap: 0.5em;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea {
    border: 1px solid var(--border);
    padding: 0.5em 0.75em;
    font-family: inherit;
    font-size: 1em;
    color: var(--foreground);
}

button,
input[type="submit"],
.search-submit {
    background: var(--primary);
    color: var(--primary-foreground);
    border: 0;
    padding: 0.5em 1em;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
}

button:hover,
input[type="submit"]:hover,
.search-submit:hover {
    opacity: 0.9;
}

/* ============================================================ 11. Comments */
.comment-list {
    list-style: none;
    margin: 1.625em 0;
    padding: 0;
}

.comment-list .comment-body {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.2em;
    margin-bottom: 1.2em;
}

.comment-metadata {
    font-size: 0.8125em;
    color: var(--muted-foreground);
}

.comment-form label {
    display: block;
    margin-bottom: 0.3em;
}

.comment-form p {
    margin-bottom: 1em;
}

/* ============================================================ 12. 404 / no results */
.error-404 .page-title,
.no-results .page-title {
    font-size: 26px;
}

.error-404 .widget,
.no-results .widget {
    margin-top: 1.625em;
}

/* ============================================================ 13. Footer */
.site-footer {
    border-top: 1px solid var(--border);
}

.site-footer .site-info {
    padding: 1.5rem var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    font-size: 0.8125em;
    color: var(--muted-foreground);
    text-align: center;
}

.site-footer a {
    color: var(--muted-foreground);
}
