/* ---------------- GLOBAL ---------------- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 70px 0 100px 0; /* account for fixed header (70px) and footer (100px) */
}

/* ---------------- HEADER ---------------- */
header {
  background: #78d75e;
  color: white;
  height: 70px; /* slim header */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.header-container {
  display: flex;
  justify-content: space-between; /* left group vs logo */
  align-items: center;
  height: 100%;
  padding: 0 0.5rem;
}

.left-container {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.menu-toggle {
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: none; /* hidden on large screens */
}

.logo-container {
  display: flex;
  align-items: right;
}

.logo-container img {
  height: 100px; /* fills header height evenly */
  object-fit: contain;
}

/* ---------------- NAVIGATION ---------------- */
nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  margin: 0;
  padding-bottom: 0px; /* ensures bottom alignment looks clean */
}

nav a.active {
  border-bottom: 2px solid yellow;
}

/* ---------------- DROPDOWNS ---------------- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #78d75e;
  min-width: 160px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  z-index: 1000;
  flex-direction: column;
}

.dropdown-content a {
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background: #66c24d;
}

.dropdown-content a.active {
  background-color: #1a73e8; /* blue background */
  color: #fff;
  border-radius: 4px;
  border-bottom: 2px solid #1a73e8;
  font-weight: bold;
}

/* Show dropdown on hover (desktop) */
.dropdown:hover .dropdown-content {
  display: flex;
}

/* ---------------- FOOTER ---------------- */
footer {
  background-color: #2c3e50;
  color: white;
  padding: 20px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

footer > div {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  align-items: center;
  text-align: center;
  gap: 15px;
}

footer a {
  color: #ecf0f1;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ---------------- SECTIONS ---------------- */
.project-section,
.resume-section {
 display: none;
}

.project-section.active,
.resume-section.active{
 display: block !important;
}


main section {
  display: none;
  padding: 0.2rem 0rem 0rem 0rem;
  border-bottom: 2px solid #ddd;
}

main section.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

.landing-img {
  max-width: 100%;   /* never overflow container */
  height: auto;
}

.tab-content { display: none; }
.tab-content.active { display: block !important; }
/* ---------------- EXPERIENCE ---------------- */
.experience-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
}

.experience-block {
  flex: 1;
  min-width: 300px;
  background: #f9f9f9;        /* light background */
  border: 1px solid #ddd;     /* subtle border */
  border-radius: 8px;         /* rounded corners */
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* soft shadow */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.experience-block:hover {
  transform: translateY(-4px); /* lift effect */
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.experience-block h2 {
  margin-top: 0;
  color: #1a73e8; /* accent color */
}

.experience-block ul {
  padding-left: 1.2rem;
}

/* ---------------- RESUME ---------------- */
.resume-container,
.education-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.resume-photo img {
  max-width: 220px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.resume-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.resume-box {
  background: #f9f9f9;
  border-top: 6px solid #ff5722; /* orange stripe for resume */
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resume-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.resume-box h2 {
  margin-top: 0;
  color: #1a73e8; /* accent color */
}

/* ---------------- TAB LINKS ---------------- */
.tab-link,
.dropdown-content a {
  color: #333;
  text-decoration: none;
  padding: 8px 12px;
  display: block;
}

.skills-container {
  display: flex;              /* side-by-side layout */
  gap: 2rem;                  /* space between columns */
  align-items: flex-start;
}

.skills-box {
  flex: 1;                    /* each column takes equal width */
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Stripe on top of each box */
.skills-box {
  border-top: 6px solid #1a73e8;
}

.tab-link.active,
.dropdown-content a.active {
  background-color: #1a73e8;   /* blue highlight */
  color: #fff;
  border-radius: 4px;
}

/* ---------------- About Me ---------------- */
.about-container {
  display: flex;              /* side-by-side layout */
  align-items: flex-start;    /* align items at the top */
  gap: 2rem;                  /* space between photo and text */
  padding: 0.2rem;
}

.about-photo {
  flex: 0 0 250px;               /* fixed width for photo */
}

.about-photo img {
  width: 100%;
  border-radius: 8px;
}

/* Welcome section under Home tab */
.welcome-section {
  width: 100%;
  max-width: 100%;
  padding: 1rem 3rem;
  margin: 0 auto;
  text-align: center;
  background: #1a73e8; /* bold background strip */
  color: #fff;         /* white text */
  box-sizing: border-box;
}

.welcome-section h1 {
  margin-bottom: 0.5rem;
  margin-top: 0;
  font-size: 1.8rem;
}

.welcome-section p {
  font-size: 1rem;
  max-width: 900px;
  margin: 0 auto; /* keeps text centered */
}

/* Landing container with text + infographic */
.landing-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem;
}

.landing-text {
  flex: 1.2;            /* smaller share of space compared to visuals */
  max-width: 600px;     /* limit text width */
}

.landing-visuals {
  flex: 1;
  display: flex;
  justify-content: center;
}

.landing-visuals img {
  width: 700px;        /* increase width */
  height: 450px;       /* increase height */
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.about-text {
  flex: 1;
  border-top: 4px solid #1a73e8; /* stripe on text container */
  padding-top: 0rem;
}

.skills-diagram-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem;
}

.diagram-left img {
  width: 500px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.diagram-right {
  flex: 1;
}

.diagram-right h2 {
  margin-bottom: 1rem;
  color: #1a73e8;
}

.diagram-right p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* MEAL Section Styling */
.skills-diagram-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 60px 0;
  gap: 40px;
  background-color: #f9fbfd; /* subtle background */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Left text block */
.skills-diagram-container .diagram-left {
  flex: 1;
  padding: 20px;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}

.skills-diagram-container .diagram-left h2 {
  border-left: 6px solid #00796b; /* teal accent */
  padding-left: 12px;
  color: #00796b;
  font-size: 26px;
  margin-bottom: 20px;
}

.skills-diagram-container .diagram-left p {
  margin-bottom: 16px;
  font-size: 16px;
}

/* Right infographic block */
.skills-diagram-container .diagram-right {
  flex: 1;
  text-align: center;
}

.skills-diagram-container .diagram-right img {
  max-width: 65%;   /* reduced size for balance */
  height: auto;
  margin: 0 auto;
  display: block;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Banner text */
.skills-diagram-container h3 {
  margin-top: 20px;
  font-size: 20px;
  color: #00796b;
  font-weight: 600;
}

.skills-diagram-container p {
  font-size: 15px;
  color: #555;
}

/* ---------------- CODE SAMPLES ---------------- */
/* FIX: ensure code section always visible */


#code-samples .code-section.active {
  display: block !important;
}

.code-wrapper pre {
  background: #1e1e1e;
  color: #fff;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
}

/* Tabs */
.code-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.tab-btn {
  padding: 6px 12px;
  background: #2d2d2d;
  color: #ccc;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.tab-btn.active {
  background: #007acc;
  color: white;
}

/* Code panels */
.code-content {
  display: flex;
}

.code-content.active {
  display: block;
}

/* Smooth UX */
.copy-btn {
  background: #007acc;
  border: none;
  padding: 6px 10px;
  border-radius: 5px;
  color: white;
  cursor: pointer;
}

.copy-btn.copied {
  background: green;
}

.copy-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 5px;
  cursor: pointer;
}

/* Panel base */
.dropdown-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: #f9f9f9;
  padding: 0 15px;
  border-left: 3px solid transparent;
}

/* Open state */
.dropdown-panel.open {
  padding: 15px;
  border-left: 3px solid #007acc;
}

/* Button styling */
.dropdown-button {
  width: 100%;
  text-align: left;
  padding: 12px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

/* Active button */
.dropdown-button.active {
  background: #eef6ff;
}

/* Arrow rotation */
.dropdown-button .arrow {
  transition: transform 0.3s ease;
}

.dropdown-button.active .arrow {
  transform: rotate(180deg);
}
/* ---------------- MOBILE ---------------- */
@media (max-width: 768px) {
  body {
    padding: 70px 0 0 0;
  }

  nav {
    flex-direction: column;
    background: #78d75e;
    padding: 0.5rem;
    position: absolute;   /* detach from header flow */
    top: 50px;            /* directly below toggle */
    left: 0;
    width: 200px;
    z-index: 1000;
    display: none;
    max-height: 0;        /* collapsed by default */
    overflow: visible;
    transition: max-height 0.3s ease-out;
  }

  nav.active {
    display: flex;
    max-height: 2000px;   /* expand to show all dropdowns */
  }
 
  .menu-toggle {
    display: block;       /* show toggle button */
  }

  /* Parent dropdown container */
  .dropdown {
    position: relative;
  }

  .dropdown-content {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 1001;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    background: #66c24d;
    min-width: 160px;
    margin-left: 0rem;
  }

  .dropdown:hover .dropdown-content {
    display: none; /* show on mobile */
  }

  .dropdown.active .dropdown-content {
    display: flex; /* show when tapped */
  }

  .experience-container,
  .resume-container,
  .education-container {
    flex-direction: column;
    align-items: center;
    text-align: justify;
  }

  .resume-details {
    width: 100%;
    align-items: justify;
  }

  .resume-box {
    width: 100%;
    text-align: justify;
  }

  .resume-photo img {
    margin-bottom: 1rem;
  }

  .about-container {
    flex-direction: column;   /* stack vertically */
    text-align: justify;
  }

  .about-photo {
    margin-bottom: 1.5rem;
  }

  .about-text {
    text-align: justify;         /* keep text aligned left */
  }

  .skills-container {
    flex-direction: column;   /* stack vertically */
  }

  .landing-container {
    flex-direction: column;
    text-align: justify;
  }

  .landing-visuals {
    margin-top: 2rem;
  }
  .landing-visuals img {
    max-width: 100%;
  }

  .skills-diagram-container {
    flex-direction: column;
    text-align: center;
  }

  .diagram-left img {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  .skills-diagram-container.meal {
    flex-direction: column;
    align-items: center;
  }

  .code-wrapper {
    padding: 1rem;
  }

  .code-wrapper pre {
    font-size: 12px;
    padding: 0.5rem;
  }

  .skills-diagram-container.meal .diagram-left,
  .skills-diagram-container.meal .diagram-right {
    width: 100%;
    text-align: center;
  }

  .skills-diagram-container.meal .diagram-left h2 {
    border-left: none;
    border-top: 4px solid #00796b;
    padding-top: 10px;
    padding-left: 0;
  }

  /* Highlight parent link when dropdown is active */
  .dropdown.active > .tab-link {
    background: #4fa63a;
    color: #fff;
    font-weight: bold;
  }

  /* Footer not fixed on mobile */
  footer {
    position: static;
  }
}


