/* ==========================================================================
   ANNA DE JONGE - PORTFOLIO DESIGN SYSTEM & CSS
   ========================================================================== */

/* 1. CSS VARIABLES & THEME TOKENS */
:root {
  --brand-blue: #0d56d7;
  --brand-red: #e60047;
  --brand-green: #379237; /* Used for Werk accent / green triangle theme */
  --brand-yellow: #f0be42;
  --bg-color: #ffffff;
  --bg-light: #fafafa;
  --text-dark: #222222;
  --text-muted: #666666;
  --border-dark: #222222;
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
}

/* 2. BASE RESET & INITIALIZATION */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #dddddd;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Selection Styles */
::selection {
  background-color: var(--brand-blue);
  color: #ffffff;
}

/* 3. SCROLL PORT CONTAINER & SECTIONS */
.scroll-container {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.section-pane {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg-color);
}

.section-content {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
}

/* 4. NAVIGATION CONTROLS (TRIANGLE ARROWS) */
.nav-control {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-dark);
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.5vh, 1.15rem);
  font-weight: 500;
  gap: 8px;
  cursor: pointer;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.nav-control-up {
  top: 4vh;
}

.nav-control-down {
  bottom: 4vh;
}

.arrow-icon {
  height: clamp(32px, 5vh, 48px);
  width: auto;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover Animations for Navigation Arrows */
.nav-control-up:hover .arrow-icon {
  transform: translateY(-6px) scale(1.05);
}

.nav-control-down:hover .arrow-icon {
  transform: translateY(6px) scale(1.05);
}

/* 5. HOMEPAGE SECTION (MIDDLE) */
.section-home {
  background-color: var(--bg-color);
}

.home-content {
  flex-direction: column;
}

/* Center Phrase & Signposts Layout */
.homepage-center {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  margin-top: -2vh; /* visually centered adjustment */
}

.brand-phrase {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.word-ontwerp {
  font-family: var(--font-sans);
  font-size: clamp(3.5rem, 8.5vw, 7.8rem);
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  margin: 0;
}

.row-voor-cards {
  display: flex;
  align-items: center;
  width: 100%;
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  margin-top: clamp(0.5rem, 1.5vw, 1.5rem);
}

.word-voor {
  font-family: var(--font-sans);
  font-size: clamp(3.5rem, 8.5vw, 7.8rem);
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  margin: 0;
}

.cards-wrapper {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 2rem);
  flex-grow: 1;
}

/* Signpost Button Styles */
.card-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  display: block;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

.card-img {
  height: clamp(55px, 7.5vh, 90px);
  width: auto;
  display: block;
  object-fit: contain;
}

/* Individualized Card Hover Rotations for Organic Feel */
.card-btn:nth-child(1):hover {
  transform: translateY(-8px) scale(1.04) rotate(-2deg);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
}

.card-btn:nth-child(2):hover {
  transform: translateY(-8px) scale(1.04) rotate(1.5deg);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
}

.card-btn:nth-child(3):hover {
  transform: translateY(-8px) scale(1.04) rotate(3deg);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
}

/* Bottom Right Logo */
.brand-logo {
  position: absolute;
  bottom: clamp(2rem, 5vh, 4rem);
  right: clamp(2rem, 6vw, 5rem);
  text-align: right;
  line-height: 1.05;
  user-select: none;
}

.logo-name {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 500;
  color: var(--brand-blue);
  text-transform: lowercase;
}

.logo-tagline {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 500;
  color: var(--brand-red);
  text-transform: lowercase;
}

/* Screen reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* 6. ABOUT SECTION (TOP) */
.section-about {
  background-color: var(--bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 5rem);
  width: 100%;
  max-width: 1200px;
  align-items: center;
}

.about-bio {
  display: flex;
  flex-direction: column;
}

/* Language Switcher Button */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
}

.lang-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
  font-weight: bold;
}

.lang-btn.active {
  color: var(--brand-red);
  border-bottom: 2px solid var(--brand-red);
}

.lang-switch span {
  color: #dddddd;
}

/* Bio copy */
.about-title {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 800;
  color: var(--brand-red);
  margin-bottom: 1.5rem;
  line-height: 1;
}

.lang-block {
  display: none;
}

/* Display active language (controlled via class on body) */
body.lang-en .lang-block.en {
  display: block;
}

body:not(.lang-en) .lang-block.nl {
  display: block;
}

.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.5;
  color: #111111;
  margin-bottom: 1.5rem;
}

.lead strong {
  font-weight: 700;
  color: var(--brand-blue);
}

.lang-block p:not(.lead) {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.6;
  color: #444444;
  margin-bottom: 1.2rem;
}

.about-contact {
  margin-top: 2rem;
  border-top: 1px solid #dddddd;
  padding-top: 1.5rem;
}

.about-contact h2 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.about-contact p {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.about-contact strong {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-dark);
  display: inline-block;
  width: 90px;
}

.underlined-link {
  color: var(--text-dark);
  text-decoration: none;
  position: relative;
  font-weight: 500;
}

.underlined-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--brand-red);
  transform: scaleX(1);
  transform-origin: bottom left;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.underlined-link:hover::after {
  transform: scaleX(0);
  transform-origin: bottom right;
}

/* Right Column Poster Card */
.about-visual {
  display: flex;
  justify-content: center;
}

.philosophy-poster {
  border: 3px solid var(--border-dark);
  filter: url(#rough-edge); /* Custom hand-drawn filter */
  padding: clamp(2rem, 4vw, 3rem);
  background-color: #faf8f4;
  transform: rotate(-1.5deg);
  max-width: 380px;
  width: 100%;
  box-shadow: 12px 12px 0px rgba(0,0,0,0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.philosophy-poster:hover {
  transform: rotate(0.5deg) translateY(-5px);
  box-shadow: 18px 18px 0px rgba(13, 86, 215, 0.08);
}

.poster-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--brand-red);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.poster-quote {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
  margin-bottom: 1.5rem;
}

.quote-word {
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 4.5vw, 4.2rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.quote-word.blue { color: var(--brand-blue); }
.quote-word.red { color: var(--brand-red); }
.quote-word.dark { color: var(--text-dark); }

.poster-desc {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.5;
  color: #555555;
  border-top: 1px dashed #cccccc;
  padding-top: 1.2rem;
}


/* 7. WORK SECTION (BOTTOM) */
.section-work {
  background-color: var(--bg-color);
}

.work-container {
  width: 100%;
  max-width: 1200px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 4vh;
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #eeeeee;
  padding-bottom: 1.2rem;
  margin-bottom: 3.5vh;
}

.work-section-title {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 0.9;
  margin: 0;
}

/* Category Filter Tabs */
.filter-nav {
  display: flex;
  gap: 8px;
}

.filter-tab {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.2vw, 1.05rem);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 16px;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-radius: 4px;
}

.filter-tab:hover {
  color: var(--text-dark);
}

.filter-tab.active {
  color: #ffffff;
  background-color: var(--brand-blue);
}

/* Project Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 2.5vw, 3rem);
  flex-grow: 1;
  align-content: start;
}

.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2.1;
  overflow: hidden;
  border: 3px solid var(--border-dark);
  filter: url(#rough-edge); /* Custom hand-drawn filter for images */
  background-color: var(--bg-light);
}

.project-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 86, 215, 0.88); /* transluscent brand blue */
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.project-card-action {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 8px 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: translateY(15px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover Actions on Project Card */
.project-card:hover {
  transform: translateY(-8px);
}

.project-card:hover .project-card-image {
  transform: scale(1.06);
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card:hover .project-card-action {
  transform: translateY(0);
}

/* Card Metadata */
.project-card-info {
  padding-top: 1.2rem;
}

.project-card-category {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-red);
  letter-spacing: 0.08em;
}

.project-card-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  font-weight: 700;
  color: var(--text-dark);
  margin: 4px 0 8px 0;
  line-height: 1.25;
}

.project-card-summary {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Filtering Transitions: Fade class */
.project-card.filtered-out {
  display: none !important;
}


/* 8. MODALS STYLING (DETAILED VIEW) */
.project-modal {
  border: none;
  background: transparent;
  padding: 0;
  width: 90vw;
  max-width: 1100px;
  max-height: 85vh;
  margin: auto;
  overflow-y: auto;
  border-radius: 0;
  outline: none;
  z-index: 1000;
}

.project-modal::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-wrapper {
  background-color: #ffffff;
  border: 3px solid var(--border-dark);
  filter: url(#rough-edge);
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: 0 24px 48px rgba(0,0,0,0.25);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2.8rem;
  color: var(--text-dark);
  cursor: pointer;
  line-height: 1;
  z-index: 20;
  transition: transform 0.3s ease, color 0.2s ease;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  color: var(--brand-red);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  height: 100%;
  max-height: 85vh;
}

.modal-visual {
  background-color: var(--bg-light);
  border-right: 3px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100%;
}

.modal-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Make GIF fit nicely in wayfinding modal */
#modal-wayfinding .modal-main-image {
  object-fit: cover;
  object-position: center;
}

.modal-body {
  padding: clamp(2rem, 4vw, 3.5rem);
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: #ffffff;
}

.modal-tag {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-red);
  letter-spacing: 0.08em;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.modal-desc {
  margin-bottom: 2rem;
}

.modal-desc .lang-block {
  display: none;
}

body.lang-en .modal-desc .lang-block.en {
  display: block;
}

body:not(.lang-en) .modal-desc .lang-block.nl {
  display: block;
}

.modal-desc p {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  color: #333333;
  margin-bottom: 1.2rem;
}

.modal-metadata {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px dashed #dddddd;
  padding-top: 1.5rem;
  margin-top: auto;
}

.modal-metadata tr {
  border-bottom: 1px dashed #eeeeee;
}

.modal-metadata tr:last-child {
  border-bottom: none;
}

.modal-metadata th {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 0;
  width: 32%;
  letter-spacing: 0.05em;
  vertical-align: top;
}

.modal-metadata td {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--text-dark);
  padding: 10px 0;
  vertical-align: top;
}


/* 9. RESPONSIVE MEDIA QUERIES */

/* For large tablets and small laptops */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-visual {
    order: -1; /* visually show poster on top of bio on medium screens */
  }
  
  .philosophy-poster {
    max-width: 100%;
  }
}

/* For mobile phones */
@media (max-width: 767px) {
  .section-content {
    padding: 10vh 5vw 8vh 5vw;
  }

  .nav-control {
    font-size: 0.9rem;
    gap: 4px;
  }

  .nav-control-up {
    top: 2vh;
  }

  .nav-control-down {
    bottom: 2.5vh;
  }

  .arrow-icon {
    height: 30px;
  }

  /* Stack brand phrase on mobile */
  .homepage-center {
    align-items: center;
    text-align: center;
    margin-top: 0;
  }

  .brand-phrase {
    align-items: center;
  }

  .row-voor-cards {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-top: 1rem;
  }

  .cards-wrapper {
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    align-items: center;
  }

  .card-img {
    height: 52px;
  }

  .brand-logo {
    bottom: 9vh;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
  }

  .logo-name, .logo-tagline {
    font-size: 1.3rem;
  }

  /* Work layout mobile */
  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .work-section-title {
    font-size: 2.2rem;
  }

  .filter-nav {
    flex-wrap: wrap;
    gap: 6px;
  }

  .filter-tab {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  /* Modals mobile */
  .project-modal {
    width: 95vw;
    max-height: 90vh;
  }

  .modal-grid {
    grid-template-columns: 1fr;
    max-height: 90vh;
  }

  .modal-visual {
    border-right: none;
    border-bottom: 3px solid var(--border-dark);
    height: 250px;
  }

  .modal-body {
    padding: 1.5rem;
    height: calc(100% - 250px);
  }

  .modal-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }
}

/* Reduced Motion Settings for Accessibility */
@media (prefers-reduced-motion: reduce) {
  .scroll-container {
    scroll-behavior: auto;
  }
  
  .card-btn:hover, .project-card:hover, .nav-control-up:hover .arrow-icon, .nav-control-down:hover .arrow-icon {
    transform: none !important;
    filter: none !important;
  }
  
  .project-card-image {
    transition: none !important;
  }
  
  .project-card:hover .project-card-image {
    transform: none !important;
  }
}
