/*
Theme Name: Deckermax
Theme URI: https://deckermax.com
Author: Max Decker
Author URI: https://deckermax.com
Description: Custom theme for deckermax.com — personal professional site
Version: 1.0.0
Text Domain: deckermax
*/

/* --- Fonts --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(assets/fonts/inter-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(assets/fonts/inter-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(assets/fonts/plus-jakarta-sans-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(assets/fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Custom Properties --- */
:root {
    --color-bg-extra-dark: #25262C;
    --color-bg-dark: #33353D;
    --color-green: #78BE77;
    --color-lime: #A4E347;
    --color-bg-light: #EBEAF1;
    --color-bg-light-alt: #F1F0F5;
    --color-line: #DCDDE8;
    --color-text-light: #FFFFFF;
    --color-text-dark: #161616;
    --color-text-muted: #9a9ba1;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container-width: 1140px;
    --section-padding: 100px 0;
    --section-padding-sm: 60px 0;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text-light);
    background-color: var(--color-bg-extra-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-lime); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-light);
}
h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-green);
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}
.section { padding: var(--section-padding); }
.section--dark { background-color: var(--color-bg-extra-dark); }
.section--darker { background-color: var(--color-bg-dark); }
.section--light {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
}
.section--light h1, .section--light h2, .section--light h3,
.section--light h4, .section--light h5 {
    color: var(--color-text-dark);
}
.section--light h6 { color: var(--color-green); }
.section__label { margin-bottom: 8px; }
.section__title { margin-bottom: 48px; }
.grid { display: grid; gap: 32px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 7px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}
.btn--primary {
    background: linear-gradient(135deg, var(--color-green), var(--color-lime));
    color: var(--color-bg-extra-dark);
}
.btn--primary:hover {
    background: linear-gradient(135deg, var(--color-lime), var(--color-green));
    color: var(--color-bg-extra-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(120, 190, 119, 0.3);
}
.btn--outline {
    border: 1px solid var(--color-green);
    color: var(--color-green);
    background: transparent;
}
.btn--outline:hover {
    background: var(--color-green);
    color: var(--color-bg-extra-dark);
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(37, 38, 44, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(220, 221, 232, 0.08);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.site-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-decoration: none;
}
.site-logo:hover { color: var(--color-text-light); }
.site-logo span { color: var(--color-green); }
.nav-list {
    display: flex;
    align-items: center;
    gap: 36px;
}
.nav-list a {
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}
.nav-list a:hover,
.nav-list a[aria-current="page"] { color: var(--color-green); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 3px;
}
.lang-switcher li { list-style: none; }
.lang-switcher a {
    display: block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-radius: 4px;
    transition: all 0.2s;
}
.lang-switcher .current-lang a,
.lang-switcher a:hover {
    color: var(--color-text-light);
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-light);
    transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero --- */
.hero {
    padding: 160px 0 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero__label {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}
.hero__title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 8px;
    line-height: 1.1;
}
.hero__title span { color: var(--color-green); }
.hero__subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    line-height: 1.4;
}
.hero__cta { margin-top: 8px; }
.hero__image { text-align: right; }
.hero__image img {
    max-width: 420px;
    width: 100%;
    border-radius: 16px;
}

/* --- Pillars --- */
.pillar-card {
    background: var(--color-bg-dark);
    border-radius: 12px;
    padding: 40px 32px;
    border: 1px solid rgba(220, 221, 232, 0.06);
    transition: transform 0.3s, border-color 0.3s;
}
.pillar-card:hover {
    transform: translateY(-4px);
    border-color: rgba(120, 190, 119, 0.2);
}
.pillar-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-green), var(--color-lime));
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 1.4rem;
}
.pillar-card__title {
    font-size: 1.2rem;
    margin-bottom: 12px;
}
.pillar-card__text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Project Cards --- */
.project-card {
    background: var(--color-bg-dark);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(220, 221, 232, 0.06);
    transition: transform 0.3s, border-color 0.3s;
}
.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(120, 190, 119, 0.2);
}
.project-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.project-card__body { padding: 28px; }
.project-card__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-green);
    margin-bottom: 8px;
}
.project-card__title {
    font-size: 1.2rem;
    margin-bottom: 12px;
}
.project-card__text {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}
.project-card__result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-lime);
}

/* --- Post Cards (Blog) --- */
.post-card {
    background: var(--color-bg-dark);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(220, 221, 232, 0.06);
    transition: transform 0.3s, border-color 0.3s;
}
.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(120, 190, 119, 0.2);
}
.post-card a { color: inherit; text-decoration: none; }
.post-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.post-card__body { padding: 24px; }
.post-card__date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.post-card__title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.3;
}
.post-card__excerpt {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}
.post-card__read-more {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-green);
}
.post-card__read-more:hover { color: var(--color-lime); }

/* --- Blog Listing (home.php) --- */
.blog-header { margin-bottom: 48px; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(220, 221, 232, 0.1);
    color: var(--color-text-light);
    transition: all 0.2s;
}
.pagination a:hover {
    background: var(--color-green);
    color: var(--color-bg-extra-dark);
    border-color: var(--color-green);
}
.pagination .current {
    background: var(--color-green);
    color: var(--color-bg-extra-dark);
    border-color: var(--color-green);
}

/* --- Single Post --- */
.post-header {
    padding: 140px 0 60px;
    text-align: center;
}
.post-header__date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}
.post-header__title { margin-bottom: 16px; }
.post-header__excerpt {
    max-width: 640px;
    margin: 0 auto;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}
.post-content {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 80px;
}
.post-content p { margin-bottom: 1.5em; }
.post-content h2 { margin: 2em 0 0.8em; }
.post-content h3 { margin: 1.8em 0 0.6em; }
.post-content ul, .post-content ol {
    margin: 1em 0 1.5em 1.5em;
    list-style: disc;
}
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.4em; }
.post-content blockquote {
    border-left: 3px solid var(--color-green);
    padding: 16px 24px;
    margin: 1.5em 0;
    background: rgba(120, 190, 119, 0.05);
    border-radius: 0 8px 8px 0;
    color: var(--color-text-muted);
    font-style: italic;
}
.post-content code {
    background: var(--color-bg-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.post-content pre {
    background: var(--color-bg-dark);
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}
.post-content pre code { background: none; padding: 0; }
.post-content img {
    border-radius: 8px;
    margin: 1.5em 0;
}
.post-content a { text-decoration: underline; text-underline-offset: 2px; }

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 28px;
    background: var(--color-bg-dark);
    border-radius: 12px;
    border: 1px solid rgba(220, 221, 232, 0.06);
}
.contact-item__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-green), var(--color-lime));
    border-radius: 10px;
    font-size: 1.2rem;
}
.contact-item__label {
    font-weight: 600;
    margin-bottom: 4px;
}
.contact-item__value {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}
.contact-item__value a { color: var(--color-text-muted); }
.contact-item__value a:hover { color: var(--color-green); }

/* --- Page (generic) --- */
.page-header {
    padding: 140px 0 40px;
    text-align: center;
}
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 80px;
}
.page-content p { margin-bottom: 1.2em; }
.page-content h2 { margin: 1.8em 0 0.6em; }
.page-content h3 { margin: 1.5em 0 0.5em; }
.page-content ul, .page-content ol {
    margin: 1em 0 1.5em 1.5em;
    list-style: disc;
}
.page-content ol { list-style: decimal; }
.page-content a { text-decoration: underline; text-underline-offset: 2px; }

/* --- Projects Page --- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }

/* --- 404 --- */
.error-404 {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.error-404__code {
    font-size: 8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--color-bg-dark);
    line-height: 1;
}
.error-404 h1 { margin: 16px 0; }
.error-404 p {
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid rgba(220, 221, 232, 0.08);
    padding: 40px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-copy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.footer-nav {
    display: flex;
    gap: 24px;
}
.footer-nav a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.footer-nav a:hover { color: var(--color-green); }
.footer-contact {
    display: flex;
    gap: 20px;
}
.footer-contact a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.footer-contact a:hover { color: var(--color-green); }

/* --- Utilities --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.text-center { text-align: center; }
.text-green { color: var(--color-green); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* --- Responsive --- */
@media (max-width: 968px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero__image { text-align: center; order: -1; }
    .hero__image img { max-width: 280px; margin: 0 auto; }
    .grid--3 { grid-template-columns: 1fr; }
    .grid--2 { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .section { padding: var(--section-padding-sm); }
    .hero { padding: 120px 0 60px; min-height: auto; }
}

@media (max-width: 768px) {
    .site-header nav .nav-list {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #25262C;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        z-index: 9999;
        margin: 0;
        padding: 0;
    }
    .site-header nav .nav-list.active { display: flex; }
    .site-header nav .nav-list a { font-size: 1.5rem; color: #fff; }
    .site-header nav .nav-list a:hover { color: var(--color-green); }
    .site-header nav .nav-list li { list-style: none; text-align: center; }
    .menu-toggle { z-index: 10000; }
    .menu-toggle { display: flex; }
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero__title { font-size: 2rem; }
    .pillar-card { padding: 28px 20px; }
}
