/* ============================================
   YOUSSEF EL HAJJ — Portfolio Hero
   "Morgan" Mockup Implementation + WebGL Shader
   ============================================ */

:root {
  --bg-color: #f4f5f7; 
  --bg-alt: #ebecee;
  --text-dark: #191c26;
  --text-muted: #5a5d6a;
  --accent-cyan: #00f3ff;
  --btn-bg: #272a38;
  --btn-text: #ffffff;
  
  --font-primary: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  background-color: var(--bg-color);
  font-family: var(--font-primary);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* --- Top Navigation --- */
.top-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}

.logo {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.5;
}

.btn-primary {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background-color: #1a1c26;
}

/* --- Hero Layout --- */
#hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* --- WebGL Container --- */
#webgl-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none; 
  mix-blend-mode: multiply; 
}

/* Make canvas fixed so it stays in the hero even if body scrolls, or let it scroll naturally. 
   Since hero is 100vh relative, absolute positioning keeps it at the top of the document. */
#webgl-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Content Wrapper --- */
.hero-content-wrapper {
  position: relative;
  z-index: 30;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  pointer-events: none;
}

/* --- Text Block --- */
.hero-text-block {
  max-width: 450px;
  pointer-events: auto;
  
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.greeting {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.hero-name {
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.email-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.email-link:hover {
  opacity: 0.6;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 4rem;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 3s forwards;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-indicator .line {
  width: 40px;
  height: 1px;
  background-color: var(--text-dark);
}

/* --- Vertical Matrix Streams --- */
.matrix-streams {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  overflow: hidden;
}

.stream {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dark);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.4), 0 0 20px rgba(0, 243, 255, 0.2);
}

.stream-1 { top: -10%; left: 35%; opacity: 0.8; font-size: 14px; }
.stream-2 { top: -20%; left: 37%; opacity: 0.4; font-size: 10px; }
.stream-3 { top: -5%; right: 25%; opacity: 0.9; font-size: 13px; }
.stream-4 { top: -15%; right: 23%; opacity: 0.5; font-size: 11px; }

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

/* ============================================
   PAGE CONTENT FLOW
   ============================================ */

.page-content {
  position: relative;
  z-index: 40;
  background-color: var(--bg-color);
}

.content-section {
  padding: 8rem 4rem;
}

.alternate-bg {
  background-color: var(--bg-alt);
}

.section-container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4rem;
  color: var(--text-muted);
}

/* --- About Grid --- */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.section-text-large {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.section-text-small {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* --- Work / Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #d8d9de;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border-radius: 8px;
}

.project-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-link {
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.9rem;
}

.project-link:hover {
  text-decoration: underline;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  padding: 6rem 4rem 3rem 4rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.footer-title {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.footer-email {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 2rem;
}

.social-links {
  display: flex;
  gap: 2rem;
}

.social-links a {
  color: var(--btn-text);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.social-links a:hover {
  opacity: 0.7;
}

.copyright {
  color: #8c8f9b;
  font-size: 0.9rem;
}


/* Responsive */
@media (max-width: 768px) {
  .hero-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 4rem;
  }
  .matrix-streams { display: none; }
  
  .section-grid, .footer-container {
    grid-template-columns: 1fr;
  }
  
  .footer-right {
    align-items: flex-start;
  }
}
