/*
Theme Name: Eshadi Mendis
Theme URI: https://eshadimendis.com/
Author: Eshadi Mendis
Description: A narrative portfolio theme for Eshadi Mendis—environmental educator, researcher, civil engineer, and National Geographic Explorer.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: eshadi-mendis
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

@import url("https://fonts.googleapis.com/css2?family=Marcellus&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --paper: #f4f1e9;
  --ink: #37312b;
  --muted: #777068;
  --forest: #26342b;
  --soft: #ebe7dd;
  --line: rgba(55, 49, 43, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "PT Serif", Georgia, serif; font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { font-family: "Marcellus", Georgia, serif; font-weight: 400; }
button, input, textarea { font: inherit; }
::selection { background: #cbd3c6; color: #182019; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { width: auto; height: auto; left: 16px; top: 16px; z-index: 100000; padding: 10px 14px; clip: auto; background: #fff; color: #111; }
.page-shell { width: min(1240px, calc(100% - 110px)); margin-inline: auto; }

.site-header { width: 100%; min-height: 96px; padding: 24px 4vw; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; position: relative; z-index: 20; }
.site-header.overlay { position: absolute; inset: 0 0 auto; color: #f8f5ed; }
.site-header.solid { background: var(--paper); }
.admin-bar .site-header.overlay { top: 32px; }
.site-brand { font-family: "Marcellus", Georgia, serif; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.02em; white-space: nowrap; }
.site-nav .menu, .site-nav .fallback-menu { margin: 0; padding: 4px 0 0; display: flex; gap: clamp(22px, 2.6vw, 42px); list-style: none; font-size: 15px; }
.site-nav a { border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { border-color: currentColor; }

.home-cover, .research-cover, .photo-title-hero { height: 100svh; min-height: 680px; position: relative; color: #fff; overflow: hidden; }
.home-cover > img, .research-cover > img, .photo-title-hero > img { width: 100%; height: 100%; object-fit: cover; }
.home-cover > img { object-position: center 52%; }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,15,11,.36), rgba(10,15,11,.04) 45%, rgba(10,15,11,.62)); }
.cover-identity { width: min(1240px, calc(100% - 110px)); position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%); }
.cover-identity h1 { max-width: 700px; margin: 0 0 18px; font-size: clamp(37px, 4vw, 52px); line-height: 1.12; }
.cover-identity h2 { max-width: 780px; margin: 0 0 12px; font-size: clamp(19px, 2vw, 27px); line-height: 1.25; }
.cover-identity p { margin: 0; font-size: clamp(18px, 1.8vw, 24px); }

.home-narrative { max-width: 940px; padding-top: clamp(80px, 9vw, 130px); padding-bottom: clamp(95px, 11vw, 150px); }
.home-narrative p { margin: 0; font-size: clamp(19px, 1.75vw, 23px); line-height: 1.55; }
.home-narrative p + p { margin-top: 30px; }
.center-link { width: fit-content; min-width: 300px; margin: 56px auto 0; padding: 20px 34px; display: block; border: 1px solid var(--ink); text-align: center; transition: .2s ease; }
.center-link:hover, .outline-button:hover { background: var(--ink); color: var(--paper); }

.site-footer { padding: 85px 0 40px; border-top: 1px solid var(--line); }
.footer-fieldnotes { display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: end; padding-bottom: 80px; }
.footer-fieldnotes h2 { margin: 0 0 8px; font-size: clamp(30px, 3vw, 42px); }
.footer-fieldnotes p { max-width: 520px; margin: 0; color: var(--muted); font-size: 17px; }
.outline-button { min-width: 210px; padding: 16px 26px; border: 1px solid var(--ink); text-align: center; transition: .2s ease; }
.footer-base { padding-top: 42px; display: flex; justify-content: space-between; gap: 50px; border-top: 1px solid var(--line); }
.footer-name { font-family: "Marcellus", Georgia, serif; font-size: 27px; }
.footer-base p { margin: 8px 0 0; color: var(--muted); }
.social-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 13px 28px; font-size: 14px; }
.social-links a:hover, .contact-socials a:hover { text-decoration: underline; }

.about-mosaic { padding-top: 95px; padding-bottom: 130px; }
.about-opening, .about-crossing, .about-final { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(55px, 8vw, 115px); align-items: start; }
.about-opening { margin-bottom: 10px; }
.about-crossing { margin-top: 10px; align-items: center; }
.about-crossing.reverse { margin-top: 80px; }
.about-copy h1 { margin: 0 0 30px; font-size: clamp(35px, 4vw, 48px); }
.credentials { margin-bottom: 55px !important; font-size: 17px !important; line-height: 1.5 !important; }
.about-copy p { margin: 0 0 25px; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.55; }
.about-photo { margin: 0; }
.about-photo img { height: 610px; object-fit: cover; }
.about-photo.tall img { height: 860px; }
.about-opening .about-photo img { object-position: 29% center; }
.about-photo figcaption, .about-wide-photo figcaption, .project-story figcaption, .research-feature figcaption, .research-end-image figcaption { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.about-wide-photo { margin: 85px 0 45px; }
.about-wide-photo img { height: min(58vw, 710px); object-fit: cover; }
.about-final { margin-top: 40px; }

.photo-title-hero h1, .research-cover h1 { width: min(1030px, calc(100% - 110px)); margin: 0; position: absolute; z-index: 2; left: 50%; top: 52%; transform: translate(-50%, -50%); color: #fff; font-size: clamp(52px, 6vw, 74px); text-align: center; }
.photo-title-hero > img { object-position: center 44%; }
.project-intro, .research-question { max-width: 1040px; padding-top: 130px; padding-bottom: 130px; text-align: center; }
.project-intro h2, .research-question h2 { margin: 0; font-size: clamp(35px, 4.1vw, 51px); line-height: 1.22; }
.project-stories { padding-bottom: 60px; }
.project-story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(55px, 8vw, 110px); align-items: center; padding: 70px 0; border-top: 1px solid var(--line); }
.project-story.reverse figure { order: 2; }
.project-story figure { margin: 0; }
.project-story figure img { height: 580px; object-fit: cover; }
.project-story:nth-child(2) figure img { object-position: 43% center; }
.project-story h2 { margin: 0 0 24px; font-size: clamp(34px, 3.5vw, 45px); line-height: 1.2; }
.project-story p { margin: 0 0 18px; font-size: 18px; line-height: 1.6; }
.project-story .project-role { margin-bottom: 27px; color: var(--muted); font-size: 14px; }
.project-more { padding: 80px 0 130px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 90px; }
.project-more > h2 { grid-column: 1 / -1; margin: 0 0 45px; font-size: 42px; }
.project-more > div { padding: 25px 0; border-top: 1px solid var(--line); }
.project-more h3 { margin: 0 0 10px; font-size: 25px; }
.project-more p { margin: 0; color: var(--muted); }

.research-cover > img { object-position: center; }
.research-feature { padding-bottom: 130px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(55px, 8vw, 110px); align-items: start; }
.research-feature figure { margin: 0; }
.research-feature figure img { height: 600px; object-fit: cover; }
.research-feature h2 { margin: 25px 0 15px; font-size: 43px; }
.research-feature h3 { margin: 0 0 12px; font-size: 27px; line-height: 1.3; }
.research-feature h4 { margin: 0 0 30px; font-size: 20px; line-height: 1.4; }
.research-feature p { margin: 0 0 18px; line-height: 1.55; }
.background-columns { padding-top: 110px; padding-bottom: 110px; display: grid; grid-template-columns: 1fr 1fr; gap: 110px; border-top: 1px solid var(--line); }
.background-columns h2 { margin: 0 0 26px; font-size: 39px; }
.background-columns h2:not(:first-child) { margin-top: 65px; }
.background-columns p { margin: 0 0 22px; padding-left: 38px; line-height: 1.5; }
.research-end-image { margin-bottom: 120px; }
.research-end-image img { height: min(62vw, 760px); object-fit: cover; }

.contact-layout { min-height: 740px; padding-top: 70px; padding-bottom: 130px; display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(80px, 10vw, 150px); }
.contact-intro h1 { margin: 0 0 38px; font-size: 47px; }
.contact-intro > p { max-width: 440px; margin: 0 0 30px; font-size: 18px; line-height: 1.55; }
.contact-socials { display: flex; flex-wrap: wrap; gap: 18px 25px; margin-bottom: 38px; font-size: 15px; }
.contact-email { border-bottom: 1px solid currentColor; }
.contact-form { padding-top: 5px; }
.contact-form label { display: block; margin-bottom: 28px; }
.contact-form label > span { color: var(--muted); font-size: 12px; }
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-form input, .contact-form textarea { width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid #aaa39a; border-radius: 0; background: #faf8f2; color: var(--ink); }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 1px solid var(--ink); outline-offset: 1px; }
.contact-form button { min-width: 125px; padding: 14px 24px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: #fff; cursor: pointer; }
.form-status { margin: 0 0 30px; padding: 14px 16px; border: 1px solid var(--line); }
.form-status.success { background: #e2ebdf; }
.form-status.error { background: #f1ded8; }
.form-honeypot { position: absolute !important; left: -9999px !important; }

.legacy-page-hero { padding: 110px 0 125px; }
.legacy-page-hero.forest { background: var(--forest); color: #fff; }
.legacy-page-grid, .editorial-grid { display: grid; grid-template-columns: 155px 1fr; gap: 75px; }
.legacy-page-grid h1 { margin: 0; font-size: clamp(48px, 6vw, 76px); }
.legacy-page-grid div > p { max-width: 760px; margin: 35px 0 0; font-size: 24px; }
.eyebrow, .section-rule { margin: 9px 0 0; padding-top: 9px; border-top: 1px solid currentColor; }
.content-section, .story-section { padding: 105px 0; }
.content-section.soft, .story-section.soft { background: var(--soft); }
.content-section.dark { background: var(--forest); color: #fff; }
.body-copy > h2, .story-copy h2 { margin: 0 0 42px; font-size: 44px; }
.record-list, .timeline { border-top: 1px solid currentColor; }
.record-row, .timeline-row { padding: 24px 0; display: grid; grid-template-columns: 100px 1fr; gap: 30px; border-bottom: 1px solid var(--line); }
.record-row h3, .timeline-row h3 { margin: 0 0 6px; font-size: 25px; }
.record-row p, .timeline-row p { margin: 0; color: var(--muted); }
.dark .record-row, .dark .timeline-row { border-color: rgba(255,255,255,.22); }
.dark .record-row p, .dark .timeline-row p { color: #d0d4ce; }
.story-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 90px; align-items: center; }
.story-grid.reverse { grid-template-columns: .85fr 1.15fr; }
.story-grid.reverse figure { order: 2; }
.story-photo { margin: 0; }
.story-photo img { height: 560px; object-fit: cover; }
.story-photo figcaption { margin-top: 9px; color: var(--muted); font-size: 11px; }
.story-copy p { font-size: 18px; }
.meta { color: var(--muted); font-size: 13px !important; }

.journal-hero { padding: 105px 0 80px; }
.journal-hero h1 { margin: 0 0 18px; font-size: clamp(48px, 6vw, 76px); }
.journal-hero p { max-width: 700px; margin: 0; font-size: 21px; }
.post-grid { padding-bottom: 120px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 70px 45px; }
.post-card { border-top: 1px solid var(--line); padding-top: 18px; }
.post-card img { height: 360px; object-fit: cover; margin-bottom: 22px; }
.post-card time { color: var(--muted); font-size: 13px; }
.post-card h2 { margin: 10px 0 12px; font-size: 32px; line-height: 1.25; }
.post-card p { margin: 0; }
.single-article, .standard-page { max-width: 820px; padding-top: 80px; padding-bottom: 120px; }
.single-article h1, .standard-page h1 { margin: 0 0 22px; font-size: clamp(42px, 5vw, 64px); line-height: 1.15; }
.single-article .entry-meta { color: var(--muted); margin-bottom: 35px; }
.single-article .entry-content, .standard-page .entry-content { font-size: 18px; }
.single-article .entry-content a, .standard-page .entry-content a { text-decoration: underline; }
.single-article .entry-content img { margin: 35px 0; }
.pagination { grid-column: 1 / -1; display: flex; gap: 20px; justify-content: space-between; }

@media (max-width: 900px) {
  .page-shell, .cover-identity { width: min(100% - 48px, 1240px); }
  .about-opening, .about-crossing, .about-final, .project-story, .research-feature, .background-columns, .contact-layout { gap: 50px; }
  .about-photo.tall img { height: 700px; }
  .project-story figure img { height: 460px; }
  .research-feature figure img { height: 500px; }
  .legacy-page-grid, .editorial-grid { grid-template-columns: 120px 1fr; gap: 45px; }
}

@media (max-width: 782px) { .admin-bar .site-header.overlay { top: 46px; } }

@media (max-width: 680px) {
  body { font-size: 15px; }
  .page-shell, .cover-identity { width: calc(100% - 32px); }
  .site-header { min-height: 86px; padding: 18px 16px; align-items: flex-start; }
  .site-brand { font-size: 18px; }
  .site-nav { max-width: 60vw; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav .menu, .site-nav .fallback-menu { width: max-content; gap: 16px; font-size: 12px; }
  .home-cover, .research-cover, .photo-title-hero { min-height: 620px; }
  .home-cover > img { object-position: 54% center; }
  .cover-identity { bottom: 7vh; }
  .home-narrative p, .about-copy p { font-size: 18px; }
  .center-link { width: 100%; min-width: 0; }
  .footer-fieldnotes, .about-opening, .about-crossing, .about-final, .project-story, .research-feature, .background-columns, .contact-layout, .legacy-page-grid, .editorial-grid, .story-grid, .story-grid.reverse, .post-grid { grid-template-columns: 1fr; }
  .footer-fieldnotes { align-items: start; }
  .outline-button { width: 100%; }
  .footer-base { flex-direction: column; }
  .social-links { justify-content: flex-start; }
  .about-mosaic { padding-top: 55px; }
  .about-opening, .about-crossing, .about-crossing.reverse, .about-final { gap: 28px; margin-top: 45px; }
  .about-opening { margin-top: 0; }
  .about-photo.tall img, .about-photo img { height: 520px; }
  .about-crossing.reverse .about-photo { order: 0; }
  .about-wide-photo { margin-top: 55px; }
  .about-wide-photo img { height: 64vw; }
  .project-intro, .research-question { padding-top: 85px; padding-bottom: 85px; }
  .project-story { padding: 50px 0; gap: 28px; }
  .project-story.reverse figure { order: 0; }
  .project-story figure img { height: 64vw; min-height: 330px; }
  .project-more { grid-template-columns: 1fr; padding-bottom: 90px; }
  .project-more > h2 { grid-column: 1; }
  .research-feature { padding-bottom: 90px; }
  .research-feature figure img { height: 64vw; min-height: 330px; }
  .background-columns { padding-top: 75px; padding-bottom: 75px; }
  .background-columns p { padding-left: 0; }
  .research-end-image { margin-bottom: 90px; }
  .contact-layout { padding-top: 45px; padding-bottom: 90px; gap: 65px; }
  .name-fields { grid-template-columns: 1fr; gap: 0; }
  .legacy-page-grid, .editorial-grid { gap: 34px; }
  .story-grid.reverse figure { order: 0; }
  .story-photo img { height: 65vw; min-height: 330px; }
  .post-card img { height: 65vw; min-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
