/* ==========================================
   ZNEISH PORTFOLIO STYLES
========================================== */

/* 1. VARIABLES & THEMING */
:root {
    --bg: #f5f3ed;
    --white: #ffffff;
    --text: #20231f;
    --muted: #6f746b;
    --primary: #65765a;
    --primary-dark: #4f6046;
    --border: #dedfd8;
    --shadow: 0 20px 45px rgba(30, 35, 28, .08);
    --radius: 18px;
}

body.dark {
    --bg: #171916;
    --card: #20231f;
    --text: #f1f0e8;
    --nav: #171916;
    --border: #343832;
    --primary: #b7c9a8;
    --primary-dark: #9fb58d;
    --muted: #a7aaa0;
}

/* 2. RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Instrument Sans", sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

img {
    max-width: 100%;
    display: block;
}

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

ul {
    list-style: none;
}

/* 3. LAYOUT & CONTAINERS */
.shell {
    width: min(1180px, 92%);
    margin: auto;
}

.section {
    padding: 100px 0;
    background: transparent;
}

.rule {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* 4. TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Bricolage Grotesque", sans-serif;
    color: var(--text);
    font-weight: 700;
}

h1 {
    font-size: clamp(46px, 7vw, 74px);
    line-height: 1.1;
}

h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

h3 {
    font-size: 24px;
}

p {
    color: var(--muted);
}

.eyebrow {
    font-family: "IBM Plex Mono", monospace;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 13px;
    margin-bottom: 15px;
}

.lead {
    font-size: 20px;
    max-width: 650px;
}

/* 5. NAVIGATION */
.nav {
    background: var(--nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    transition: background 0.4s ease;
}

.navbar-brand {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 30px;
    font-weight: bold;
    color: var(--text) !important;
}

.nav-link {
    color: var(--text) !important;
    font-weight: 600;
    margin-left: 18px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary) !important;
}
.nav-link.active {
    color: var(--primary) !important;
    font-weight: 700;
}

.nav-link.active::after {
    background: var(--primary);
}

/* 6. HERO & PORTRAIT */
.hero {
    background: var(--bg);
    padding: 120px 0 80px;
}

.hero h1 span {
    color: var(--primary);
}

.portrait {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 30px;
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
}

.portrait img {
    width: 380px;
    height: 380px;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
    transition: transform 0.5s ease;
}

.portrait:hover img {
    transform: scale(1.04) rotate(-1deg);
}

/* 7. BUTTONS */
.theme-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    cursor: pointer;
    background: var(--card);
    color: var(--text);
    font-size: 18px;
    transition: .3s;
    margin-left: 18px;
}

.theme-btn:hover {
    background: var(--primary);
    color: var(--bg);
    transform: rotate(180deg);
}

.btn {
    border-radius: 999px;
    padding: 14px 28px;
    font-weight: 600;
    transition: transform 0.35s ease, background 0.35s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-ink {
    background: var(--primary);
    color: #fff;
}

.btn-ink:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

.btn-ghost {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--border);
    transform: translateY(-4px);
}

/* 8. SECTIONS & CARDS */
.about-box {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.work-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, padding-left 0.3s ease;
}

.work-row:hover {
    transform: translateY(-6px);
    padding-left: 30px;
}

.work-row .year {
    color: var(--primary);
    font-weight: 700;
}

.work-row .title {
    font-size: 22px;
    font-weight: 700;
}

.work-row .kind {
    color: var(--muted);
}

.post-card {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .15);
}

.thumb {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .thumb {
    transform: scale(1.05);
}

.post-card .body {
    padding: 30px;
}

.post-card h3 {
    margin-bottom: 15px;
}

.meta {
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 10px;
}

/* 9. SKILLS & BLOG */
.skill {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    margin: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

.skill:hover {
    background: var(--primary);
    color: #ffffff;
}

.more {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary);
    font-weight: 600;
}

.article {
    max-width: 900px;
    margin: auto;
}

.article-hero {
    margin: 40px 0;
    border-radius: 24px;
    overflow: hidden;
}

/* 10. FORMS & FOOTER */
.form-control {
    border-radius: 14px;
    padding: 15px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary);
}

footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 80px;
    color: var(--text);
    transition: letter-spacing 0.3s ease;
}

footer:hover {
    letter-spacing: 1px;
}

.foot {
    color: var(--muted);
}

/* 11. MEDIA QUERIES */
@media (max-width: 991px) {
    .hero {
        text-align: center;
    }

    .portrait {
        margin-top: 40px;
    }

    .work-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section {
        padding: 70px 0;
    }

    h2 {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 28px;
    }

    .hero {
        padding: 80px 0;
    }

    h1 {
        font-size: 42px;
    }

    .btn {
        width: 100%;
        margin-bottom: 12px;
    }

    .d-flex.gap-3 {
        flex-direction: column;
    }
}

.dropdown-menu {
    border-radius: 15px;
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .1);
}

.dropdown-item {
    padding: 10px 18px;
    transition: .3s;
}

.dropdown-item:hover {
    background: var(--primary);
    color: #fff;
}