/* Reset i variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --dark-bg: #1a1a1a;
  --dark-bg-texture: #2d2d2d;
  --light-bg: #f5f5f5;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --nav-text: #1e40af;
  --brand-text: #1a1a1a;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  height: 100vh;
}

/* Layout Container - Two Column Split */
.layout-container {
  display: flex;
  min-height: 100vh;
  width: 100vw;
}

/* Left Section - Dark with J */
.left-section {
  width: 45%;
  background: #1a1a1a;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 25px 25px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-image {
  max-width: 60%;
  max-height: 60%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.95;
  user-select: none;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

/* Right Section - Light with Content */
.right-section {
  width: 55%;
  background: #f5f5f5;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1a1a1a;
  border: none;
  cursor: pointer;
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-light);
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Main Navigation - Desktop */
.main-nav {
  position: fixed;
  top: 50%;
  right: 4rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 100;
}

.nav-link {
  color: #1e40af;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
  text-align: right;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  opacity: 0.7;
}

/* Main Content */
.main-content {
  padding: 4rem 6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

/* Brand Text - Bottom Left */
.brand-text {
  position: absolute;
  bottom: 4rem;
  left: 6rem;
  z-index: 10;
}

.brand-line {
  font-size: 1.4rem;
  font-weight: 300;
  color: #1a1a1a;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.brand-name {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-first,
.brand-last {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1a1a;
  display: block;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Content Sections */
.content-sections {
  margin-top: auto;
  padding-bottom: 12rem; /* Espai per evitar solapament amb brand-text */
  padding-right: 40%; /* Espai a la dreta per evitar solapament amb brand-text */
}

.content-section {
  margin-bottom: 4rem;
  max-width: 600px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.section-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  opacity: 0.8;
}

.section-content p {
  margin-bottom: 1rem;
}

.section-content a.project-link {
  color: var(--nav-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.section-content a.project-link:hover {
  border-bottom-color: var(--nav-text);
}

.section-content strong {
  font-weight: 600;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 26, 0.95);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.mobile-menu-overlay.active {
  display: flex;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.mobile-nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.mobile-nav-link:hover {
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .layout-container {
    flex-direction: column;
  }

  .left-section {
    width: 100%;
    height: 40vh;
    min-height: 300px;
  }

  .logo-image {
    max-width: 50%;
    max-height: 50%;
  }

  .right-section {
    width: 100%;
    height: 60vh;
  }

  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .main-content {
    padding: 2rem;
    justify-content: flex-start;
  }

  .brand-text {
    position: relative;
    bottom: auto;
    left: auto;
    margin-bottom: 3rem;
  }

  .brand-line {
    font-size: 1.25rem;
  }

  .brand-first,
  .brand-last {
    font-size: 2rem;
  }

  .content-sections {
    padding-bottom: 2rem;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .left-section {
    height: 30vh;
    min-height: 200px;
  }

  .logo-image {
    max-width: 45%;
    max-height: 45%;
  }

  .main-content {
    padding: 1.5rem;
  }

  .brand-text {
    margin-bottom: 2rem;
  }

  .brand-line {
    font-size: 1rem;
  }

  .brand-first,
  .brand-last {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .section-content {
    font-size: 0.9rem;
  }

  .content-sections {
    padding-bottom: 2rem;
    padding-right: 0;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Hide sections initially for scroll reveal */
.content-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.content-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer Styles */
.site-footer {
  background-color: var(--light-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 2rem 3rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  align-items: start;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.footer-subtitle {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.4;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.5);
  margin-top: auto;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 1.5rem;
    margin-top: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
}
