/* styles.css - updated: larger mobile portrait + tighter top spacing */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #cfd8e6;
  color: #333;
}

/* Navbar & Footer */
.navbar, .footer {
  padding: 10px 20px;
  min-height: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  color: white;
  z-index: 1000;
  box-sizing: border-box;
}
.navbar { position: fixed; top: 0; width: 100%; }
.footer { position: fixed; bottom: 0; width: 100%; } /* position: relative is needed so absolute positioning is relative to footer */
.nav-left { flex: 0 0 auto; display: flex; align-items: center; gap: 20px; }
.nav-left a.active {
  color: #ffd700;          /* highlight color, e.g., gold */
  font-weight: 700;        /* make it bolder */
  border-bottom: 2px solid #ffd700;  /* underline indicator */
}
.nav-right { flex: 0 0 auto; display: flex; align-items: center; gap: 15px; }
.navbar a { font-size: 0.8rem; font-weight: bold; color: white; text-decoration: none; white-space: nowrap; }
/* Ensure dropdown menu styling */
.nav-left .dropdown {
  position: relative;
}

.nav-left .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  min-width: 180px;
  border-radius: 6px;
}

.nav-left .dropdown:hover .dropdown-menu {
  display: block;
}

.nav-left .dropdown-menu li {
  padding: 0;
}

.nav-left .dropdown-menu a {
  display: block;
  padding: 8px 14px;
  color: white;
  text-decoration: none;
}

.nav-left .dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Highlight the parent link if a child is active (requires :has support) */
.nav-left .dropdown:has(.active) > a {
  color: #ffd700;
  font-weight: 700;
  border-bottom: 2px solid #ffd700;
}


/* Footer */
.footer a { font-size: 0.8rem; font-weight: bold; color: white; text-decoration: none; white-space: nowrap;}
.footer-left { font-size: 0.8rem; flex: 0 0 auto; display: flex; align-items: center; gap: 20px;}
.footer-right img { max-height: 22px; width: auto; }
.footer-center { position: absolute; left: 50%; transform: translateX(-50%); text-align: center;}
.footer-center img { max-height: 22px; width: auto; }

/* Logos */
.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display:inline-block; 
  vertical-align:middle;
  /* box-shadow: 0 0 6px rgba(0,0,0,0.25);  optional glow for extra highlight */
}

/* Gradient Box */
.container {
  margin: 100px auto;
  width: 90%;
  max-width: 1200px;
  padding: 20px;
  background: linear-gradient(to right,#eaf4f4,#fef9f4);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.content {
  flex: 0 0 72%;
  max-width: 72%;
  padding-right: 20px;
}
.container iframe {
  width: 100%;
  height: 100%; /* fills the container’s min-height */
  border: none;
  border-radius: 12px;
}

/* Portrait container - desktop: absolute pop-out; mobile will switch to flow */
.image-container {
  position: absolute;
  bottom: -40px;
  right: 0;
  pointer-events: none;
  z-index: 5;
}

.portrait-img,
.image-container img {
  max-width: 380px;
  height: auto;
  display: block;
  pointer-events: auto;
  border-radius: 6px;
}


/* Floating Buttons */
.floating-buttons {
  position: fixed;
  top: 75px;          /* pushes buttons below the nav-bar (adjust as needed) */
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.floating-buttons-bottom {
  position: fixed;
  bottom: 5vh;        /* pushes buttons to the bottom (adjust as needed) */
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.floating-btn {
  background: rgba(0,0,0,0.6);
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 25px;
  font-size: 14px;
  transition: background 0.3s ease;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 50px;
}
.floating-btn:hover { background: rgba(0,0,0,0.8); }

/* new: compact circular icon-only buttons */
.icon-btn {
  min-width: auto;      /* cancel out the wide rule */
  width: 42px;          /* small fixed size */
  height: 42px;         /* make it circular */
  padding: 0;           /* no extra padding */
  border-radius: 50%;   /* circle */
  font-size: 20px;      /* icon size */
  line-height: 1;       /* vertical centering */

}
.icon-btn img { max-height: 22px; width: auto; }

/* Copyright floating label */
.copyright-btn {
  background: transparent;      /* no background */
  color: #000000;                  /* black text */
  font-size: 12px;
  padding: 0;
  min-width: auto;
  box-shadow: none;             /* remove shadow */
  cursor: default;              /* not clickable */
  text-align: center;
  opacity: 0.7;                 /* softer look */
}
.copyright-btn img { max-height: 22px; width: auto; }
#year::after {
  content: " ";
}


/* --- Carousel: improved layout for centering mini-cards --- */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 18px 0;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.carousel-track {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 420ms cubic-bezier(.22,.9,.4,1);
  will-change: transform;
  touch-action: pan-y;
  transform: translate3d(0,0,0);
}

.carousel-slide {
  flex: 0 0 auto;
  width: min(300px, 78%);
  max-width: 320px;
  min-height: 84px;
  box-sizing: border-box;
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
}

.carousel-icon { font-size: 20px; }
.carousel-text { font-size: clamp(10px,0.9vw,13px); line-height: 1.2; }
.highlight { color: #006400; font-weight: bold; }

.carousel-text sup {
  font-size: 0.65em;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.08em;
}
@media (max-width: 420px) {
  .carousel-text sup { font-size: 0.72em; }
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: white;
  width:36px;
  height:36px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  z-index: 10;
}
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }

/* Typography */
.headline { color: #006400; font-weight: bold; font-size: 1.6rem; margin-top: 0; }
.subheadline { color: #006400; font-size: 1.2rem; }
.tagline { font-family: inherit; font-style: italic; color: black; font-size: 1rem; }
.description { font-size: 0.85rem; line-height: 1.4; }

/* Resume iframe */
.container iframe {
  width: 100%;
  height: calc(100vh - 200px);
  border: none;
}

/* Mobile: show portrait above content, make portrait larger & centered,
   and reduce top margin so image + headline are more "above the fold" */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
    margin: 40px auto;        /* <- reduced from 80px to 40px so the image sits higher */
    padding-bottom: 24px;
  }

  .image-container {
    position: relative;
    order: -1;
    bottom: 0;
    right: 0;
    margin: 8px 0 12px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
  }

  /* Increased mobile portrait size so image is very prominent on initial load */
  .image-container img,
  .portrait-img {
    max-width: 340px;   /* <-- increased to 300px for strong visual prominence */
    height: auto;
    display: block;
    pointer-events: auto;
    border-radius: 6px;
  }

  /* Slightly reduce headline size so it sits below the image cleanly */
  .headline { margin-top: 6px; font-size: 1.45rem; }

  .content {
    order: 0;
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  .carousel { margin-top: 12px; z-index: 1; width: 100%; }
  .floating-buttons { z-index: 999; }
}

/* Extra-narrow adjustments: for very narrow viewports reduce portrait slightly */
@media (max-width: 420px) {
  .image-container img { max-width: 280px; } /* slightly reduce for tiny widths */
  .container { padding-bottom: 90px; }
  .carousel-slide { width: min(260px, 86%); max-width: 280px; padding:12px; }
  .carousel { padding:14px 0; }
  .carousel-nav { width:34px; height:34px; }
}
