/* Local Fonts */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 200;
  src: url('assets/fonts/raleway-v28-latin-200.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300;
  src: url('assets/fonts/raleway-v28-latin-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  src: url('assets/fonts/raleway-v28-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  src: url('assets/fonts/raleway-v28-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  src: url('assets/fonts/raleway-v28-latin-600.woff2') format('woff2');
}

:root {
  --bg-color: #0a0a0a;
  --text-color: #ffffff;
  --accent-color: #e0e0e0;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 15px;
  --transition-speed: 0.6s;
}

body {
  font-family: 'Geist', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Global Box Sizing Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible,
.back-link:focus-visible,
.portfolio-item:focus-visible {
  outline: 2px solid white !important;
  outline-offset: 4px;
  border-radius: 2px;
  opacity: 1 !important;
}

#app {
  width: 100%;
  height: 100vh;
  position: relative;
}

/* Background Video */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4) saturate(1.2);
}

/* Overlay Layers */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease, visibility 0s linear 0s;
  visibility: visible;
  z-index: 10;
  /* Ensure active overlay is on top */
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  visibility: hidden;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease, visibility 0s linear var(--transition-speed);
  z-index: 0;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 4rem;
  display: flex;
  justify-content: center;
  /* Centered instead of space-between */
  align-items: center;
  z-index: 100;
}

.logo {
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
}

.nav-links {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 3rem;
  width: auto;
  min-width: 400px;
  align-items: center;
}

.nav-links>*:nth-child(1) {
  justify-self: end;
  /* changed from text-align: right */
}

.nav-links>*:nth-child(3) {
  justify-self: start;
  /* changed from text-align: left */
}

.nav-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  cursor: pointer;
  position: relative;
  /* Changed for ::after positioning */
  /* align-self: center; implicitly handled */
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.nav-link:hover {
  opacity: 1;
  /* Ensure full opacity on hover */
}

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

/* Legal Links specific overrides to match previous inline styles */
.legal-link-btn {
  color: white;
  text-decoration: none;
  border-bottom: none;
  text-transform: none;
  /* Keep legal links mixed case if desired, but design was generic. Nav is uppercase. Let's keep legal simple. */
}

/* Back Link Button */
.back-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  color: white;
  text-decoration: none;
  opacity: 0.8;
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
}

.back-link:hover {
  opacity: 1;
}

/* Hero Section */
/* Hero Section */
.hero-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 8rem);
  font-weight: 200;
  letter-spacing: 0.1em;
  /* Reduced spacing to save width */
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  /* Reduced bottom margin */
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  /* Prevent wrapping */
  gap: 1.5rem;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  /* Ensure it doesn't cause scrollbars */
}

.hero-title>span:first-child {
  text-align: right;
  /* Removed justify-self */
}

.hero-title>span:last-child {
  text-align: left;
  /* Removed justify-self */
}

.separator-logo {
  height: 2.5em;
  /* Scaled up so inside letters match text height */
  width: auto;
  filter: brightness(0) invert(1);
  /* Ensure it's white to match text */
  opacity: 0.9;
}

.hero-subline {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 90vw;
  /* Safety constraint */
  margin-left: auto;
  margin-right: auto;
  font-size: 1.5rem;
  /* Reduced for hierarchy */
  letter-spacing: 0.4rem;
  font-weight: 300;
  text-transform: uppercase;
  color: var(--text-color);
  opacity: 0.9;
  margin-top: 0.5rem;
  text-align: inherit;
  /* Reset align */
}

.hero-subline span {
  color: #ffffff;
  /* Explicitly force white */
  opacity: 1;
}

/* Portfolio & Contact Glass Panels */
.content-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  /* Soft fading edges using mask */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
  border: none;
  border-radius: 20px;
  padding: 4rem;
  width: 80%;
  max-width: 1000px;
  height: 70vh;
  overflow-y: auto;
  /* Enable scrolling */
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.content-panel h2 {
  font-weight: 300;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  flex-shrink: 0;
  text-align: center;
}

/* Portfolio Grid */
.portfolio-grid {
  display: flex;
  flex-direction: column !important;
  /* Force vertical stack globally */
  width: 100%;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.portfolio-item {
  width: 90%;
  height: 100px;
  /* Slimmer fixed height */
  position: relative;
  aspect-ratio: auto;
  /* Override aspect ratio */
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.4s ease;
  cursor: pointer;
  border: none;
  flex: none;
  text-decoration: none;
  /* No underlines */
  display: block;
  /* Ensure buttons behave like blocks */
  padding: 0;
  /* Reset default button padding */
  text-align: left;
  /* Reset default center align */
}

.portfolio-item:hover {
  transform: scale(1.02);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.portfolio-info {
  width: 100%;
  height: 100%;
  /* Fill the item */
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.portfolio-item img+.portfolio-info {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  /* Vertical center */
  justify-content: center;
  /* Horizontal center */
  padding: 0.5rem 1rem;
}

.portfolio-info h3 {
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.1rem;
}



/* Contact Links */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: center;
  text-align: center;
}

.contact-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease;
}

.contact-link:hover {
  transform: translateX(10px);
}




/* Legal Page Styling */
.index {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.index li {
  margin-bottom: 0.5rem;
}

.index-link {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.3s ease;
}

.index-link:hover {
  border-bottom-color: var(--text-color);
}

.m-elements,
.glossary {
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.m-elements li,
.glossary li {
  margin-bottom: 1rem;
}

.seal {
  margin-top: 3rem;
  opacity: 0.6;
  font-size: 0.8rem;
  text-align: center;
}

/* Custom Scrollbar */
.content-panel::-webkit-scrollbar {
  width: 6px;
}

.content-panel::-webkit-scrollbar-track {
  background: transparent;
}

.content-panel::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

@media (max-width: 1350px) {
  nav {
    padding: 1.5rem 1rem;
    flex-direction: column;
    align-items: center;
    /* Ensure vertical stack is centered */
    gap: 1rem;
    background: rgba(0, 0, 0, 0.5);
    /* Slight bg for readability behind nav */
    backdrop-filter: blur(5px);
  }

  .nav-links {
    gap: 1.5rem;
    font-size: 0.8rem;
  }

  .hero-title {
    display: flex;
    font-size: 2.5rem;
    gap: 0.5rem;
    flex-direction: column;
    /* Stack vertically */
    letter-spacing: 0.2rem;
    /* Reduce spacing from desktop 0.5rem */
  }

  .separator-logo {
    order: -1;
    /* Move to top */
    height: auto;
    /* Allow scaling */
    width: 60%;
    /* Fill decent width */
    max-width: 200px;
    /* Cap size */
    margin: 1rem 0;
    /* Vertical spacing */
    padding: 0;
    border: none;
    background: transparent;
  }

  /* Cleaner mobile subline: standard text flow instead of scattered letters */
  .hero-subline {
    display: block;
    /* Fixes individual span flex behavior */
    font-size: 1rem;
    letter-spacing: 0.2rem;
    text-align: center;
    margin-top: 1rem;
    width: 100%;
  }

  /* Reset span behavior for mobile to look like normal text */
  .hero-subline span {
    display: inline;
  }

  /* Reset span behavior for mobile to look like normal text */
  .hero-subline span {
    display: inline;
  }

  .content-panel {
    width: 95%;
    padding: 2rem 1.5rem;
    height: 80vh;
    /* Taller panel on mobile */
  }

  .content-panel h2 {
    font-size: 2rem;
    text-align: center;
  }

  /* Redundant portfolio styles removed, global styles apply */

  .contact-links {
    align-items: center;
    /* Center contact info */
  }

  .contact-link {
    font-size: 1rem;
  }

  .external-links {
    flex-direction: column;
    gap: 1.5rem;
    /* More breathing room */
    align-items: center;
    margin-top: 3rem;
    /* Separate from grid */
    padding-bottom: 2rem;
    width: 100%;
  }



  .external-links a {
    font-size: 1.1rem;
    /* Easier to tap */
    padding: 0.5rem 1rem;
    /* Touch target */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Button-like look */
    border-radius: 5px;
    width: 80%;
    /* extensive buttons */
    text-align: center;
    text-decoration: none;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: clamp(1.2rem, 8vw, 2.2rem);
    letter-spacing: 0.1rem;
  }

  .hero-subline {
    font-size: 0.8rem;
  }

  .content-panel {
    width: 95%;
    padding: 1.5rem 1rem;
  }

  .content-panel h2 {
    font-size: 1.5rem;
  }
}