/* Universal Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Root Styles */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

:root {
  --mobile-menu-h: 74px; /* tweak if your bottom menu is taller/shorter */
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to right top, rgb(31, 32, 45), rgb(15, 15, 19));
  color: white;
  line-height: 1.6;
}

/* Main Layout */
main {
  padding-top: 20px;
  /* prevents overlap with mobile menu + supports iPhone safe-area */
  padding-bottom: calc(var(--mobile-menu-h) + env(safe-area-inset-bottom));
}

.title {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
}

.sub-con {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* About Me Section */
.about-me-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 40px;
}

.headshot {
  width: 100%;
  max-width: 400px;
  text-align: center;
  margin: 0 auto 20px auto;
}

.headshot img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.about-me {
  flex: 1;
  padding: 0 20px;
  min-width: 280px;
}

.about-me h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.about-me p {
  font-size: 1.25rem;
  text-align: justify;
}

/* Resume Section */
.resume-section {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeIn 1.5s ease-out forwards;
}

.resume-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #00bcd4;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.resume-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 10px;
}

.resume-container iframe {
  display: block;
  width: 100%;
  height: 90vh;
  border: none;
  border-radius: 10px;
}

.resume-download {
  margin-top: 30px;
  text-align: center;
}

.resume-btn {
  display: inline-block;
  background: linear-gradient(135deg, #6a5acd, #00bcd4);
  color: white;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 30px;
  font-size: 1.3rem;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  text-transform: uppercase;
  margin: 8px 10px;
}

.resume-btn:hover {
  background: linear-gradient(135deg, #00bcd4, #6a5acd);
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.resume-btn:active {
  transform: scale(0.98);
}

/* Projects Section */
.projects-section {
  margin-top: 60px;
  text-align: center;
}

.projects-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #00bcd4;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  height: 0;
  padding-bottom: 66.66%; /* 3:2 ratio */
}

.project-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-item:hover img {
  transform: scale(1.1);
}

.hover-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px;
  border-radius: 5px;
}

.project-item:hover .hover-text {
  opacity: 1;
  visibility: visible;
}

/* === UNIVERSAL MENU STYLES === */
.menu-container {
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.85);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
}

/* Link Styling */
.menu a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 16px 24px;
  display: block;
  transition: all 0.3s ease;
  border-radius: 6px;
  text-align: center;
}

.menu a:hover {
  background-color: #007bff;
  transform: scale(1.1);
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
}

.menu a:active {
  transform: scale(0.95);
}

/* === DESKTOP (Right-side Vertical Menu) === */
@media (min-width: 769px) {
  .menu-container {
    position: fixed;
    top: 25%;
    right: 15px;
    padding: 12px;
  }

  .menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}

/* === MOBILE (Bottom Horizontal Bar) === */
@media (max-width: 768px) {
  .menu-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    border-radius: 0;
  }

  .menu {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
  }

  .menu a {
    flex: 1;
    font-size: 1.05rem;
    padding: 14px 10px;
  }

  /* IMPORTANT: PDFs in iframes are flaky on mobile; hide embed */
  .resume-container {
    display: none;
  }

  /* Make the buttons big + easy to tap */
  .resume-download {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .resume-btn {
    width: min(92vw, 420px);
    text-align: center;
    margin: 0;
  }
}

/* Fade-in Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-fade {
  opacity: 0;
  transform: translateY(30px);
  animation: aboutFadeIn 2.5s ease-out 0.5s forwards;
}

@keyframes aboutFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
