/* =========================
   Variables & Base Reset
   ========================= */
:root {
  --primary-color: #2c3e50;
  --accent-color:  #3498db;
  --text-color:    #2c2c2c;
  --nav-h:         64px;     /* navbar height */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text-color);
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  padding-top: calc(var(--nav-h) + 16px); /* keep content below fixed nav */
}

/* Anchor offset so in-page links don't hide under the sticky nav */
section, .title { scroll-margin-top: var(--nav-h); }

/* 3 x 4 full-screen grid behind your content */
.background-grid{
  position: fixed; inset: 0; z-index: -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows:    repeat(4, 1fr);
}

.bg-tile{
  position: relative;
  overflow: visible;         /* allow overlap if images are larger */
  pointer-events: none;      /* clicks pass through to your content */
}

.bg-tile img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  max-width: 90vw;   /* at most 90% of screen width */
  max-height: 90vh;  /* at most 90% of screen height */
  gap: 0;
}



/* =========================
   Top Navigation (Fixed)
   ========================= */
.main-nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: flex-end;     /* logo left, links right */
  gap: 16px;
  padding: 0 20px;
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Optional “shrink on scroll” state if you toggle the class in JS */
.main-nav.shrink {
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Inline links (desktop) */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: opacity .2s ease;
}
.nav-links a:hover { opacity: .85; }

/* CTA button on the right */
.btn, #contact-btn {
  margin-left: 12px;
  padding: .5rem 1rem;
  background: var(--accent-color);
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

/* Mobile menu toggle (hidden on desktop) */
.menu-toggle {
  display: none;
  font-size: 1.6rem;
  line-height: 1;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
}

/* =========================
   Content Cards / Sections
   ========================= */
h1, h2, h3, h4, h5 { color: var(--primary-color); }

.summary-box,
.work-experience,
.projects-slideshow,
.education,
.skills,
.certification {
  max-width: 1100px;
  margin: 1rem auto;
  padding: 1rem 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.title { text-align: center; padding-top: 10px; }
.work-experience h4 { padding-top: 10px; }
.work-experience p  { margin-top: -20px; }
.education { margin-top: -20px; }

/* Job blocks */
.job { margin: 1rem 0; }
.job-divider {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 20px 0;
  opacity: .6;
}
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
}

.job-header .job-title{       /* wrap long titles nicely */
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.date{
  margin-left:auto;
  white-space: nowrap;        /* keep it on one line on wide screens */
  color:#666;
  font-style: italic;
}

.job-header h4 { margin: 0; line-height: 1.2; }
.company { padding-top: 15px; color: #444; }
.date { white-space: nowrap; color: #666; font-style: italic; }

/* Dropdown content blocks */
.relevant-courses-container { margin-top: 20px; }
.dropdown-toggle {
  background: #ddd;
  border: 0;
  padding: 10px 15px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color .2s ease;
}
.dropdown-toggle:hover { background: #ccc; }
.dropdown-content {
  display: none;
  margin-top: 15px;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.dropdown-content h3 { margin: 10px 0 5px; color: var(--primary-color); }
.dropdown-content ul { margin-bottom: 15px; }

/* Profile section */
.profile-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.profile-image img {
  width: 250px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
}
.profile-summary {
  flex: 1;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
}
.degree, .job { margin: 1rem 0; }

/* Projects “slideshow” card (textual) */
.projects-slideshow {
  display: grid;
  grid-template-columns: 60px 1fr 60px; /* arrows / content / arrows */
  align-items: start;
  column-gap: 28px;
  background: #ecf8ff;
  padding: 2.25rem 2rem;
  border-radius: 15px;
}
.project-slide { max-width: 900px; margin: 0 auto; line-height: 1.6; }
.project-slide h4 { margin: 0 0 .35rem; }
#project-tech { display: block; margin: 0 0 .75rem; color: #566; }
#project-desc p { margin: .4rem 0; }

.arrow {
  width: 60px;
  text-align: center;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.arrow:hover { transform: scale(1.3); }

/* Certifications grid */
.certification {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.cert {
  width: 120px;
  height: auto;
  border-radius: 8px;
  transition: transform .3s ease;
}
.cert[src*="CSAP"] {
  transform: scale(1.14);
  transform-origin: center;
  margin-top: 12px;
}
.cert:hover { transform: scale(1.1); }

#toggleContentBtn {
  position: fixed;
  bottom: 80px;          /* above your scroll-up button */
  right: 20px;
  z-index: 2000;
  font-size: 1rem;
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#toggleContentBtn:hover {
  background: #217dbb;
}


#scrollTopBtn {
  display: none;                  /* hidden by default */
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  font-size: 1.5rem;
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: opacity 0.3s;
}

#scrollTopBtn:hover {
  background: #217dbb;  /* darker accent */
}

.hidden { display: none !important; }
body.content-hidden { padding-top: 0 !important; }




/* =========================
   Responsive (Mobile)
   ========================= */
@media (max-width: 768px) {
  /* Mobile hamburger visible */
  .menu-toggle { display: block; }

  /* Compact dropdown panel (hidden by default) */
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    right: 12px;
    display: none;
    flex-direction: column;
    gap: 10px;
    background: var(--primary-color);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    min-width: 220px;
  }
  /* Show when nav has .open (toggled in JS) */
  .main-nav.open .nav-links { display: flex; }

  /* Center CTA when space is tight */
  #contact-btn { margin-left: auto; }

  /* Stack profile area */
  .profile-section { flex-direction: column; text-align: center; }
  .work-experience,
  .summary-box,
  .education,
  .skills,
  .certification{
    padding: 0.8rem 1rem;     /* a little tighter padding on phones */
  }

  .job-header{
    flex-wrap: wrap;          /* allow content to break lines */
    align-items: flex-start;
    gap: .25rem .75rem;
  }

  .job-header .job-title{
    flex: 1 1 100%;           /* title on its own line */
    min-width: 100%;
  }

  .date{
    order: 7;                 /* move date to end of flex order */
    width: 100%;
    text-align: right;        /* date goes to next line, right aligned */
    white-space: normal;      /* allow wrapping if needed */
    margin-left: 0;
    margin-top: 2px;
  }
.summary-box,
  .work-experience,
  .projects-slideshow,
  .education,
  .skills,
  .certification {
    margin: 0.5rem 0.5rem;   /* smaller margins left/right */
    padding: 0.8rem 1rem;    /* less inner padding */

  }

   .projects-slideshow {
    grid-template-columns: 1fr;   /* single column */
    row-gap: 1rem;                /* space between arrow + content */
    padding: 1rem;                /* reduce padding */
  }

  .arrow {
    font-size: 1.5rem;
    width: auto;
    text-align: center;
    justify-self: center;        /* center arrows */
  }

  .project-slide {
    max-width: 100%;             /* let content use full width */
    margin: 0;                   /* no side squeeze */
  }

  .project-slide ul {
    padding-left: 1.2rem;        /* consistent with skills section */
    margin-left: 0;
  }
}

