/* =========================
   GLOBAL LAYOUT
========================= */

:root {
  --page-bg: #f5f7fa;
}

body {
  background-color: var(--page-bg);
  padding-top: 88px;
  margin: 0;
}

.page-content,
.single-page-content,
.content,
main .container[role="main"] {
  max-width: 980px;
  margin: 0 auto; 
}

main,
.profile-hero,
.section-primary-bg {
  background-color: var(--page-bg);
}

/* =========================
   NAVBAR
========================= */

main {
  padding-top: 0;
}

.navbar {
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background-color: white;
}

/* =========================
   SECTION HEADERS
========================= */

.section-header {
  margin: 18px 0 24px;
  text-align: center;
}

.section-title {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 8px;
}

.section-subtitle {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.6;
  opacity: .8;
  margin: 12px 0 40px;
}

/* =========================
   PROFILE SECTION
========================= */

.profile-hero {
  padding-top: 0;
}

@media (max-width: 992px) {
  .profile-hero {
    padding-top: 16px;
  }
}

.navbar,
header,
.intro-header {
  position: relative;
  z-index: 10;
}

.profile-hero-title {
  margin-top: 18px;
  margin-bottom: 8px;
}

.profile-hero-tagline {
  margin-bottom: 26px;
  color: #555;
}

.profile-hero-row {
  margin-top: 10px;
  margin-bottom: 30px;
}

@media (min-width: 992px) {
  .profile-hero-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 22px;
  }

  .profile-hero-row > [class*="col-"] {
    flex: 0 0 auto;
    width: auto;
    padding-left: 0;
    padding-right: 0;
  }

  .profile-hero-row > .col-lg-7 {
    max-width: 520px;
  }

  .profile-hero-row > .col-lg-5 {
    max-width: 360px;
  }
}

.profile-card-wrap {
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-box {
  background-color: white;
  padding: 26px;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 520px;
  text-align: center;
}

.profile-box-text p {
  margin: 0;
  line-height: 1.8;
  font-size: 18px;
}

.profile-box-cta {
  margin-top: 18px;
}

.profile-photo-wrap {
  width: 100%;
  max-width: 360px;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

@media (max-width: 992px) {
  .profile-card-wrap {
    min-height: auto;
    margin-bottom: 18px;
  }

  .profile-photo-wrap {
    min-height: auto;
    max-width: 320px;
  }

  .profile-photo {
    height: auto;
  }
}

/* =========================
   PROJECTS SECTION
========================= */

.projects-section .row {
  --bs-gutter-x: 2rem;
}

.projects-section .row.mt-5 {
  text-align: center;
}

.projects-section .row.justify-content-center {
  justify-content: center;
}

/* =========================
   ABOUT PAGE 
========================= */

.about-card {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  max-width: none;
}

/* =========================
   ABOUT PAGE — SECTION CARDS 
========================= */

main .about-box,
.content .about-box,
div.about-box {
  background: white;
  border-radius: 20px;
  padding: 40px 48px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  
  max-width: 980px; 
  width: 100%;
  box-sizing: border-box; 
  
  margin: 0 auto 24px auto; 
  display: block;
}

.about-box:first-of-type {
  margin-top: 0;
}

.about-box:last-child {
  margin-bottom: 0;
}

.about-box h2 {
  margin: 0 0 24px;
  font-weight: 400; 
  font-size: 32px; 
  letter-spacing: -0.01em; 
  line-height: 1.3;
}

.about-box p {
  margin: 0 0 1.5rem;
  line-height: 1.85;
  font-size: 18px;
}

.about-box p:last-child {
  margin-bottom: 0;
}

/* =========================
   ABOUT GALLERY
========================= */

.about-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px; 
  margin-top: 24px;
}

@media (max-width: 900px) {
  .about-gallery {
    grid-template-columns: 1fr;
  }
}

.about-gallery-item {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
  aspect-ratio: 1 / 1;
}

.about-gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.about-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   BACKGROUND 
========================= */

html,
body {
  background-color: #f5f7fa;
}

main,
.page-content,
.single-page-content,
.content,
.intro-header {
  background-color: #f5f7fa;
}

section.section-primary-bg,
section.section-primary-bg.projects-section {
  background-color: #f5f7fa;
}

section.section-primary-bg .container,
section.section-primary-bg .container-fluid {
  background-color: transparent;
}

/* =========================
   PROJECT CARDS
========================= */

.project-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
  margin-top: 1.5rem;
  max-width: 980px; 
  margin-left: auto;
  margin-right: auto;
}

.project-card h2:first-child {
  margin-top: 0;
}

.project-card h2 {
  margin: 36px 0 14px;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.project-card p {
  margin: 0 0 24px;
  line-height: 1.8;
  font-size: 17px;
}

.project-card p:last-child {
  margin-bottom: 0;
}

.project-hero img {
  width: auto;
  max-width: 100%;
  max-height: 380px;
  height: auto;
  object-fit: contain;
}

.project-hero img.fixed-img {
  height: auto;
  object-fit: contain;
}

/* =========================
   CONTACT PAGE
========================= */

.contact-section {
  display: block;
  margin: 0 auto;
  max-width: 980px;
  width: 100%;
  box-sizing: border-box;
}

.contact-section h2 {
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.contact-section h3 {
  font-weight: 500;
  margin-bottom: 15px;
}

.contact-section p {
  line-height: 1.85;
}

.contact-section form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-section input,
.contact-section textarea {
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.contact-section input:focus,
.contact-section textarea:focus {
  outline: none;
  border-color: #7d7ad2;
}

.contact-section button {
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.contact-section button:hover {
  background: #6a67c4;
  transform: translateY(-1px);
}

.contact-section button:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .contact-section > div:last-child {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

/* =========================
   UNIFY PAGE HEADINGS 
========================= */

.container[role="main"] header h1,
.container[role="main"] .section-header .section-title {
  margin-top: 18px !important;
  margin-bottom: 8px !important;
  font-weight: 500 !important;
  font-size: 32px !important; 
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  line-height: 1.2 !important;
  color: #222 !important;
  display: block !important;
}

.container[role="main"] header p,
.container[role="main"] .section-header .section-subtitle {
  text-align: center !important;
  font-weight: 300 !important;
  color: #555 !important;
  margin-top: 0 !important;
  margin-bottom: 20px !important;
  font-size: 18px !important;
  display: block !important;
}

/* =========================
   DARK MODE IMAGE FIX (GLOBAL THEME OVERRIDE)
========================= */

@media (prefers-color-scheme: dark) {
  img,
  .profile-photo,
  .about-gallery-item img,
  .project-hero img {
    filter: invert(1) hue-rotate(180deg) !important;
    -webkit-filter: invert(1) hue-rotate(180deg) !important; 
    
    background-color: transparent !important; 
  }
}