/* ================== RESET ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================== THEME COLORS ================== */
:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --accent: #f59e0b;       /* warm amber */
  --accent-soft: #fbbf24;
  --text-main: #e5e7eb;
  --text-muted: #94a3b8;
}

/* ================== BODY ================== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* ================== HEADER ================== */
header {
  position: relative;
  text-align: center;
  padding: 6rem 1rem 3rem 1rem; /* increased top padding */
  min-height: 90vh; /* make header taller */
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertically center the content */
  background: linear-gradient(rgba(15,23,42,0.6), rgba(15,23,42,0.6)), url('./images/cover_page.JPG') no-repeat center center;
  background-size: cover;
  color: var(--text-main);
  overflow: hidden;
}

header h1 {
  font-size: 3.5rem; /* slightly bigger name */
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 15px rgba(0,0,0,0.5);
}

header p {
  font-size: 1.3rem;
  color: var(--text-muted);
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
}

/* Hide old circular image */
header img {
  display: none;
}

/* Pop-in animation */
@keyframes popUp {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-10px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Apply animation to header content */
header h1, header p {
  opacity: 0; /* start invisible */
  animation: popUp 1.2s ease-out forwards;
}

header p {
  animation-delay: 0.3s; /* delay the subtitle slightly */
}
/* ================== NAVIGATION ================== */
nav {
  background: #020617;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
}

nav li {
  margin: 0 1.5rem;
}

nav a {
  display: block;
  padding: 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: 0.3s;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 8px;
  left: 0;
  background-color: var(--accent);
  transition: 0.3s;
}

nav a:hover {
  color: var(--accent-soft);
}

nav a:hover::after {
  width: 100%;
}

/* ================== SECTIONS ================== */
section {
  max-width: 900px;
  margin: 2.5rem auto;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

/* Section titles */
section h2 {
  margin-bottom: 1rem;
  color: var(--accent);
  border-left: 4px solid var(--accent);
  padding-left: 0.6rem;
}

/* About text */
#about p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* ================== PHOTOS ================== */
#photos {
  text-align: center;
}

#photos img {
  margin: 0.7rem;
  border-radius: 10px;
  width: 280px;
  transition: 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
}

#photos img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

/* ================== FOOTER ================== */
footer {
  text-align: center;
  padding: 1.2rem;
  background: #020617;
  color: var(--text-muted);
  margin-top: 2rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ================== BACKGROUND TECH GRID ================== */
body::before {
  content: "";
  position: fixed;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
}

/* Make nav stick to top */
.sticky-nav {
  position: sticky;
  top: 0;
  background: #020617;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}
 
body {
  scroll-padding-top: 70px; /* height of your nav + small buffer */
}
.sticky-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
}

.sticky-nav li {
  margin: 0 1.5rem;
}

.sticky-nav a {
  display: block;
  padding: 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: 0.3s;
}

.sticky-nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 8px;
  left: 0;
  background-color: var(--accent);
  transition: 0.3s;
}

.sticky-nav a:hover {
  color: var(--accent-soft);
}

.sticky-nav a:hover::after {
  width: 100%;
}

.projects-page header {
  background: linear-gradient(rgba(15,23,42,0.6), rgba(15,23,42,0.6)), url('./images/zumobot.JPG') no-repeat center center;
  background-size: cover;
}

.projects-page header img {
  display: none; /* hide the <img> tag since we're using CSS background now */
}

/* Footer social links */
footer .footer-social-links {
  margin-top: 0.8rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

footer .footer-social-links a {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: 0.3s;
  color: var(--text-main);
  background-color: var(--bg-card);
  border: 1px solid var(--accent);
}

footer .footer-social-links a.github:hover {
  background-color: #333; /* GitHub dark */
  color: #fff;
}

footer .footer-social-links a.linkedin:hover {
  background-color: #0a66c2; /* LinkedIn blue */
  color: #fff;
}

#about {
  position: relative;
  overflow: hidden;
}

#about .section-bg-video {
 position: absolute;
  top: 50%;
  left: 50%;
  width: 177vh;   /* 16/9 ratio scaled to viewport height */
  height: 100vw;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  opacity: 0.15;
  z-index: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
}

#about h2,
#about p {
  position: relative;
  z-index: 1;          /* keeps text above the video */
}

/* ================== TYPING CURSOR ================== */
.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 0.7s step-end infinite;
  font-weight: 300;
  font-size: 1.1em;
  vertical-align: middle;
  line-height: 1;
}


@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ================== MOBILE RESPONSIVENESS ================== */
@media (max-width: 768px) {

  /* Header */
  header {
    padding: 4rem 1rem 2rem 1rem;
    min-height: 60vh;
  }

  header h1 {
    font-size: 2.2rem;
  }

  header p {
    font-size: 1rem;
  }

  /* Nav */
  .sticky-nav ul {
    flex-wrap: wrap;
    gap: 0;
    padding: 0.3rem 0;
  }

  .sticky-nav li {
    margin: 0 0.5rem;
  }

  .sticky-nav a {
    padding: 0.6rem 0.4rem;
    font-size: 0.9rem;
  }

  /* Sections */
  section {
    margin: 1.2rem 0.8rem;
    padding: 1.2rem;
  }

  /* Resume iframe */
  #resume iframe {
    height: 500px;
  }

  /* Photos */
  #photos img {
    width: 90%;
    margin: 0.5rem auto;
    display: block;
  }

  /* Footer social links */
  footer .footer-social-links {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }

  .sticky-nav a {
    font-size: 0.8rem;
    padding: 0.5rem 0.3rem;
  }

  section {
    margin: 1rem 0.5rem;
    padding: 1rem;
  }
}

#projects {
  background: transparent;
  box-shadow: none;
}

.project-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
/* Project Card */
.project-card {
  width: 240px;
  height: 120px; /* collapsed height for title only */
  border-radius: 16px;
  background: radial-gradient(circle, #1e293b, #020617);
  border: 2px solid var(--accent);

  display: flex;
  flex-direction: column;
  justify-content: center; /* centers title when collapsed */
  align-items: center;
  text-align: center;

  padding: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;

  transition: 
    width 0.35s ease,
    height 0.35s ease,
    border-radius 0.35s ease,
    padding 0.35s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

/* Title wrapper */
.project-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: all 0.35s ease;
}

/* Hidden content */
.project-content {
  opacity: 0;
  margin-top: 0;
  max-height: 0;
  transition: all 0.35s ease;
}

/* Expanded state */
.project-card.active {
  width: 400px;       /* expand width */
  height: auto;       /* let height grow naturally */
  padding: 1.5rem;
  border-radius: 20px;
  justify-content: flex-start; /* stack title + content at top */
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

/* Move title up slightly when expanded */
.project-card.active .project-title {
  margin-bottom: 0.8rem;
}

/* Show content */
.project-card.active .project-content {
  opacity: 1;
  max-height: 1000px; /* large enough to fit text */
  margin-top: 0.5rem;
}