/* General styles for all menus */
.cbp-spmenu {
	background: #47a3da;
	position: fixed;
}

.cbp-spmenu h3 {
	color: #afdefa;
	font-size: 1.9em;
	padding: 20px;
	margin: 0;
	font-weight: 300;
	background: #0d77b6;
}

.cbp-spmenu a {
	display: block;
	color: #fff;
	font-size: 1.1em;
	font-weight: 300;
}

.cbp-spmenu a:hover {
	background: #258ecd;
}

/* Current page indicator in sidebar */
.cbp-spmenu a.active {
  background: #afdefa;
  color: #0d77b6;
  font-weight: 600;
}

/* Orientation-dependent styles for the content of the menu */

.cbp-spmenu-vertical {
	width: 240px;
	height: 100%;
	top: 0;
	z-index: 1000;
}

.cbp-spmenu-vertical a {
	border-bottom: 1px solid #258ecd;
	padding: 1em;
}

.cbp-spmenu-horizontal {
	width: 100%;
	height: 150px;
	left: 0;
	z-index: 1000;
	overflow: hidden;
}

.cbp-spmenu-horizontal h3 {
	height: 100%;
	width: 20%;
	float: left;
}

.cbp-spmenu-horizontal a {
	float: left;
	width: 20%;
	padding: 0.8em;
	border-left: 1px solid #258ecd;
}

/* Vertical menu that slides from the left or right */

.cbp-spmenu-left {
	left: -240px;
}

.cbp-spmenu-right {
	right: -240px;
}

.cbp-spmenu-left.cbp-spmenu-open {
	left: 0px;
}

.cbp-spmenu-right.cbp-spmenu-open {
	right: 0px;
}

/* Horizontal menu that slides from the top or bottom */

.cbp-spmenu-top {
	top: -150px;
}

.cbp-spmenu-bottom {
	bottom: -150px;
}

.cbp-spmenu-top.cbp-spmenu-open {
	top: 0px;
}

.cbp-spmenu-bottom.cbp-spmenu-open {
	bottom: 0px;
}

/* Push classes applied to the body */

.cbp-spmenu-push {
	overflow-x: hidden;
	position: relative;
	left: 0;
}

.cbp-spmenu-push-toright {
	left: 240px;
}

.cbp-spmenu-push-toleft {
	left: -240px;
}

/* Transitions */

.cbp-spmenu,
.cbp-spmenu-push {
	-webkit-transition: all 0.3s ease;
	-moz-transition: all 0.3s ease;
	transition: all 0.3s ease;
}

/* Example media queries */

@media screen and (max-width: 55.1875em){

	.cbp-spmenu-horizontal {
		font-size: 75%;
		height: 110px;
	}

	.cbp-spmenu-top {
		top: -110px;
	}

	.cbp-spmenu-bottom {
		bottom: -110px;
	}

}

@media screen and (max-height: 26.375em){

	.cbp-spmenu-vertical {
		font-size: 90%;
		width: 190px;
	}

	.cbp-spmenu-left,
	.cbp-spmenu-push-toleft {
		left: -190px;
	}

	.cbp-spmenu-right {
		right: -190px;
	}

	.cbp-spmenu-push-toright {
		left: 190px;
	}
}

.page{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 18px 12px;
  font-size: 14px;
}

.top-nav a {
  text-decoration: none;
  color: #4aa3df;
  padding: 6px 2px;
}

.top-nav a.active {
  text-decoration: underline;
  font-weight: 600;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: start;
}

.about-text h1 {
  margin-top: 0;
}

.about-subhead {
  margin-top: 18px;
  font-size: 16px;
}

.about-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* ================================
   Global top header + top links
   (match About page everywhere)
================================== */

.page-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.top-links{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-body);
  font-size: 14px;
}

.top-links a{
  text-decoration: none;
  color: #47a3da;
  opacity: 0.85;
}

.top-links a:hover{
  opacity: 1;
}

.top-links a.active{
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
}

/* Mobile */
@media (max-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .top-nav {
    flex-wrap: wrap;
  }
}

.contact-page .contact-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.contact-page .top-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  font-size:14px;
}

.contact-page .top-links a{
  text-decoration:none;
  opacity:0.85;
}

.contact-page .top-links a.active{
  opacity:1;
  text-decoration:underline;
  text-underline-offset:4px;
}

/* Contact page layout */
body.contact-page .contact-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 22px;
}

body.contact-page .contact-title{
  margin:0;
  font-size:20px;
  letter-spacing:0.02em;
}

body.contact-page .top-links{
  display:flex;
  gap:14px;
  font-size:13px;
}

body.contact-page .top-links a{
  text-decoration:none;
  opacity:.75;
}

body.contact-page .top-links a.active,
body.contact-page .top-links a:hover{
  opacity:1;
}

/* Main card */
body.contact-page .contact-wrap{
  max-width:980px;
  margin:0 auto;
  padding:48px 22px 28px;
}

body.contact-page .contact-card{
  max-width:720px;
  margin:0 auto;
  padding:28px 28px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
}

body.contact-page .contact-card h2{
  margin:0 0 10px;
  font-size:22px;
}

body.contact-page .contact-card p{
  margin:0 0 18px;
  opacity:.85;
  line-height:1.55;
}

body.contact-page .contact-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:10px 0 18px;
}

body.contact-page .contact-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.12);
  text-decoration:none;
}

body.contact-page .contact-btn.primary{
  border-color:rgba(0,0,0,.12);
  font-weight:600;
}

body.contact-page .contact-details{
  border-top:1px solid rgba(0,0,0,.08);
  padding-top:14px;
  display:grid;
  gap:10px;
  font-size:14px;
}

body.contact-page .contact-details span{
  display:inline-block;
  width:78px;
  opacity:.65;
}

/* Make header links collapse on small screens */
@media (max-width: 640px){
  body.contact-page .top-links{
    display:none;
  }
  body.contact-page .contact-wrap{
    padding-top:28px;
  }
}

/* ===== SIDEBAR ACTIVE LINK (FINAL OVERRIDE) ===== */
#cbp-spmenu-s1 a.active{
  background: #afdefa !important;
  color: #0d77b6 !important;
  font-weight: 800;
  border-left: 6px solid #0d77b6;
  padding-left: calc(1em - 6px);
}

/* Home page: active sidebar link must override the forced white links */
body.home-page #cbp-spmenu-s1 a.active{
  background: #afdefa !important;
  color: #0d77b6 !important;
  font-weight: 800;
  border-left: 6px solid #0d77b6;
  padding-left: calc(1em - 6px);
}

body.home-page #cbp-spmenu-s1 a.active:hover{
  background: #afdefa !important;
  color: #0d77b6 !important;
}

/* ================================
   ABOUT — Mobile polish
================================== */

@media (max-width: 640px){

  /* Give the page better breathing room */
  .about-page .about{
    padding: 18px 14px 44px;
  }

  /* Header: keep it simple on phones */
  .about-page .page-top{
    align-items: center;
    margin-bottom: 14px;
  }

  /* Hide inline top links on small screens (use the slide menu) */
  .about-page .top-links{
    display: none;
  }

  /* Make the H1 feel less gigantic and more phone-friendly */
  .about-page h1{
    font-size: 28px;
    line-height: 1.15;
    margin-bottom: 10px;
  }

  .about-page .about-copy p{
    font-size: 15px;
    line-height: 1.65;
  }

  /* Photo: keep it from feeling huge and overpowering */
  .about-page .about-photo{
    max-width: 520px;
    margin: 10px auto 0;
    border-radius: 14px;
  }

  /* Optional: tighten list spacing */
  .about-page .about-copy ul{
    margin-top: 8px;
  }
  .about-page .about-copy li{
    margin-bottom: 6px;
  }
}

/* Footer nav class alias (legacy) */
.resume-footer .footer-links { 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
}

/* ================================
   Footer nav active state
================================== */

.resume-footer .footer-nav a.active {
  font-weight: 600;
  opacity: 1;
}

.resume-footer .footer-nav a {
  opacity: 0.65;
  transition: opacity 0.15s ease;
}

.resume-footer .footer-nav a:hover {
  opacity: 1;
}

/* ================================
   Projects page
================================== */

.projects-page .projects{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.projects-page .page-title{
  margin: 0 0 8px;
  text-align: center;
  color: #47a3da;
}

.projects-page .projects-intro{
  margin: 0 auto 22px;
  text-align: center;
  max-width: 60ch;
  opacity: 0.85;
  line-height: 1.55;
}

.projects-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.project-card{
  border: 1px solid rgba(71,163,218,0.18);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
}

.project-body{
  padding: 14px 14px 16px;
}

.project-body h2{
  margin: 0 0 8px;
  font-size: 18px;
  color: #47a3da;
}

.project-body p{
  margin: 0 0 12px;
  line-height: 1.55;
  opacity: 0.9;
}

.project-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill{
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(71,163,218,0.35);
  opacity: 0.85;
}


/* ================================
   Projects page (FIXED)
================================== */

.projects-page .projects{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.projects-page .page-title{
  margin: 0 0 8px;
  text-align: center;
  color: #47a3da;
}

.projects-page .projects-intro{
  margin: 0 auto 22px;
  text-align: center;
  max-width: 60ch;
  opacity: 0.85;
  line-height: 1.55;
}

.projects-page .projects-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.projects-page .project-card{
  border: 1px solid rgba(71,163,218,0.18);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
}

/* The missing piece: make project images behave */
.projects-page .project-media{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;      /* consistent thumbnails */
  overflow: hidden;
  background: rgba(71,163,218,0.06);
  border-bottom: 1px solid rgba(71,163,218,0.14);
}

.projects-page .project-media img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;         /* fills nicely on all screens */
  object-position: top;      /* better for website screenshots */
}

.projects-page .project-body{
  padding: 14px 14px 16px;
}

.projects-page .project-body h2{
  margin: 0 0 8px;
  font-size: 18px;
  color: #47a3da;
}

.projects-page .project-body p{
  margin: 0 0 12px;
  line-height: 1.55;
  opacity: 0.9;
}

.projects-page .project-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.projects-page .pill{
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(71,163,218,0.35);
  opacity: 0.85;
}

/* Responsive grid */
@media (max-width: 980px){
  .projects-page .projects-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .projects-page .projects-grid{
    grid-template-columns: 1fr;
  }

  /* optional: on phones, hide top links and rely on slide menu */
  .projects-page .top-links{
    display: none;
  }

  .projects-page .project-actions .btn{
    padding: 11px 14px;
  }

  .resume-footer .footer-nav{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 8px;
    column-gap: 10px;
    line-height: 1.6;
  }

  .resume-footer .dot{
    margin: 0 6px;
  }
}