@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --green: #188653;
    --deep: #123d2b;
    --mint: #eaf7ef;
    --ink: #193328;
    --muted: #6d8176;
    --line: #e1ebe5;
    --white: #fff;
    --shadow: 0 14px 38px rgba(25,75,49,.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fbfdfb;
    color: var(--ink);
    font-family: 'DM Sans', Arial, sans-serif;
    line-height: 1.65;
}

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

.container {
    max-width: 1160px;
    margin: auto;
    padding: 0 24px;
}

/* HEADER */

.site-header {
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
}

.nav-wrap {
    max-width: 1160px;
    margin: auto;
    padding: 13px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.1;
}

.brand-mark {
    background: var(--green);
    color: #fff;
    border-radius: 11px;
    padding: 12px 10px;
    font-size: 17px;
}

.brand-accent {
    color: var(--green);
}

.brand small {
    display: block;
    font-size: 9px;
    letter-spacing: .14em;
    color: var(--muted);
    font-weight: 700;
    margin-top: 5px;
}

.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}

.main-nav a:hover,
.text-link {
    color: var(--green);
}

.admin-nav {
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 8px;
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 24px;
}

/* HERO */

.hero {
    margin: 44px 0 70px;
    padding: 60px;
    border-radius: 26px;
    background: linear-gradient(120deg,#e9f8ef,#f5fbf7 58%,#e4f4eb);
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 35px;
    overflow: hidden;
}

.eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    color: var(--green);
}

h1, h2, h3 {
    font-family: Manrope,'DM Sans',sans-serif;
    line-height: 1.2;
    margin-top: 0;
}

.hero h1 {
    font-size: clamp(38px,5vw,60px);
    letter-spacing: -.045em;
    margin: 17px 0;
}

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

.hero-copy > p,
.page-hero p {
    color: #63776b;
    max-width: 570px;
    font-size: 17px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 27px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    padding: 12px 18px;
    font: 700 14px 'DM Sans',sans-serif;
    cursor: pointer;
}

.btn-primary {
    background: var(--green);
    color: white;
}

.btn-primary:hover {
    background: #116d42;
}

.btn-light {
    background: white;
    color: var(--deep);
    border: 1px solid var(--line);
}

.btn-danger {
    background: #b83232;
    color: white;
}

.full {
    width: 100%;
}

/* CODE WINDOW */

.hero-art {
    display: flex;
    justify-content: center;
}

.code-window {
    width: min(100%,390px);
    background: #102c21;
    color: #d7f4e2;
    border-radius: 17px;
    padding: 20px 22px;
    box-shadow: 0 24px 55px #143d2b35;
    transform: rotate(2deg);
}

.window-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 22px;
}

.window-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #64b889;
}

.window-dots i:nth-child(2) {
    background: #e9c56a;
}

.window-dots i:nth-child(3) {
    background: #d77c78;
}

.code-window pre {
    font: 14px/2 monospace;
    white-space: pre-wrap;
}

.code-purple {
    color: #d4a7ff;
}

.code-blue {
    color: #85d7ff;
}

.code-tag {
    color: #77d99e;
    font: 12px monospace;
}

/* SECTIONS */

.section {
    margin: 65px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.section-heading h2 {
    font-size: 30px;
    margin: 6px 0 0;
}

.text-link {
    font-size: 14px;
    font-weight: 700;
}

/* PROJECTS */

.project-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 22px;
}

.project-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(22,70,43,.035);
    transition: .2s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.cover-link {
    display: block;
}

.project-cover,
.cover-placeholder {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.cover-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg,#e7f6ed,#d7efe1);
    color: var(--green);
    font-size: 42px;
    font-weight: 800;
}

.project-card-body {
    padding: 20px;
}

.project-card h3 {
    font-size: 19px;
    margin: 8px 0;
}

.project-card p {
    color: var(--muted);
    font-size: 14px;
    min-height: 44px;
}

.meta {
    font-size: 12px;
    color: var(--muted);
}

/* OTHER PAGES */

.page-hero {
    text-align: center;
    padding: 65px 10px 30px;
}

.page-hero h1 {
    font-size: clamp(34px,5vw,48px);
    margin: 10px 0;
}

.page-hero p {
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 680px;
    margin: 20px auto 35px;
}

.search-form input {
    flex: 1;
}

.search-form input,
input,
textarea,
select {
    font: inherit;
    border: 1px solid #d7e3db;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    width: 100%;
    color: var(--ink);
}

label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin: 16px 0;
}

label input,
label textarea,
label select {
    display: block;
    margin-top: 7px;
}

.empty-state {
    text-align: center;
    background: #f2f8f4;
    border: 1px dashed #c8ddcf;
    border-radius: 15px;
    padding: 45px 20px;
    margin: 30px 0;
}

.empty-state p {
    color: var(--muted);
}

/* CTA */

.cta-strip {
    background: #eaf7ef;
    border-radius: 18px;
    padding: 30px 35px;
    margin: 65px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cta-strip h2 {
    margin: 6px 0 0;
}

/* FOOTER */

.site-footer {
    margin-top: 80px;
    background: #102f22;
    color: #e6f3eb;
}

.footer-inner {
    max-width: 1160px;
    margin: auto;
    padding: 35px 24px;
}

.footer-brand {
    color: white;
}

.footer-brand .brand-mark {
    background: #2c9d67;
}

.footer-inner p,
.footer-inner small {
    color: #b5cbbd;
}

/* DETAIL PAGE */

.detail {
    max-width: 850px;
    margin: 35px auto 70px;
}

.back-link {
    display: inline-block;
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
}

.detail-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 30px;
}

.detail-content h1 {
    font-size: 42px;
    margin: 10px 0;
}

.detail-summary {
    font-size: 18px;
    color: var(--muted);
}

.prose {
    white-space: normal;
    margin: 28px 0;
    font-size: 16px;
}

.download-btn {
    margin-top: 10px;
}

.about-content {
    max-width: 760px;
    margin: 25px auto 80px;
}

/* FORMS AND ADMIN */

.auth-card,
.form-card {
    max-width: 600px;
    margin: 55px auto;
    padding: 32px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.auth-card h1,
.form-card h1 {
    margin: 8px 0 22px;
}

.alert {
    background: #fff0ef;
    color: #a12b22;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
}

.admin-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 45px 0 25px;
}

.admin-heading h1 {
    margin: 7px 0;
}

.stats-grid {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}

.stat-card {
    background: #eaf7ef;
    padding: 20px 25px;
    border-radius: 12px;
    min-width: 150px;
}

.stat-card strong {
    display: block;
    font-size: 30px;
    color: var(--green);
}

.stat-card span {
    font-size: 13px;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 60px;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}

th,
td {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

th {
    background: #f4faf6;
}

.status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 20px;
    background: #f1f3f2;
}

.status-published {
    background: #e5f7ec;
    color: #167846;
}

.status-draft {
    background: #fff4df;
    color: #94600a;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 9px;
}

.check-label input {
    width: auto;
    margin: 0;
}

/* =========================================
   HOMEPAGE WATERMARK
   Only appears when index.php includes
   .home-watermark inside the homepage main
========================================= */

main.container:has(.home-watermark) {
    position: relative;
    isolation: isolate;
}

/* Watermark text */

.home-watermark {
    position: absolute;
    top: 330px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;

    z-index: 0;
    pointer-events: none;
    user-select: none;

    text-align: center;
    white-space: nowrap;
    overflow: hidden;

    font-family: 'Manrope', sans-serif;
    font-size: clamp(40px, 9vw, 125px);
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1.2;

    color: rgba(24, 134, 83, 0.075);
}

/* Keep homepage content above watermark */

.home-watermark ~ * {
    position: relative;
    z-index: 1;
}

/* RESPONSIVE */

@media(max-width:800px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 38px 28px;
    }

    .hero-art {
        display: none;
    }

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

    .main-nav {
        gap: 16px;
    }

    .home-watermark {
        top: 300px;
        font-size: clamp(35px, 9vw, 75px);
        letter-spacing: -2px;
    }
}

@media(max-width:600px) {
    .container {
        padding: 0 16px;
    }

    .nav-wrap {
        padding: 12px 16px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 18px 24px;
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav.open {
        display: flex;
    }

    .hero {
        margin: 25px 0 45px;
        padding: 34px 23px;
    }

    .hero h1 {
        font-size: 39px;
    }

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

    .section-heading,
    .cta-strip,
    .admin-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading h2 {
        font-size: 25px;
    }

    .search-form {
        flex-wrap: wrap;
    }

    .search-form input {
        flex-basis: 100%;
    }

    .detail-content h1 {
        font-size: 34px;
    }

    .auth-card,
    .form-card {
        padding: 23px 18px;
        margin: 30px auto;
    }

    .stats-grid {
        flex-wrap: wrap;
    }

    .home-watermark {
        top: 290px;
        font-size: 31px;
        letter-spacing: -1px;
    }
}
/* Homepage Creator Watermark */
main.container:has(.home-watermark) {
    position: relative;
    isolation: isolate;
}

.home-watermark {
    position: absolute;
    top: 300px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(38px, 9vw, 125px);
    font-weight: 800;
    letter-spacing: -3px;
    color: rgba(24, 134, 83, 0.09);
}

main.container:has(.home-watermark) > *:not(.home-watermark) {
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .home-watermark {
        font-size: 10vw;
        letter-spacing: -1px;
    }
}
/* Erfanullah Ahmadi - Homepage Only Watermark */

main.container:has(.home-watermark) {
    position: relative;
    isolation: isolate;
}

.home-watermark {
    position: absolute;
    top: 300px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    text-align: center;

    font-family: 'Manrope', sans-serif;
    font-size: clamp(42px, 9vw, 125px);
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1.2;

    color: rgba(24, 134, 83, 0.075);
}

main.container:has(.home-watermark) > *:not(.home-watermark) {
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .home-watermark {
        top: 250px;
        font-size: 10vw;
        letter-spacing: -1px;
    }
}