/* =========================================================
   pages.css — footer + Projects, Publications, Contact pages
   Load AFTER style.css on every page (including index.php).
   ========================================================= */

[hidden] { display: none !important; }

/* =========================================================
   FOOTER
   ========================================================= */
.main-footer {
    position: relative;
    overflow: hidden;
    padding: 0;
    color: rgba(255, 255, 255, .8);
    background:
        radial-gradient(circle at 95% 105%, rgba(247, 144, 30, .28), transparent 45%),
        radial-gradient(circle at 0% 0%, rgba(92, 184, 42, .12), transparent 40%),
        var(--forest-d);
}
.main-footer::after {                     /* big faint arc */
    content: "";
    position: absolute;
    right: -180px;
    bottom: -260px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    border: 44px solid rgba(255, 255, 255, .04);
    pointer-events: none;
}
.ft-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.35fr .8fr 1fr 1.1fr;
    gap: 48px;
    padding: 90px 0 64px;
}
.ft-logo { display: inline-block; margin-bottom: 20px; }
.ft-logo img {
    height: 62px;
    padding: 8px 14px;
    background: #fff;
    border-radius: 16px 16px 16px 4px;
}
.ft-about > p { max-width: 36ch; margin-bottom: 26px; line-height: 1.7; }

.ft-contact { display: grid; gap: 14px; }
.ft-contact li { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 14px; }
.ft-contact i {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    font-size: .95rem;
    color: #fff;
    background: var(--c);
    border-radius: 50% 50% 50% 6px;
}
.ft-contact a, .ft-contact span { overflow-wrap: anywhere; }

.ft-col h3 {
    margin-bottom: 24px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.3rem;
    color: #fff;
}
.ft-col h3::after {
    content: "";
    display: block;
    width: 44px;
    height: 5px;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--leaf), var(--sun));
    border-radius: 999px;
}
.ft-col li + li { margin-top: 2px; }
.ft-col li a {
    display: inline-block;
    padding: 7px 0;
    transition: color .25s, transform .3s var(--ease);
}
.ft-col li a:hover { color: var(--sun); transform: translateX(6px); }

.ft-social { display: flex; gap: 12px; margin-top: 26px; }
.ft-social a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #fff;
    background: rgba(255, 255, 255, .09);
    border-radius: 50% 50% 50% 8px;
    transition: background .3s, transform .3s var(--ease);
}
.ft-social a:hover { color: #fff; background: var(--c); transform: translateY(-5px); }

.ft-bottom { position: relative; z-index: 1; padding: 20px 0; background: rgba(0, 0, 0, .25); font-size: .92rem; }
.ft-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.ft-tag { font-family: var(--font-head); font-weight: 600; color: var(--sun); }

/* =========================================================
   PAGE BANNER (inner pages)
   ========================================================= */
.pg-banner {
    position: relative;
    overflow: hidden;
    padding: 76px 0 96px;
    color: #fff;
    background:
        radial-gradient(circle at 10% 120%, rgba(92, 184, 42, .3), transparent 45%),
        var(--forest-d);
    border-radius: 0 0 0 110px;
}
.pg-arc {
    position: absolute;
    right: -6%;
    top: -60%;
    width: 62%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 12px solid var(--sun);
    border-top-color: transparent;
    border-right-color: transparent;
    transform: rotate(-18deg);
    opacity: .85;
    pointer-events: none;
}
.pg-arc--2 {
    right: 6%;
    top: -48%;
    width: 44%;
    border-width: 8px;
    border-color: var(--leaf);
    border-top-color: transparent;
    border-right-color: transparent;
    opacity: .7;
}
.pg-banner .container { position: relative; }
.crumbs {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 6px 16px;
    font-size: .92rem;
    background: rgba(255, 255, 255, .1);
    border-radius: 999px;
}
.crumbs i { font-size: .65rem; color: var(--sun); }
.crumbs a:hover { color: var(--sun); }
.pg-banner h1 {
    max-width: 720px;
    margin-bottom: 16px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.07;
    letter-spacing: -.025em;
}
.pg-banner p.lead { max-width: 56ch; font-size: 1.12rem; color: rgba(255, 255, 255, .88); }

.pg-section { padding: 72px 0 100px; }

/* chips (filters) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 38px; }
.chip {
    --c: var(--forest);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 20px 9px 10px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .95rem;
    color: var(--forest-d);
    background: #fff;
    border: 2px solid var(--mist);
    border-radius: 999px 999px 999px 8px;
    white-space: nowrap;
    transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.chip i {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    font-size: .8rem;
    color: #fff;
    background: var(--c);
    border-radius: 50%;
}
.chip:hover { border-color: var(--c); transform: translateY(-2px); }
.chip.is-active { color: #fff; background: var(--c); border-color: var(--c); }
.chip.is-active i { color: var(--c); background: #fff; }

.empty-note {
    padding: 40px 24px;
    text-align: center;
    color: #3d5646;
    background: var(--mist);
    border-radius: 24px 24px 24px 6px;
}

/* closing call-to-action band */
.pg-cta { padding: 0 0 90px; }
.pg-cta-panel {
    position: relative;
    overflow: hidden;
    padding: 56px 40px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--forest), var(--forest-d));
    border-radius: 36px 110px 36px 110px;
}
.pg-cta-panel::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -170px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 12px solid var(--sun);
    border-left-color: transparent;
    border-bottom-color: transparent;
    transform: rotate(-10deg);
}
.pg-cta-panel h2 { position: relative; max-width: 600px; margin: 0 auto 10px; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.02em; }
.pg-cta-panel p { position: relative; max-width: 500px; margin: 0 auto 26px; color: rgba(255, 255, 255, .85); }
.pg-cta-panel .thm-btn { --btn-bg: var(--leaf); position: relative; }

/* =========================================================
   PROJECTS
   ========================================================= */
.prj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.prj-card {
    --c: var(--forest);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 26px 26px 26px 6px;
    box-shadow: 0 22px 38px -30px rgba(5, 43, 21, .65);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.prj-card:hover { transform: translateY(-8px); box-shadow: 0 30px 44px -28px var(--c); }

.prj-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(150deg, var(--c), var(--forest-d)) center / cover no-repeat;
    border-radius: 0 0 90px 0;
}
.prj-status {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 5px 14px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .82rem;
    color: #fff;
    background: var(--leaf);
    border-radius: 999px;
}
.prj-status--done { background: var(--sky); }
.prj-area {
    position: absolute;
    right: 18px;
    bottom: -22px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    font-size: 1.15rem;
    color: #fff;
    background: var(--c);
    border: 4px solid #fff;
    border-radius: 50%;
}

.prj-body { display: flex; flex: 1; flex-direction: column; padding: 30px 26px 28px; }
.prj-area-name { margin-bottom: 4px; font-family: var(--font-head); font-weight: 700; font-size: .92rem; color: var(--c); }
.prj-body h3 { margin-bottom: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; line-height: 1.2; color: var(--forest-d); }
.prj-body p { margin-bottom: 18px; color: #4a6353; }
.prj-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: auto 0 18px; font-size: .9rem; color: #5b7364; }
.prj-meta i { margin-right: 6px; color: var(--c); }
.prj-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--forest);
    padding-bottom: 3px;
    border-bottom: 2px solid var(--sun);
}
.prj-link i { font-size: .8rem; transition: transform .3s var(--ease); }
.prj-link:hover i { transform: translateX(6px); }

/* featured project: wide, photo beside the text */
.prj-card--wide { grid-column: span 2; flex-direction: row; }
.prj-card--wide .prj-media { flex: 0 0 48%; aspect-ratio: auto; min-height: 100%; border-radius: 0 110px 0 0; }
.prj-card--wide .prj-area { bottom: 24px; right: -26px; }
.prj-card--wide .prj-body { justify-content: center; padding: 36px 36px 36px 50px; }
.prj-card--wide h3 { font-size: 1.7rem; }

/* =========================================================
   PUBLICATIONS
   ========================================================= */
.pub-tools { display: grid; grid-template-columns: 1fr 190px auto; gap: 14px; margin-bottom: 26px; }
.pub-search { position: relative; }
.pub-search i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--forest); }
.pub-search input,
.pub-tools select {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--mist);
    border-radius: 999px 999px 999px 10px;
    transition: border-color .3s, box-shadow .3s;
}
.pub-search input { padding-left: 50px; }
.pub-search input:focus,
.pub-tools select:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(92, 184, 42, .18); }
.pub-clear { padding: 0 22px; font-family: var(--font-head); font-weight: 700; color: var(--forest); border-radius: 999px; transition: background .3s; }
.pub-clear:hover { background: var(--mist); }

.pub-count { margin-bottom: 18px; font-size: .95rem; color: #5b7364; }
.pub-list { display: grid; gap: 22px; }

.pub {
    --c: var(--forest);
    display: grid;
    grid-template-columns: 104px 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 26px 30px 26px 26px;
    background: #fff;
    border-left: 6px solid var(--c);
    border-radius: 8px 30px 30px 8px;
    box-shadow: 0 20px 36px -30px rgba(5, 43, 21, .65);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.pub:hover { transform: translateX(6px); box-shadow: 0 26px 40px -28px var(--c); }

.pub-year {
    display: grid;
    place-items: center;
    width: 104px;
    height: 118px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.55rem;
    color: #fff;
    background: var(--forest);
    border-radius: 52px 52px 12px 12px;
    border-bottom: 6px solid var(--sun);
}
.pub-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 4px 14px 4px 10px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
    background: var(--c);
    border-radius: 999px;
}
.pub-main h3 { margin-bottom: 6px; font-family: var(--font-head); font-weight: 800; font-size: 1.28rem; line-height: 1.25; color: var(--forest-d); }
.pub-authors { margin-bottom: 8px; font-size: .92rem; font-weight: 600; color: var(--forest); }
.pub-main p:last-child { max-width: 70ch; color: #4a6353; }
.pub .thm-btn { padding: 12px 24px; font-size: .95rem; white-space: nowrap; }

/* =========================================================
   CONTACT
   ========================================================= */
.ct-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.ct-info h2, .ct-form h2 {
    margin-bottom: 10px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    letter-spacing: -.02em;
    color: var(--forest-d);
}
.ct-info > p { margin-bottom: 28px; color: #3d5646; }
.ct-list { display: grid; gap: 16px; }
.ct-item {
    --c: var(--forest);
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: #fff;
    border-radius: 60px 20px 20px 60px;
    box-shadow: 0 18px 32px -28px rgba(5, 43, 21, .7);
    transition: transform .3s var(--ease);
}
.ct-item:hover { transform: translateX(6px); }
.ct-item i {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    font-size: 1.15rem;
    color: #fff;
    background: var(--c);
    border-radius: 50%;
}
.ct-item small { display: block; font-weight: 600; font-size: .85rem; color: #5b7364; }
.ct-item strong, .ct-item a { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--forest-d); overflow-wrap: anywhere; }
.ct-item a:hover { color: var(--sun); }

.ct-form {
    position: relative;
    overflow: hidden;
    padding: 48px 44px 44px;
    background: #fff;
    border-radius: 100px 28px 28px 28px;
    box-shadow: 0 34px 60px -36px rgba(5, 43, 21, .7);
}
.ct-form::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 11px solid var(--sun);
    border-left-color: transparent;
    border-bottom-color: transparent;
    transform: rotate(-8deg);
    pointer-events: none;
}
.ct-form > p { margin-bottom: 26px; color: #3d5646; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--forest-d); }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 14px 18px;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid #dbe9d3;
    border-radius: 16px 16px 16px 6px;
    transition: border-color .3s, box-shadow .3s, background .3s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--leaf);
    box-shadow: 0 0 0 4px rgba(92, 184, 42, .18);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-form .thm-btn { padding: 16px 40px; font-size: 1.05rem; }

.alert { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; padding: 18px 20px; border-radius: 18px 18px 18px 6px; }
.alert i { margin-top: 3px; font-size: 1.2rem; }
.alert--ok { color: var(--forest-d); background: #e4f4d8; }
.alert--ok i { color: var(--forest); }
.alert--err { color: #7a1010; background: #fde6e6; }
.alert--err i { color: var(--ember); }
.alert ul { margin-top: 4px; padding-left: 18px; list-style: disc; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px) {
    .ft-grid { grid-template-columns: 1fr 1fr; gap: 44px 32px; padding: 70px 0 48px; }
    .ft-about { grid-column: 1 / -1; }
    .ft-about > p { max-width: 56ch; }

    .pg-banner { padding: 56px 0 72px; border-radius: 0 0 0 70px; }
    .pg-section { padding: 52px 0 80px; }

    .prj-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    .prj-card--wide { grid-column: 1 / -1; }

    .pub { grid-template-columns: 90px 1fr; gap: 20px; }
    .pub-year { width: 90px; height: 104px; font-size: 1.3rem; }
    .pub-actions { grid-column: 2; }

    .ct-grid { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 767px) {
    /* filter chips become a one-line swipe strip */
    .chips {
        flex-wrap: nowrap;
        margin-inline: -18px;
        padding: 4px 18px 10px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .chips::-webkit-scrollbar { display: none; }
    .chip { scroll-snap-align: start; }

    .prj-grid { grid-template-columns: 1fr; }
    .prj-card--wide { flex-direction: column; }
    .prj-card--wide .prj-media { flex: none; aspect-ratio: 16 / 10; min-height: 0; border-radius: 0 0 90px 0; }
    .prj-card--wide .prj-area { right: 18px; bottom: -22px; }
    .prj-card--wide .prj-body { padding: 30px 26px 28px; }
    .prj-card--wide h3 { font-size: 1.35rem; }

    .pub-tools { grid-template-columns: 1fr; }
    .pub-clear { justify-self: start; height: 44px; }
    .pub { grid-template-columns: 1fr; gap: 16px; padding: 24px 22px; border-left-width: 0; border-top: 6px solid var(--c); border-radius: 8px 8px 26px 26px; }
    .pub:hover { transform: none; }
    .pub-year { width: auto; height: auto; justify-self: start; padding: 8px 22px; font-size: 1.2rem; border-radius: 999px; border-bottom-width: 4px; }
    .pub-actions { grid-column: 1; }
    .pub .thm-btn { width: 100%; }

    .f-row { grid-template-columns: 1fr; gap: 0; }
    .ct-form { padding: 40px 22px 32px; border-radius: 64px 22px 22px 22px; }
    .ct-form .thm-btn { width: 100%; }
    .ct-item { grid-template-columns: 48px 1fr; padding: 14px 16px; border-radius: 48px 18px 18px 48px; }
    .ct-item i { width: 48px; height: 48px; }

    .pg-cta-panel { padding: 44px 22px; border-radius: 28px 70px 28px 70px; }
}

@media (max-width: 575px) {
    .ft-grid { grid-template-columns: 1fr; gap: 38px; }
    .ft-bottom .container { flex-direction: column; text-align: center; }
}
