/*=============================================
  1) Root Variables & Global Resets
===============================================*/
:root {
  --aztec: #081010;     /* Very dark background */
  --gunsmoke: #555555;  /* Dark gray for sections/contrasts */
  --gallery: #f0f0f0;   /* Light gray text */
  --pampas: #fbfbf9;    /* Off-white highlight if needed */
  --cohiba: #fcca03;    /* Bright accent (yellow-gold) for headings */
  --charcoal: #1f1f1f;  /* Darker gray for text on dark background */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  overflow-x: visible; /* prevents sideways page scroll */
  height: 100%;
  background-color: var(--aztec);
  color: var(--gallery);
  font-family: "Raleway", sans-serif;
  line-height: 1.6;
}

/* For the language dropdown in nav */
.language-dropdown > a {
  color: var(--cohiba);
  transition: color 0.3s ease;
}
.language-dropdown > a:hover {
  color: #45cdff; /* Blue on hover */
}
.language-dropdown {
  position: relative;
}
.language-dropdown .language-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--aztec);
  border: 1px solid var(--gallery);
  display: none; /* hidden by default */
  list-style: none;
  padding: 5px 0;
  z-index: 9999;
}
.language-dropdown:hover .language-menu {
  display: block;
}
.language-dropdown .language-menu li a {
  display: block;
  padding: 5px 10px;
  text-decoration: none;
  color: var(--gallery);
}
.language-dropdown .language-menu li a:hover {
  background-color: var(--cohiba);
  color: #000;
}

/* Wrapper to hold content + footer at bottom if short page */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Distinguish "Raleway" text vs. "Silkscreen" text in the marquee */
.raleway-text {
  font-family: "Raleway", sans-serif;
  font-size: 5.4rem;
  font-weight: 700;
  color: white;
}

/*=============================================
  2) Header & Navigation
===============================================*/
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: var(--aztec);
  border-bottom: 1px solid var(--cohiba);
}

header {
  padding: 5px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
}
.logo svg {
  width: 100%;
  height: auto;
  max-width: 150px; 
}

/* On smaller devices, let the logo shrink naturally */
@media (max-width: 768px) {
  .logo {
    transform: none;
    max-width: 50%;
  }
}

nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}
nav ul li a {
  text-decoration: none;
  color: var(--gallery);
  font-weight: 100;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}
nav ul li a:hover {
  color: var(--cohiba);
}

/* Hamburger hidden by default on large screens */
.hamburger {
  display: none;
  font-size: 2rem;
  color: var(--gallery);
  cursor: pointer;
}

/* On mobile, show the hamburger & hide the nav by default */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    margin-right: 10px;
  }

  .nav-menu {
    position: absolute;
    top: 50px; /* just below header */
    right: 0;
    width: 70%;
    background-color: var(--aztec);
    border-left: 1px solid var(--cohiba);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
  }
  .nav-menu.open {
    transform: translateX(0%);
  }

  .nav-menu ul {
    display: block;
    margin: 0;
    padding: 1rem;
  }
  .nav-menu ul li {
    margin-bottom: 0.5rem;
  }
  .nav-menu ul li a {
    display: block;
    font-size: 1.1rem;
  }

  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
  }
}

/*=============================================
  3) Main Content & Sections
===============================================*/
main {
  flex: 1;
  margin-top: 50px; /* same height as .top-bar */
}

/* Hero (Carousel) */
.hero {
  position: relative;
  overflow: hidden;
  height: 250px; 
  background-color: #000;
}
.carousel {
  position: relative;
  width: 100%;
  height: 100%;
}
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}
.slide.active {
  opacity: 1;
}
.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.caption {
  position: absolute;
  bottom: 30px;
  right: 20px;
  background-color: var(--aztec);
  color: var(--gallery);
  padding: 20px;
  max-width: 60%;
}
.caption h2 {
  font-weight: 200;
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.slide-cta {
  display: inline-block;
  background-color: var(--aztec);
  color: var(--gallery);
  border: none;
  padding: 8px 16px;
  font-weight: 200;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
}
.slide-cta:hover {
  background-color: var(--gunsmoke);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Make the hero auto-adjust for narrower screens */
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 200px;
  }
  .carousel img {
    height: auto; /* Let the image scale */
  }
  .caption {
    position: static;
    margin: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
  }
  .caption h2 {
    font-size: 1.2rem;
  }
}

/* Scrolling Nav Text (large headings) */
.scroll-nav {
  background-color: var(--charcoal);
  margin: 0;
  padding: 0;
  overflow: hidden;
  overflow-x: visible;
}
.scroll-item {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 70px;
  color: var(--gallery);
  margin: 20px 20px;
  text-align: left;
  transition: transform 0.3s ease;
}
.scroll-item .number {
  margin-right: 20px;
  opacity: 0.7;
  color: var(--cohiba);
}
.scroll-item .label {
  text-transform: uppercase;
}
/* Variation for the "UNSUPERVISED THINKING" home banner */
.scroll-item-diff {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  color: var(--gallery);
  text-align: left;
  transition: transform 0.3s ease;
  margin: 20px 20px;
  font-size: 70px;
  letter-spacing: -2px;
}
.scroll-item-diff p {
  margin: -30px 0 0 0;
  padding: 0;
  line-height: 1;
}

/* Silkscreen text styling */
.silkscreen-text {
  font-family: "Silkscreen", sans-serif;
  font-weight: 100;
  font-size: 84px;
  color: var(--cohiba);
  margin: 0;
  letter-spacing: -15px;
  display: inline-block;
  line-height: 1;
}
.silkscreen-text2 {
  font-family: "Silkscreen"; 
  font-weight: 100;
  letter-spacing: -15px;
  font-size: 6rem; 
  color: var(--cohiba);
}



/*=============================================
  MOBILE-ONLY OVERRIDES
  Keep desktop unchanged, only fix for screens <= 768px
===============================================*/
@media (max-width: 768px) {

  /* 1) Home section headings: reduce from 70px to ~2rem */
  .scroll-item,
  .scroll-item-diff {
    font-size: 2rem;       /* override for smaller screens */
    letter-spacing: 0;     /* allow normal spacing */
    margin: 20px 10px;
    white-space: normal;   /* let text wrap instead of overflow */
    word-wrap: break-word;
  }

  /* Adjust the negative margin around "ARTIFICIAL INTELLIGENCE" so it doesn't overlap */
  .scroll-item-diff p {
    margin: -20px 0 0 0;  /* or -15px if you want closer spacing */
    line-height: 1.1;
  }

  /* 2) ARTIFICIAL INTELLIGENCE text: reduce from 84px to ~2.2rem */
  .silkscreen-text {
    font-size: 2.2rem;
    letter-spacing: -15%;
    margin: 10px 0;
  }

  /* 3) Marquee text: unify the Raleway & Silkscreen fonts to the same size */
  .raleway-text {
    font-size: 2.7rem;
    letter-spacing: 0;
  }

  .silkscreen-text2 {
    font-size: 3rem;
    letter-spacing: -15%;
  }

  /* Adjust if you want them slightly larger or smaller on mobile */
  /* Example: font-size: 2.2rem for both if you need more impact. */
}



/*=============================================
  4) About / Home Sections
===============================================*/
.about-section {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding: 3rem 1rem;
}
.clearfix {
  clear: both;
}
.dotted-line {
  border-bottom: 1px dotted var(--cohiba);
  margin-bottom: 2rem;
}
.about-main {
  float: left;
  width: 60%;
  margin-bottom: 0;
  max-width: 700px;
}
.lead-paragraph {
  font-size: 1.2rem;
  line-height: 1.5;
  text-transform: uppercase;
  margin-bottom: 0;
}
.emblem-blurb {
  float: right;
  width: 35%;
  border-left: 2px dotted var(--cohiba);
  padding-left: 1rem;
  max-width: 400px;
  font-size: 0.9rem;
}
.emblem-title {
  display: inline-block;
  background: var(--cohiba);
  color: #000;
  padding: 0.2rem 0.4rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
/* On mobile, stack them vertically */
@media (max-width: 768px) {
  .about-main, .emblem-blurb {
    float: none;
    width: 100%;
    border-left: none;
    padding-left: 0;
    margin-bottom: 2rem;
  }
}

/* Knowledge container for home page */
.knowledge-container {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 2rem;
}
.HOME-blurb {
  border-left: 2px dotted #fcca03;
  padding-left: 1rem;
  max-width: 300px;
}
.HOME-title {
  display: inline-block;
  margin-bottom: 0.5rem;
  background: #fcca03;
  color: #000;
  padding: 0.2rem 0.4rem;
  font-weight: bold;
}
.lead-paragraph {
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 600px;
}
@media (max-width: 768px) {
  .knowledge-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/*=============================================
  5) Marquees & Mouse-Following Equations
===============================================*/
.text-bleed {
  margin: 0.25rem 0; 
}
.scrolling-marquee {
  margin-top: 0.5rem; 
}
.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  animation: marqueeScroll 25s linear infinite;
}
.marquee-inner span {
  display: inline-block;
  margin: 0 3rem; 
}
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Full-bleed container for the equations */
.full-bleed {
  margin: 0.25rem 0; 
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw; 
}
.mouse-chars {
  position: relative;
  width: 90%;
  height: 400px;
  background: black;
  overflow: hidden;
  border: 1px solid #ffffff;
  margin: 0 auto;
}
.char-layer {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 10rem;
  color: black; 
  white-space: nowrap;
  pointer-events: none;
  text-shadow:
    -2px -2px 0 #ffffff,
    2px -2px 0 #ffffff,
    -2px 2px 0 #ffffff,
    2px 2px 0 #ffffff;
}
@media (max-width: 768px) {
  .mouse-chars {
    height: 150px; /* any smaller height you prefer */
  }
  .char-layer {
    font-size: 3rem; /* already shrinking text so it won't overflow */
  }
}

/*=============================================
  6) Chat Boxed Gradient
===============================================*/
.boxed-gradient {
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 5rem 2rem; 
  min-height: 300px;
  border: 1px solid #000;
  background: linear-gradient(to right, var(--cohiba), #f9f7ee, #45cdff);
  text-align: center;
  color: #000;  
  position: relative;
}
.chat-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--cohiba);
  color: #000;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
.chat-btn:hover {
  background-color: #fac500;
}

/*=============================================
  7) Portfolio
===============================================*/
.portfolio-section {
  position: relative;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.portfolio-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}
.portfolio-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.portfolio-list {
  flex: 2;
}
.portfolio-item {
  border-bottom: 1px dotted var(--cohiba);
  padding: 1rem 0;
  cursor: pointer;
  transition: color 0.2s;
}
.portfolio-item:hover {
  color: var(--cohiba);
}
.portfolio-item h3 {
  font-size: 1.3rem;
  font-weight: normal;
  display: inline-block;
}
.category-tag {
  font-size: 0.8rem;
  color: var(--cohiba);
  margin-left: 1rem;
}
.tenet-blurb {
  flex: 1;
  margin-top: 0;
  border-left: 2px dotted var(--cohiba);
  padding-left: 1rem;
  max-width: 300px;
}
.tenet-title {
  display: inline-block;
  margin-bottom: 0.5rem;
  background: #fcca03;
  color: #000;
  padding: 0.2rem 0.4rem;
  font-weight: bold;
}
/* On mobile, stack them */
@media (max-width: 768px) {
  .portfolio-content {
    flex-direction: column;
  }
}

/*=============================================
  8) Research Slider
===============================================*/
.research-section {
  position: relative;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.research-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}
.research-slider {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 2rem;
}
.research-slider::-webkit-scrollbar {
  display: none;
}
.research-slider {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.research-card {
  min-width: 450px;
  max-width: 550px;
  height: 450px;
  background-color: var(--charcoal);
  background-position: center;
  background-size: cover;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.card-content {
  background-color: rgba(0, 0, 0, 0.75);
  padding: 1.5rem;
  width: 100%;
}
.author {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--cohiba);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #fff;
}
.excerpt {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 1.5rem;
}
.read-btn {
  display: inline-block;
  background-color: var(--cohiba);
  color: #000;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.read-btn:hover {
  background-color: rgba(252, 202, 3, 0.8);
}
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--cohiba);
  color: var(--cohiba);
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-arrow:hover {
  background: rgba(252, 202, 3, 0.8);
  color: #000;
}
.nav-arrow--left {
  left: -2rem;
}
.nav-arrow--right {
  right: -2rem;
}
@media (max-width: 768px) {
  .research-card {
    min-width: 80%;
    height: 300px;
  }
  .card-content {
    padding: 1rem;
  }
  .title {
    font-size: 1.2rem;
  }
  .nav-arrow--left {
    left: 0.5rem;
  }
  .nav-arrow--right {
    right: 0.5rem;
  }
}

/*=============================================
  9) Modal Styles
===============================================*/
#modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  position: relative;
  background: #111;
  border: 1px solid var(--cohiba);
  padding: 2rem;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 0 20px var(--cohiba);
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  color: var(--cohiba);
  border: 1px solid var(--cohiba);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  text-transform: uppercase;
}
.modal-logo {
  margin-bottom: 1rem;
}
.circle-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border: 2px solid var(--cohiba);
  border-radius: 50%;
  color: var(--cohiba);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-transform: uppercase;
}
.modal-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--cohiba);
  letter-spacing: 2px;
}
.modal-description {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}
.view-website-btn {
  border: 1px solid var(--cohiba);
  background: none;
  color: var(--cohiba);
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.view-website-btn:hover {
  background: #fac500;
  color: #000;
}

/*=============================================
  10) Contact Section
===============================================*/
.contact-section {
  background: #0b0b0b;
  color: #fff;
  padding: 4rem 2rem;
}
.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}
.contact-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}
.contact-content p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  color: #ccc;
}
.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 600px;
}
.form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  border-radius: 4px;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #d9a800;
  color: #000;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.2s ease;
}
.btn:hover {
  background: #e6be0a;
}

.read-article {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

/*=============================================
  11) Footer
===============================================*/
footer {
  background-color: var(--cohiba);
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--aztec);
}
