/* VARIABLES */
:root {
  --primary-color: #0B1F4A;
  --secondary-color: #1E3A8A;
  --accent-color: #0D6EFD;
  --text-color: #212529;
  --light-gray: #F8F9FA;
  --dark-gray: #343A40;
  --white: #FFFFFF;
  --radius: 8px;
  --transition: 0.3s ease;
  font-size: 16px;
  font-family: "Segoe UI", Roboto, sans-serif;
}

/* —— Base outline‑button style —— */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  background: transparent;
  color: var(--accent-color);
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.btn:hover {
  background: var(--accent-color);
  color: var(--white);
  opacity: 1;
}

/* —— Filled variation —— */
.btn.primary {
  background: var(--accent-color);
  color: var(--white);
}
.btn.primary:hover {
  background: transparent;
  color: var(--accent-color);
}

/* —— Outline variation —— */
.btn.outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn.outline:hover {
  background: var(--white);
  color: var(--primary-color);
}


/* GLOBAL RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  color: var(--text-color);
  background: var(--white);
  line-height: 1.6;
}
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.logo {
  font-size: 1.25rem;
  font-weight: 600;
}
.site-nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--accent-color); }
.site-nav .cta {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--accent-color);
  border-radius: var(--radius);
  color: var(--accent-color);
}
.site-nav .cta:hover {
  background: var(--accent-color);
  color: var(--white);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* HERO */
.hero {
  background: var(--primary-color);
  color: var(--white);
  padding: 4rem 0;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.hero-image img {
  border-radius: var(--radius);
  max-width: 300px;
  width: 100%;
}
.hero-copy h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.hero-copy h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #FFFFFF; /* Example: gold color */
}
.hero-copy p {
  max-width: 500px;
  margin-bottom: 1.5rem;
}
.hero-buttons .btn {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.hero .hero-copy h2 {
  color: #FFFFFF !important;
}
.btn.primary {
  background: var(--accent-color);
  color: var(--white);
}
.btn.primary:hover {
  background: var(--white);
  color: var(--accent-color);
}
.btn.outline {
  border: 1px solid var(--white);
  color: var(--white);
}
.btn.outline:hover {
  background: var(--white);
  color: var(--primary-color);
}

/* OVERVIEW */
.overview {
  text-align: center;
  padding: 3rem 0;
}
.overview p {
  max-width: 800px;
  margin: 0 auto 1rem;
}
.read-more {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 600;
}

/* ROLES */
.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.role-card {
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: var(--radius);
}
.role-card h3 {
  margin-bottom: 0.5rem;
}
.role-card h4 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
}
.role-card .link {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 600;
  transition: opacity var(--transition);
}
.role-card .link:hover { opacity: 0.8; }

/* PROJECTS */
.projects h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--light-gray);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.project-card h4 {
  margin: 1rem;
}
.project-card p {
  margin: 0 1rem 1rem;
  flex-grow: 1;
}
.project-card .btn.small {
  margin: 0 1rem 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* PUBLICATIONS TEASER */
.publications-teaser {
  padding: 3rem 0;
  background: var(--white);
  text-align: center;
}
.publications-teaser ul {
  list-style: none;
  margin: 1rem 0 1.5rem;
}
.publications-teaser li {
  margin-bottom: 0.5rem;
}
.publications-teaser .link {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 600;
}

/* FOOTER */
.site-footer {
  background: var(--dark-gray);
  color: var(--light-gray);
  padding: 2rem 0 1rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1rem;
}
.footer-inner a {
  color: var(--light-gray);
  text-decoration: none;
  transition: opacity var(--transition);
}
.footer-inner a:hover { opacity: 0.8; }
.footer-legal {
  text-align: center;
  font-size: 0.875rem;
  border-top: 1px solid var(--gray);
  padding-top: 1rem;
}

/* —— ABOUT-PAGE SECTION HEADINGS & SPACING —— */
.container h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

.section-bio,
.section-education,
.section-skills,
.section-experience,
.section-achievements,
.section-publications,
.section-patents,
.section-mentorship,
.section-interests,
.section-contact {
  padding: 3rem 0;
}

/* EDUCATION LIST */
.education-list {
  list-style: none;
}
.education-list li {
  margin-bottom: 1.5rem;
}

/* SKILLS GRID */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}
.skills-grid .skill {
  text-align: center;
}
.skills-grid .skill img {
  max-width: 60px;
  margin-bottom: 0.5rem;
  filter: invert(0%);
}

/* EXPERIENCE OVERVIEW */
.section-experience ul {
  list-style: none;
  margin-bottom: 1.5rem;
}
.section-experience ul li {
  margin-bottom: 1rem;
}
.section-experience .btn {
  margin-top: 1rem;
}

/* PUBLICATIONS & MENTORSHIP BUTTONS */
.section-publications .btn,
.section-mentorship .btn {
  margin-top: 1rem;
}

/* CONTACT SECTION */
.section-contact {
  text-align: center;
}
.section-contact .btn {
  margin: 0 0.5rem;
}

/* SUBTLE “FLASH” for ABOUT HERO */
.about-hero {
  background:
    linear-gradient(rgba(11,31,74,0.85), rgba(30,58,138,0.85)),
    url('images/about-hero-bg.jpg') center/cover no-repeat;
}
.about-hero .hero-image img {
  border: 4px solid var(--accent-color);
}
.about-hero .hero-copy h1,
.about-hero .hero-copy p {
  color: var(--white);
}

/* —— TWO-COLUMN GRID LAYOUT —— */
.container.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0;              /* vertical spacing around the entire split */
}

/* restore each section’s spacing inside columns */
.container.two-col section {
  padding: 0;
  margin-bottom: 2rem;
}

/* collapse to single column on narrow screens */
@media (max-width: 768px) {
  .container.two-col {
    grid-template-columns: 1fr;
  }
  .project-grid.two-col {
    grid-template-columns: 1fr;
  }

  .mobile-apps .project-grid.two-col .project-card:nth-child(-n+2) img {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 19.5 !important;
    object-fit: cover;
    max-height: 400px;      /* <-- your ceiling, adjust as needed */
  }
  .ai-cloud-images {
    flex-direction: column;    /* Stack vertically on mobile */
  }

  .ai-cloud-images img {
    width: 60%;               /* Control image size */
    max-width: 200px;         /* Prevent images from being too large */
    margin: 0 auto;           /* Center images horizontally */
  }

  /* NAV */
  .nav-toggle {
    display: block;
    cursor: pointer;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a {
    padding: 1rem;
    border-top: 1px solid var(--light-gray);
    margin: 0;
  }

  /* HERO */
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .hero-image,
  .hero-copy {
    width: 100%;
  }
  .hero-image img {
    max-width: 100%;
    height: auto;
  }

  /* OVERVIEW / TWO-COL SECTIONS → SINGLE COLUMN */
  .container.two-col {
    grid-template-columns: 1fr !important;
  }
  .project-grid.two-col {
    grid-template-columns: 1fr !important;
  }

  /* MOBILE‑APPS: first two images taller, rest auto */
  .mobile-apps .project-grid.two-col .project-card:nth-child(-n+2) img {
    aspect-ratio: 9/19.5;
    max-height: 400px;
    object-fit: cover;
  }

  /* reduce padding/gap */
  section {
    padding: 2rem 0;
  }
  .container {
    width: 95%;
  }

  .site-footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    padding-bottom: 1.5rem;
  }

  /* Simplify the nav */
  .footer-nav {
    width: 100%;
    margin: 0;
  }
  .footer-nav a {
    display: inline-block;
    margin: 0 .5rem;
    padding: .25rem 0;
  }
  .footer-nav a + a::before {
    content: "|";
    margin: 0 .5rem;
    color: var(--light-gray);
  }

  /* Center social links */
  .footer-social {
    width: 100%;
    margin-top: 0.5rem;
  }
  .footer-social a {
    margin: 0 .5rem;
  }

  /* Shrink legal notice */
  .footer-legal {
    font-size: 0.75rem;
    padding-top: 1rem;
  }

  /* Tame AI & Cloud images on phones */
  .ai-cloud-services .ai-cloud-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .ai-cloud-services .ai-cloud-images img {
    width: 100%;
    height: auto;
    /* enforce a 16:9 ratio so they’re not too tall */
    aspect-ratio: 4/4;
    max-height: 240px;
    object-fit: cover;
  }

  /* STACK HERO BUTTONS WITH GAP */
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;               /* space between buttons */
    align-items: center;     /* center them */
  }

  /* make each button fill a bit more, for rhythm */
  .hero-buttons .btn {
    width: 90%;
    max-width: 300px;
  }
}

/* center the nav and add separators */
.footer-nav {
  text-align: center;        /* center inline links */
  margin: 0 auto;            /* ensure it can shrink-wrap and center */
}

.footer-nav a {
  display: inline-block;
  margin: 0 0.5rem;          /* small left/right padding */
  color: var(--light-gray);
  text-decoration: none;
}

/* insert a bar before every link except the first */
.footer-nav a + a::before {
  content: "|";
  margin-right: 0.5rem;      /* space between bar and link */
  color: var(--light-gray);
}
.project-grid.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem; /* match your existing gap */
}

/* in 2‑col grids, let images size by aspect ratio */
.project-grid.two-col .project-card img {
  width: 100%;
  /* remove the old fixed height */
  height: auto;
  /* enforce a nice, consistent ratio */
  aspect-ratio: 4 / 3;
  /* crop to fill if needed */
  object-fit: cover;
}

/* make the first two mobile app images taller */
.mobile-apps .project-grid.two-col .project-card:nth-child(1) img,
.mobile-apps .project-grid.two-col .project-card:nth-child(2) img {
  /* pick a “taller” aspect ratio: width/height */
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  width: auto;
  height: 100%;
}

.mobile-apps .project-grid.two-col 
  .project-card:nth-child(-n+2) img {
  width: 100%;
  height: auto;

  /* keep the phone‑shape */
  aspect-ratio: 9 / 19.5 !important;
  object-fit: cover;

  /* stop growing taller than 400px */
  max-height: 1200px;
}

.ai-cloud-images {
  display: flex;
  justify-content: space-evenly;  /* spread centers evenly */
  align-items: center;
  margin-bottom: 3rem;
}

.ai-cloud-images img {
  flex: 0 0 25%;        /* each image is 25% of container width (half of the previous ~50%) */
  max-width: 25%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
}

section {
  padding: 4rem 0;    /* 4rem above and below */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

/* ——— Primary (Filled) ——— */
.btn.primary {
  background: var(--accent-color);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.btn.primary:hover {
  background: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

/* ——— Outline ——— */
.btn.outline {
  background: transparent;
  color: var(--accent-color);
  box-shadow: inset 0 0 0 1px var(--accent-color);
}

.btn.outline:hover {
  background: var(--accent-color);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* ——— Small Variant ——— */
.btn.small {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}