html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background-color: #111;
  position: relative;
  overflow-x: hidden;
  font-family: sans-serif;
  color: #e0e0e0;
}

/* Background Effect */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url('background.jpg');
  background-size: cover;
  background-attachment: fixed;
  opacity: 0;
  animation: fadeInBackground 8s forwards;
  z-index: -1;
}

@keyframes fadeInBackground {
  to { opacity: 0.08; }
}

/* Layout Containers */
.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 0;
}

.split-container {
  display: flex;
  align-items: center;
  gap: 4rem;
  /* Change 10% to 20px for consistent side gutters */
  padding: 4rem 20px; 
  max-width: 1024px;
  margin: 0 auto;
}

.split-container.reverse {
  flex-direction: row-reverse;
}

/* Full-width text container that respects site margins */
.full-width-text {
  max-width: 1024px; /* Matches your .split-container max-width */
  margin: 0 auto;    /* Centers it on the page */
  padding: 2rem 20px; /* Matches the consistent side gutters we discussed */
  text-align: left;  /* Standard left-justified reading */
  box-sizing: border-box; 
}

/* Tighten the gap when full-width text follows a split section */
.split-container + .full-width-text {
  padding-top: 0;
  margin-top: -1rem; /* Optional: pull it slightly closer if it still feels far */
}

/* Adjusted Flex Ratios: Text gets more room by default */
.split-image { flex: 1; }
.split-text { flex: 1.5; text-align: left; }

/* Image Types */
.img-circle img {
  width: 30vmin;
  height: 30vmin;
  border-radius: 50%;
  border: 3px solid #999;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
  object-fit: cover;
}

.img-banner img {
  width: 100%;
  max-width: 1024px;
  height: auto;
}

/* Limit the height of portrait-oriented images in split views */
.split-image img {
  width: auto;         /* Allow width to scale proportionally */
  max-width: 100%;     /* But never wider than its column */
  max-height: 550px;   /* The "goldilocks" height for book covers */
  object-fit: contain; /* Ensures the image isn't cropped */
  display: block;
  margin: 0 auto;      /* Centers it if it's narrower than the column */
}

/* Fix for the huge LinkedIn Image */
.hero-banner img {
    width: 100%;
    max-width: 550px; /* Limits the size so text isn't squashed */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Typography */
h1, h2, h3 { color: #e0e0e0; margin-top: 0; line-height: 1.2; }
h3 { font-size: 2.5rem; }
p { font-size: 1.1rem; line-height: 1.6; margin-bottom: 1.5rem; }

a { color: #6ac4df; text-decoration: none; transition: color 0.3s; }
a:visited { color: #ddc697; }
a:hover { text-decoration: underline; }

/* Scroll Animations */
.scroll-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Fix */
@media (max-width: 768px) {
  .split-container, .split-container.reverse {
    flex-direction: column !important;
    padding: 2rem 20px; /* Matching the 20px gutter */
    text-align: center;
  }
  .split-text { text-align: center; }
  .hero-banner img { max-width: 90%; }
}

footer {
  text-align: center;
  padding: 10px;
  width: 100%;
  background-color: #111;
  color: #999;
  border-top: 1px solid #333;
}

footer a {
  display: inline-block;
  cursor: pointer;
  color: #ddd;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease-in-out, transform 0.2s ease-in-out;
  padding: 2px 5px;
}

footer a:hover {
  color: #1e90ff;
  text-decoration: underline;
  transform: scale(1.1);
}

