/* ============================================
   BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --nav-height: 56px;

  --analyst-bg:      #091525;
  --analyst-accent:  #4fc3f7;
  --analyst-text:    #cee4f5;

  --story-bg:        #f4ede0;
  --story-accent:    #8b6220;
  --story-text:      #2a1a0e;

  --routes-bg:       #0b1e12;
  --routes-accent:   #6abf69;
  --routes-text:     #c8e6c9;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #091525;
}


/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 2.5rem;
  z-index: 100;
  background: none;
  border: none;
}

.nav-name {
  font-family: 'Space Mono', monospace;
  font-size: 26px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
}

.lang-sep {
  color: rgba(255,255,255,0.25);
  font-size: 1.5rem;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.12em;
  padding: 0.25rem 0.4rem;
  transition: color 0.2s;
}

.lang-btn.active {
  color: rgba(255, 255, 255, 0.85);
}

.lang-btn:hover:not(.active) {
  color: rgba(255,255,255,0.7);
}


/* ============================================
   PANELS CONTAINER
   ============================================ */
.panels-container {
  display: flex;
  height: 100vh;
}

.panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: default;
  transition: flex 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.panels-container:has(.panel:hover) .panel:not(:hover) {
  flex: 0.38;
}

.panels-container:has(.panel:hover) .panel:hover {
  flex: 2.24;
}

/* Vertical divider */
.panel + .panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: rgba(255,255,255,0.07);
  z-index: 10;
}


/* ============================================
   PANEL INNER LAYOUT
   ============================================ */
.panel__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 2.5rem;
  overflow: hidden;
}

/* Large decorative bg word */
.panel__bg-text {
  position: absolute;
  bottom: -0.1em;
  right: -0.04em;
  font-size: 18vw;
  font-weight: 700;
  line-height: 1;
  opacity: 0.04;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translateX(5%);
  user-select: none;
}

.panel:hover .panel__bg-text {
  opacity: 0.08;
  transform: translateX(0);
}

/* Tag */
.panel__tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 1.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.28rem 0.75rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.55;
  transition: opacity 0.3s;
}

.panel:hover .panel__tag {
  opacity: 0.85;
}

/* Title */
.panel__title {
  font-size: clamp(1.3rem, 1.8vw, 2rem);
  line-height: 1.25;
  margin-bottom: 0;
  transition: margin-bottom 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel:hover .panel__title {
  margin-bottom: 1.6rem;
}

/* Content reveal */
.panel__content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.65s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.45s ease 0.15s;
}

.panel:hover .panel__content {
  max-height: 320px;
  opacity: 1;
}

.panel__desc {
  font-size: 0.92rem;
  line-height: 1.75;
  opacity: 0.7;
  margin-bottom: 1.4rem;
}

.panel__skills {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  opacity: 0.55;
}

.panel__skills li::before {
  content: '— ';
}

.panel__cta {
  display: inline-block;
  width: fit-content;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border: 1px solid currentColor;
  transition: background 0.2s ease, color 0.2s ease;
}


/* ============================================
   PANEL HEADER (top title, all panels)
   ============================================ */
.panel__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding-top: calc(var(--nav-height) + 24px);
  text-align: center;
  font-size: 2.5rem;
  line-height: 1.2;
  z-index: 5;
  pointer-events: none;
}

.panel__header--analyst {
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.panel__header--storyteller {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 2.75rem;
  color: #f4ede0;
}

.panel__header--routes {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: #c8e6c9;
  letter-spacing: 0.05em;
}


/* ============================================
   PANEL — ANALYST (dark blue / technical)
   ============================================ */
.panel--analyst {
  background-color: var(--analyst-bg);
  background-image: url('../assets/images/analitic1.jpeg');
  background-size: cover;
  background-position: center;
  color: var(--analyst-text);
  font-family: 'Space Mono', monospace;
}

.panel--analyst::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(9, 21, 37, 0.65);
  pointer-events: none;
}

/* Subtle grid overlay */
.panel--analyst .panel__deco--grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,195,247,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,195,247,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.panel--analyst .panel__tag   { color: var(--analyst-accent); border-color: var(--analyst-accent); }
.panel--analyst .panel__title { font-size: clamp(1.1rem, 1.5vw, 1.7rem); }
.panel--analyst .panel__bg-text { font-family: 'Space Mono', monospace; color: var(--analyst-accent); }

.panel--analyst .panel__cta {
  color: var(--analyst-accent);
  border-color: var(--analyst-accent);
}
.panel--analyst .panel__cta:hover {
  background: var(--analyst-accent);
  color: var(--analyst-bg);
}


/* ============================================
   PANEL — STORYTELLER (warm cream / folklore)
   ============================================ */
.panel--storyteller {
  background-color: var(--story-bg);
  background-image: url('../assets/images/CesuStasti1.jpeg');
  background-size: cover;
  background-position: center;
  color: var(--story-text);
  font-family: 'Cormorant Garamond', serif;
}

.panel--storyteller::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(61, 32, 8, 0.55);
  pointer-events: none;
}

/* Floral ornament top-left */
.panel__ornament {
  position: absolute;
  top: 2.2rem;
  left: 2.4rem;
  font-size: 1.8rem;
  color: var(--story-accent);
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.panel--storyteller:hover .panel__ornament { opacity: 0.6; }

.panel--storyteller .panel__tag   { color: var(--story-accent); border-color: var(--story-accent); }
.panel--storyteller .panel__title {
  font-size: clamp(1.5rem, 2.2vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
}
.panel--storyteller .panel__desc  { font-style: italic; font-size: 1rem; }
.panel--storyteller .panel__bg-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--story-accent);
}

.panel--storyteller .panel__cta {
  color: var(--story-accent);
  border-color: var(--story-accent);
}
.panel--storyteller .panel__cta:hover {
  background: var(--story-accent);
  color: var(--story-bg);
}


/* ============================================
   PANEL — ROUTES (dark forest green / nature)
   ============================================ */
.panel--routes {
  background-color: var(--routes-bg);
  background-image: url('../assets/images/LatvianRoutes1.jpeg');
  background-size: cover;
  background-position: center;
  color: var(--routes-text);
  font-family: 'Playfair Display', serif;
}

.panel--routes::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 30, 18, 0.60);
  pointer-events: none;
}

/* Coordinates label */
.panel__coords {
  position: absolute;
  top: 2.2rem;
  left: 2.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--routes-accent);
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.panel--routes:hover .panel__coords { opacity: 0.7; }

.panel--routes .panel__tag   { color: var(--routes-accent); border-color: var(--routes-accent); }
.panel--routes .panel__title {
  font-size: clamp(1.5rem, 2.2vw, 2.4rem);
  font-weight: 600;
}
.panel--routes .panel__bg-text {
  font-family: 'Playfair Display', serif;
  color: var(--routes-accent);
}

.panel--routes .panel__cta {
  color: var(--routes-accent);
  border-color: var(--routes-accent);
}
.panel--routes .panel__cta:hover {
  background: var(--routes-accent);
  color: var(--routes-bg);
}


/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
  background: transparent;
  pointer-events: none;
}

.site-footer a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  pointer-events: all;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: rgba(255,255,255,0.6);
}


/* ============================================
   RESPONSIVE — mobile: stack vertically
   ============================================ */
@media (max-width: 768px) {
  html, body { overflow: auto; }

  .main-nav {
    height: 36px;
    padding: 0 1rem;
  }

  .nav-name {
    font-size: 8px;
  }

  .nav-lang,
  .lang-btn,
  .lang-sep {
    font-size: 8px;
  }

  .panels-container {
    flex-direction: column;
    height: auto;
  }

  .panel {
    flex: none !important;
    width: 100%;
    height: 248px;
    transition: none;
  }

  .panels-container:has(.panel:hover) .panel:not(:hover),
  .panels-container:has(.panel:hover) .panel:hover {
    flex: none;
  }

  .panel + .panel::before {
    width: 100%;
    height: 1px;
    top: 0;
    left: 0;
  }

  .panel__header {
    font-size: 1.1rem;
    padding-top: 56px;
    text-align: center;
  }

  .panel__bg-text {
    opacity: 0.06;
    transform: none;
  }
}
