/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #000;
  color: #fff;
  line-height: 1.6;
}

h2 {
  text-align: center;
}

/* =========================
   HEADER / NAV / LOGO
========================= */

header {
  padding: 20px 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(0, 0, 0, 95);
  backdrop-filter: blur(6px);

  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #94a3b8;
  transition: 0.3s;
}

nav a:hover {
  color: #fff;
}

/* =========================
   HERO
========================= */

.hero {
  height: 90vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  position: relative;
  z-index: 1;

  background: url("MiscMedia/earth.webp") no-repeat center/cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.9) 100%
  );

  z-index: 0;
}

.hero * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 48px;
  margin-bottom: 10px;
}

.hero p {
  color: #94a3b8;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;

  padding: 8px 18px;
  border: 2px solid #ffffff;
  border-radius: 6px;

  background: transparent;
  color: #ffffff;
  text-decoration: none;

  transition: 0.3s;
}

.btn:hover {
  background: #ffffff;
  color: #000;
}

/* =========================
   BACKGROUND IMAGE
========================= */

.bg-image-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  opacity: 0;
  transition: opacity 0.7s ease;

  filter: grayscale(60%) brightness(40%);
}

.bg-image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
}

.bg-image-container.active {
  opacity: 1;
}

/* =========================
   SECTIONS
========================= */

#projects {
  padding-top: 1px;   /* smaller = moves it UP */
  scroll-margin-top: 100px;

}

section {
  padding: 80px 10%;
}

.card img,
.project-card img {
  width: 100%;        /* NOT fixed width */
  height: 200px;
  object-fit: cover;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* max 3 per row */
  gap: 20px;
}

@media (max-width: 900px) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .projects {
    grid-template-columns: 1fr;
  }
}

.projects-page {
  padding: 100px 10%;
}

/* SEE MORE BUTTON */
.see-more {
  display: block;
  text-align: right;
  margin: 40px 0 40px 0;
  

  width: fit-content;

  padding: 8px 18px;
  border: 2px solid #ffffff;
  border-radius: 6px;

  color: #ffffff;
  text-decoration: none;

  transition: 0.3s;
}

.see-more:hover {
  background: #ffffff;
  color: #000;
}

.timeline .section-header {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.section-header {
  display: flex;
  justify-content: flex-end; /* pushes button right */
}

.section-header h2 {
  margin: 0;
}
/* =========================
   PROJECTS
========================= */

.projects,
.projects-grid {
  display: grid;
  gap: 20px;
}

.projects {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  display: block;
  background: #000;
  border: 2px solid #fff;
  border-radius: 10px;
  color: inherit;
  overflow: hidden;
  text-decoration: none;
  transition: 0.3s;
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-card h3 {
  padding: 10px;
}

.project-card p {
  padding: 0 10px 15px;
  color: #94a3b8;
}

.project-card:hover {
  transform: translateY(-5px) scale(1.02);
}

/* FILTER BUTTONS */
.filters {
  text-align: center;
  margin-bottom: 30px;
}

.filters button {
  margin: 5px;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
}

/* =========================
   CARDS
========================= */

.card {
  background: #000;
  padding: 20px;
  border-radius: 10px;
  border: 3px solid #fff;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

/* =========================
   ABOUT
========================= */

.about-container {
  margin-top: 30px;

  display: flex;
  align-items: center;
  gap: 40px;
}

.about-img {
  width: 300px;
  height: 300px;
  object-fit: cover;

  border-radius: 12px;
  border: 3px solid #fff;

  flex-shrink: 0;
}

.about-container p {
  color: #94a3b8;
}

.about-list {
  margin-top: 20px;
  padding-left: 20px;
}

.about-list li {
  margin-bottom: 10px;
}

.about-grid {
  margin-top: 5px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.about-card {
  border: 2px solid #ffffff;
  border-radius: 10px;
  padding: 20px;
  background: #000;

  transition: 0.3s;
}

.about-card h3 {
  margin-bottom: 10px;
}

.about-card p {
  color: #94a3b8;
}

/*project stuff*/
.filter-row {
  margin-bottom: 10px;
}

.filters button {
  margin: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  transition: 0.3s;
}

.filters button:hover {
  background: #fff;
  color: #000;
}

.clear-btn {
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  
}

.filter-row:first-child {
  display: flex;
  justify-content: flex-start;
}

.clear-btn:hover {
  background: #fff;
  color: #000;
}

.linkedin-icon {
    width: 24px;
    height: auto;

    position: relative;
    top: 8px;    /* moves it down */
    left: -3px;  /* moves it left */
}

.phone-icon {
    width: 24px;
    height: auto;

    position: relative;
    top: 6px;    /* moves it down */
    left: -3px;  /* moves it left */
}

/* =========================
   TIMELINE
========================= */

@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

.timeline-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;

  border-radius: 10%;
  border: 3px solid #fff;

  position: relative;
  z-index: 1;

  cursor: pointer;

  animation: float 3s ease-in-out infinite; /* ADD THIS */
}

.timeline {
  display: flex;
  align-items: flex-start;
  margin-top: 40px;

}

.timeline-item {
  flex: 1;
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-item p {
  text-align: center;
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 80px;
  left: 70%;
  width: 60%;
  height: 2px;
  background: #464849;
  z-index: 0;
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-item img.stopped {
  animation: none !important;
  transform: translateY(0); /* reset position */
}

.timeline-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;

  border-radius: 10%;
  border: 3px solid #fff;

  position: relative;
  z-index: 1;
  transition: 0.3s;
  cursor: pointer;

}

.timeline-item img:hover {
  animation: none;               /* stop floating on hover */
  transform: translateY(-10px) scale(1.05);
}

.timeline-item:nth-child(1) img { animation-delay: 0s; }
.timeline-item:nth-child(2) img { animation-delay: 0.5s; }
.timeline-item:nth-child(3) img { animation-delay: 1s; }
.timeline-item:nth-child(4) img { animation-delay: 1.5s; }
.timeline-item:nth-child(5) img { animation-delay: 2s; }
.timeline-item:nth-child(6) img { animation-delay: 2.5s; }

.company {
  margin-bottom: 10px;
  font-weight: bold;
  text-align: center;
}

.role,
.degree {
  font-size: 14px;
  align-self: stretch;
  margin-left: 0;
  padding: 0 12px;
}

.role {
  color: #94a3b8;
}

.degree {
  color: #fff;
}

/* =========================
   MISC
========================= */

.email-icon {
  width: 30px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}


/* =========================
   FOOTER
========================= */

footer {
  text-align: center;
  padding: 20px;
  background: #000;
  color: #fff;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 20px 10%;
  border: 3px solid #fff;
}

/* =========================
   RESPONSIVE / MOBILE
========================= */
.logo {
  color: inherit;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid #475569;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.filters button.active {
  background: #fff;
  color: #000;
}

.footer a {
  color: #fff;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  header {
    min-height: 68px;
    padding: 9px 5%;
  }

  header h1 {
    font-size: 17px;
  }

  .logo img {
    width: 42px;
    height: 42px;
  }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 2;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    padding: 8px 5% 16px;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid #334155;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
  }

  nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
    margin: 0;
    border-bottom: 1px solid #1e293b;
  }

  .hero {
    min-height: calc(100svh - 68px);
    height: auto;
    padding: 64px 7% 80px;
    background-position: 62% center;
  }

  .hero h2 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.1;
  }

  .hero p {
    max-width: 30rem;
    font-size: 1rem;
  }

  .btn {
    min-height: 46px;
    padding: 9px 20px;
  }

  section {
    padding: 60px 5%;
    scroll-margin-top: 68px;
  }

  section > h2 {
    font-size: 1.8rem;
  }

  .about-container {
    flex-direction: column;
    gap: 24px;
  }

  .about-img {
    width: min(100%, 280px);
    height: auto;
    aspect-ratio: 1;
  }

  .about-grid,
  .projects,
  .projects-grid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .about-card {
    padding: 18px;
  }

  .timeline {
    display: grid;
    margin-top: 28px;
    gap: 0;
  }

  .timeline-item {
    min-height: 150px;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    column-gap: 18px;
    align-content: start;
    align-items: start;
    padding-bottom: 28px;
  }

  .timeline-item .company,
  .timeline-item > p:not(.company) {
    grid-column: 2;
    text-align: left;
    padding: 0;
  }

  .timeline-item .company {
    margin: 0;
    font-size: 1.05rem;
  }

  .timeline-item img {
    grid-column: 1;
    grid-row: 1 / span 4;
    width: 68px;
    height: 68px;
  }

  .timeline-item::after {
    top: 70px;
    bottom: 0;
    left: 33px;
    width: 2px;
    height: auto;
  }

  .filters {
    margin: 20px -1% 24px;
  }

  .filter-row,
  .filter-row:first-child {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
  }

  .filters button {
    min-height: 44px;
    margin: 4px;
    padding: 8px 12px;
    font-size: 0.88rem;
    border-radius: 22px;
  }

  .project-card img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .project-card:hover {
    transform: none;
  }

  footer {
    padding: 12px 5% 24px;
  }

  .footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 20px 16px;
    border-width: 2px;
    border-radius: 10px;
  }

  .footer p {
    text-align: left;
  }
}

@media (max-width: 380px) {
  header h1 { font-size: 15px; }
  .logo { gap: 7px; }
  .filters button { font-size: 0.8rem; }
}

@media (hover: none) {
  .timeline-item img { animation: none; }
  .timeline-item img:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
