/* Reset styles to prevent overflow issues */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; 
    width: 100%; 
}

a {
  color: #000000;
}

body {
    font-family: "Times New Roman", serif;
    background-color: #FFFFFF;
    color: #1a1a1a;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* HEADER */


header {
    background-color: #FFFFFF;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 22px;
    margin-left: 5%;
    margin-top: 2.5%;
    margin-right: 5%;
}

header h1 {
    font-size: 44px; 
    font-weight: normal; 
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header nav ul li {
    display: inline-block;
    padding-inline: 60px;
}

header nav ul li a {
    text-decoration: none;
    color: #000000;
    display: block;
    font-size: 17.5px;
}

header nav ul li a:hover {
    text-decoration: underline;
}

header nav ul li a.active {
    text-decoration: underline; /* Underline the active link */
}


/* PORTFOLIO */


main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Intro Paragraph */
.home-intro {
    text-align: center;
    width: 50%;
    margin: 0 auto;
    line-height: 1.6;
    margin-top: 15rem;
    margin-bottom: 15rem;
    margin-left: 20%; /* Match the body margin for this element */
    margin-right: 20%; /* Match the body margin for this element */
}

/* Centered Projects Section */
#project-section {
    display: flex;
    flex-direction: column;
    gap: 150px; /* Verticle Space between projects */
    width: 70%; /* Horizontal Space from sides */
    margin: 100px auto; /* Centers the projects section within the viewport */
    text-align: start; /* Aligns text and content centrally */
    align-items: center; /* Centers child elements horizontally */
}

.project {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Ensure top-alignment of text and images */
  gap: 30px;               /* Optional: for consistent space between sides */
  width: 100%;
}


.project-details, .project-images {
  flex: 1;
  max-width: 50%;
  min-width: 0;          /* Prevent it from stretching too wide */
}

.project-details h2 {
    align-items: flex-start;
    font-size: 1.5rem;
    font-weight: normal; /* Removes bold styling */
}

.project-description {
    font-size: 1rem;
    margin: 20px 0;
}

.project-skills {
    color: #BA1B1D;
    font-size: 0.9rem;
}

.project-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  width: 100%; /* or a fixed width like 500px */
  max-width: 600px; /* prevents it from getting too wide */
}

.project-images img {
  width: 100%;
  height: auto;
  object-fit: cover; /* prevents distortion */
}


/* ABOUT */


#about-section {
    display: flex;
    flex-direction: column;
    width: 70%; /* Horizontal Space from sides */
    margin: 13% auto; /* Centers the projects section within the viewport */
    text-align: start; /* Aligns text and content centrally */
    align-items: center; /* Centers child elements horizontally */
}

.about-section p {
  margin-bottom: 1em; /* Adds space below each paragraph */
  font-size: 0.9rem; /* Smaller font size */
}

.about {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Ensure top-alignment of text and images */
    gap: 10%;               /* Optional: for consistent space between sides */
    width: 65%;
    height: 200px;
}

.about-details, .about-images {
  flex: 1;
  max-width: 50%;
  min-width: 0;          /* Prevent it from stretching too wide */
}

.about-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.about-details p {
  font-size: 0.87rem;
  margin-bottom: 1em; /* Adjust this value to your preference */
}

.about-images {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%; /* Take full height of .about */
  width: 100%; /* Ensure it takes full width */
}

.about-images img {
  object-fit: cover;
  max-width: 100%;   
  height: 100%;
}


/* ANECDOTES */

/* Main image at the top */
.anecdotes-main-image {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 150px auto 70px auto;
  width: 50%;
}

.anecdotes-main-image img {
  max-width: 25%;
  width: 90%;
  height: auto;
}

/* Intro text below the image */
.anecdotes-intro {
  text-align: center;
  width: 60%;
  margin: 0 auto 180px auto;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Instagram-style feed container */
#anecdote-feed {
  width: 33.333%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 150px;
  padding-bottom: 100px;
}

/* Individual post */
.anecdote-post {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Image container with carousel functionality */
.anecdote-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  cursor: none;
  background: #f5f5f5;
}

.anecdote-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.anecdote-image.active {
  opacity: 1;
}

/* Custom cursor counter */
.anecdote-image-container::after {
  content: attr(data-counter);
  position: fixed;
  left: var(--mouse-x, 0);
  top: var(--mouse-y, 0);
  transform: translate(10px, 10px);
  pointer-events: none;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: "Times New Roman", serif;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.anecdote-image-container:hover::after {
  opacity: 1;
}

/* Post text content */
.anecdote-title {
  font-size: 1.3rem;
  font-weight: normal;
  margin-top: 20px;
  margin-bottom: 8px;
  text-align: center;
}

.anecdote-subtitle {
  font-size: 1rem;
  font-weight: normal;
  font-style: italic;
  margin-bottom: 12px;
  text-align: center;
  color: #4a4a4a;
}

.anecdote-description {
  font-size: 0.95rem;
  margin-bottom: 10px;
  text-align: center;
  line-height: 1.5;
}

.anecdote-skills {
  color: #BA1B1D;
  font-size: 0.85rem;
  text-align: center;
}

/* CONTACT */


#contact-section {
    display: flex;
    flex-direction: column;
    width: 70%; /* Horizontal Space from sides */
    margin: 11% auto; /* Centers the projects section within the viewport */
    text-align: start; /* Aligns text and content centrally */
    align-items: center; /* Centers child elements horizontally */
}

.contact {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Ensure top-alignment of text and images */
    gap: 10%;               /* Optional: for consistent space between sides */
    width: 75%;
}

.contact-details, .contact-images {
  flex: 1;
  max-width: 50%;
  min-width: 0;          /* Prevent it from stretching too wide */
}

.contact-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.contact-images {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200%; /* Take full height of .about */
  width: 200%; /* Ensure it takes full width */
}

.contact-images img {
  object-fit: contain;
  max-width: 50%;   
  height: auto;
}


/* FOOTER */


footer {
    text-align: center; /* Center the footer's text */
    /*padding: 20px 0; /* Vertical padding for the footer */
    background-color: #FFFFFF;
    position: relative;
    bottom: 0;
    box-sizing: border-box;
    width: 100%; /* Footer spans the full viewport width */
    margin: 20px; /* Ensure no conflicting global margins */
    margin-bottom: 5%;
}

.footer-container {
    display: flex;
    justify-content: space-between; /* Space out footer links evenly */
    align-items: center;
    width: 60%; /* Content respects 20% page margins */
    margin: 0 auto; /* Center footer container horizontally */
    padding: 0; /* Ensure no unnecessary internal padding */
    text-align: center; /* Center-align content */
}

.footer-link {
    font-family: "Times New Roman", serif;
    font-size: 0.8rem; /* Small footer text size */
    color: #000000; /* Black text */
    text-decoration: underline; /* Underlined links */
}





/* ------------------- */
/* 📱 Mobile Styles */
/* ------------------- */

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 18px;
    margin-left: 0;
    margin-right: 0;
  }

  header nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  header nav ul li {
    padding-inline: 0;
    display: block;
  }

  header h1 {
    font-size: 32px;
    text-align: center;
  }

  .home-intro {
  width: 90%;
  margin: 4rem auto;
  text-align: center;
}

.project-images {
  display: flex;
  flex-wrap: wrap;              /* Allow images to wrap into rows */
  justify-content: center;      /* Center the grid */
  gap: 10px;                    /* Small gap between images */
}

.project-images img {
  flex: 0 1 calc(50% - 10px);   /* 2 columns minus the gap */
  height: auto;
  width: 100%;
  object-fit: cover;            /* Optional: makes it look cleaner */
}

.footer-container {
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 90%;
  margin: 2rem auto;
  text-align: center;
}
}
