@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@400;700&family=Nunito:wght@300;400;600;700&display=swap');

/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
  /* Colors */
  --color-primary-red: #E63946;
  --color-dark-charcoal: #262626;
  --color-light-gray: #f2f2f2;
  --color-white: #FFFFFF;

  /* Deep Navy/Blue for titles in mockups */
  --color-blue-title: #1D3557;

  /* Fonts */
  --font-titles: 'Antonio', sans-serif;
  --font-body: 'Nunito', sans-serif;

  /* Layout & Spacing */
  --max-width: 1200px;
  --header-height: 40px;
}

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

html,
body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-dark-charcoal);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-titles);
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* ==========================================
   HEADER / TOP BAR
   ========================================== */
.site-header {
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-dark-charcoal);
  color: var(--color-white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  position: relative;
}

.site-header .logo-text {
  font-family: var(--font-titles);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-header a {
  display: inline-block;
  padding: 5px 0;
}

.site-header a:hover {
  color: var(--color-primary-red);
}

/* ==========================================
   HERO SECTION (HOME)
   ========================================== */
.hero {
  width: 100%;
  min-height: 60vh;
  background-color: var(--color-light-gray);
  background-image: url('../images/hero_banner_background.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 60px 0;
  position: relative;
}

.hero-container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-dark-charcoal);
}

.hero-title-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-title {
  font-size: 7.5rem;
  line-height: 0.85;
  color: var(--color-primary-red);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-year-capsule {
  background-color: var(--color-dark-charcoal);
  color: var(--color-white);
  font-family: var(--font-titles);
  font-size: 1.3rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 50px;
  margin-top: 15px;
  align-self: flex-start;
  letter-spacing: 0.05em;
}

.hero-intro {
  margin-top: 20px;
}

.hero-intro h3 {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-dark-charcoal);
}

.hero-intro p {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: #555555;
  max-width: 850px;
  line-height: 1.7;
}

/* ==========================================
   WORK SECTION & GRID
   ========================================== */
.work-section {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 80px 20px;
}

.work-section-title {
  font-size: 4rem;
  color: var(--color-primary-red);
  text-transform: uppercase;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Card Core Layout */
.work-card {
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
  aspect-ratio: 4 / 5;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  background-color: var(--color-light-gray);
}

.work-card:hover {
  transform: scale(1.025);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.card-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 35px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transition: background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Card overlays (custom colors) */
.card-1 .card-overlay {
  background-color: rgba(220, 226, 232, 0.45);
}

.card-2 .card-overlay {
  background-color: rgba(38, 38, 38, 0.65);
}

.card-3 .card-overlay {
  background-color: rgba(185, 188, 192, 0.5);
}

.card-4 .card-overlay {
  background-color: rgba(200, 214, 226, 0.55);
}

.card-5 .card-overlay {
  background-color: rgba(175, 202, 230, 0.6);
}

.card-6 .card-overlay {
  background-color: rgba(220, 216, 210, 0.5);
}

/* Card Text Styling */
.card-category {
  font-family: var(--font-titles);
  font-size: 2.8rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  display: block;
  margin-bottom: 5px;
  transition: color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  transition: color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Default Text Colors */
.card-1 .card-category,
.card-1 .card-title {
  color: var(--color-blue-title);
}

.card-2 .card-category,
.card-2 .card-title {
  color: var(--color-white);
}

.card-3 .card-category,
.card-3 .card-title {
  color: var(--color-blue-title);
}

.card-4 .card-category,
.card-4 .card-title {
  color: var(--color-blue-title);
}

.card-5 .card-category,
.card-5 .card-title {
  color: var(--color-blue-title);
}

.card-6 .card-category,
.card-6 .card-title {
  color: var(--color-blue-title);
}

/* Hover Transition to red mask */
.work-card:hover .card-overlay {
  background-color: rgba(230, 57, 70, 0.92);
  /* Primary Red `#E63946` */
}

.work-card:hover .card-category,
.work-card:hover .card-title {
  color: var(--color-white) !important;
}

.work-card:hover .card-bg {
  transform: scale(1.04);
}

/* ==========================================
   EXPERIENCE SECTION (HOME)
   ========================================== */
.experience-section {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 80px 20px;
}

.experience-title {
  font-size: 4rem;
  color: var(--color-primary-red);
  text-transform: uppercase;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.experience-desc {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #555555;
  line-height: 1.7;
  max-width: 100%;
  margin-bottom: 40px;
}

/* ==========================================
   PORTFOLIO INNER PAGES
   ========================================== */
.inner-banner {
  width: 100%;
  height: 250px;
  background-image: url('../images/portfolio_pages_banner.png');
  background-repeat: repeat-x;
  background-size: cover;
  background-position: center;
  position: relative;
}

.project-container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 60px 20px 80px 20px;
}

/* Breadcrumbs / Back button */
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #777777;
  margin-bottom: 30px;
  transition: color 0.3s ease;
}

.back-home:hover {
  color: var(--color-primary-red);
}

/* Inner Page Title Layout */
.project-header {
  margin-bottom: 40px;
}

.project-category {
  font-size: 4.8rem;
  color: var(--color-primary-red);
  text-transform: uppercase;
  line-height: 0.95;
  font-weight: 700;
}

.project-title {
  font-family: var(--font-body);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-blue-title);
  margin-top: 5px;
}

.project-description {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #555555;
  line-height: 1.8;
  max-width: 100%;
  margin-bottom: 50px;
}

/* Grids for Project Mockups */
.project-mockups-grid {
  display: grid;
  gap: 30px;
  margin-bottom: 50px;
}

/* 2x2 grid layout (triOS Healthcare College) */
.grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Laptop + 2 side-by-side mockup (Innovahub UX) */
.grid-innovahub-ux {
  grid-template-columns: repeat(2, 1fr);
}

.grid-innovahub-ux .mockup-large {
  grid-column: span 2;
}

/* Infographic Layout (Canada's Mental Health) */
.infographic-container {
  display: flex;
  justify-content: center;
  margin-bottom: 60px;
}

.infographic-img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

/* Video Player Container */
.video-section {
  width: 100%;
  background-color: var(--color-light-gray);
  border-radius: 20px;
  padding: 50px 40px;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.video-section-title {
  font-size: 2rem;
  text-transform: uppercase;
  color: var(--color-blue-title);
  text-align: left;
}

.video-wrapper {
  max-width: 100%;
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background-color: #000;
  aspect-ratio: 16 / 9;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Social Media Banners Page Grid */
.grid-social-banners {
  grid-template-columns: repeat(2, 1fr);
}

.grid-social-banners .banner-full {
  grid-column: span 2;
}

.grid-social-banners .banner-left {
  grid-row: span 2;
}

.grid-social-banners .banner-right-bottom-placeholder {
  background-color: #E6E8EA;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 4 / 3;
}

/* Project images generic style */
.mockup-item {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  background-color: var(--color-light-gray);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mockup-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.mockup-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Motion Graphics Section */
.motion-graphics-section {
  width: 100%;
  margin-top: 60px;
  border-top: 1px solid #e0e0e0;
  padding-top: 60px;
  margin-bottom: 30px;
}

.motion-graphics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.motion-card {
  background-color: var(--color-light-gray);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  border: 1px solid #eef2f5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.motion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.motion-video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  overflow: hidden;
}

.motion-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.motion-card-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.motion-card-desc {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #555555;
  line-height: 1.7;
  margin: 0;
}

/* eLearning Storyline Modules Section */
.storyline-section {
  width: 100%;
  margin-top: 60px;
  border-top: 1px solid #e0e0e0;
  padding-top: 60px;
}

.storyline-section-title {
  font-size: 2.5rem;
  color: var(--color-blue-title);
  text-transform: uppercase;
  margin-bottom: 30px;
  text-align: left;
}

.storyline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.storyline-card {
  background-color: var(--color-light-gray);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #eef2f5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.storyline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.storyline-card-header {
  margin-bottom: 15px;
}

.storyline-number {
  font-family: var(--font-titles);
  color: var(--color-primary-red);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
  display: block;
}

.storyline-card-title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark-charcoal);
  line-height: 1.35;
}

.storyline-card-desc {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 25px;
  line-height: 1.5;
}

.storyline-launch-btn {
  font-family: var(--font-titles);
  font-size: 1.1rem;
  font-weight: 700;
  background-color: var(--color-primary-red);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.storyline-launch-btn:hover {
  background-color: #c92f3b;
  transform: scale(1.02);
}

/* ==========================================
   LIGHTBOX MODAL (IMAGES)
   ========================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2.2rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  color: var(--color-primary-red);
  transform: scale(1.1);
}

/* Navigation arrows for lightbox if multiple images exist */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 3.5rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  padding: 10px;
}

.lightbox-arrow:hover {
  color: var(--color-primary-red);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow-left {
  left: -80px;
}

.lightbox-arrow-right {
  right: -80px;
}

/* ==========================================
   STORYLINE MODAL (IFRAME)
   ========================================== */
.storyline-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(18, 18, 18, 0.98);
  z-index: 2500;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.storyline-modal.active {
  display: flex;
  opacity: 1;
}

.storyline-modal-header {
  width: 100%;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-dark-charcoal);
  color: var(--color-white);
}

.storyline-modal-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
}

.storyline-modal-close {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease, transform 0.2s ease;
}

.storyline-modal-close:hover {
  color: var(--color-primary-red);
  transform: scale(1.1);
}

.storyline-modal-body {
  flex: 1;
  width: 100%;
  height: calc(100% - 70px);
  position: relative;
  background-color: #121212;
}

.storyline-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #121212;
}

/* Spinner Loader inside iframe modal */
.iframe-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-primary-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  width: 100%;
  background-color: var(--color-dark-charcoal);
  color: var(--color-white);
  padding: 50px 0;
}

.footer-container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-contact-title {
  font-size: 1.8rem;
  font-family: var(--font-titles);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-contact-email {
  font-size: 1.05rem;
  font-family: var(--font-body);
  color: #cccccc;
  font-weight: 400;
  transition: color 0.3s ease;
}

.footer-contact-email:hover {
  color: var(--color-primary-red);
}

.footer-right {
  font-size: 0.9rem;
  color: #999999;
  font-family: var(--font-body);
}

/* ==========================================
   RESPONSIVE LAYOUTS
   ========================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 6rem;
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .storyline-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .lightbox-arrow-left {
    left: -50px;
  }

  .lightbox-arrow-right {
    right: -50px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 40px 20px;
  }

  .hero-title {
    font-size: 4.5rem;
  }

  .hero-year-capsule {
    font-size: 1.1rem;
    padding: 4px 15px;
  }

  .work-section,
  .experience-section {
    padding: 50px 20px;
  }

  .experience-section {
    padding-top: 0;
  }

  .work-section-title,
  .experience-title {
    font-size: 3rem;
    margin-bottom: 30px;
  }

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

  .storyline-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .motion-card-content {
    padding: 20px;
  }

  .grid-2x2,
  .grid-innovahub-ux,
  .grid-social-banners {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .grid-innovahub-ux .mockup-large {
    grid-column: span 1;
  }

  .grid-social-banners .banner-full {
    grid-column: span 1;
  }

  .grid-social-banners .banner-left {
    grid-row: span 1;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .lightbox-arrow {
    display: none !important;
    /* Hide arrows on small screens, rely on touch/swipe */
  }

  .lightbox-content {
    max-width: 95%;
  }

  .lightbox-close {
    top: -45px;
    right: 5px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 3.2rem;
  }

  .project-category {
    font-size: 3.2rem;
  }

  .project-title {
    font-size: 1.4rem;
  }

  .card-category {
    font-size: 2.2rem;
  }
}