@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* =========================================================================
   TOKENS & VARIABLES
   ========================================================================= */
:root {
  /* Colors - Deep Space Aesthetic */
  --bg-base: #030014;
  --bg-surface: #0a0520;
  --bg-surface-2: #120a33;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #cbd5e1;

  --accent-1: #818cf8; /* Soft Indigo */
  --accent-2: #c084fc; /* Purple */
  --accent-glow: rgba(129, 140, 248, 0.4);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-bg-hover: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Animation */
  --curve: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.4s var(--curve);
}

/* =========================================================================
   RESET & BASE
   ========================================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html.lenis, html.lenis body {
  height: auto;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-1);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-2);
  border-radius: 10px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================================================================
   BACKGROUND FX (NOISE & ORBS)
   ========================================================================= */
#noise {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  animation: float 20s ease-in-out infinite alternate;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-1) 0%, transparent 60%);
  top: -200px;
  right: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 60%);
  bottom: -100px;
  left: -200px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 50px) scale(1.1); }
}

/* =========================================================================
   LAYOUT UTILS
   ========================================================================= */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  position: relative;
  z-index: 2;
}

main {
  padding-top: 80px;
  position: relative;
  z-index: 2;
}

section {
  padding: 8rem 0;
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-1);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent-1);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 2;
}

/* =========================================================================
   NAVIGATION
   ========================================================================= */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  transition: all 0.3s;
}

nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(3, 0, 20, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: -1;
  transition: background 0.3s;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-scrolled {
  padding: 0.7rem 0;
}

.nav-scrolled::before {
  background: rgba(3, 0, 20, 0.85);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-decoration: none;
}
.nav-logo span { color: var(--accent-1); }

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-1);
  transition: width 0.3s var(--curve);
}

.nav-link:hover { color: var(--text-main); }
.nav-link:hover::after { width: 100%; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  z-index: 1;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-base);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.btn-glass {
  background: var(--glass-bg);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--text-main);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.btn:hover .btn-icon svg {
  transform: translate(2px, -2px);
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 6rem;
  align-items: center;
}

.hero-h1 {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 6.5vw, 6.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
}

.hero-h1 .line {
  display: block;
  overflow: hidden;
}

.hero-h1 .line span {
  display: block;
  transform: translateY(110%);
}

.hero-h1 em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  
  /* Fix gradient clipping bug on italics */
  padding: 0.15em 0.1em 0.1em 0.1em;
  margin-left: -0.05em;
  display: inline-block;
  vertical-align: bottom;
}

.hero-bio {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 3rem;
  opacity: 0;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  opacity: 0;
}

/* Hero Profile Card */
.profile-card {
  background: linear-gradient(180deg, var(--glass-bg), rgba(255,255,255,0.01));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  position: relative;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  transform: translateY(30px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.pc-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pc-photo-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--glass-border-hover);
  padding: 4px;
  background: var(--bg-surface-2);
  overflow: hidden;
}

.pc-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.3);
}

.pc-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
}

.pc-role {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-1);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tag {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.tech-tag:hover {
  border-color: var(--accent-1);
  color: var(--text-main);
  background: rgba(129, 140, 248, 0.1);
}

.tech-tag img {
  width: 14px;
  height: 14px;
}

/* =========================================================================
   MARQUEE
   ========================================================================= */
.marquee-section {
  padding: 1.5rem 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(3, 0, 20, 0.4);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.mq-track {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

.mq-inner {
  display: flex;
  gap: 4rem;
  align-items: center;
  animation: scroll-x 35s linear infinite;
  white-space: nowrap;
  padding-right: 4rem;
}

@keyframes scroll-x {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.mq-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.3s;
}

.mq-item:hover {
  opacity: 1;
  color: var(--text-main);
}

.mq-item img {
  width: 28px;
  height: 28px;
  filter: grayscale(1) invert(0.8);
  transition: filter 0.3s;
}

.mq-item:hover img {
  filter: none;
}

/* =========================================================================
   EXPERIENCE SECTION
   ========================================================================= */
.exp-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 6rem;
}

.exp-sticky {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  border-left: 1px solid var(--glass-border);
  padding-left: 3rem;
  position: relative;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -3rem; /* relative to padding-left */
  top: 0.5rem;
  width: 15px;
  height: 15px;
  background: var(--bg-base);
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: all 0.4s ease;
  z-index: 2;
}

.timeline-item:hover .timeline-dot, .timeline-dot.active {
  border-color: var(--accent-1);
  background: var(--accent-1);
  box-shadow: 0 0 15px var(--accent-glow);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-1);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timeline-role {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.timeline-desc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.timeline-desc li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.7;
}

.timeline-desc li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  top: 2px;
}

/* =========================================================================
   BENTO PROJECTS
   ========================================================================= */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background: linear-gradient(145deg, var(--glass-bg), rgba(255,255,255,0.005));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, background 0.4s;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}

.bento-wide {
  grid-column: span 2;
}

.bento-num {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px var(--glass-border-hover);
  line-height: 1;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.bento-card:hover .bento-num {
  -webkit-text-stroke: 1px var(--accent-1);
  color: rgba(129, 140, 248, 0.1);
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.bento-tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.bento-content h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.bento-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.bento-arrow {
  position: absolute;
  top: 3rem;
  right: 3rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 1.25rem;
  transition: all 0.4s var(--curve);
}

.bento-card:hover .bento-arrow {
  background: var(--accent-1);
  color: var(--bg-base);
  border-color: var(--accent-1);
  transform: rotate(45deg);
}

/* =========================================================================
   BLOG SECTION
   ========================================================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}

.blog-image {
  height: 200px;
  background: var(--bg-surface-2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--glass-border);
  overflow: hidden;
}

.blog-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 80%);
  opacity: 0.5;
}

.blog-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  z-index: 2;
}

.blog-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.blog-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.blog-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s;
}

.blog-card:hover .blog-link {
  gap: 1rem;
}

/* =========================================================================
   FOOTER / CONTACT
   ========================================================================= */
.cta-section {
  padding: 10rem 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 8vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 3rem;
}

.cta-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
}

.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-base);
  position: relative;
  z-index: 2;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-1);
}

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 4rem; }
  .profile-card { max-width: 500px; margin: 0 auto; }
  .exp-layout { grid-template-columns: 1fr; gap: 3rem; }
  .exp-sticky { position: static; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Transform top nav into a sleek floating bottom bar for mobile */
  .nav-links {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(10, 5, 32, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border-hover);
    border-radius: 100px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    z-index: 999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  }

  .nav-links .nav-link {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
  }

  .nav-links .btn {
    display: none; /* Hide primary CTA inside the tight mobile nav */
  }

  .footer-wrap {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  /* Add extra padding at the bottom of the page so the footer isn't covered by bottom nav */
  main {
    padding-bottom: 5rem;
  }

  section { padding: 5rem 0; }
  .blog-grid { grid-template-columns: 1fr; }
  
  .hero-h1 { font-size: 3rem; } /* Scale down hero slightly more for small mobile */
  .footer { flex-direction: column; gap: 1.5rem; text-align: center; }
  .timeline { padding-left: 2rem; }
  .timeline-dot { left: -2rem; }
}
