/* ============================================
   INDEX.CSS — page-specific styles
   ============================================ */

/* ── HERO ── */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--ink);
  }
  
  #page-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
  }
  
  #canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
  }
  
  .flex-wrapper {
    display: flex;
    flex-wrap: wrap;
  }
  
  .multi-textures {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    justify-content: center;
    align-items: center;
  }
  
  .multi-textures img {
    display: none;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
  }
  
  /* fallback when no WebGL */
  .no-curtains .multi-textures {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .no-curtains .multi-textures img:nth-child(3) { display: block; }
  
  /* gradient fade from left over the image */
  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
      90deg,
      var(--ink) 35%,
      rgba(26,26,26,0.6) 60%,
      transparent 100%
    );
    pointer-events: none;
  }
  
  .hero-text {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0 var(--space-lg);
    max-width: 600px;
  }
  
  .hero-text .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  }
  .hero-text .reveal:nth-child(1) { transition-delay: 0.1s; }
  .hero-text .reveal:nth-child(2) { transition-delay: 0.25s; }
  .hero-text .reveal:nth-child(3) { transition-delay: 0.45s; }
  /* trigger on load instead of scroll for hero */
  .hero-text .reveal { opacity: 1; transform: none; }
  
  .hero-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: var(--space-sm);
  }
  
  .hero-name {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.95;
    color: var(--cream);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
  }
  
  .hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
  }
  
  /* scroll hint */
  .hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
  }
  .hero-scroll-hint span {
    display: block;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--teal));
    animation: scrollPulse 2s ease-in-out infinite;
  }
  @keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50%       { opacity: 1;   transform: scaleY(1.1); }
  }
  
  /* ── ABOUT ── */
  
  #about {
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,0.04);
  }
  
  .about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-md);
  }
  
  .about-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: border-color var(--duration-med) var(--ease-out),
                background var(--duration-med) var(--ease-out);
  }
  .about-card:hover {
    border-color: rgba(0,124,122,0.4);
    background: rgba(0,124,122,0.05);
  }
  
  .about-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0,124,122,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
  }
  
  .about-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: var(--space-xs);
  }
  
  .about-card p {
    font-size: 0.875rem;
    color: rgba(245,240,232,0.55);
    line-height: 1.75;
  }
  
  /* ── PROJECTS ── */
  
  #projects {
    background: linear-gradient(180deg, var(--ink) 0%, #111 100%);
    border-top: 1px solid rgba(255,255,255,0.04);
  }
  
  .project-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal);
    background: rgba(0,124,122,0.12);
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    margin-bottom: var(--space-sm);
  }
  
  /* Swarmbot feature */
  .project-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-xl);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
  
  .project-feature-media {
    overflow: hidden;
    aspect-ratio: 4/3;
  }
  .project-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
  }
  .project-feature:hover .project-feature-media img {
    transform: scale(1.04);
  }
  
  .project-feature-body {
    padding: var(--space-lg) var(--space-md);
  }
  
  .project-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--cream);
    margin-bottom: var(--space-sm);
    line-height: 1.1;
  }
  
  .project-desc {
    font-size: 0.9rem;
    color: rgba(245,240,232,0.55);
    line-height: 1.8;
    margin-bottom: var(--space-md);
  }
  
  .project-links {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
  }
  
  .btn-sm {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
  }
  
  /* UE project cards */
  .projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
  }
  
  .card-video {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
  }
  .card-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }
  
  /* Web project cards */
  .web-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
  
  .web-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    aspect-ratio: 16/10;
    background: var(--ink-soft);
  }
  
  .web-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
    transform: scale(1);
    transition: transform 0.6s var(--ease-out);
  }
  .web-card:hover iframe { transform: scale(1.03); }
  
  .web-card-label {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(26,26,26,0.85);
    color: var(--cream);
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    z-index: 2;
    backdrop-filter: blur(6px);
  }
  
  .web-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26,26,26,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-med) var(--ease-out);
    z-index: 3;
  }
  .web-card:hover .web-card-overlay { opacity: 1; }
  
  /* ── CONTACT ── */
  
  #contact {
    background: var(--ink-soft);
    border-top: 1px solid rgba(255,255,255,0.04);
  }
  
  .contact-section {
    max-width: 600px;
  }
  
  .contact-grid {
    margin-top: var(--space-md);
  }
  
  .contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.95rem;
    color: rgba(245,240,232,0.7);
  }
  .contact-item i {
    width: 20px;
    color: var(--teal);
    font-size: 1rem;
  }
  .contact-item a:hover { color: var(--teal); }
  
  /* ── RESPONSIVE ── */
  
  @media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .project-feature { grid-template-columns: 1fr; }
    .project-feature-media { aspect-ratio: 16/9; }
    .project-feature-body { padding: var(--space-md); }
    .projects-grid { grid-template-columns: 1fr; }
    .web-grid { grid-template-columns: 1fr; }
  }
  
  @media (max-width: 768px) {
    .multi-textures {
      width: 100%;
      opacity: 0.3;
    }
    .hero::after {
      background: linear-gradient(
        to bottom,
        rgba(26,26,26,0.4) 0%,
        rgba(26,26,26,0.85) 100%
      );
    }
    .hero-text {
      padding: 0 var(--space-md);
    }
    .hero-name {
      font-size: clamp(3rem, 15vw, 5rem);
    }
  }