/* ═══════════════════════════════════════════
   MONS — Portfolio Design System v2
   Ultra Dark · Deep Shadows · Premium
   ═══════════════════════════════════════════ */

/* --- Design Tokens --- */
:root {
  --bg-primary: #030712;
  --bg-secondary: #050b18;
  --bg-card: rgba(8, 14, 32, 0.7);
  --bg-card-solid: #080e20;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: #2563eb;
  --accent-cyan: #22d3ee;
  --text-primary: #d6dce8;
  --text-secondary: #7a859b;
  --text-muted: #3a4255;
  --border-subtle: rgba(59, 130, 246, 0.06);
  --border-card: rgba(59, 130, 246, 0.08);

  /* Ultra Deep Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.6), 0 0 20px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.7), 0 8px 24px rgba(0,0,0,0.5), 0 0 40px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.7), 0 16px 32px rgba(0,0,0,0.5), 0 32px 64px rgba(0,0,0,0.3), 0 0 80px rgba(59,130,246,0.03);
  --shadow-xl: 0 8px 20px rgba(0,0,0,0.8), 0 20px 40px rgba(0,0,0,0.6), 0 40px 80px rgba(0,0,0,0.35), 0 0 100px rgba(59,130,246,0.05);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.1), 0 0 80px rgba(59,130,246,0.05);

  --radius: 16px;
  --radius-lg: 24px;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1200px;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: default;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,0.4); }

/* --- Grain Overlay --- */
.grain-overlay {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Cursor Constellation Canvas --- */
#cursorCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 9998;
  pointer-events: none;
}

/* --- Navigation (Centered) --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 24px 0;
  transition: all 0.5s ease;
  background: transparent;
}
.nav.scrolled {
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  box-shadow: var(--shadow-md);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-links {
  display: flex; align-items: center; gap: 40px;
}
.nav-link {
  font-size: 0.88rem; font-weight: 400;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  letter-spacing: 0.5px;
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 1px;
  background: var(--accent); transition: width 0.4s ease;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }
.nav-cta {
  font-size: 0.82rem; font-weight: 500;
  color: var(--bg-primary) !important;
  background: var(--accent-light);
  padding: 10px 26px; border-radius: 100px;
  transition: var(--transition);
  letter-spacing: 0.5px;
  box-shadow: 0 0 24px rgba(96,165,250,0.15);
}
.nav-cta:hover {
  background: #93bbfd;
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(96,165,250,0.3);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--bg-primary);
}
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 0 24px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 20px;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.1);
  border-radius: 100px;
  font-size: 0.78rem; font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 44px;
  letter-spacing: 0.5px;
  opacity: 0; transform: translateY(20px);
}
.badge-dot {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(34,197,94,0.3);
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 300;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: 2px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(210,220,240,0.9) 0%, var(--accent-light) 50%, rgba(34,211,238,0.6) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease-in-out infinite;
  opacity: 0; transform: translateY(40px);
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.3vw, 0.92rem);
  color: rgba(96,165,250,0.7);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 400;
  opacity: 0; transform: translateY(20px);
}
.hero-desc {
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
  opacity: 0; transform: translateY(20px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute; bottom: 40px;
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  z-index: 2;
  opacity: 0;
}
.scroll-indicator span {
  font-size: 0.65rem; letter-spacing: 4px;
  text-transform: uppercase; color: var(--text-muted);
  font-family: var(--font-mono);
}
.scroll-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, rgba(59,130,246,0.4), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.2; transform: scaleY(0.5); }
}

/* --- Sections --- */
.section { padding: 140px 0; position: relative; }
.container {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 32px;
}

/* Section Label */
.section-label {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 60px;
  font-family: var(--font-mono);
  font-size: 0.75rem; letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(96,165,250,0.6);
  opacity: 0; transform: translateY(20px);
}
.label-line {
  width: 40px; height: 1px;
  background: rgba(59,130,246,0.3);
}

/* --- About --- */
.about { background: var(--bg-primary); }
.about-heading {
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(214,220,232,0.85);
  max-width: 780px;
  opacity: 0; transform: translateY(30px);
}

/* --- Expertise --- */
.expertise {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(30px);
}
.expertise-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(59,130,246,0.04) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.5s;
}
.expertise-card:hover {
  border-color: rgba(59,130,246,0.18);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}
.expertise-card:hover::before { opacity: 1; }
.card-number {
  font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 2px;
}
.card-icon {
  color: rgba(96,165,250,0.7);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(59,130,246,0.2));
}
.expertise-card h3 {
  font-size: 1.2rem; font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.expertise-card p {
  font-size: 0.88rem; line-height: 1.7;
  color: var(--text-secondary);
}

/* --- Projects --- */
.projects { background: var(--bg-primary); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.project-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  text-decoration: none !important;
  opacity: 0; transform: translateY(30px);
}
.project-card:hover {
  border-color: rgba(59,130,246,0.18);
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}
.project-image {
  width: 140px; min-height: 180px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59,130,246,0.03);
  flex-shrink: 0;
  border-right: 1px solid var(--border-subtle);
}
.project-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.project-card:hover .project-icon { transform: scale(1.08); }
.project-image--gradient { position: relative; }
.project-initial {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 600; font-style: italic;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 0 30px rgba(59,130,246,0.2);
}
.infoseek-gradient { background: linear-gradient(135deg, #060810 0%, #0d1628 100%); }
.omg-gradient { background: linear-gradient(135deg, #0a0804 0%, #1a1408 100%); }
.talkboy-gradient { background: linear-gradient(135deg, #0a0908 0%, #161210 100%); }
.project-info {
  padding: 28px 28px 28px 24px;
  display: flex; flex-direction: column;
  flex: 1; position: relative;
}
.project-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 3px 10px;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.08);
  border-radius: 100px;
  color: rgba(96,165,250,0.6);
  letter-spacing: 0.5px;
}
.project-info h3 {
  font-size: 1.25rem; font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.project-info p {
  font-size: 0.85rem; line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}
.project-arrow {
  position: absolute; top: 28px; right: 28px;
  color: var(--text-muted);
  transition: var(--transition);
}
.project-card:hover .project-arrow {
  color: var(--accent-light);
  transform: translate(3px, -3px);
}

/* Full-width last card if odd */
.projects-grid .project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 600px;
}

/* --- Vision --- */
.vision {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 160px 0;
}
.vision-content {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  opacity: 0; transform: translateY(30px);
}
.vision-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 300;
  line-height: 1.8;
  color: rgba(214,220,232,0.8);
}
.vision-content h2::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 4rem; font-style: italic;
  color: rgba(59,130,246,0.25);
  display: block;
  margin-bottom: 20px;
  line-height: 1;
}

/* --- Footer --- */
.footer {
  background: var(--bg-primary);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 40px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600; font-style: italic;
  color: rgba(214,220,232,0.6);
  display: block; margin-bottom: 8px;
}
.footer-brand p {
  font-size: 0.85rem; color: var(--text-muted);
}
.footer-links { display: flex; gap: 20px; }
.footer-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--text-secondary);
  transition: var(--transition);
  padding: 8px 18px;
  border: 1px solid var(--border-card);
  border-radius: 100px;
  background: rgba(59,130,246,0.03);
}
.footer-link:hover {
  color: var(--accent-light);
  border-color: rgba(59,130,246,0.2);
  box-shadow: 0 0 24px rgba(59,130,246,0.08);
  background: rgba(59,130,246,0.06);
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.footer-bottom p {
  font-size: 0.72rem; color: var(--text-muted);
  letter-spacing: 1px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .expertise-grid, .projects-grid { grid-template-columns: 1fr; }
  .projects-grid .project-card:last-child:nth-child(odd) { max-width: none; }
  .section { padding: 100px 0; }
}
@media (max-width: 768px) {
  .nav-links .nav-link { display: none; }
  .nav-inner { padding: 0 20px; }
  .container { padding: 0 20px; }
  .hero-name { font-size: clamp(3.5rem, 12vw, 6rem); }
  .project-card { flex-direction: column; }
  .project-image { width: 100%; min-height: 120px; border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .footer-inner { flex-direction: column; gap: 30px; }
  .vision { padding: 100px 0; }
}
@media (max-width: 480px) {
  .hero-badge { font-size: 0.68rem; padding: 6px 14px; }
  .expertise-card { padding: 24px; }
  .project-info { padding: 20px; }
}

/* --- Animations (triggered by JS) --- */
.revealed { opacity: 1 !important; transform: translateY(0) !important; }
