/* ===========================================
   SID MACHINES | Desktop Styles (>=1025px)
   =========================================== */

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  color: #353535;
  background-color: #fff;
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  padding-top: 10vh;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* ===== HEADER (Logo) ===== */
.header {
  position: absolute;
  top: clamp(1rem, 1vw, 1rem);
  left: clamp(1rem, 3vw, 3rem);
  display: flex;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: clamp(0.2rem, 0.6vw, 0.5rem);
}

.logo-img {
  width: clamp(2.8rem, 4.5vw, 5rem);
  height: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.logo-text h1 {
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.logo-text p {
  font-size: clamp(0.7rem, 1vw, 1rem);
  color: #555;
  letter-spacing: -0.095em;
  transform: translateY(0.1em);
}

/* ===== CONTENT LAYOUT ===== */
.content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  height: 100%;
  width: 100%;
  padding: 0 clamp(1rem, 2vw, 2rem);
  flex-wrap: wrap;
}

/* ===== TEXT SIDE ===== */
.text-content {
  margin-top: 5vh;
  max-width: 60%;
  flex: 1 1 50%;
  flex-shrink: 0;
}

.main-heading {
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 800;
  white-space: nowrap;
  margin-bottom: clamp(0.5rem, 1vw, 1rem);
}

.sub-heading {
  font-size: clamp(0.9rem, 1.4vw, 1.3rem);
  font-weight: 500;
  margin-bottom: clamp(0.8rem, 1.5vw, 1.2rem);
  color: #222;
}

.description {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  line-height: 1.7;
  color: #333;
  margin-bottom: clamp(1rem, 2vw, 2rem);
  max-width: 60ch;
  margin: 0 0 1.8rem 0;
  text-align: left;
  line-height: 1.75;
}

.founder {
  font-family: "Consolas", monospace;
  font-size: clamp(0.85rem, 1vw, 1rem);
  color: #111;
  margin-bottom: clamp(3rem, 6vh, 5rem);
  text-align: left;
  letter-spacing: 0.02em;
}

.founder span {
  font-family: "Consolas", monospace;
  font-weight: 700;
  font-style: normal;
  color: #000;
}

/* ===== TYPEWRITER TEXT ===== */
.equation {
  font-family: "Courier New", monospace;
  font-size: clamp(1rem, 1.5rem, 2rem);
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  line-height: 1.1;
  height: 1.2em;
  position: relative;
}

.equation::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #111;
  animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
  50% {
    opacity: 0;
  }
}

/* ===== CHARACTER IMAGE ===== */
.character-container {
  flex: 1 1 40%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  width: 100%;
}

.character-img {
  width: clamp(22rem, 45vw, 65rem);
  height: auto;
  object-fit: contain;
  display: block;
  transform: translate(62%, -58%);
  transition: transform 0.4s ease, width 0.4s ease;
  will-change: opacity, transform; /* Add this line for performance */
}

/* ===== SCROLL BUTTON ===== */
.scroll-container {
  position: fixed;
  bottom: 1rem;
  left: 47rem;
  z-index: 10;
}

#scrollBtn {
  font-family: "Consolas", monospace;
  font-size: 0.85rem;
  color: #111;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#scrollBtn:hover {
  opacity: 1;
}

#scrollBtn:active {
  transform: scale(0.95);
}

/* ===== CORE SECTION ===== */
.core-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: transparent;
  font-family: "Poppins", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  /* FIX 1: Add vertical padding to give the heading breathing room. */
  padding: 5rem 0;
}

.core-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  z-index: -1;
}

.core-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-content: center;
  width: 98%;
  max-width: 1350px;
  gap: 2rem;
}

.core-left {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
}

.core-title {
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
  color: #111;
}

.core-subtitle {
  color: #555;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}

.core-members {
  font-family: "Consolas", monospace;
  font-size: 0.95rem;
}

.core-note {
  margin-top: 1rem;
  max-width: 600px;
}

.core-note h3 {
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.core-note p {
  color: #222;
  line-height: 1.7;
  font-size: 0.95rem;
}

.core-btn {
  background: #111;
  color: #fff;
  border: none;
  padding: 0.7rem 1.8rem;
  font-family: "Consolas", monospace;
  font-size: 0.9rem;
  border-radius: 6px;
  margin-top: 1.2rem;
  cursor: pointer;
  transition: 0.3s ease;
  width: fit-content;
}

.core-btn:hover {
  background: #333;
}

.core-status {
  font-family: "Consolas", monospace;
  margin-top: 1.2rem;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(58, 58, 58, 0.4);
}

/* FIX 3: Position icons at the bottom-center of the section. */
.core-icons {
  position: absolute;
  bottom: 3rem; /* Distance from the bottom edge */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem; /* Increased gap for better spacing */
  font-size: 1.3rem; /* Slightly larger icons */
}

.core-icons i {
  cursor: pointer;
  transition: 0.3s;
}

.core-icons i:hover {
  color: #000;
  transform: scale(1.1);
}

/* FIX 2: Center the logo perfectly inside the right grid area. */
.core-right {
  display: flex;
  justify-content: center; /* Horizontally centered */
  align-items: center;     /* Vertically centered */
  height: 100%; /* Ensure it takes the full height of the grid row */
}

.core-logo {
  width: clamp(18rem, 35vw, 28rem);
  height: auto;
  opacity: 0.9;
}

/* ICON COLORS */
.core-icons a {
  color: inherit;
  text-decoration: none;
}

.core-icons a:hover i.fa-github { color: #333; }
.core-icons a:hover i.fa-reddit { color: #ff4500; }
.core-icons a:hover i.fa-instagram { color: #e1306c; }
.core-icons a:hover i.fa-x-twitter { color: #000; }

/* ===== FIXED OVERLAY TEXTS ===== */
.core-phase,
.core-date {
  position: fixed;
  bottom: 1.5rem;
  font-family: "Consolas", monospace;
  font-size: 0.85rem;
  color: #000000;
  opacity: 0.85;
  pointer-events: none;
  z-index: 20;
}

.core-phase { left: 2rem; }
.core-date { right: 2rem; }

body:not(.core-visible) .core-phase,
body:not(.core-visible) .core-date {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ===== LAYOUT CONSTRAINT FOR LARGE SCREENS ===== */
@media (min-width: 1440px) {
  .content {
    max-width: 1400px;
    margin: 0 auto;
  }
}




/* ===== CHARACTER ANIMATION STYLES ===== */
@keyframes fadeInRight {
  from {
    opacity: 0;
    /* Combines new translateX with existing transform */
    transform: translate(calc(62% + 50px), -58%);
  }
  to {
    opacity: 1;
    /* Returns to the original position */
    transform: translate(62%, -58%);
  }
}

@keyframes fadeOutLeft {
  from {
    opacity: 1;
    /* Starts at the original position */
    transform: translate(62%, -58%);
  }
  to {
    opacity: 0;
    /* Combines new translateX with existing transform */
    transform: translate(calc(62% - 50px), -58%);
  }
}

/* Classes to apply the animations */
.character-img.fade-in {
  animation: fadeInRight 0.6s ease-out forwards;
}

.character-img.fade-out {
  animation: fadeOutLeft 0.6s ease-in forwards;
}


/* ===========================================
   RECRUITING MODAL STYLES
   =========================================== */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 100; /* Sit on top of everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
  font-family: "Inter", sans-serif;
}

/* This new class makes the modal visible on desktop */
.modal.modal-open {
  display: block;
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 25px 35px;
  border: 1px solid #888;
  width: 90%; /* Responsive width */
  max-width: 550px; /* Max width */
  border-radius: 8px;
  position: relative;
  animation: fadeInModal 0.4s ease-out;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-btn {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.modal-content h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #111;
}

.modal-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
}

.modal-content .contact-info {
  margin-top: 1.5rem;
  font-family: "Consolas", monospace;
  font-size: 1rem;
  color: #000;
}

.modal-content .contact-info a {
  color: #0056b3;
  text-decoration: none;
}

.modal-content .contact-info a:hover {
  text-decoration: underline;
}
