/* ============================================================
   index.css — styles for the portfolio home page
   ============================================================ */

/* ---- TOKENS ---- */
:root {
  --bg:          #0F0D0B;
  --bg-2:        #171410;
  --bg-3:        #1C1916;
  --fg:          #F0EDE8;
  --fg-muted:    #888880;
  --fg-dim:      #555550;
  --accent:      #E8A838;
  --accent-2:    #2ABFBF;
  --grid-color:  rgba(255, 240, 200, 0.045);
  --section-pad: clamp(4rem, 10vw, 8rem);
  --side-pad:    clamp(1.5rem, 8vw, 7rem);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Epilogue', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- SKIP LINK ---- */
.skip-link {
  position: absolute; top: -40px; left: 1rem;
  background: var(--accent); color: var(--bg);
  padding: 0.5rem 1rem;
  font-family: 'DM Mono', monospace; font-size: 0.75rem;
  text-decoration: none; z-index: 100; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---- NAV ---- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: flex-end;
  gap: 1.8rem;
  padding: clamp(1.2rem, 3vw, 1.8rem) var(--side-pad);
  opacity: 0; animation: fade-in 0.8s ease forwards 0.9s;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.site-nav.scrolled {
  background: rgba(15, 13, 11, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-nav a.nav-link {
  font-family: 'DM Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-muted); text-decoration: none; transition: color 0.2s;
}
.site-nav a.nav-link:hover { color: var(--accent-2); }
.site-nav a.nav-icon {
  display: flex; align-items: center;
  color: var(--fg-muted); transition: color 0.2s;
}
.site-nav a.nav-icon:hover { color: var(--accent-2); }
.site-nav a.nav-icon svg { width: 16px; height: 16px; }
.nav-divider { width: 1px; height: 14px; background: var(--fg-dim); }

/* ---- HERO ---- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(5rem, 8vw, 6rem) var(--side-pad) clamp(2rem, 4vw, 4rem);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 48px 48px;
}
#dot-canvas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* HUD */
.hero-hud {
  position: fixed; top: clamp(1.2rem, 3vw, 1.8rem); left: var(--side-pad);
  z-index: 51; display: flex; align-items: center; gap: 0.4rem;
  font-family: 'DM Mono', monospace; font-size: 0.68rem; letter-spacing: 0.18em;
  color: rgba(200, 60, 40, 0.5);
  opacity: 0; pointer-events: none; user-select: none;
  transition: color 0.3s, opacity 0.6s ease;
}
.hero-hud.revealed { opacity: 1; }
.hero-hud.complete { color: rgba(255, 255, 255, 0.9); }
.hud-icon { font-size: 0.55rem; }
.hud-total { opacity: 0.45; }
.hud-star {
  font-size: 0.65rem; color: #ffffff;
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: inline-block;
}
.hero-hud.complete .hud-star { opacity: 1; transform: scale(1); }

/* Hero content */
.hero-content { position: relative; z-index: 3; max-width: 780px; }
.hero-name {
  font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 900;
  line-height: 0.92; letter-spacing: -0.03em; color: var(--fg);
  margin-bottom: 0.15em;
  opacity: 0; transform: translateY(16px);
  animation: fade-up 0.7s ease forwards 0.25s;
}
.hero-name span { color: var(--accent); }
.hero-role {
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.75rem, 1.4vw, 0.9rem); font-weight: 300;
  letter-spacing: 0.12em; color: var(--fg-muted); text-transform: uppercase;
  margin-bottom: 2.5rem;
  opacity: 0; transform: translateY(12px);
  animation: fade-up 0.6s ease forwards 0.4s;
}
.hero-tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 300;
  line-height: 1.6; color: var(--fg); max-width: 560px; margin-bottom: 3rem;
  opacity: 0; transform: translateY(12px);
  animation: fade-up 0.6s ease forwards 0.55s;
}
.hero-tagline em { font-style: normal; font-weight: 500; color: var(--fg); }
.hero-cta {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'DM Mono', monospace; font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bg); background: var(--accent);
  padding: 0.85rem 1.75rem; border-radius: 3px; text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  opacity: 0; animation: fade-up 0.6s ease forwards 0.7s;
}
.hero-cta:hover { background: #f0b840; transform: translateY(-2px); }
.hero-cta svg { transition: transform 0.2s; }
.hero-cta:hover svg { transform: translateX(4px); }

/* ---- WORK ---- */
.work { background: var(--bg-3); padding: var(--section-pad) var(--side-pad); }
.section-label {
  font-family: 'DM Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.8rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700;
  letter-spacing: -0.02em; color: var(--fg);
  margin-bottom: clamp(2.5rem, 5vw, 4rem); line-height: 1.1;
}
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

/* Card */
.work-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--bg-2);
  border: 1px solid rgba(255, 240, 200, 0.06);
  border-radius: 4px; overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.work-card:hover {
  border-color: rgba(232, 168, 56, 0.25);
  transform: translateY(-4px);
}

/* Cover image container */
.card-cover {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg);
}
.card-cover img.cover-single {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.4s ease;
}
.card-cover .logo-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0a0a0a;
  transition: opacity 0.4s ease;
  z-index: 2;
}
.card-cover .logo-wrap img { width: 55%; max-width: 220px; object-fit: contain; }
.card-cover .cover-overlay {
  position: absolute; inset: 0;
  background: rgba(15, 13, 11, 0.55);
  opacity: 0; transition: opacity 0.4s ease;
  z-index: 3;
}
.work-card:hover .cover-overlay { opacity: 1; }
.work-card:hover .logo-wrap { opacity: 0; }

/* Dual-screen composite */
.card-cover .dual-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.dual-wrap .screen {
  position: absolute;
  height: 88%; width: auto; object-fit: contain;
  border-radius: 12px;
  transition: transform 0.45s ease, opacity 0.45s ease;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.5));
}
.dual-wrap .screen-a { transform: translateX(0) scale(1); opacity: 1; z-index: 2; }
.dual-wrap .screen-b { transform: translateX(30%) scale(0.88); opacity: 0; z-index: 1; }
.work-card:hover .dual-wrap .screen-a { transform: translateX(-28%) scale(0.88); }
.work-card:hover .dual-wrap .screen-b { transform: translateX(28%) scale(0.88); opacity: 1; }

/* Card body */
.work-card-body { padding: 1.4rem 1.6rem 1.8rem; }
.work-card-tags { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.work-card-tag {
  font-family: 'DM Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-dim); border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.55rem; border-radius: 2px;
}
.work-card-title {
  font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 700;
  letter-spacing: -0.01em; color: var(--fg);
  margin-bottom: 0.6rem; line-height: 1.2;
}
.work-card-desc {
  font-size: 0.9rem; font-weight: 300;
  line-height: 1.65; color: var(--fg-muted); margin-bottom: 1.2rem;
}
.work-card-link {
  font-family: 'DM Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: gap 0.2s;
}
.work-card:hover .work-card-link { gap: 0.7rem; }

/* ---- ABOUT ---- */
.about { padding: var(--section-pad) var(--side-pad); background: var(--bg); }
.about-inner {
  display: grid; grid-template-columns: 300px 1fr;
  gap: clamp(3rem, 6vw, 6rem); align-items: start;
  max-width: 1100px; margin-inline: auto;
}
.about-photo-wrap { position: sticky; top: 6rem; }
.about-photo {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  object-position: top center; display: block;
  border-radius: 3px; background: var(--bg-2);
  border: 1px solid rgba(255, 240, 200, 0.06);
}
.about-photo-caption {
  font-family: 'DM Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-dim); margin-top: 0.8rem;
}
.about-text .section-label { margin-bottom: 0.8rem; }
.about-text .section-title { margin-bottom: 1.8rem; }
.about-body {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem); font-weight: 300;
  line-height: 1.8; color: var(--fg-muted); max-width: 580px;
}
.about-body p + p { margin-top: 1.2rem; }
.about-body strong { font-weight: 500; color: var(--fg); }

/* ---- FOOTER ---- */
.site-footer {
  padding: 3rem var(--side-pad); background: var(--bg);
  border-top: 1px solid rgba(255, 240, 200, 0.06);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy {
  font-family: 'DM Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.14em; color: var(--fg-dim);
}
.footer-links { display: flex; gap: 1.5rem; align-items: center; }
.footer-links a {
  font-family: 'DM Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-dim); text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-2); }

/* ---- ANIMATIONS ---- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- RESPONSIVE: TABLET (≤ 900px) ---- */
@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-photo-wrap { position: static; max-width: 260px; }
}

/* ---- RESPONSIVE: MOBILE (≤ 680px) ---- */
@media (max-width: 680px) {
  .work-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 1.2rem; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

/* ---- RESPONSIVE: SMALL MOBILE (≤ 480px) ---- */
@media (max-width: 480px) {
  .site-nav a.nav-link:first-child { display: none; }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-name, .hero-role, .hero-tagline,
  .hero-cta, .site-nav, .hero-hud { opacity: 1; transform: none; }
}
