/* =========================================
   MARVELYN AGAYAO — CREATIVE PORTFOLIO
   MAIN STYLESHEET
========================================= */


/* =========================================
   1. ROOT & GLOBAL STYLES
========================================= */

:root {
  --navy: #16285E;
  --blue: #004AAD;
  --cream: #F6F2E9;
  --paper: #FBF9F4;
  --ink: #171717;
  --muted: #77736D;
  --line: rgba(22, 40, 94, .18);

  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.6;
}

body.dialog-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
}

.container {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.section-pad {
  padding: 105px 0;
}

em {
  font-family: var(--serif);
  font-weight: 400;
}


/* =========================================
   2. ACCESSIBILITY
========================================= */

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  color: var(--navy);
  background: white;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid #E5A93D;
  outline-offset: 4px;
}


/* =========================================
   3. HEADER & NAVIGATION
========================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 244, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(22, 40, 94, .08);
}

.nav-wrap {
  position: relative;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  color: var(--navy);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -2px;
}

.wordmark span {
  color: var(--blue);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 13px;
}

.primary-nav a {
  transition: color .2s ease;
}

.primary-nav a:hover {
  color: var(--blue);
}

.nav-contact {
  color: var(--blue);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}


/* =========================================
   4. HERO
========================================= */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  display: flex;
  align-items: center;
  color: var(--cream);
  background: var(--navy);
}

.hero-inner {
  position: relative;
  padding-top: 100px;
  padding-bottom: 80px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.eyebrow.light {
  color: rgba(245, 241, 232, .72);
}

.eyebrow span {
  padding-inline: 5px;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(54px, 8vw, 104px);
  line-height: .98;
  letter-spacing: -5px;
  font-weight: 600;
}

.hero h1 em {
  color: #D9D2C2;
}

.hero-copy {
  max-width: 490px;
  margin: 30px 0;
  color: rgba(245, 241, 232, .78);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  font-size: 12px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease;
}

.button-cream {
  color: var(--navy);
  background: var(--cream);
}

.button-cream:hover {
  color: white;
  background: var(--blue);
}

.text-link {
  font-size: 12px;
}

.light-link {
  color: var(--cream);
}

.light-link:hover {
  color: #D9D2C2;
}

.hero-signature {
  position: absolute;
  right: 5%;
  top: 28%;
  color: rgba(255, 255, 255, .045);
  font-family: var(--serif);
  font-size: clamp(150px, 25vw, 330px);
  line-height: 1;
  pointer-events: none;
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 100px;
  color: rgba(245, 241, 232, .55);
  font-size: 9px;
  letter-spacing: 1.7px;
}


/* =========================================
   5. ABOUT
========================================= */

.intro-section {
  background: var(--paper);
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 55px;
}

.section-index {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.intro-grid {
  display: grid;
}

.about-layout {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 65px;
  align-items: center;
}

.about-photo-wrap {
  width: 100%;
  max-width: 230px;
  height: 285px;
  overflow: hidden;
  background: #e8e3d9;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content h2,
.work-heading h2,
.experience-section h2,
.contact-section h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -2px;
  font-weight: 500;
}

.about-content h2 em,
.work-heading h2 em,
.experience-section h2 em {
  color: var(--blue);
}

.intro-text {
  max-width: 690px;
  margin-top: 25px;
  color: #5F5C57;
  font-size: 14px;
}

.intro-text p {
  margin: 0 0 15px;
}

.intro-text .lead {
  color: var(--ink);
  font-size: 17px;
}

.skills-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 75px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.skills-band .eyebrow {
  margin-bottom: 8px;
}

.skills-band p {
  margin: 0;
  color: #55514C;
  font-size: 13px;
}


/* =========================================
   6. SELECTED WORK & PROJECT FILTERS
========================================= */

.work-section {
  background: var(--cream);
}

.work-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 40px;
}

.work-heading p {
  max-width: 330px;
  margin: 0 0 5px;
  color: #66615A;
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 38px;
}

.filter-btn {
  padding: 9px 15px;
  border: 1px solid rgba(22, 40, 94, .25);
  border-radius: 30px;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  transition: .2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 28px;
}

.project-card {
  min-width: 0;
  animation: cardIn .35s ease both;
}

.project-card.hidden {
  display: none !important;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.project-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.project-art {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e6e0d4;
}

.project-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.project-open:hover .project-art img {
  transform: scale(1.035);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  padding-top: 17px;
}

.project-type {
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.project-meta h3 {
  margin: 5px 0 3px;
  color: var(--navy);
  font-size: 23px;
  font-weight: 500;
}

.project-meta p {
  margin: 0;
  color: #777168;
  font-size: 12px;
}

.project-arrow {
  color: var(--blue);
  font-size: 23px;
  transition: transform .2s ease;
}

.project-open:hover .project-arrow {
  transform: translate(3px, -3px);
}


/* =========================================
   7. EXPERIENCE
========================================= */

.experience-section {
  background: var(--paper);
}

.experience-section h2 {
  margin-bottom: 55px;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.timeline-content .eyebrow {
  margin-bottom: 8px;
}

.timeline-content h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 21px;
  font-weight: 500;
}

.timeline-content p:last-child {
  max-width: 700px;
  margin: 0;
  color: #68635D;
  font-size: 13px;
}


/* =========================================
   8. CONTACT
========================================= */

.contact-section {
  color: var(--cream);
  background: var(--navy);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 70px;
  align-items: center;
}

.contact-section h2 {
  color: var(--cream);
}

.contact-section h2 em {
  color: #D9D2C2;
}

.contact-copy p {
  max-width: 390px;
  color: rgba(245, 241, 232, .75);
  font-size: 14px;
}

.email-link {
  display: inline-block;
  margin: 18px 0;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(245, 241, 232, .5);
  font-size: 16px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
  color: rgba(245, 241, 232, .72);
  font-size: 12px;
}

.social-links a:hover {
  color: white;
}


/* =========================================
   9. FOOTER
========================================= */

footer {
  padding: 22px 0;
  background: #101E49;
  color: rgba(245, 241, 232, .65);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
}

.footer-mark {
  color: var(--cream);
  font-size: 24px;
}

.back-top:hover {
  color: white;
}


/* =========================================
   10. PROJECT IMAGE GALLERY
========================================= */

.project-dialog {
  width: min(1000px, calc(100% - 30px));
  max-width: none;
  max-height: min(90vh, 900px);
  padding: 0;
  border: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ink);
  background: var(--paper);
}

.project-dialog::backdrop {
  background: rgba(8, 15, 37, .78);
  backdrop-filter: blur(5px);
}

.dialog-inner {
  position: relative;
  padding: 48px clamp(20px, 5vw, 60px) 35px;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-size: 25px;
  transition: .2s ease;
}

.dialog-inner h2 {
  margin: 0 45px 8px 0;
  color: var(--navy);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
}

#dialog-description {
  margin: 0 0 24px;
  color: #6b665e;
  font-size: 13px;
}


/* Gallery layout */

.gallery {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  background: transparent;
}

.gallery-window {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: transparent;
}

.gallery-track {
  display: flex;
  width: 100%;
  transition: transform .65s cubic-bezier(.22, .7, .2, 1);
  will-change: transform;
}

.gallery-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  margin: 0 auto;
}


/* Gallery arrows */

.gallery-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  transition: .2s ease;
}

.gallery-arrow:hover:not(:disabled),
.dialog-close:hover {
  color: white;
  background: var(--navy);
}

.gallery-arrow:disabled {
  opacity: .35;
  cursor: not-allowed;
}


/* Gallery counter */

.gallery-count {
  margin: 20px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  letter-spacing: 1px;
}


/* Empty gallery and error messages */

.gallery-empty {
  width: 100%;
  padding: 35px 15px;
  color: var(--muted);
  background: transparent;
  text-align: center;
  font-size: 13px;
}


/* =========================================
   11. TABLET RESPONSIVENESS
========================================= */

@media (max-width: 760px) {

  .container {
    width: min(100% - 36px, 600px);
  }

  .section-pad {
    padding: 75px 0;
  }

  .nav-wrap {
    min-height: 66px;
  }

  /* Mobile navigation button */

  .menu-toggle {
    display: flex;
    width: 42px;
    height: 42px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 9px;
  }

  .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    transition: transform .25s ease;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  /* Mobile navigation menu */

  .primary-nav {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .primary-nav.open {
    display: flex;
  }

  .primary-nav a {
    padding: 12px 0;
  }


  /* Hero */

  .hero {
    min-height: 590px;
  }

  .hero-inner {
    padding-top: 75px;
    padding-bottom: 45px;
  }

  .hero h1 {
    letter-spacing: -3px;
  }

  .hero-foot {
    margin-top: 75px;
  }


  /* About */

  .about-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-photo-wrap {
    width: 180px;
    height: 220px;
  }

  .skills-band {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 50px;
  }


  /* Work */

  .work-heading {
    display: block;
  }

  .work-heading p {
    margin-top: 20px;
  }

  .project-grid {
    gap: 35px 18px;
  }

  .project-meta h3 {
    font-size: 19px;
  }


  /* Experience */

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }


  /* Contact */

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }


  /* Footer */

  .footer-inner {
    flex-wrap: wrap;
  }

}


/* =========================================
   12. SMALL MOBILE SCREENS
========================================= */

@media (max-width: 520px) {

  .project-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    gap: 7px;
  }

  .filter-btn {
    padding: 8px 11px;
    font-size: 10px;
  }

  .gallery {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 5px;
  }

  .gallery-arrow {
    width: 32px;
    height: 32px;
  }

  .gallery-slide img {
    max-height: 58vh;
  }

  .project-dialog {
    width: calc(100% - 16px);
    max-height: 92vh;
  }

  .dialog-inner {
    padding: 55px 14px 25px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .hero-foot {
    font-size: 8px;
  }

  .email-link {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

}


/* =========================================
   13. REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

}


/* =========================================
   END OF STYLESHEET
========================================= */
