/* Global box-sizing reset */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

@media (max-width: 700px) {
  html, body {
    overflow-x: hidden;
  }
  /* ensure contact sections never exceed viewport width */
  .contact-page .contact-sections,
  .contact-page .contact-sections * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Footer icon/text responsive styles */
.footer-link-text {
  display: inline;
  margin-left: 0.4em;
  vertical-align: middle;
}

@media (max-width: 700px) {
  .footer-link-text {
    display: none;
  }
}
body {
  font-family: Arial, sans-serif;
  text-align: center;
  padding: 5rem;
  background-color: #f5f5f5;
  color: #333;
}

/* Page footer (scope to .site-footer so article/project footers are not affected) */
footer.site-footer {
  background: #222;
  color: #eee;
  padding: 2rem 1rem 1.5rem 1rem;
  text-align: center;
  margin-top: 3rem;
  font-size: 1rem;
  letter-spacing: 0.01em;
  /* full-bleed across viewport */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  box-sizing: border-box;
  border-radius: 0;
}

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

footer a:hover {
  color: #fff;
}

.nav-tabs {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 2rem 0 3rem 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: max-height 0.3s ease;
}

/* Hamburger styles */
.nav-toggle {
  display: none;
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 2rem;
  height: 0.3rem;
  margin: 0.3rem 0;
  background: #333;
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 700px) {
  /* remove body horizontal padding so centering uses full viewport */
  body {
    padding-left: 0;
    padding-right: 0;
  background: transparent;
  color: #222;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.08rem;
  transition: background 0.2s, color 0.2s, transform 0.08s;
  text-decoration: none;
  box-shadow: none;
  }

  /* keep the hamburger fixed so it doesn't occupy layout width */
  .nav-toggle {
    position: fixed;
  transform: translateY(-2px);
    top: 1rem;
    left: 1rem;
/* Contact button styled like header nav button */
.contact-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: transparent;
  color: #222;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.08rem;
  transition: background 0.2s, color 0.2s, transform 0.08s;
  text-decoration: none;
  box-shadow: none;
  border: none;
  cursor: pointer;
}
.contact-btn:hover {
  background: #007bff;
  color: #fff;
  transform: translateY(-2px);
}
  }

  /* ensure contact sections span full width then use internal padding for gutters */
  .contact-sections {
    width: 100%;
    max-width: 400px;
    padding: 0 1rem;
    box-sizing: border-box;
    margin: 2rem auto;
  }

  /* Force center visually by using calc and transform so it ignores the fixed nav-toggle */
  .contact-sections {
    left: 50%;
    transform: translateX(-50%);
    position: relative; /* allow left/transform without taking it out of flow */
    max-width: 400px;
    width: calc(100% - 2rem);
  }
}

.nav-tabs {
  flex-direction: row;
  align-items: center;
  max-height: none;
  overflow: visible;
  margin: 2rem 0 3rem 0;
  width: auto;
}
.nav-tabs.open {
  max-height: none;
}
.nav-tabs li {
  margin: 0 1.5rem;
  width: auto;
}
.nav-tabs a {
  padding: 1rem 2rem;
  width: auto;
  text-align: center;
}
.nav-toggle {
  display: none;
}
body.menu-open {
  overflow-x: hidden;
}

/* Mobile nav: show burger, collapse menu */
@media (max-width: 700px) {
  .nav-tabs {
    flex-direction: column;
    align-items: flex-start;
    max-height: 0;
    overflow: hidden;
    margin: 0 0 2rem 0;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    background: #fff;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    z-index: 1000;
  }
  .nav-tabs.open {
    max-height: 500px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  .nav-tabs li {
    margin: 0.5rem 1rem;
    width: 100%;
  }
  .nav-tabs a {
    padding: 1rem 1.5rem;
    width: 100%;
    text-align: left;
  }
  .nav-toggle {
    display: flex;
  }
}

h1 {
  color: green;
}

/* Contact page sections layout */
.contact-sections {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  margin: 2rem auto;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}
.contact-form-section, .contact-info-section {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  flex: 1 1 350px;
  min-width: 250px;
}
.contact-form label {
  display: block;
  margin: 1rem 0 0.3rem 0;
  font-weight: bold;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
.contact-form button {
  background: #222;
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-form button:hover {
  background: #444;
}
.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  font-size: 1.1rem;
}
.contact-info-list li {
  margin-bottom: 1rem;
}

/* Social link styles used in contact page */
.contact-info-list .social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #222;
  text-decoration: none;
  font-weight: 600;
}
.contact-info-list .social-link svg {
  color: #111;
}
.contact-info-list .social-link:hover {
  text-decoration: underline;
}

@media (max-width: 800px) {
  .contact-sections {
    flex-direction: column;
    gap: 1.5rem;
    max-width: 400px;
    width: 100%;
    align-items: center;
    margin: 0 auto;
  }
  .contact-form-section, .contact-info-section {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  .contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .contact-form label,
  .contact-form input,
  .contact-form textarea,
  .contact-form button {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }
}

/* define UI vars */
:root {
  --burger-w: 2.5rem;
  --center-adjust: 0px; /* tweak this if center needs nudging */
}

@media (max-width: 700px) {
  .nav-toggle {
    width: var(--burger-w);
    height: calc(var(--burger-w) * 1);
  }

  /* Force center visually by compensating for half the burger width */
  .contact-sections {
    position: relative;
    left: 50%;
    transform: translateX(calc(-50% - (var(--burger-w) / 2) + var(--center-adjust)));
    max-width: 400px;
    width: calc(100% - 2rem);
  }
}

/* Scoped contact-page fixes */
.contact-page .page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}
.contact-page .contact-sections {
  position: static;
  left: auto;
  transform: none;
  width: 100%;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent horizontal overflow on contact page (do not include footer) */
.contact-page .page-content,
.contact-page .contact-sections {
  max-width: 100%;
  overflow-x: hidden;
}

/* Desktop nav link styles */
@media (min-width: 701px) {
  .nav-tabs a {
    background: transparent;
    color: #222;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s, transform 0.08s;
    text-decoration: none;
    box-shadow: none;
    font-weight: 700;
  }
  .nav-tabs a:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-2px);
  }
  .nav-tabs a:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
  }
  .nav-tabs li + li {
    margin-left: 1rem;
  }
}

/* Mobile nav link styles (improve appearance inside the hamburger menu) */
@media (max-width: 700px) {
  .nav-tabs a {
    display: block; /* ensure full clickable row */
    color: #222;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
  }
  .nav-tabs a:hover {
    background: rgba(0,0,0,0.04);
    color: #111;
  }
  .nav-tabs a:focus {
    outline: 3px solid rgba(0,123,255,0.25);
    outline-offset: 2px;
  }
  /* mark current/active link if present on mobile */
  .nav-tabs li.active a,
  .nav-tabs a.active,
  .nav-tabs a[aria-current="page"] {
    background: #007bff;
    color: #fff;
  }
}

/* Desktop improvements: larger tabs and full-fitting active background */
@media (min-width: 701px) {
  .nav-tabs a {
    font-size: 1.08rem; /* slightly larger for desktop */
    padding: 0.85rem 1.25rem; /* increase padding so background fully covers the tab */
    display: inline-block; /* allow background to hug the text */
  }
  /* Active / current page states */
  .nav-tabs li.active a,
  .nav-tabs a.active,
  .nav-tabs a[aria-current="page"] {
    background: #007bff;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,123,255,0.12);
    transform: none;
  }
}

/* Resume viewer styles */
.resume-viewer p {
  color: #444;
  margin-bottom: 0.5rem;
}

.viewer-controls .button {
  display: inline-block;
  background: #222;
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.viewer-controls .button:hover { background: #444; }

@media (max-width: 700px) {
  .pdf-embed iframe { height: 60vh; }
}

/* Experiences Article styles */

.experience-list {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.experience-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.company-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 8px;
  background: #fafafa;
  padding: 8px;
  flex: 0 0 84px;
}
.experience-content {
  flex: 1 1 auto;
}

.experience-content .role {
  margin:  0 0 0.25rem 0;
}

.experience-content p {
  text-align: left;
}

.experience-content .meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
  margin-top: 0;
}
.experience-content ul {
  margin: 0.5rem 0 0 1rem;
  text-align: left;
}

@media (max-width: 700px) {
  .experience-item {
    flex-direction: row;
    gap: 0.75rem;
  }
  .company-logo {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
  }
}

/* Education Article styles */

.education-list {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.education-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.edu-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 8px;
  background: #fafafa;
  padding: 8px;
  flex: 0 0 84px;
}

.education-content {
  flex: 1 1 auto;
}

.education-content p {
  text-align: left;
}

.education-content .role,
.education-content h3 {
  margin: 0 0 0.25rem 0;
}

.education-content .meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
  margin-top: 0;
}

.education-content ul {
  margin: 0.5rem 0 0 1rem;
    text-align: left;
}

@media (max-width: 700px) {
  /* When stacked on small screens, keep education items top-aligned for readability */
  .education-item {
    flex-direction: row;
    gap: 0.75rem;
  }
  .edu-logo {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
  }
}

/* Contact grid/cards */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr; /* force single column (stacked) on desktop) */
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto 1.5rem auto;
}
.contact-card {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  text-align: center;
}
.contact-card .card-icon {
  margin-bottom: 0.6rem;
  color: #222;
}
.card-link {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #222;
  text-decoration: none;
  margin-bottom: 0.25rem;
}
.card-link:hover { text-decoration: underline; }
.card-label {
  font-size: 0.9rem;
  color: #666;
}

/* Resume toolbar removed; viewer controls are inline in the HTML */

/* Presentation (profile picture + text) */
.presentation {
  display: flex;
  align-items: left;
  gap: 1.25rem;
  /* allow presentation to span wide so image can use vw sizing */
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 1rem;
  box-sizing: border-box;
}
.presentation .profile-image {
  /* make image roughly half the viewport width but clamp it for very wide/narrow screens */
  width: clamp(220px, 48vw, 560px);
  height: clamp(220px, 48vw, 560px);
  flex: 0 0 auto; /* fixed visual size coming from width/height */
  border-radius: 12px; /* use rounded rectangle for large image; change to 50% for circle */
  object-fit: cover;
  background: #fafafa;
  padding: 4px;
}



.presentation .profile-text {
  flex: 1 1 0;
    text-align: left;
}

.presentation .intro-text {
  text-align: left !important;
}


/* Inline image element used in HTML (.profile-pic) */
.presentation .profile-pic {
  display: block;
  /* desktop: target 50% of viewport but clamp to sensible min/max */
  width: clamp(360px, 50vw, 720px);
  max-width: 720px;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}

/* Small screens: stack vertically and center */
@media (max-width: 700px) {
  .presentation {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  /* on small screens make the image smaller and circular */
  .presentation .profile-image {
    width: clamp(96px, 36vw, 160px);
    height: clamp(96px, 36vw, 160px);
    flex: 0 0 auto;
    border-radius: 12px;
  }
  .presentation .profile-text { text-align: center; }
  .presentation .intro-text { text-align: left !important; }

  /* make inline profile image full-width on mobile */
  .presentation .profile-pic {
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 12px; /* keep same shape as desktop */
  }
}



  /* Project Article style*/
:root{
  --bg: #ffffff;
  --card: #fbfcfe;
  --muted: #6b7280;
  --text: #0f1724;
  --accent: #0a66c2;
  --accent-600: #0956a8;
  --radius: 10px;
  --gap: 1rem;
  --elevation: 0 6px 18px rgba(12, 20, 30, 0.06);
}

.project-header { gap: 0.12rem; margin-bottom: 0.25rem; }
.project-header h2,
.project-header p { margin: 0; }      /* remove default block margins */
.project-title { margin-bottom: 0; }  /* ensure no extra space */
.project-meta { margin-top: 0; padding-top: 0; }

/* Project article base */
article.project{
  background: linear-gradient(180deg, var(--card), var(--bg));
  border: 1px solid rgba(15,23,36,0.06);
  box-shadow: var(--elevation);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem auto;
  max-width: 1000px;
  color: var(--text);
  line-height: 1.45;
  overflow: hidden;
}

/* Header */
.project-header{
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.project-title{
  font-size: 1.35rem;
  margin: 0;
  font-weight: 600;
}
.project-meta{
  font-size: 0.9rem;
  color: var(--muted);
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Media */
.project-media{
  margin: 0.75rem 0;
  border-radius: 8px;
  overflow: hidden;
}
.project-media img{
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}
.project-media figcaption{
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* Summary */
.project-summary{
  margin: 0.5rem 0 0.75rem;
  font-weight: 400;
}

/* Details layout */
.project-details{
  margin-top: 0.5rem;
  display: grid;
  gap: 0.75rem;
}
.project-details h4{
  margin: 0 0 0.33rem;
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}

/* Key feature list */
.project-features ul,
.project-tech ul{
  margin: 0;
  padding-left: 1.2rem;
}

/* Tech badges */
.tech-list{
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tech-list li{
  background: rgba(10,102,194,0.08);
  color: var(--accent-600);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
}

/* Role & links */
.project-role p{ margin: 0; color: var(--muted); }
.project-links{
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--accent-600);
  border: 1px solid rgba(10,102,194,0.12);
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:focus-visible,
.btn:focus{
  outline: 3px solid rgba(10,102,194,0.18);
  outline-offset: 2px;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 6px 14px rgba(10,102,194,0.06); }

.btn-primary{
  background: linear-gradient(180deg, var(--accent), var(--accent-600));
  color: #fff;
  border: none;
}
.btn-primary:hover{ box-shadow: 0 8px 20px rgba(10,102,194,0.18); }

/* Footer stats */
.project-footer{
  margin-top: 0.8rem;
  border-top: 1px dashed rgba(15,23,36,0.04);
  padding-top: 0.6rem;
}
.project-stats{ color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Accessibility helper */
.sr-only{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Responsive: two-column layout on wider screens */
@media (min-width: 880px){
  article.project{
    display: grid;
    grid-template-columns: 1fr 320px;
    /* make room for header (auto), growing content (1fr) and footer (auto) */
    grid-template-rows: auto 1fr auto;
    column-gap: 1.25rem;
    align-items: start;
    padding: 1.5rem;
  }
  /* make media occupy the sidebar column */
  .project-media{ grid-column: 2; grid-row: 2; margin: 0; }
  .project-details{ grid-column: 1; grid-row: 2; }
  /* ensure project footer spans both columns and sits in the final row */
  .project-footer{
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: end;
    background: transparent; /* avoid inheriting the site footer background */
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(15,23,36,0.04);
    margin-top: 0.8rem;
  }
}