:root {
  --bg-color: #0A0A0A; /* Black Background */
  --bg-secondary: #050505; /* Deep Black */
  --text-main: #8D939F; /* Raw Cement for text */
  --highlight: #1E90FF; /* Digital Blue */
  --border-color: #5F6368; /* Ash Gray */
  
  --font-hero: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  /* MOBILE-FIRST: Tight ambient spacing default */
  --spacing: 0.75rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Absolute zero rounded corners */
}

body, html {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-mono);
  overflow-x: hidden;
  position: relative;
}

/* Background Canvas Effect */
#ascii-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

/* System Overlay */
.system-overlay {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--spacing);
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
}

/* Grid Architecture */
.grid-layout {
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
}

.panel {
  border: 1px solid var(--border-color);
  background-color: transparent;
  padding: calc(var(--spacing) * 1.2);
}

/* ----------------------------------------------------
   BASE MOBILE STYLES (PORTRAIT PHONES, < 768px)
   ---------------------------------------------------- */

/* SECTION 01 // HERO */
.header-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem var(--spacing);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.brand-iso, .brand-logo, .system-status {
  display: flex;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.brand-iso img {
  display: block;
  width: 36px;
  height: 36px;
}

.brand-logo img {
  display: block;
  height: 24px;
}

.system-status {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.blink {
  color: var(--highlight);
  animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
  50% { opacity: 0; }
}

.hero-content {
  padding: 2.5rem var(--spacing);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center; /* Centered layout for mobile first */
  text-align: center;
}

.hero-title {
  font-family: var(--font-hero);
  font-weight: 800;
  font-size: clamp(1.25rem, 6vw, 1.8rem);
  line-height: 1.1;
  text-transform: uppercase;
  max-width: 1200px;
}

.cta-button {
  background-color: var(--highlight);
  color: #0A0A0A;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1.1rem var(--spacing);
  display: block;
  width: 100%; /* Tactile touch target: full width on mobile */
  border: 1px solid var(--highlight);
  transition: all 0.2s ease;
  font-size: 1.1rem;
  text-align: center;
}

.cta-button:hover {
  background-color: transparent;
  color: var(--highlight);
}

/* SECTION 02 // WORK FILES */
.section-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  text-transform: uppercase;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column by default on mobile */
  gap: var(--spacing);
}

.console-window {
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
}

.window-header {
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--text-main);
  color: var(--bg-color);
  font-size: 0.8rem;
  font-weight: 700;
}

.window-controls {
  display: flex;
  gap: 6px;
}

.window-controls span {
  display: block;
  width: 10px;
  height: 10px;
  background-color: var(--bg-color);
}

.window-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.demo-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-color);
  border: 1px dashed var(--border-color);
}

.window-status {
  font-size: 0.8rem;
  color: var(--text-main);
  font-weight: 700;
}

/* SECTION 03 // PIPELINE */
.pipeline-container {
  display: flex;
  flex-direction: column;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.pipeline-step:last-child {
  border-bottom: none;
}

.step-num {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* SECTION 04 // FOOTER */
.section-04 {
  display: flex;
  flex-direction: column; /* Stacked by default */
}

.left-footer, .right-footer {
  flex: 1;
}

.right-footer {
  border-top: 1px solid var(--border-color);
  border-left: none;
}

.brand-marker {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.email-capture {
  display: flex;
  width: 100%;
  border: 1px solid var(--border-color);
}

.email-capture input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem 0.8rem; /* Large touch target */
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
}

.email-capture input::placeholder {
  color: var(--text-main);
  opacity: 0.6;
}

.submit-btn {
  background-color: var(--text-main);
  color: var(--bg-color);
  border: none;
  padding: 0 1.75rem; /* Easy to tap */
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.3rem;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  background-color: var(--highlight);
  color: var(--text-main);
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* ----------------------------------------------------
   PROGRESSIVE ENHANCEMENT (DESKTOP & TABLETS, >= 768px)
   ---------------------------------------------------- */

@media (min-width: 768px) {
  :root {
    --spacing: 2rem; /* Enhance spacing for layout grids */
  }

  .panel {
    padding: calc(var(--spacing) * 1.5);
  }

  .header-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1.25rem var(--spacing);
    gap: 0;
  }

  .brand-iso, .brand-logo, .system-status {
    width: auto;
  }

  .brand-iso {
    justify-content: flex-start;
  }

  .brand-iso img {
    width: 52px;
    height: 52px;
  }

  .brand-logo {
    justify-content: center;
  }

  .brand-logo img {
    height: 48px;
  }

  .system-status {
    justify-content: flex-end;
    font-size: 0.9rem;
    gap: 20px;
  }

  .hero-content {
    padding: 4rem var(--spacing);
    gap: 3rem;
    align-items: flex-start;
    text-align: left;
  }

  .hero-title {
    font-size: clamp(2rem, 5vw, 4.5rem);
  }

  .cta-button {
    display: inline-block;
    width: auto;
    padding: 1rem 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .window-body {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .pipeline-step {
    padding: 2rem 0;
  }

  .step-num {
    font-size: 1.2rem;
  }

  .step-desc {
    font-size: 1rem;
  }

  .section-04 {
    flex-direction: row;
    justify-content: space-between;
  }

  .right-footer {
    border-left: 1px solid var(--border-color);
    border-top: none;
  }

  .brand-marker {
    font-size: 0.9rem;
  }
}


/* INTRO ANIMATION */
#iamazing-intro-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background-color: #0A0A0A;
  transition: opacity 1.5s ease;
}

#iamazing-intro-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

#intro-ascii-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.intro-cyber-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
  opacity: 0.15;
  mix-blend-mode: overlay;
}
