/* ==========================================================================
   1. GLOBAL STYLES & RESET
   ========================================================================== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Poppins', 'Segoe UI', sans-serif;
	text-decoration: none;
	scroll-behavior: smooth;
	list-style: none;
}

section {
	min-height: 100vh;
	padding: 8rem 12%;
	width: 100%;
	position: relative;
}

/* ==========================================================================
   2. FLOATING NAVIGATION HEADER
   ========================================================================== */
header {
	position: fixed;
	top: 1rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5rem;
	background-color: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: white;
	padding: 0.6rem 2rem;
	border-radius: 3rem;
	z-index: 1000;
	width: auto;
	max-width: 90%;
	transition: all 0.3s ease-in-out;
}

.logo {
	color: white;
	font-size: 1.5rem;
	font-weight: 600;
	text-wrap: nowrap;
	transition: 0.3s ease-in-out;
}

.logo:hover {
	transform: scale(1.02);
}

.nav-link {
	display: flex;
	gap: 2rem;
}

li a {
	color: white;
	position: relative;
	font-weight: 300;
}

li a::before {
	position: absolute;
	content: '';
	width: 0;
	left: 0;
	height: 4px;
	top: 25px;
	border-radius: 1rem;
	transition: 0.3s ease-in-out;
	background: linear-gradient(to right, rgb(0, 157, 255), rgb(255, 0, 255));
}

li a:hover::before {
	width: 100%;
}

.visit-btn {
	padding: 0.6rem 1.5rem;
	border-radius: 3rem;
	border: none;
	font-weight: 500;
	font-size: 1rem;
	color: white;
	background-color: #222222;
	cursor: pointer;
	text-wrap: nowrap;
	transition: 0.3s ease-in-out;
}

.visit-btn:hover {
	background: linear-gradient(to right, rgb(255, 0, 255), rgb(0, 157, 255));
	transform: scale(1.03);
}

#menu-bar {
	font-size: 1.8rem;
	color: white;
	cursor: pointer;
	display: none; /* Hidden on desktop views */
}

/* ==========================================================================
   3. ABOUT SECTION
   ========================================================================== */
.about {
	display: flex;
	align-items: center;
	justify-content: center;
}

.about .about-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10rem;
}

.about img {
	width: 25vw;
	min-width: 200px;
	border-radius: 50%;
}

.info-box {
	display: flex;
	flex-direction: column;
	text-align: center;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
}

.info-box h3 {
	font-size: 1.8rem;
	font-weight: 500;
	opacity: 0.8;
}

.info-box h1 {
	font-size: 4rem;
	font-weight: 600;
	color: #111111;
}

.info-box span {
	background: linear-gradient(to right, rgb(0, 157, 255), rgb(255, 0, 255));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: 2rem;
	font-weight: 600;
}

.btn-group {
	display: flex;
	gap: 1rem;
}

.btn {
	border-radius: 3rem;
	padding: 0.5rem 1.5rem;
	border: 2px solid black;
	cursor: pointer; 
	font-weight: 500;
	text-wrap: nowrap;
	transition: 0.2s ease-in-out;
	background-color: transparent;
	color: black;
}

.btn:hover {
	background-color: black;
	color: white;
}

.socials {
	display: flex;
	gap: 2rem;
}

.socials i {
	font-size: 2.5rem;
	color: #222222;
	cursor: pointer;
	transition: 0.2s ease-in-out;
}

.socials i:hover {
	transform: scale(1.1);
	color: rgb(0, 157, 255);
}

/* ==========================================================================
   4. EXPERIENCE SECTION
   ========================================================================== */
.experience {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 4%;
  color: #111111;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 60px;
  letter-spacing: -0.5px;
}

.experience-layout {
  display: flex;
  gap: 50px;
  align-items: stretch;
  justify-content: center;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  flex: 1.3;
}

.grid-card {
  border: 1.5px solid #222222;
  border-radius: 28px;
  padding: 35px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  color: white;
  background-color: black;
}

/* Keeps text components inside card white when card is hovered */
.grid-card:hover .desc {
  color: #cccccc;
}

.grid-card:hover .card-icon {
  color: #ffffff;
}

.card-icon {
  font-size: 1.5rem;
  color: #111111;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.job-title {
  font-size: 1.25rem;
  font-weight: 600;
  background: linear-gradient(45deg, #3a7bd5, #db36a4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.years {
  font-size: 1rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 10px;
}

.grid-card:hover .years {
  color: white;
}

.desc {
  font-size: 0.9rem;
  color: #555555;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.experience-image-box {
  flex: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.experience-image-box img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 40px;
}

/* ==========================================================================
   5. PROJECTS SECTION
   ========================================================================== */
.projects {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 4%;
}

.projects-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 60px;
}

.projects-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: stretch;
}

.project-card {
  flex: 1;
  background-color: #ffffff;
  border: 1.5px solid #222222;
  border-radius: 35px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-content {
  text-align: center;
  padding: 25px 10px 10px 10px;
}

.project-content h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #111111;
  margin-bottom: 15px;
}

.project-content p {
  font-size: 0.95rem;
  color: #555555;
  line-height: 1.5;
  margin-bottom: 25px;
}

.project-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.proj-btn {
  padding: 10px 22px;
  border: 1.5px solid #222222;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111111;
  background-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.proj-btn:hover {
  background-color: #111111;
  color: #ffffff;
}

.project-card.featured-card {
  background-color: #000000;
  border-color: #000000;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.featured-card .project-content h3 {
  color: #ffffff;
}

.featured-card .project-content p {
  color: #ffffff;
}

.featured-card .proj-btn {
  border-color: #ffffff;
  color: #ffffff;
}

.featured-card .proj-btn:hover {
  background-color: #ffffff;
  color: #000000;
}

/* ==========================================================================
   6. CONTACT SECTION
   ========================================================================== */
.contact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 4%;
  text-align: center;
}

.contact-title {
  font-size: 3rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 45px;
  letter-spacing: -0.5px;
}

.contact-form {
  max-width: 680px;
  margin: 0 auto;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid #222222;
  border-radius: 50px;
  padding: 18px 35px;
  background-color: #ffffff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.input-group:focus-within {
  border-color: #3498db;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.input-group i {
  font-size: 2.2rem;
  color: #000000;
  margin-right: 20px;
}

.input-group input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 1.6rem;
  color: #222222;
  background: transparent;
}

.input-group input::placeholder {
  color: #888888;
  font-weight: 400;
}

.submit-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.submit-btn {
  padding: 10px 32px;
  border: 1.5px solid #222222;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #000000;
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.submit-btn:hover {
  background-color: #000000;
  color: #ffffff;
}

.submit-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   7. FOOTER SECTION
   ========================================================================== */
.footer {
  width: 100%;
  padding: 60px 4% 30px 4%;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-links {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-bottom: 25px;
}

.footer-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111111;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.7;
}

.copyright {
  font-size: 0.8rem;
  color: #666666;
  font-weight: 500;
}

/* ==========================================================================
   8. RESPONSIVE DESIGN & MOBILE MENU MECHANICS
   (Requires: <meta name="viewport" content="width=device-width, initial-scale=1.0">)
   ========================================================================== */

/* Prevent accidental sideways scrolling on small screens */
html, body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

/* ---------- Tablet & small laptops (<= 992px) ---------- */
@media (max-width: 992px) {
  section {
    padding: 7rem 6%;
  }

  header {
    gap: 2.5rem;
  }

  .nav-link {
    gap: 1.2rem;
  }

  /* About: photo, text, buttons and socials are all direct children of
     .about-container, so stack them in a centered column */
  .about .about-container {
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
  }

  .about img {
    width: 40vw;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  .info-box h1 {
    font-size: 3rem;
  }

  .info-box h3 {
    font-size: 1.5rem;
  }

  .info-box span {
    font-size: 1.6rem;
  }

  /* Experience: stack the image under the cards */
  .experience-layout {
    flex-direction: column;
    gap: 40px;
  }

  .experience-image-box {
    width: 100%;
    flex: none;
  }

  .experience-image-box img {
    max-height: 380px;
  }

  /* Projects: allow cards to wrap into 2 columns */
  .projects-grid {
    flex-wrap: wrap;
  }

  .project-card {
    flex: 1 1 calc(50% - 30px);
  }

  .section-title,
  .projects-title,
  .contact-title {
    font-size: 2.6rem;
  }
}

/* ---------- Mobile (<= 768px) ---------- */
@media (max-width: 768px) {
  section {
    padding: 6rem 5% 4rem;
    min-height: auto;
  }

  /* Header + hamburger menu */
  header {
    width: 92%;
    max-width: 92%;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .nav-link {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px 0;
    border-radius: 1.5rem;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);

    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-15px);
    transition: all 0.3s ease-in-out;
  }

  .nav-link.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  li a::before {
    top: 30px;
  }

  /* !important is needed: the HTML gives this link an inline display style */
  .visit-btn {
    display: none !important;
  }

  #menu-bar {
    display: block; /* Show hamburger icon */
  }

  /* About */
  .about .about-container {
    gap: 2rem;
  }

  .about img {
    width: 55vw;
    max-width: 260px;
  }

  .info-box {
    gap: 1.2rem;
  }

  .info-box h1 {
    font-size: 2.4rem;
  }

  .info-box h3 {
    font-size: 1.3rem;
  }

  .info-box span {
    font-size: 1.4rem;
  }

  .btn-group {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* The Contact button has an inline margin-left in the HTML; the flex gap handles spacing */
  .btn-group .btn {
    margin-left: 0 !important;
  }

  .socials {
    gap: 1.5rem;
  }

  .socials i {
    font-size: 2.2rem;
  }

  /* Experience */
  .experience,
  .projects {
    padding: 60px 5%;
  }

  .section-title,
  .projects-title,
  .contact-title {
    font-size: 2.2rem;
    margin-bottom: 35px;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .grid-card {
    padding: 25px;
    border-radius: 22px;
  }

  .experience-image-box img {
    max-height: 300px;
    border-radius: 28px;
  }

  /* Projects: single column */
  .projects-grid {
    flex-direction: column;
    gap: 22px;
  }

  .project-card {
    flex: none;
    border-radius: 28px;
  }

  /* Contact */
  .contact {
    padding: 60px 5%;
  }

  .input-group {
    padding: 14px 22px;
  }

  .input-group i {
    font-size: 1.6rem;
    margin-right: 14px;
  }

  .input-group input {
    font-size: 1.2rem;
    min-width: 0;
  }

  /* Footer */
  .footer {
    padding: 40px 5% 25px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 18px 24px;
  }
}

/* ---------- Small phones (<= 480px) ---------- */
@media (max-width: 480px) {
  section {
    padding: 5.5rem 5% 3rem;
  }

  header {
    padding: 0.5rem 1.2rem;
  }

  #menu-bar {
    font-size: 1.6rem;
  }

  .info-box h1 {
    font-size: 2rem;
  }

  .info-box h3 {
    font-size: 1.1rem;
  }

  .info-box span {
    font-size: 1.2rem;
  }

  .section-title,
  .projects-title,
  .contact-title {
    font-size: 1.9rem;
  }

  .job-title {
    font-size: 1.1rem;
  }

  .project-content h3 {
    font-size: 1.35rem;
  }

  .project-btns {
    flex-wrap: wrap;
  }

  .input-group {
    padding: 12px 18px;
  }

  .input-group input {
    font-size: 1rem;
  }

  .input-group i {
    font-size: 1.3rem;
    margin-right: 10px;
  }
}

/* ---------- Mobile safety fixes (phones such as the Galaxy S24, ~360-412px wide) ---------- */
html {
  -webkit-text-size-adjust: 100%; /* stop Android from auto-inflating text */
  text-size-adjust: 100%;
}

@media (max-width: 992px) {
  .about .about-container {
    width: 100%;
  }

  /* flex: 1.3 / 0.9 collapse these when the layout switches to a column */
  .experience-grid,
  .experience-image-box {
    flex: none;
    width: 100%;
  }

  /* let grid/flex children shrink instead of forcing the page wider */
  .grid-card,
  .project-card,
  .info-box {
    min-width: 0;
    max-width: 100%;
  }

  .desc,
  .job-title,
  .project-content p {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 768px) {
  .about {
    min-height: 100svh; /* fills the visible screen even with the Android URL bar */
  }

  .experience-layout,
  .experience-grid {
    width: 100%;
  }

  .experience-image-box img {
    height: auto;
  }
}
