/* ==================================================
   LAYOUT.CSS
   Page Structure & Section Composition
   ================================================== */


/* =========================
   HEADER & NAVIGATION LAYOUT
========================= */

header {
  width: 100%;
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  gap: 0.5rem;
}

.header-container .logo {
  margin-right: auto;
}

header .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}


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

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5rem 0;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;

  background:
    linear-gradient(135deg, rgba(227,242,253,0.6), rgba(255,255,255,0.6)),
    url('../imgs/wake_up3.gif') center/cover no-repeat;

  animation: heroPan 8s ease-in-out infinite alternate;
}

.dark .hero {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
    url('../imgs/wake_up3.gif') center/cover no-repeat;

  animation: heroPan 8s ease-in-out infinite alternate;
}

.hero-text {
  flex: 1;
  min-width: 300px;
}

.hero-text h1 {
  font-size: 3rem;
  color: var(--color-primary);
}

.hero-text p {
  font-size: 1.2rem;
  margin: 1rem 0;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

/* Hero entrance animation */
.hero-text h1,
.hero-text p,
.hero-buttons {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-text.loaded h1,
.hero-text.loaded p,
.hero-text.loaded .hero-buttons {
  opacity: 1;
  transform: translateY(0);
}


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

.about {
  padding: 5rem 0;
  background-color: var(--color-surface);
}

.about h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.about-content {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text p {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.65;
  color: var(--color-secondary-text);
}

/* Education Block */

.education {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-primary);
  line-height: 1.4;
}

.education p {
  margin: 0.2rem 0;
}

.education p:first-child {
  font-weight: 700;
  margin-bottom: 0.6rem;
}


/* =========================
   PROJECTS SECTION
========================= */

.projects {
  padding: 5rem 0;
}

.projects h2 {
  font-size: 2.4rem;
  letter-spacing: 1px;
}

.project-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--color-surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 350px;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.project-media {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.project-media iframe,
.project-media video,
.project-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.project-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.project-date {
  font-size: 0.9rem;
  color: var(--color-tertiary-text);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.modal-date {
  color: var(--color-secondary-text);
  font-weight: 600;
  margin: 0.25rem 0 0.75rem 0;
}

.project-info p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.project-buttons {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.project-buttons a,
.project-buttons button {
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
}

.project-info .tags-container strong {
  display: inline-block;
  width: 78px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.5rem;
}


/* =========================
   RESUME SECTION
========================= */

.resume {
  padding: 5rem 0;
}

.resume-preview {
  width: 100%;
  height: 600px;
  margin-top: 1rem;
  border: none;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}


/* =========================
   CONTACT SECTION
========================= */

.contact {
  padding: 5rem 0;
  background-color: var(--color-surface);
  text-align: center;
}

.contact a {
  color: var(--color-primary);
}

.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.socials img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.socials img:hover {
  transform: scale(1.2);
}

.dark .socials img {
  filter: brightness(2) invert(1);
}

.dark .socials a {
  color: var(--color-tag-text);
}


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

footer {
  background-color: var(--color-primary);
  color: #fff;
  padding: 2rem 0;
  text-align: center;
}

footer .footer-nav {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

footer .footer-nav li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

footer .footer-nav li a:hover {
  text-decoration: underline;
}

footer .old-portfolios {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.3);
}

footer .old-portfolios h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

footer .old-portfolios ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer .old-portfolios li {
  margin-bottom: 0.25rem;
}

footer .old-portfolios a {
  color: #fff;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

footer .old-portfolios a:hover {
  opacity: 0.8;
}


/* =========================
   RESPONSIVE DESIGN
========================= */

@media screen and (max-width: 992px) {

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--color-surface);
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  }

  .nav-links li {
    padding: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

@media screen and (max-width: 600px) {

  .project-info .tags-container strong {
    width: auto;
  }

  .project-buttons a,
  .project-buttons button {
    min-height: 32px;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
  }
}
