/* ==========================================================================
   GLOBAL VARIABLES & ELITE PALETTE
   ========================================================================== */
:root {
  --bg: #050505;
  --surface: #0c0c0c;
  --accent: #c5a059; /* Elite Champagne Gold */
  --text-main: #ffffff;
  --text-dim: #71717a;
  --border: rgba(255, 255, 255, 0.08);
  --font-serif: "Playfair Display", serif;
  --font-sans: "Inter", sans-serif;
  --transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   BASE INFRASTRUCTURE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important; /* Forces custom cursor */
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.italic-serif {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
}

.section {
  padding: 10rem 0;
}

/* ==========================================================================
   SCROLLBAR & PROGRESS BAR
   ========================================================================== */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    transparent,
    var(--accent),
    transparent
  );
  border-radius: 10px;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 1000;
  width: 0%;
}

/* ==========================================================================
   CUSTOM CURSOR (Desktop Only)
   ========================================================================== */
.cursor-dot,
.cursor-outline {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%); /* Centers the cursor */
  border-radius: 50%;
  z-index: 9999;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent);
  transition: opacity 0.3s ease;
}

/* Disable custom cursor natively on touch devices */
@media (pointer: coarse) {
  * {
    cursor: auto !important;
  }
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }
}

/* ==========================================================================
   NAVBAR & SYSTEM MONITOR
   ========================================================================== */
.navbar {
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 700;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: 0.3s;
}

.nav-link:hover {
  color: var(--accent);
}

.system-monitor {
  display: flex;
  gap: 20px;
  font-family: monospace;
  font-size: 0.65rem;
  color: var(--accent);
}

.monitor-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-bg {
  width: 40px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.8s ease;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-toggle span {
  width: 25px;
  height: 2px;
  background: var(--accent);
  transition: 0.3s;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-premium {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-bg-text {
  position: absolute;
  font-size: 25vw;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.01);
  z-index: -1;
  bottom: -5%;
  right: -5%;
  pointer-events: none;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 0.7rem;
  margin-bottom: 1rem;
  display: block;
}

.statement {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-description {
  max-width: 550px;
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  font-weight: 300;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-premium,
.btn-outline {
  padding: 1rem 2.5rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  transition: var(--transition);
  border: none;
  margin-right: 1.5rem;
  display: inline-block;
}

.btn-premium {
  background: var(--accent);
  color: #000;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: #fff;
}
.btn-premium:hover {
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
}

/* ==========================================================================
   TECHNICAL PHILOSOPHY
   ========================================================================== */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: center;
}

.pillars {
  margin-top: 40px;
  display: grid;
  gap: 30px;
}
.pillar-item h4 {
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.pillar-item p {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 450px;
}

.image-frame {
  border: 1px solid var(--accent);
  padding: 20px;
}
.elite-portrait {
  width: 100%;
  filter: grayscale(100%) contrast(110%);
  transition: var(--transition);
}
.image-frame:hover .elite-portrait {
  filter: grayscale(0%) contrast(100%);
}

/* ==========================================================================
   BENTO PORTFOLIO GRID
   ========================================================================== */
.section-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  margin-bottom: 5rem;
  text-align: left;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(350px, auto);
  gap: 1.5rem;
}

.bento-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.bento-item.wide {
  grid-column: span 2;
}
.bento-item:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  background: linear-gradient(145deg, #111111, var(--surface));
  box-shadow:
    0 10px 30px -10px rgba(197, 160, 89, 0.1),
    0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.bento-content h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}
.bento-content p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.tag {
  color: var(--accent);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  display: block;
}

.schema-mini {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 120px;
  opacity: 0.3;
  color: var(--accent);
}

.bento-links > a {
  color: #c5a059;
}

/* The links have the smooth transition applied */
.bento-links {
  transition: var(--transition);
}

/* Slide the link container slightly to the right when the card is hovered */
.bento-item:hover .bento-links {
  transform: translateX(8px);
}

/* Archive Specifics */
.archive-card {
  background: linear-gradient(145deg, #0c0c0c, #050505);
}
.tech-stack-mini {
  display: flex;
  gap: 12px;
  margin: 1.5rem 0;
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
}
.status-badge {
  font-family: monospace;
  font-size: 0.65rem;
  color: #27c93f;
  background: rgba(39, 201, 63, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 15px;
}

/* ==========================================================================
   API DOCS & TERMINAL
   ========================================================================== */
.api-doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 16px;
  font-family: monospace;
}
.method.post {
  color: #49cc90;
  margin-right: 10px;
  font-weight: bold;
}

.method.get {
  color: #61affe; /* A nice standard API blue */
  margin-right: 10px;
  font-weight: bold;
}

/* Optional: Ensure the <pre> tag doesn't break your layout on small screens */
.code-block-premium pre {
  overflow-x: auto;
}
.code-block-premium {
  background: #000;
  padding: 1.5rem;
  margin-top: 1rem;
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.9rem;
}

.terminal-premium {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.terminal-header {
  background: #0a0a0a;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.r {
  background: #ff5f56;
}
.y {
  background: #ffbd2e;
}
.g {
  background: #27c93f;
}
.terminal-body {
  padding: 2.5rem;
  font-family: "Courier New", monospace;
}
.command {
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.output {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}
/* ==========================================================================
   CONTACT FORM & ACCESS VAULT
   ========================================================================== */
.access-vault {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
}
.social-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.social-links a {
  font-size: 1.5rem;
  color: var(--text-main);
  transition: var(--transition);
}
.social-links a:hover {
  color: var(--accent);
}

.btn-mini-terminal {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: monospace;
  font-size: 0.7rem;
  padding: 5px 12px;
  transition: 0.3s;
}
.btn-mini-terminal:hover {
  background: var(--accent);
  color: #000;
}

.hidden-links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--border);
  animation: fadeIn 1s ease;
}
.whatsapp-link {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--accent);
  text-decoration: none;
  font-family: monospace;
  font-size: 1.2rem;
  margin-top: 10px;
}

#contact-form {
  max-width: 900px;
  margin-top: 4rem;
}
.form-row {
  display: flex;
  gap: 3rem;
  margin-bottom: 1rem;
}
.form-row input {
  flex: 1;
  width: 100%;
}

input,
textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  display: block;
  width: 100%;
  transition:
    border-color 0.4s ease,
    transform 0.4s ease;
}
input:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
  transform: translateY(-2px);
}
::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 2px;
}
#contact-form button {
  margin-top: 2rem;
  min-width: 250px;
}

.success-state {
  padding: 4rem;
  border: 1px dashed var(--accent);
  background: rgba(197, 160, 89, 0.05);
  text-align: center;
  border-radius: 16px;
  animation: fadeIn 0.8s ease forwards;
}
.terminal-loader {
  font-family: monospace;
  font-size: 0.8rem;
  text-align: left;
  display: inline-block;
  margin-bottom: 20px;
}
.terminal-loader p {
  margin: 5px 0;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  width: 0;
  animation:
    typing 1s steps(30, end) forwards,
    blink 0.5s step-end infinite alternate;
}
.terminal-loader p:nth-child(2) {
  animation-delay: 1.2s;
}
.terminal-loader .status {
  width: 0;
  animation: typing 0.5s steps(20, end) 2.4s forwards;
  border: none;
  color: #27c93f;
}

/* ==========================================================================
   FOOTER, LOGS & PANIC OVERLAY
   ========================================================================== */
.footer {
  padding: 6rem 0 3rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.footer-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-weight: 600;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #27c93f;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(39, 201, 63, 0.4);
  animation: status-pulse 2s infinite;
}
.utc-clock {
  display: flex;
  gap: 8px;
  font-family: monospace;
  color: var(--text-dim);
}
#server-time {
  color: var(--accent);
  min-width: 75px;
}
.status-sep {
  color: var(--border);
  margin: 0 5px;
}

.server-logs {
  font-family: "Courier New", monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  height: 60px;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
  margin-bottom: 15px;
  mask-image: linear-gradient(to top, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 70%, transparent 100%);
}
.log-entry {
  padding: 2px 0;
  white-space: nowrap;
  animation: logIn 0.3s ease-out forwards;
}
.log-entry.method-get {
  color: #49cc90;
}
.log-entry.method-post {
  color: var(--accent);
}

.panic-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  color: #ff5f56;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Courier New", monospace;
}
.panic-content {
  max-width: 600px;
  width: 90%;
}
.panic-title {
  border-bottom: 2px solid #ff5f56;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}
.panic-logs p {
  font-size: 0.9rem;
  margin: 5px 0;
}
.panic-footer {
  margin-top: 40px;
  color: #fff;
}
#panic-input {
  background: transparent;
  border: 1px solid #ff5f56;
  color: #ff5f56;
  padding: 10px;
  width: 100%;
  margin-top: 10px;
  text-transform: uppercase;
  font-family: inherit;
}
.highlight {
  color: var(--accent);
  font-weight: bold;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@keyframes status-pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes blink {
  from {
    border-color: transparent;
  }
  to {
    border-color: var(--accent);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes logIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* The blinking block cursor */
.typing-cursor::after {
  content: "█";
  animation: blink 1s step-end infinite;
  margin-left: 5px;
  color: var(--accent); /* Matches your command text color */
}

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

/* We will use JS to make the text visible once the animation starts, 
   so the terminal doesn't look fully populated before scrolling down */
.terminal-body {
  min-height: 250px; /* Keeps the terminal window from collapsing when empty */
}

/* ==========================================================================
   ELITE MOBILE RESPONSIVENESS (Merged & Cleaned)
   ========================================================================== */
@media (max-width: 992px) {
  .navbar {
    padding: 1rem 5%;
  }
  .desktop-only {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--border);
  }
  .nav-menu.active {
    right: 0;
  }
  .nav-link {
    margin: 0;
    font-size: 1.5rem;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .philosophy-image {
    order: -1;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .bento-item.wide {
    grid-column: span 1;
  }
  .bento-item {
    min-height: 300px;
    padding: 1.5rem;
  }

  .section {
    padding: 5rem 0;
  }
}

@media (max-width: 768px) {
  .statement {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 2.5rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  /* Restored Footer Alignment */
  .footer-grid {
    flex-direction: column;
    gap: 30px;
    align-items: center;
    text-align: center;
  }
  .footer-status {
    flex-direction: column;
    gap: 10px;
  }
  .status-sep {
    display: none;
  }
  .server-logs {
    margin: 0 auto 15px auto;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .statement {
    font-size: 2.2rem;
  }
  .hero-btns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .btn-premium,
  .btn-outline {
    width: 100%;
    text-align: center;
    margin-right: 0;
  }
}
