/* Justify text under experience section */
#experience p {
  text-align: justify;
}
/* Offset anchor scrolling to account for fixed header */
:root {
  --header-height: 72px; /* adjust if your header height changes */
}
html {
  scroll-padding-top: var(--header-height);
}
/* Ensure section headings are visible when targeted by fragment links */
section,
.contact-section,
#recommendation-letters,
#projects,
#about,
#skills,
#experience,
#Coursework {
  scroll-margin-top: calc(var(--header-height) + 8px);
}
/* Coursework Table Styling */
.coursework-table {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
  border-collapse: separate;
  border-spacing: 0.5rem 0.3rem;
  font-size: 1.08rem;
  color: #333;
}
.coursework-table td {
  background: #fffbea;
  border-radius: 8px;
  padding: 0.5em 0.7em;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  white-space: nowrap;
  min-width: 180px;
}
/* Coursework List Styling */
.coursework-list {
  columns: 4 120px;
  -webkit-columns: 4 120px;
  -moz-columns: 4 120px;
  list-style: disc inside;
  padding-left: 1.2rem;
  margin: 0 auto 1.5rem auto;
  max-width: 600px;
  font-size: 1.08rem;
  color: #333;
}
.coursework-list li {
  margin-bottom: 0.3em;
}
/* PDF Button Style */
.pdf-btn {
  background: #f6e27f;
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  margin: 0.7rem 0 1.2rem 0;
  transition: background 0.2s, transform 0.2s;
  vertical-align: middle;
  color: #0036b5;
  outline: 2px solid #ffe066;
}
.pdf-btn:hover, .pdf-btn:focus {
  background: #ffe066;
  transform: scale(1.08);
}
/* Recommendation Letters Section */
.recommendation-list {
  display: flex;
  gap: 0.8rem;
  flex-wrap: nowrap; /* keep items on single row */
  overflow-x: auto; /* allow horizontal scroll on small screens */
  -webkit-overflow-scrolling: touch;
  max-width: 1000px;
  margin: 0 auto 0.6rem auto;
  padding: 0.3rem 0;
}
.rec-item {
  background: #fff5d7;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  flex: 0 0 300px; /* fixed width so three fit on wide screens */
}
.rec-item .pdf-link {
  color: #0036b5;
  text-decoration: none;
  font-weight: 600;
}
/* Project Images: Equal and Suitable Dimensions */
.projects-grid .project img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background: #f6f6f6;
  display: block;
  margin: 0 auto 1rem auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
/* Firstpage slideshow */
.firstpage {
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: flex-start; /* place content at top */
  justify-content: center; /* center horizontally */
  padding-top: calc(var(--header-height) + 12px); /* space below fixed header */
}
.slideshow {
  position: absolute;
  inset: 0;
  display: block;
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.slideshow .slide.active {
  opacity: 1;
}
.slide-prev, .slide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.slide-prev { left: 12px }
.slide-next { right: 12px }
.firstpage-text {
  position: relative;
  z-index: 25;
  color: #002e7d;
  text-align: center;
}
/* Base Styles */



p {
    padding: 0;
    margin-bottom: 0;
    margin-top: 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  padding: 0;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #fffbea; /* beige-yellow background */
  color: #333;
}

/* Header / Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #f6e27f; /* yellow */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
  color: #333;
  font-weight: 700;
}

.brand h1 { font-size: 1.05rem; letter-spacing: 0.5px }

#nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

/* Make nav accessible and responsive */
#main-nav {
  display: block;
}

/* Ensure images are fluid */
img { max-width: 100%; height: auto; display: block }

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #b58900;
}

/* Section Styling */

.firstpage-text {
  padding-left: 1rem;
  padding-top: 1px;
  font-size: clamp(1.6rem, 4vw, 3.8rem);

}

.firstpage {
  min-height: 100vh;
  padding-top: 6rem;
  margin: 0;
  background-image: url("IMAGES/PROFILE PIC.jpeg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

section {
  min-height: 60vh;
  padding: 1.2rem 0.5rem;
  margin: 0;
  background-color: #fffbea;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

#skills, #Coursework {
  min-height: 30vh;
  padding: 1.5rem 0.5rem;
}

section h2 {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  font-size: 3rem;
  color: #0036b5;
  text-align: center;
}

section img {
  padding-top: 2rem;
  margin: 0;
}

.aboutme img {
  padding-left: 0;
  /* larger desktop image but remain fluid on small screens */
  max-width: 720px; /* increased from 380px */
  width: 100%;
  height: auto;
  margin: 1rem auto;
}

/* About Subsections */

.about-sub p {
    margin-bottom: 0.6rem;
}

.about-sub {
  text-align: justify;
  background: #fff5d7;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.about-sub h3 {
  color: #444;
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.4rem;
}

.project {
  background: #fff5d7;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.project h3 {
  margin-bottom: 0.5rem;
}

.project a {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f6e27f;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: background 0.3s;
}

.project a:hover {
  background: #ffdd44;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #f6e27f;
  color: #333;
}

.container {
        display: flex; /* Enables Flexbox layout */
        gap: 20px; /* Adds space between columns */
    }

    .column {
        flex: 1; /* Allows columns to grow and shrink equally */
        padding: 15px;
        border: 1px solid #ccc;
}

.contact-section {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  text-align: center;
  padding: 80px 40px;
}

.contact-section h1 {
  font-size: 3rem;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: #0036b5;
  text-align: center;
}

.contact-info {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  grid-template-columns: repeat(5, minmax(200px, 1fr)); /* force five columns */
  gap: 20px;
  margin-bottom: 40px;
  overflow-x: auto; /* allow horizontal scroll on small screens */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px; /* space for scroll */
}

.info-box {
  padding: 20px;
  scroll-snap-align: start;
}

.info-box i {
  font-size: 28px;
  color: #d1b892;
  margin-bottom: 10px;
}

.info-box h3 {
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 8px;
  color: #444;
}

/* Responsive breakpoints */
@media (max-width: 900px) {
  header { padding: 0.5rem 0.8rem }
  nav ul { gap: 1rem }
  #nav-toggle { display: inline-flex }
  #main-nav { display: none }
  #main-nav.open { display: block; position: absolute; top: 100%; right: 0; left: 0; background: #f6e27f; padding: 1rem 1rem; box-shadow: 0 6px 12px rgba(0,0,0,0.08) }
  #main-nav ul { flex-direction: column; gap: 0.6rem }
  #main-nav ul li { margin: 0.2rem 0 }
  header .brand { flex: 1 }
  .firstpage { min-height: 60vh }
  section h2 { font-size: 2rem }
  .projects-grid { gap: 0.8rem }
  .container { flex-direction: column }
  .contact-section { padding: 40px 16px }
}

@media (max-width: 520px) {
  section h2 { font-size: 1.6rem }
  .firstpage-text { padding-left: 0.5rem; font-size: clamp(1.2rem, 6vw, 2.6rem) }
  .rec-item { flex: 0 0 240px }
  .coursework-table td { min-width: 120px }
}

.info-box p {
  font-size: 14px;
  color: #666;
}

/* Resume download button */
.download-btn {
  display: inline-block;
  background: #0036b5;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.download-btn:hover {
  background: #002080;
  transform: translateY(-2px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.contact-form .row {
  display: flex;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 25px;
  outline: none;
  font-size: 14px;
}

.contact-form textarea {
  border-radius: 15px;
  resize: none;
  min-height: 120px;
}

.contact-form button {
  background: #d1b892;
  border: none;
  padding: 12px;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  color: white;
  transition: 0.3s;
}

.contact-form button:hover {
  background: #bfa278;
}

.social-icons {
  margin-top: 20px;
}

.social-icons a {
  margin: 0 10px;
  text-decoration: none;
  font-size: 20px;
  color: #555;
  transition: 0.3s;
}

.social-icons a:hover {
  color: #d1b892;
  transform: scale(1.2);
}
