/* ── CSS VARIABLES ── */
:root {
    --bg: #f5f5f3;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0ee;
    --surface: #ebebea;
    --surface2: #e2e2df;
    --text: #1a1a18;
    --text-muted: #6b6b68;
    --text-faint: #a0a09d;
    --border: #e0e0dc;
    --green: #3a8a65;
    --green-light: #52b788;
    --green-pale: #eaf7ee;
    --green-glow: rgba(58, 138, 101, 0.1);
    --nav-bg: rgba(245, 245, 243, 0.88);
    --modal-overlay-bg: rgba(20, 20, 18, 0.5);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --hero-bck: url(../IMGS/003.png);
    --bg-card-dummy: rgba(234, 234, 234, 0.5);
    --border-dummy: rgba(215, 215, 215, 0.5);
    --blue2: rgba(20, 120, 205, 1);
    --blue3: rgba(207, 231, 252, 1);
}

[data-theme="dark"] {
    --bg: #111110;
    --bg-card: #1c1c1a;
    --bg-card-hover: #242422;
    --surface: #222220;
    --surface2: #2a2a28;
    --text: #f0f0ee;
    --text-muted: #9a9a97;
    --text-faint: #5a5a58;
    --border: #2e2e2c;
    --green: #52b788;
    --green-light: #74c69d;
    --green-pale: #1b3a2d;
    --green-glow: rgba(82, 183, 136, 0.1);
    --nav-bg: rgba(17, 17, 16, 0.88);
    --modal-overlay-bg: rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --hero-bck: url(../IMGS/004.png);
    --bg-card-dummy: rgba(24, 24, 24, 0.5);
    --border-dummy: rgba(38, 38, 38, 0.5);
    --blue2: rgba(20, 120, 205, 1);
    --blue3: rgba(251, 251, 251, 0.5);
}

/* ── RESET ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Geist', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* ── SCROLL PROGRESS ── */
.scroll-progress {
    position: fixed;
    top: 64px;
    left: 0;
    height: 2px;
    background: var(--green);
    width: 0%;
    z-index: 101;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── NAV ── */
nav.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 64px;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    letter-spacing: -0.03em;
    text-decoration: none;
}

.logo span {
    color: var(--green);
    padding-left: 2px;
}

.nav-link {
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-faint);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 100px;
    border: 1.5px solid var(--green);
    background: transparent;
    color: var(--green);
    font-family: 'Geist', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.btn-contact:hover {
    background: var(--green);
    color: #fff;
}

.btn-cv {
    white-space: nowrap;
    margin-left: 2%;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
    font-size: 1rem;
}

.theme-toggle:hover {
    border-color: var(--green);
    color: var(--green);
}

/* ── HERO ── */
.hero {
    padding: 160px 0 0;
    background-image: var(--hero-bck);
    background-repeat: repeat;
}

.hero-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 28px;
    max-width: 720px;
}

.hero h1 em {
    font-style: italic;
    color: var(--green);
}

.hero-bio {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 82%;
    margin-bottom: 40px;
}

.hero-divider {
    margin-top: 72px;
    border: none;
    border-top: 1px solid var(--border);
}

.btn-linkedin,
.access-granted a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    background: var(--green);
    color: #fff;
    font-family: 'Geist', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px var(--green-glow);
}


.btn-linkedin:hover,
.access-granted a:hover {
    background: var(--green-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--green-glow);
}

/* ── WORKS SECTION ── */
.works-section {
    max-width: 1480px;
    margin: 0 auto;
    padding: 80px 40px 64px;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}

.section-title {
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    letter-spacing: -0.03em;
    color: var(--text);
}

.top-space {
    margin-top: 64px;
}

/* ── WORKS GRID ── */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ── CARDS ── */
.work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
    position: relative;
    text-decoration: none;
    display: block;
}

.dummy-div {
    background: var(--bg-card-dummy);
    border: 1px solid var(--border-dummy);
    border-radius: 16px;
    overflow: hidden;
    display: block;
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--green);
}

.work-card.full-width {
    grid-column: span 3;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 250px;
}

.work-card.full-width .card-thumb-placeholder {
    width: 420px;
    min-width: 420px;
    height: 100%;
    aspect-ratio: unset;
    flex-shrink: 0;
    border-radius: 0;
}

.work-card.full-width .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px 36px;
}

.work-card.full-width .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.work-card.full-width .card-desc {
    font-size: 0.92rem;
}

.card-thumb-placeholder {
    width: 100%;
    margin-bottom: 12px;
    border-radius: 16px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
    background-size: cover !important;
    background: linear-gradient(135deg, #b7deca 0%, #74c69d 100%);
}

.card-thumb-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(255, 255, 255, 0.04));
}

/* ── CARD THUMBNAILS ── */
.thumb-grad-1,
[data-theme="dark"] .thumb-grad-1 {
    background-image: url(../IMGS/906.png);
}

.thumb-grad-2,
[data-theme="dark"] .thumb-grad-2 {
    background: url(../IMGS/904.png) center/cover no-repeat;
}

.thumb-grad-3,
[data-theme="dark"] .thumb-grad-3 {
    background: url(../IMGS/905.png) center/cover no-repeat;
}

.thumb-grad-4,
[data-theme="dark"] .thumb-grad-4 {
    background: url(../IMGS/theme4.png) center/cover no-repeat;
}

.thumb-grad-5,
[data-theme="dark"] .thumb-grad-5 {
    background: url(../IMGS/907.png) center/cover no-repeat;
}

.thumb-grad-6,
[data-theme="dark"] .thumb-grad-6 {
    background: url(../IMGS/913.png) center/cover no-repeat;
}

.thumb-grad-7,
[data-theme="dark"] .thumb-grad-7 {
    background: url(../IMGS/908.png) center/cover no-repeat;
}

.thumb-grad-8,
[data-theme="dark"] .thumb-grad-8 {
    background: url(../IMGS/909.png) center/cover no-repeat;
}

.thumb-grad-9,
[data-theme="dark"] .thumb-grad-9 {
    background: url(../IMGS/910.png) center/cover no-repeat;
}

.thumb-grad-10,
[data-theme="dark"] .thumb-grad-10 {
    background: url(../IMGS/911.png) center/cover no-repeat;
}

.thumb-grad-11,
[data-theme="dark"] .thumb-grad-11 {
    background: url(../IMGS/912.png) center/cover no-repeat;
}

/* Dark mode overrides only where image differs from light */
[data-theme="dark"] .card-thumb-placeholder {
    /*background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);*/
}

.lock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    color: #fff;
    border-radius: 100px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.thumb-locked {
    filter: blur(12px);
    transform: scale(1.05);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.card-body {
    padding: 20px 22px 28px;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    margin-left: -2px;
}

.card-tag {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-pale);
    padding: 4px 10px;
    border-radius: 100px;
}

.card-tag-date {
    color: var(--text-faint);
    background: var(--surface);
    text-transform: none;
    letter-spacing: 0.02em;
}

.card-title {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.025em;
    color: var(--text);
    margin: 6px 0;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── PASSWORD FORM (legacy — hidden) ── */
.pw-form-wrap {
    display: none;
}

/* ── PASSWORD UNLOCK BUTTON ── */
.pw-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 11px 22px;
    border-radius: 100px;
    border: 1.5px solid var(--green);
    background: transparent;
    color: var(--green);
    font-family: 'Geist', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    align-self: flex-start;
}

.pw-submit:hover {
    background: var(--green);
    color: #fff;
}

.pw-error {
    font-size: 0.75rem;
    color: #e05252;
}

.access-granted {
    padding: 24px;
    background: var(--green-pale);
    /*border-top: 1px solid var(--border);*/
    display: flex;
    border-radius: 12px;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
}

.access-granted p {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green);
}

.access-granted a {
    font-size: 0.9rem;
    font-weight: 700;
    /*color: var(--text);*/
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.access-granted a:hover {
    /*color: var(--green);*/
}

.logout-link {
    font-size: 0.72rem;
    color: var(--text-faint);
    text-decoration: none;
    /*text-transform: uppercase;*/
    letter-spacing: 0.08em;
    margin-top: 4px;
    transition: color 0.2s;
    background: var(--text-muted) !important;
}

.logout-link:hover {
    color: var(--text-faint);
    background-color: var(--border) !important;
}

/* ── MODALS ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay-bg);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.contact-modal {
    display: none;
}

.contact-modal.open {
    display: flex;
}

#passwordModal {
    display: none;
}

#passwordModal.open {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px);
    transition: transform 0.25s;
}

.modal-overlay.open .modal-box {
    transform: translateY(0);
}

.modal-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.modal-box h3 {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 6px;
}

.modal-box p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.contact-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: 'Geist', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: var(--green);
}

textarea.modal-input {
    resize: vertical;
    min-height: 100px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.btn-primary {
    flex: 1;
    padding: 11px;
    border-radius: 10px;
    border: none;
    background: var(--green);
    color: #fff;
    font-family: 'Geist', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--green-light);
}

.btn-ghost {
    padding: 11px 18px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-family: 'Geist', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.success-msg {
    display: none;
    text-align: center;
    padding: 16px 0;
}

.success-msg .checkmark {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.success-msg h4 {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 6px;
}

.success-msg p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ── FOOTER ── */
.site-footer-wrap {
    border-top: 1px solid var(--border);
    width: 100%;
}

.site-footer {
    padding: 40px;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    letter-spacing: -0.03em;
    text-decoration: none;
}

.footer-logo-text span {
    color: var(--green);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-faint);
    margin: 2px 0 0 8px;
}

.site-footer > div {
    display: flex;
}

.footer-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--green);
}

.footer-links button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Geist', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s;
    padding: 0;
}

.footer-links button:hover {
    color: var(--green);
}

/* ── ANIMATIONS ── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in:nth-child(1) {
    animation-delay: 0.05s;
}

.fade-in:nth-child(2) {
    animation-delay: 0.15s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.25s;
}

/* ── RESPONSIVE ── */
@media (max-width: 1255px) {
    .hero-wrap {
        margin-left: 4%;
        margin-right: 4%;
    }
}




@media (max-width: 900px) {
    .hero-wrap {
        /*max-width: 800px;*/
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .work-card.full-width {
        grid-column: span 2;
        flex-direction: column;
    }

    .work-card.full-width .card-thumb-placeholder {
        width: 100%;
        min-width: 300px;
        height: 100%;
        aspect-ratio: 16/9;
        flex: auto;
    }

    .card-thumb-placeholder {
        margin-bottom: 0;
    }

    .card-body {
        border-top: 2px solid var(--border);
    }

    #second-dummy {
        display: none;
    }

}


@media (max-width: 768px) {

    .logo {
        font-size: 0.8em;
        line-height: 14px;
    }

    nav.main-nav {
        padding: 0 20px;
    }

    .hero {
        padding: 140px 24px 32px;
    }

    .works-section {
        padding: 60px 24px 80px;
    }

    #first-grid {
        gap: 48px;
    }

    .site-footer {
        padding: 32px 24px;
    }

    .site-footer {
        padding: 32px 24px;
    }

}

@media (max-width: 560px) {
    .logo svg {
        display: none;
    }


    nav.main-nav {
        padding: 0 16px;
        height: 56px;
    }

    .scroll-progress {
        top: 56px;
    }

    .hero {
        padding: 96px 24px 24px;
    }

    .hero-divider {
        margin-top: 48px;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .hero-bio {
        font-size: 0.92rem;
        max-width: 100%;
    }

    .fade-in {
        width: 100%;
        display: inline-grid;
    }

    .fade-in > a {
        text-align: center;
        margin: 0 auto;
    }

    .pw-submit {
        margin: 0 auto;
        display: block !important;
    }

    .works-section {
        padding: 32px 16px 72px;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .work-card.full-width {
        grid-column: span 1;
        flex-direction: column;
    }

    .work-card {
        min-height: 200px;
    }

    .card-title {
        padding-top: 16px;
    }

    .card-body {
        /*min-height: 200px;*/
        border-top-width: 0;
        display: inline-block !important;
        padding-bottom: 32px;
    }

    .card-thumb-placeholder {
        border-radius: 4px;
    }

    .work-card.full-width .card-body {
        padding: 16px;
    }

    .site-footer {
        padding: 24px 16px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .modal-box {
        padding: 28px 20px;
    }

    .dummy-div {
        display: none;
    }
}
