/* --- GLOBAL STYLES & VARIABLES --- */
:root {
  --background-color: #0d0d0d;
  --primary-text: #ffffff;
  --secondary-text: #5E5E5E;
  --border-color: #d0d0d0;
  --font-main: 'Helvetica', sans-serif;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--background-color);
  color: var(--primary-text);
  text-transform: uppercase;
}

/* --- LOADING SCREEN --- */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: var(--primary-text);
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-size: 2em;
  letter-spacing: -1px;
}

.loading-text {
  display: inline-block;
}

/* --- HEADER --- */
.header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  min-height: 85vh;
  align-items: start;
}

.header p {
  margin: 0;
}

.logo {
  grid-column: 1 / -1; /* Spant over alle 4 kolommen */
  width: 100%;
}

.description, .role, .specialization {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1.04px;
  text-transform: none;
}

.role p:last-of-type,
.specialization p:last-of-type {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: -0.64px;
  padding-top: 1rem;
}

.role .link {
  color: var(--primary-text);
  text-decoration: none;
  position: relative;
  display: inline-block;
}

.role .link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  background-color: var(--primary-text);
  bottom: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s ease-in-out;
}

.role .link:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.current {
  grid-column: 4 / 5;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1.04px;
  text-transform: none;
}

/* --- NAVIGATION --- */
.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.main-nav li {
  padding: 2px 0 2px 20px;
  position: relative;
}

.main-nav li a {
  text-decoration: none;
  font-size: 1.5rem;
  color: var(--secondary-text);
  transition: color 0.3s ease;
}

.main-nav li.active a {
  color: var(--primary-text);
}

.moving-bullet {
  position: absolute;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--primary-text);
  border-radius: 50%;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

/* --- MAIN CONTAINER & FILTER NAV --- */
.main-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  justify-content: space-between;
}

.nav-links a {
  text-decoration: none;
  font-size: 1.3em;
  font-weight: 400;
  letter-spacing: -1.05px;
  color: var(--secondary-text);
  transition: color 0.3s ease-in-out;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--primary-text);
}

/* --- MASONRY GRID --- */
.grid {
  padding: 1rem;
  column-count: 5;
  column-gap: 1rem;
}

.video {
  position: relative;
  margin-bottom: 20px;
  break-inside: avoid-column;
  overflow: hidden;
  border-radius: 8px;
}

.video video {
  display: block;
  width: 100%;
  height: auto;
}

.sound-control {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 5px;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.3s ease;
  opacity: 0.7;
}

.sound-control:hover {
  opacity: 1;
}

.sound-control i {
  color: var(--primary-text);
  font-size: 14px;
  display: block;
}

/* --- ABOUT PAGE SPECIFIC STYLES --- */
.header-about {
  grid-template-rows: 400px 1fr;
}

.logo-about {
  grid-column: 1 / -1;
  width: 85%;
}

.about {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  text-transform: none;
  margin: 0;
  padding: 0;
}

.about h1 {
  font-size: 2.3em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1.5px;
  margin-top: 0;
}

.about p {
  font-size: 1.8em;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -1px;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  grid-column: 3 / 5;
  grid-row: 2 / 3;
}

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

/* --- CV SECTION --- */
.cv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 5em 1rem 1rem;
}

.cv .function {
  border-bottom: 0.5px solid var(--border-color);
  margin-bottom: 0.5em;
}

.function.past-job {
  opacity: 0.35;
}

.function h3 {
  font-size: 1.3em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -1px;
  margin: 0;
  text-transform: none;
}

.function .job {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.job p {
  margin: 0;
  padding: 0.3em 0 0.7em 0;
  font-size: 1em;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -1px;
  text-transform: none;
}

.job p:last-of-type {
  text-align: right;
}

.function.right-1 {
  grid-column: 2;
  grid-row: 1;
}

.function.right-2 {
  grid-column: 2;
  grid-row: 2;
}

.function.left-1 {
  grid-column: 1;
  grid-row: 1;
}

.function.left-2 {
  grid-column: 1;
  grid-row: 2;
}

.function.left-3 {
  grid-column: 1;
  grid-row: 3;
}

.function.left-4 {
  grid-column: 1;
  grid-row: 4;
}


/* --- FOOTER --- */
footer {
  display: flex;
  justify-content: center;
  padding: 8em 1rem;
}

footer a {
  font-size: 2em;
  text-decoration: none;
  text-transform: none;
  font-weight: 300;
  letter-spacing: -2px;
  color: var(--secondary-text);
  transition: color 0.3s ease-in-out;
}

footer a:hover {
  color: var(--primary-text);
}

/* --- RESPONSIVE STYLES --- */

/* Larger Desktops */
@media (min-width: 1921px) {
  .about h1 {
    font-size: 3vw;
  }
  .about p {
    font-size: 1.8vw;
  }
}

/* Grid columns for videos */
@media (max-width: 1800px) {
  .grid { column-count: 4; }
}

/* Laptops & Tablets */
@media (max-width: 1200px) {
  .header {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 2rem;
    min-height: 70vh;
  }
  .description, .role, .specialization, .current {
    grid-row: auto;
    grid-column: auto;
  }
  .grid { column-count: 3; }

  /* About page tablet layout */
  .header-about { grid-template-rows: auto; }
  .about, .right-column {
    grid-column: 1 / -1; /* Full width */
  }
  .about { grid-row: 2; }
  .right-column { grid-row: 3; margin-top: 2rem; }
  .about-image { max-height: 600px; object-position: top; }
}

/* Smaller Tablets */
@media (max-width: 1024px) {
  /* .description, .role, .specialization, .current { font-size: 1.2rem; } */
  .nav-links a { font-size: 1rem; letter-spacing: -0.7px; }
  footer { padding: 6em 2em; justify-content: center; }
  footer a { font-size: 1.5em; }
}

/* Mobile */
@media (max-width: 768px) {
  .header { grid-template-columns: 1fr; }
  .description, .role, .specialization, .current, .main-nav li a { font-size: 1.2rem; }
  .grid { column-count: 2; }

  /* About page mobile layout */
  .logo-about { width: 80%; }
  .about h1 { font-size: 1.8em; letter-spacing: -1px; }
  .about p { font-size: 1.1em; letter-spacing: -0.5px; }

  /* CV mobile layout */
  .cv { grid-template-columns: 1fr; padding: 3em 1rem 1rem; gap: 0; }
  .function.right-1, .function.right-2 {
    grid-column: auto;
    grid-row: auto;
  }
  .function h3 { font-size: 1.1em; }
  .job p { font-size: 0.9em; letter-spacing: -0.5px; }
}

/* Small Mobile */
@media (max-width: 480px) {
  .grid { column-count: 1; padding: 1rem; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 0.8rem; }
  
  /* About page small mobile */
  .about h1 { font-size: 1.6em; }
  .about p { font-size: 1em; letter-spacing: normal; }

  /* CV small mobile */
  .cv { padding: 2em 1rem 1rem; }
  .job { grid-template-columns: 1fr; }
  .job p:last-of-type { text-align: right; padding-top: 0.1em; }
  footer { padding: 4em 1rem 7em; }
  footer a { font-size: 1.2em; }
}