/* Portfolio landing page */
.portfolio-header {
  margin: 0 0 1.4em;
}

.portfolio-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2em;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2em;
}

.portfolio-tagline {
  font-size: 1.05em;
  color: #666;
  margin-top: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4em;
  margin-top: 1em;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #dde6f0;
  border-radius: 8px;
  padding: 1.6em;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
  box-shadow: 0 4px 18px rgba(42, 111, 173, 0.13);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.project-card-body {
  flex: 1;
}

.project-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 0.5em;
  color: #1a4a7a;
}

.project-desc {
  font-size: 0.9em;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.project-card-footer {
  margin-top: 1.2em;
  font-size: 0.85em;
  font-weight: 600;
  color: #2a6fad;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-top: 0.9em;
}

.tag {
  font-size: 0.72em;
  font-weight: 500;
  padding: 0.25em 0.75em;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.tag-tool {
  background-color: #ddf4ff;
  color: #0969da;
  border-color: #b6e3ff;
}

.tag-domain {
  background-color: #dafbe1;
  color: #116329;
  border-color: #aceebb;
}

.section-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-top: 3.5em;
  margin-bottom: 0.8em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid #e0e0e0;
}

/* ── Contrails Australia theme ───────────────────────────── */
body.contrails-theme {
  background-color: #c9dfef;
}

body.contrails-theme .site-header {
  background-color: #b8d3e6;
  border-bottom: 1px solid #a4c2d8;
}

body.contrails-theme .site-footer {
  background-color: #b8d3e6;
  border-top: 1px solid #a4c2d8;
  color: #3a5a72;
}

body.contrails-theme .site-footer a,
body.contrails-theme .footer-heading,
body.contrails-theme .contact-list a,
body.contrails-theme .social-media-list a {
  color: #1a4a6a;
}

/* White content card for posts and pages */
body.contrails-theme .post,
body.contrails-theme .page-content .home,
body.contrails-theme .page-content .page {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.2em 2.5em 2em;
  box-shadow: 0 2px 16px rgba(0, 50, 100, 0.1);
  margin-top: 1em;
  margin-bottom: 1em;
}

body.contrails-theme .page-content {
  padding-top: 0.5em;
  padding-bottom: 1.5em;
}

body.contrails-theme .wrapper {
  max-width: 960px;
}

/* Secondary text */
body.contrails-theme .post-meta {
  color: #4a7090;
}

body.contrails-theme .post-excerpt {
  color: #4a6070;
}

body.contrails-theme .photo-credit,
body.contrails-theme .photo-credit a {
  color: #5a7a90;
}

body.contrails-theme .rss-subscribe a {
  color: #2a6fad;
}

/* Space between homepage sections (Welcome, Findings so far, Posts) */
body.contrails-theme .home h2 {
  margin-top: 1.8em;
}

body.contrails-theme .home h2.post-list-heading {
  margin-top: 2.4em;
  padding-top: 1.2em;
  border-top: 1px solid #d0e4f0;
}

/* "Findings so far" summary card on the Contrails homepage */
body.contrails-theme .summary-card {
  background: #f3f8fc;
  border: 1px solid #d0e4f0;
  border-radius: 10px;
  padding: 1.2em 1.6em 0.4em;
  margin: 1.8em 0 1.4em;
}

body.contrails-theme .summary-card-title {
  font-size: 1.25em;
  font-weight: 600;
  color: #1f4e79;
  margin-bottom: 0.8em;
}

body.contrails-theme .summary-card ul {
  margin-left: 1.2em;
}

body.contrails-theme .summary-card li {
  margin-bottom: 0.5em;
}

@media (max-width: 600px) {
  body.contrails-theme .summary-card {
    padding: 1em 1em 0.2em;
  }
}

/* Post list dividers */
body.contrails-theme .post-preview-card {
  border-bottom-color: #d0e4f0;
}

body.contrails-theme hr {
  border-color: #d0e4f0;
}

/* Post preview image card on blue background */
.post-preview-thumb {
  background: #ffffff;
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 2px 8px rgba(0, 60, 120, 0.12);
}

/* Accordion (About The Project) */
.accordion {
  border: 1px solid #bdd0e8;
  border-radius: 8px;
  margin-bottom: 0.7em;
  overflow: hidden;
  background: #ffffff;
}

.accordion summary {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1em;
  padding: 0.9em 1.2em;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1a4a7a;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: '+';
  font-size: 1.3em;
  font-weight: 300;
  color: #7aabc8;
  transition: transform 0.2s ease;
}

.accordion[open] summary::after {
  content: '−';
}

.accordion summary:hover {
  background-color: #f0f7ff;
}

.accordion-body {
  padding: 0.2em 1.2em 1.1em;
  border-top: 1px solid #ddeaf5;
}

.accordion-body p,
.accordion-body ul {
  font-size: 0.95em;
  line-height: 1.7;
  color: #333;
  margin-bottom: 0.6em;
}

/* About Me page */
.about-me-page {
  margin: 0;
}

.about-photo-wrap {
  margin-bottom: 1.2em;
}

.about-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 3px solid #dde6f0;
}

.about-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2em;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 0.2em;
}

/* match .section-heading style from homepage */
.about-me-page h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-top: 2.8em;
  margin-bottom: 0.8em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid #e0e0e0;
}

.about-me-page p,
.about-me-page ul {
  font-size: 1em;
  line-height: 1.7;
  color: #555;
}

.about-me-page a {
  color: #2a6fad;
}

.about-links {
  list-style: none;
  padding-left: 0;
}

.about-links li {
  margin-bottom: 0.3em;
}

/* Global background */
body {
  background-color: #f0f5fb;
}

/* Active nav link */
.page-link.active {
  font-weight: 700;
  color: #2a6fad;
}

/* Hide large page heading on static pages */
.page-heading {
  display: none;
}

/* Site title and nav font */
.site-title,
.site-title:visited,
.page-link {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Hero banner */
.hero-banner {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center 70%;
  border-radius: 6px;
  margin-bottom: 0.4em;
}

/* Photo credit caption */
.photo-credit {
  font-size: 0.72em;
  color: #aaa;
  margin-top: 0;
  margin-bottom: 1.8em;
  text-align: right;
}

.photo-credit a {
  color: inherit;
  text-decoration: none;
}

.photo-credit a:hover {
  text-decoration: underline;
}

/* Post preview cards */
.post-list {
  list-style: none !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.post-preview-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5em;
  padding: 1.4em 0;
  border-bottom: 1px solid #e8e8e8;
}

.post-preview-card:last-child {
  border-bottom: none;
}

.post-preview-content {
  flex: 1;
  min-width: 0;
}

.post-preview-content h3 {
  margin-top: 0.2em;
  margin-bottom: 0.3em;
}

.post-excerpt {
  font-size: 0.9em;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.post-preview-thumb {
  flex: 0 0 175px;
}

.post-preview-thumb img {
  width: 175px;
  height: 120px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

hr {
  margin-top: 30px;
  margin-bottom: 20px;
}

/* Post navigation links */
.post_navi {
  display: flex;
}

.post_navi-label {
  font-size: 0.8em;
  opacity: 0.5;
}

.post_navi .post_navi-item {
  padding: 0 2.2em;
  width: 50%;
  position: relative;
  color: inherit !important;
}

.post_navi .nav_prev {
  text-align: left;
}

.post_navi .nav_next {
  text-align: right;
}

.post_navi .nav_prev .post_navi-arrow {
  left: 0;
}

.post_navi .nav_next .post_navi-arrow {
  right: 0;
}

.post_navi .post_navi-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5em;
  opacity: 0.3;
}

/* Footer fix */
.footer-col-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.footer-col {
  min-width: 200px;
  flex: 1;
}

.footer-col-1 {
  flex: 0 0 auto;
  min-width: 180px;
}

.footer-col-2 {
  flex: 0 0 auto;
  min-width: 160px;
}

.footer-col-3 {
  flex: 2;
  min-width: 250px;
}

.social-links li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Tables */
.post-content table,
.page-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2em 0;
  background-color: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.post-content th,
.page-content th {
  background-color: #1a4a7a;
  color: #ffffff;
  text-align: left;
  padding: 0.6em 1em;
  font-size: 0.9em;
}

.post-content td,
.page-content td {
  padding: 0.55em 1em;
  border-bottom: 1px solid #e4ecf5;
  font-size: 0.9em;
}

.post-content tr:last-child td,
.page-content tr:last-child td {
  border-bottom: none;
}

.post-content tr:nth-child(even) td,
.page-content tr:nth-child(even) td {
  background-color: #f5f8fd;
}

/* References section */
.references {
  font-size: 0.8em;
  color: #777;
}

.references p {
  margin-bottom: 0.4em;
}

.references a {
  color: inherit;
}

.site-footer {
  padding: 30px 0;
}

/* Figure captions for plots/images */
.post-content figure {
  margin: 0 0 1.8em;
  text-align: center;
}

.post-content figure img {
  margin-bottom: 0.5em;
}

/* Shorter, cropped banner photo (e.g. Entry 4 header image) */
.post-content figure.banner-figure img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 6px;
}

.post-content figcaption {
  font-size: 0.8em;
  color: #888;
  font-style: italic;
  line-height: 1.4;
}

/* Lightbox */
.post-content img {
  cursor: zoom-in;
}

#lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
}

#lightbox-overlay img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: zoom-out;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
/* About the author photo */
.author-photo {
  float: left;
  width: 96px !important;
  height: 96px !important;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  margin: 0.25rem 1.25rem 0.5rem 0;
}

.accordion-body::after {
  content: "";
  display: table;
  clear: both;
}

/* "All Projects" back link on project sites */
.site-back {
  float: left;
  line-height: 54px;
  margin-right: 1.25rem;
  padding-right: 1.25rem;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: #3a5a72;
  text-decoration: none;
}

.site-back:hover {
  color: #1c3a52;
  text-decoration: none;
}

/* Back link above post titles */
.post-back {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: #4a7090;
  text-decoration: none;
}

.post-back:hover {
  color: #1c3a52;
  text-decoration: none;
}
