/* ==========================================================================
   Faisal Aljaroshah — Minimalist Coming Soon
   Pure, clean, distraction-free aesthetic with high-contrast typography
   ========================================================================== */

:root {
  --bg-color: #05070d;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.78);
  --text-dim: rgba(255, 255, 255, 0.42);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* DIAGNOSTIC (temporary per Step 7): red background reveals whether bars belong to HTML or Safari chrome */
html {
  margin: 0;
  padding: 0;
  background: red; /* DIAGNOSTIC: fallback is #05070d */
  color-scheme: dark;
}

body {
  margin: 0;
  padding: 0;
  background: transparent; /* DIAGNOSTIC: transparent so html's red diagnostic shows if any bars appear. Revert to #05070d later */
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* Background Canvas — Full Screen, independent of page layout, covering notch & browser bars */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;      /* fallback */
  height: 100lvh;     /* full screen, incl. under the browser bars */
  z-index: 0;         /* behind .site-container (z-index: 10) */
  display: block;
  pointer-events: none;
}

/* iOS Safari Full-Bleed Overscan to cover under Dynamic Island / Status Bar & Bottom Toolbar */
@supports (-webkit-touch-callout: none) {
  #webgl-canvas {
    top: -120px;
    bottom: -120px;
    height: calc(100lvh + 240px);
    min-height: calc(100vh + 240px);
  }
}

/* Site Layout Structure */
.site-container {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: calc(2.5rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  padding-left: calc(3rem + env(safe-area-inset-left, 0px));
  padding-right: calc(3rem + env(safe-area-inset-right, 0px));
  max-width: 1440px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .site-container {
    padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
  }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.15s;
}

.site-domain {
  color: var(--text-muted);
  font-weight: 500;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  transition: color 0.2s ease;
}

.site-domain:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.site-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 0;
  width: 100%;
}

.content-block {
  max-width: 1100px;
  opacity: 0;
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.25s;
}

.hero-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.2rem;
  line-height: 1.05;
}

.person-name {
  font-size: clamp(2.5rem, 6.8vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  color: #ffffff;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.6);
  text-rendering: optimizeLegibility;
  white-space: nowrap;
}

.coming-soon-big {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.42);
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.35s;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.link-item {
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0.2rem 0;
  position: relative;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.link-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: #ffffff;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-item:hover {
  color: #ffffff;
}

.link-item:hover::after {
  width: 100%;
}

.separator {
  color: var(--text-dim);
  user-select: none;
}

.copyright {
  color: var(--text-dim);
}

/* ==========================================================================
   Minimal Toast Notification — Hidden by default to prevent iOS Safari edge sampler bug
   ========================================================================== */
.toast {
  display: none;
  position: fixed;
  bottom: max(2.5rem, calc(1.5rem + env(safe-area-inset-bottom, 0px)));
  right: max(2.5rem, calc(1.5rem + env(safe-area-inset-right, 0px)));
  background: rgba(15, 18, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Focus styles for keyboard accessibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 4px;
  border-radius: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
  .site-header, .content-block, .site-footer {
    animation: none !important;
    opacity: 1 !important;
  }
}
