:root {
  /* Secure Node Colors */
  --bg-primary: #0B0C10;
  --bg-secondary: #16181F;
  --text-primary: #FFFFFF;
  --text-secondary: #C5C6C7;
  --accent: #66FCF1;
  
  --card-bg: rgba(22, 24, 31, 0.6);
  --card-dark-bg: rgba(11, 12, 16, 0.8);
  --card-border: rgba(102, 252, 241, 0.15);
  
  /* Glass rules */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 
                  0 20px 40px -15px rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --container-max: 1200px;
  --radius-lg: 2.5rem;
  --radius-md: 1.5rem;
  
  /* Motion */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.3s var(--ease-spring);
  --transition-slow: 0.6s var(--ease-spring);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  background-image: 
    radial-gradient(circle at 10% 40%, rgba(102, 252, 241, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(102, 252, 241, 0.03) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 
    100% 100%, 
    100% 100%, 
    40px 40px, 
    40px 40px;
  background-attachment: fixed;
}

/* Utilities */
.mono-text { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; }
.text-accent { color: var(--accent); }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.size-lg { font-size: 2rem; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }

/* Typography */
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.display-title { font-size: clamp(2.5rem, 6vw, 5.5rem); font-weight: 600; letter-spacing: -0.04em; margin-bottom: 1rem;}
.section-title { font-size: 2.5rem; font-weight: 500; margin-bottom: 0.25rem; }
.section-desc { color: var(--text-secondary); margin-bottom: 3rem; }
.hero-subtitle { font-size: 1.125rem; color: var(--text-secondary); max-width: 50ch; margin: 1.5rem 0 2.5rem; }

/* Container */
.page-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 4rem 0; }

/* Glass Navbar */
.glass-nav {
  position: sticky;
  top: 1.5rem;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem 0.75rem 1.5rem;
  background: rgba(11, 12, 16, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 9999px;
  margin-bottom: 4rem;
}
.nav-brand { font-weight: 600; font-size: 1.125rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 2rem; }
.nav-link { 
  text-decoration: none; 
  color: var(--text-secondary); 
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.nav-link:hover { color: var(--accent); }

/* Buttons */
.btn, .magnetic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 9999px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition-fast);
  will-change: transform;
}
.btn.lg, .magnetic-btn.lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}
.primary-btn { background: var(--text-primary); color: var(--bg-primary); }
.primary-btn:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgba(102, 252, 241, 0.5); }
.secondary-btn { background: transparent; color: var(--text-primary); border: 1px solid var(--card-border); }
.secondary-btn:hover { background: rgba(102, 252, 241, 0.1); color: var(--accent); }

/* Hero Section */
.hero-section { min-height: 80vh; display: flex; align-items: center; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap;}

/* Visual Hero Panel */
.glass-panel {
  aspect-ratio: 4/5;
  background: rgba(22, 24, 31, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.visual-inner {
  height: 100%;
  border-radius: var(--radius-md);
  background: var(--card-dark-bg);
  border: 1px solid rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dots-container { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-block { padding: 1.5rem; font-size: 0.875rem; color: #a1a1aa; line-height: 1.7; }
.line { opacity: 0; animation: fadeUp 0.5s var(--ease-spring) forwards; animation-delay: calc(var(--delay) * 100ms); }
.keyword { color: #f472b6; }
.string { color: var(--accent); }
.func { color: #60a5fa; }

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.mesh-bg {
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(102, 252, 241, 0.08), transparent 60%);
  animation: rotate 20s linear infinite;
  z-index: -1;
  pointer-events: none;
}
@keyframes rotate { 100% { transform: rotate(360deg); } }

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  grid-auto-rows: 26rem; /* slightly taller for images */
}
.bento-grid-about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.col-span-3 { grid-column: span 3;}
.col-span-2 { grid-column: span 2; }
.col-span-1 { grid-column: span 1; }

.bento-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 20px 40px -15px rgba(0, 0, 0, 0.4);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-fast);
}
.interactive-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -12px rgba(102, 252, 241, 0.05);
  border-color: rgba(102, 252, 241, 0.3);
}

.card-dark { background: var(--card-dark-bg); }
.card-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; pointer-events: none; }
.mono-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); margin-bottom: 1rem; display: block; opacity: 0.8; }

.bento-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; pointer-events: auto; }
.bento-card p { color: var(--text-secondary); max-width: 45ch; pointer-events: auto; }
.icon-accent { color: var(--accent); margin-bottom: 1.5rem; }

/* Setup for Images */
.has-image-bg {
  color: #fff;
}
.has-image-bg .mono-label { color: var(--accent); }
.has-image-bg h3 { text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.has-image-bg p { color: rgba(255,255,255,0.9); text-shadow: 0 1px 4px rgba(0,0,0,0.8); }

.card-bg-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.interactive-card:hover .card-bg-image {
  transform: scale(1.05);
}
/* Gradient overlay for text readability */
.card-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(11, 12, 16, 0.8) 0%, rgba(11, 12, 16, 0.3) 50%, rgba(11, 12, 16, 0.9) 100%);
  z-index: 1;
}

/* About Block Details */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
.about-text {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.expertise-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.expertise-item h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.expertise-item h4 i { color: var(--accent); }
.expertise-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Footer */
.footer { border-top: 1px solid var(--card-border); padding: 6rem 0 2rem; margin-top: 6rem; }
.footer-split { display: flex; justify-content: space-between; margin-bottom: 6rem; }
.footer-title { font-size: 4rem; max-width: 15ch; line-height: 1; }
.footer-contact { display: flex; flex-direction: column; align-items: flex-end; }
.footer-link { font-size: 1.5rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-primary); transition: color var(--transition-fast); }
.footer-link:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; color: var(--text-secondary); border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; }

/* Mobile */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .col-span-3, .col-span-2, .col-span-1 { grid-column: span 1 !important; }
  .bento-card { min-height: 24rem; }
  .footer-split { flex-direction: column; gap: 4rem; }
  .footer-contact { align-items: flex-start; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .display-title { font-size: 3.5rem; }
}

/* Hero Video Background Settings */
.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1; 
    opacity: 0.35; 
    filter: brightness(0.7) contrast(1.2); 
    border-radius: inherit; 
}

.visual-inner {
    position: relative;
    overflow: hidden;
}
