/* ========================================
   Main Stylesheet - Alexander Bastidas Fry
   ======================================== */

/* ========== CSS Variables ========== */
:root {
  --ink-black: #000000;
  --olive-wood: #333333;
  --night-bordeaux: #000000;
  --deep-space-blue: #000000;
  --deep-ocean: #ffffff;
}

/* ========== Base Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 210px;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Futura", 'questrial', "Century Gothic", sans-serif;
  background: #000;
  /*background: #000 url('/imgs/apollo_wide.jpg') no-repeat center bottom; */
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  color: #e0e0e0;
}

/* ========== React App Container ========== */
#app-root {
  position: fixed;
  top: -12.5%;
  left: -12.5%;
  width: 125%;
  height: 125%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.95;
}

/* ========== Header Section ========== */
.hero-section {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 280px;
  padding: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37),
              0 0 40px rgba(255, 255, 255, 0.03),
              inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(102, 102, 102, 0.01) 25%,
    rgba(255, 255, 255, 0.008) 50%,
    rgba(102, 102, 102, 0.01) 75%,
    rgba(255, 255, 255, 0.02) 100%
  );
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    transparent 15px,
    rgba(255, 255, 255, 0.15) 25px,
    rgba(255, 255, 255, 0.15) calc(100% - 25px),
    transparent calc(100% - 15px),
    transparent 100%
  );
  z-index: 1;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 15px,
    black 25px,
    black calc(100% - 25px),
    transparent calc(100% - 15px),
    transparent 100%
  );
}

.hero-section > * {
  position: relative;
  z-index: 2;
}

.site-name {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.2em;
  font-weight: 400;
  z-index: 998;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3),
               0 0 40px rgba(255, 255, 255, 0.15);
}

.site-name-container,
.site-name-video,
.site-name-text {
  display: none;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  position: relative;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 0;
  display: none;
}

.hero-content > * {
  position: relative;
  z-index: 1;
}

/* ========== Profile Image ========== */
.profile-image-wrapper {
  flex-shrink: 0;
  width: 240px;
  height: 240px;
  clip-path: polygon(
    20px 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% calc(100% - 20px),
    calc(100% - 20px) 100%,
    20px 100%,
    0 calc(100% - 20px),
    0 20px
  );
  overflow: hidden;
  border: none;
  position: fixed;
  left: 50%;
  top: 65px;
  transform: translateX(-50%);
  z-index: 999;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.profile-image-wrapper:hover,
.profile-image-wrapper:active {
  transform: translateX(-50%) scale(1.05);
}

.profile-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Identity Text ========== */
.identity-text {
  flex: 1;
  display: none;
}

.identity-line {
  font-size: 0.75em;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 3px;
  color: #fff;
  letter-spacing: 0.2px;
}

.role-line {
  font-size: 0.6em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.3px;
}

.role-line span {
  color: rgba(255, 255, 255, 0.7);
}

.worldview-paragraph {
  display: none;
}

/* ========== Navigation Cards ========== */
.nav-cards-container {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.nav-card {
  position: relative;
  width: 220px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 5px;
  background: transparent;
  border: none;
  overflow: visible;
}

.nav-card:hover {
  background: transparent;
}

.nav-card .video-bg,
.nav-card span {
  display: none;
}

.nav-card .content {
  position: relative;
  padding: 4px 8px;
  z-index: 10;
  color: #fff;
  text-align: center;
}

.nav-card .content h3 {
  font-size: 0.95em;
  color: #fff;
  font-weight: 400;
  letter-spacing: 0.8px;
  margin: 0;
  position: relative;
  display: inline-block;
}

/* Modern hover underline effect */
.nav-card .content h3::after,
.nav-card .content h3::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #666666, #ffffff);
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease-out;
}

.nav-card .content h3::before {
  top: -5px;
  bottom: auto;
  transform-origin: left;
}

.nav-card:hover .content h3::after,
.nav-card:hover .content h3::before,
.nav-card:active .content h3::after,
.nav-card:active .content h3::before {
  transform: scaleX(1);
}

.nav-card:hover .content h3,
.nav-card:active .content h3 {
  color: #ffffff;
}

/* ========== Content Area ========== */
.content-area {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 310px;
  padding-left: 40px;
  padding-right: 40px;
  padding-bottom: 30px;
}

.placeholder-text {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2em;
  padding: 60px 20px;
  font-style: italic;
}

.content-section {
  display: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  clip-path: polygon(
    12px 0,                    /* top-left chamfer */
    calc(100% - 12px) 0,       /* top-right corner */
    100% 12px,                 /* top-right chamfer */
    100% calc(100% - 12px),    /* bottom-right corner */
    calc(100% - 12px) 100%,    /* bottom-right chamfer */
    12px 100%,                 /* bottom-left corner */
    0 calc(100% - 12px),       /* bottom-left chamfer */
    0 12px                     /* top-left corner */
  );
  padding: 40px 50px;
  margin-bottom: 30px;
  position: relative;
  overflow: visible;
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.37),
    0 0 40px rgba(255, 255, 255, 0.03),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.content-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(102, 102, 102, 0.01) 25%,
    rgba(255, 255, 255, 0.008) 50%,
    rgba(102, 102, 102, 0.01) 75%,
    rgba(255, 255, 255, 0.02) 100%
  );
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.content-section > * {
  position: relative;
  z-index: 1;
}

.content-section::after {
  content: '';
  display: table;
  clear: both;
}

.content-section.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes line {
  0% {
    background-position-x: 390px;
  }
}

/* ========== Content Typography ========== */
.content-section h2 {
  font-size: 1.5em;
  font-weight: 400;
  margin-bottom: 20px;
  color: #ffffff;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
  transition: opacity 0.3s ease;
}

.content-section h2.scrolled {
  opacity: 0;
}

.content-section h3 {
  font-size: 1.1em;
  font-weight: 400;
  margin: 20px 0 10px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3px;
}

.content-section p {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95em;
  margin-bottom: 16px;
  font-weight: 300;
}

.content-section ul {
  list-style: none;
  padding-left: 0;
  margin: 16px 0;
}

.content-section li {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9em;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.content-section li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #ffffff;
  font-size: 0.9em;
}

.content-section a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

/* ========== Call-to-Action Box ========== */
.cta-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  clip-path: polygon(
    10px 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    10px 100%,
    0 calc(100% - 10px),
    0 10px
  );
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  box-shadow: 
    0 6px 24px 0 rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 255, 255, 0.04),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.12);
}

.cta-box p {
  font-size: 1em;
  color: #fff;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* ========== Subsection & Contact ========== */
.subsection {
  margin: 20px 0;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  clip-path: polygon(
    8px 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% calc(100% - 8px),
    calc(100% - 8px) 100%,
    8px 100%,
    0 calc(100% - 8px),
    0 8px
  );
  box-shadow: 
    0 4px 16px 0 rgba(0, 0, 0, 0.25),
    0 0 20px rgba(255, 255, 255, 0.02),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.contact-link {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  clip-path: polygon(
    6px 0,
    calc(100% - 6px) 0,
    100% 6px,
    100% calc(100% - 6px),
    calc(100% - 6px) 100%,
    6px 100%,
    0 calc(100% - 6px),
    0 6px
  );
  color: #fff;
  text-decoration: none;
  font-size: 0.9em;
  letter-spacing: 0.3px;
  box-shadow: 
    0 4px 16px 0 rgba(0, 0, 0, 0.25),
    0 0 20px rgba(255, 255, 255, 0.02),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.contact-link:hover,
.contact-link:active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  box-shadow: 
    0 6px 20px 0 rgba(0, 0, 0, 0.3),
    0 0 35px rgba(255, 255, 255, 0.05),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ========== Glassmorphism Card ========== */
.glassmorphism-card {
  position: relative;
  max-width: 400px;
  margin: 30px auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  overflow: hidden;
}

.glassmorphism-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    rgba(255, 255, 255, 0.1), 
    rgba(255, 255, 255, 0.05), 
    rgba(102, 102, 102, 0.1),
    rgba(255, 255, 255, 0.05));
  border-radius: 20px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.glassmorphism-card:hover::before {
  opacity: 1;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.glassmorphism-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  filter: brightness(0.9) contrast(1.1);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.glassmorphism-card:hover img {
  transform: scale(1.05);
  filter: brightness(1) contrast(1.2);
}

.glassmorphism-card .card-caption {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
  font-style: italic;
}

/* ========== Section Media ========== */
.section-media {
  float: right;
  width: 400px;
  height: 400px;
  margin: 0 0 20px 30px;
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
  overflow: hidden;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 255, 255, 0.03),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-media:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 45px rgba(255, 255, 255, 0.05),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
}

.section-media img,
.section-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.close-button {
  display: none;
}

/* ========== Responsive Design ========== */
@media (min-width: 769px) {
  .hero-section {
    height: 320px !important;
  }

  .hero-section::after {
    background: linear-gradient(
      to right,
      transparent 0%,
      transparent 20px,
      rgba(255, 255, 255, 0.15) 35px,
      rgba(255, 255, 255, 0.15) calc(100% - 35px),
      transparent calc(100% - 20px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      transparent 20px,
      black 35px,
      black calc(100% - 35px),
      transparent calc(100% - 20px),
      transparent 100%
    );
  }

  .site-name {
    font-size: 2.5em !important;
    letter-spacing: 4px !important;
    top: 15px !important;
    text-align: center;
  }

  .profile-image-wrapper {
    width: 202px !important;
    height: 202px !important;
    top: 68px !important;
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    grid-column: unset !important;
    grid-row: unset !important;
    clip-path: polygon(
      17px 0,
      calc(100% - 17px) 0,
      100% 17px,
      100% calc(100% - 17px),
      calc(100% - 17px) 100%,
      17px 100%,
      0 calc(100% - 17px),
      0 17px
    ) !important;
  }

  .profile-image-wrapper:hover {
    transform: translateX(-50%) scale(1.05) !important;
  }

  .nav-cards-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    position: absolute !important;
    bottom: -10px !important;
    gap: 25px !important;
    grid-template-columns: unset !important;
    grid-template-rows: unset !important;
  }

  .nav-card {
    width: 240px !important;
    height: 55px !important;
    grid-column: unset !important;
    grid-row: unset !important;
  }

  .nav-card .content h3 {
    font-size: 1.05em !important;
    letter-spacing: 1px !important;
  }

  .content-area {
    padding-top: 350px !important;
  }

  .content-section {
    overflow: visible !important;
  }

  .section-media {
    float: right !important;
    width: 450px !important;
    height: 450px !important;
    min-height: 450px !important;
    margin: 0 0 20px 30px !important;
    overflow: hidden !important;
    display: block !important;
  }

  .section-media img,
  .section-media video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
  }
}

@media (min-width: 1600px) {
  body {
    background-size: 150% auto;
  }
}

@media (min-width: 1920px) {
  body {
    background-size: 180% auto;
  }
}

@media (min-width: 2560px) {
  body {
    background-size: 220% auto;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 205px;
  }

  body {
    overflow-y: auto;
  }

  #app-root {
    top: -12.5%;
    left: -12.5%;
    width: 125%;
    height: 125%;
  }

  .hero-section {
    height: auto;
    min-height: 185px;
    padding-bottom: 5px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .site-name {
    position: static;
    display: block;
    font-size: 1.3em;
    margin: 8px auto 8px auto;
    padding-top: 6px;
    transform: none;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4),
                 0 0 40px rgba(255, 255, 255, 0.2);
  }
  }

  .hero-content {
    position: relative;
    display: contents;
  }

  .identity-text {
    display: none;
  }

  .profile-image-wrapper {
    position: relative;
    left: 0;
    top: 0;
    transform: none;
    width: 100px;
    height: 100px;
    margin: 0;
    clip-path: polygon(
      8px 0,
      calc(100% - 8px) 0,
      100% 8px,
      100% calc(100% - 8px),
      calc(100% - 8px) 100%,
      8px 100%,
      0 calc(100% - 8px),
      0 8px
    );
  }

  .nav-cards-container {
    position: static;
    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    grid-template-rows: auto auto;
    gap: 5px;
    column-gap: 8px;
    padding: 0 12px 5px 12px;
    max-width: 450px;
    margin: 0 auto;
    align-items: start;
  }

  .nav-card {
    width: 100%;
    height: 42px;
  }

  /* Profile photo in center, spanning 2 rows - acts as About button */
  .profile-image-wrapper {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: center;
    position: static;
    transform: none;
    cursor: pointer;
  }

  .profile-image-wrapper:hover {
    transform: scale(1.08);
  }

  /* Art & Creative - top left */
  .nav-card[data-target="art"] {
    grid-column: 1;
    grid-row: 1;
  }

  /* Technical Art Consulting - top right */
  .nav-card[data-target="consulting"] {
    grid-column: 3;
    grid-row: 1;
  }

  /* Science & Engineering - bottom left */
  .nav-card[data-target="science"] {
    grid-column: 1;
    grid-row: 2;
  }

  /* Contact - bottom right */
  .nav-card[data-target="contact"] {
    grid-column: 3;
    grid-row: 2;
    height: 42px;
    max-width: none;
    margin: 0;
  }

  .nav-card .content h3 {
    font-size: 0.62em;
    white-space: nowrap;
  }

  .content-section {
    padding: 20px;
  }

  .content-area {
    padding: 20px;
    padding-top: 200px;
  }

  .glassmorphism-card {
    max-width: 100%;
    padding: 20px;
    margin: 20px 0;
  }

  .section-media {
    float: none;
    width: 100%;
    max-width: 400px;
    height: 400px;
    margin: 0 auto 20px auto;
  }
}
