/* ---------- THEME ---------- */
:root {
  --bg-main: #050711;
  --bg-elevated: #0b0f1d;
  --bg-card: #111726;
  --accent: #f4b2ff;
  --accent-soft: #c77dff;
  --accent-strong: #ffdf6b;
  --text-main: #f5f5ff;
  --text-muted: #a7b0d2;
  --border-subtle: #23263a;
  --shadow-soft: 0 0 40px rgba(164, 120, 255, 0.25);
  --radius-large: 24px;
  --radius-pill: 999px;
  --transition-fast: 160ms ease-out;
  --transition-slow: 380ms cubic-bezier(0.19, 1, 0.22, 1);
  --max-width: 1080px;
  --nav-blur: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overscroll-behavior: none; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #241438 0, #050711 55%, #020308 100%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

/* ---------- STARFIELD ---------- */
.starfield {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  background-image: 
      radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)),
      radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
      radial-gradient(1px 1px at 50px 160px, #ddd, rgba(0,0,0,0)),
      radial-gradient(1px 1px at 90px 40px, #fff, rgba(0,0,0,0)),
      radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
      radial-gradient(1.5px 1.5px at 160px 120px, #ddd, rgba(0,0,0,0));
  background-repeat: repeat; background-size: 200px 200px; opacity: 0.3; z-index: -1; animation: twinkle 5s infinite;
}
@keyframes twinkle { 0% { opacity: 0.3; } 50% { opacity: 0.5; } 100% { opacity: 0.3; } }

/* ---------- LAYOUT ---------- */
.page { max-width: var(--max-width); margin: 0 auto; padding: 64px 16px 64px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(var(--nav-blur));
  background: linear-gradient(to bottom, rgba(5, 7, 17, 0.94), rgba(5, 7, 17, 0.77), transparent);
  border-bottom: 1px solid rgba(67, 74, 120, 0.5);
}
.nav-inner { max-width: var(--max-width); margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;

  text-decoration: none; 
  color: inherit;        
  cursor: pointer;       
}

/* SATURN LOGO GLOW ANIMATION */
@keyframes saturnGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(244, 178, 255, 0.4)); }
  50% { filter: drop-shadow(0 0 12px rgba(244, 178, 255, 0.7)); }
}

.nav-logo {
  width: 50px;
  height: 50px;
  margin-right: -5px;
  display: block;
  animation: saturnGlow 3s ease-in-out infinite;
}

.nav-title {
  font-weight: 800;
  letter-spacing: 0.25em;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 2px;
}

.nav-links { display: flex; gap: 18px; font-size: 14px; }
.nav-links a { color: var(--text-muted); text-decoration: none; position: relative; padding-bottom: 3px; transition: color var(--transition-fast); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px; border-radius: 999px; background: linear-gradient(90deg, var(--accent-soft), var(--accent-strong)); transition: width var(--transition-fast); }
.nav-links a:hover { color: var(--text-main); }
.nav-links a:hover::after { width: 100%; }

/* Nav Button */
.nav-cta--small { padding: 4px 10px; font-size: 12px; gap: 4px; }


/* ---------- SECTIONS & SPACING ---------- */
section { margin-top: 72px; }

.page > section:first-child, 
.hero {
  margin-top: 0 !important;
}

.section-header { margin-bottom: 22px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title { font-size: 1.05rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

.reveal { opacity: 0; transform: translateY(18px); filter: blur(4px); transition: opacity 600ms ease-out, transform 600ms ease-out, filter 600ms ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ---------- HERO (Standard & Parallax) ---------- */

/* STANDARD HERO (Projects, Contact, etc.) */
.hero {
  display: block;        
  min-height: auto;      
  padding-bottom: 40px;  
  text-align: left;
}

/* HOME HERO (Homepage Only - Parallax) */
.hero-home {
  display: flex;         
  align-items: center;   
  justify-content: space-between;
  min-height: 85vh;     
  padding: 40px 0;
  position: relative;
}

/* Typography for Hero */
.hero-title { font-size: clamp(2.4rem, 4vw, 3rem); line-height: 1.1; margin-bottom: 14px; }
.hero-title span { background: linear-gradient(120deg, #f9d5ff, #ffdf6b, #b3e3ff); -webkit-background-clip: text; color: transparent; text-shadow: 0 0 24px rgba(244, 178, 255, 0.5); }
.hero-subtitle { font-size: 0.95rem; color: var(--text-muted); max-width: 420px; margin-bottom: 20px; }

.hero-bio {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-main);
  opacity: 0.9;
  margin: 28px 0 32px;
}

.hero-text {
  flex: 1; 
  max-width: 580px; 
  z-index: 10; 
  position: relative;
}

/* --- RIGHT SIDE (The Parallax Wrapper) --- */
.hero-parallax-wrapper {
  position: absolute; 
  top: 0;
  right: 0;
  width: 50%;       
  height: 100%;   
  pointer-events: none; 
  overflow: visible;   
  z-index: 1;        
}

/* --- THE ROBOT ARM GRAPHIC --- */
.parallax-graphic {
  position: absolute;

  right: -400px; 
 
  top: -10%; 

  width: 750px;
  max-width: 65vw; 
  height: auto;
  
  opacity: 0.9;

  transform: translate(0, 0);
  will-change: transform;

  filter: drop-shadow(-10px 10px 20px rgba(0, 0, 0, 0.5));

  user-select: none;
  -webkit-user-select: none; /* Safari/Chrome */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* Edge */
 
  -webkit-user-drag: none;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
  .hero-parallax-wrapper {
    position: relative; 
    width: 100%;
    height: auto;
    right: auto;
    display: flex;
    justify-content: center;
  }

  .parallax-graphic {
    position: relative;
    right: auto;
    top: auto;
    width: 80%; 
    max-width: 350px;
    margin-bottom: 20px;
    opacity: 0.5; 
  }
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tag { font-size: 11px; text-transform: uppercase; padding: 5px 10px; border-radius: var(--radius-pill); border: 1px solid rgba(82, 92, 149, 0.9); color: var(--text-muted); background: rgba(7, 11, 22, 0.9); }

.hero-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-meta-badge { font-size: 11px; padding: 2px 9px; border-radius: var(--radius-pill); border: 1px solid rgba(255, 223, 107, 0.7); color: var(--accent-strong); background: rgba(33, 26, 7, 0.85); }


/* --- NAVBAR BUTTON (GitHub) --- */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  
  padding: 8px 28px; 
  
  border-radius: 50px; 
  background: rgba(255, 255, 255, 0.08); 
  border: 1px solid rgba(255, 255, 255, 0.2);
  
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  box-shadow: 0 0 15px rgba(100, 200, 255, 0.5); 
  border-color: rgba(100, 200, 255, 0.8);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.15); 
}

/* --- MAIN BUTTONS (Projects, Contact) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 34px;
  
  border-radius: 50px; 
  font-weight: 500;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

/* --- BUTTON CONTAINER --- */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px; 
  margin-top: 50px;
  margin-bottom: 24px;
}

/* --- PRIMARY BUTTON (Email) --- */
.btn-primary {
  background: rgba(0, 150, 255, 0.15); 

  border: 1px solid rgba(100, 200, 255, 0.6);

  color: #ffffff;
  padding: 10px 34px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  /* Brighter glow on hover */
  background: rgba(0, 150, 255, 0.3);
  box-shadow: 0 0 25px rgba(0, 180, 255, 0.5); 
  border-color: #ffffff;
  transform: translateY(-2px); 
}

/* --- GHOST BUTTON (GitHub) --- */
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  
  color: #e0e0e0;
  
  padding: 10px 34px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  border-color: #ffffff !important;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
/* ---------- PROJECT CARDS ---------- */
/* Large Cards (Featured) */
a.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #1f242d; 
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
a.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(100, 200, 255, 0.5); 
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Grid Cards (Projects Page) */
.project-grid-card { 
  background: var(--bg-card); 
  border-radius: var(--radius-large); 
  border: 1px solid var(--border-subtle); 
  box-shadow: 0 0 18px rgba(3, 7, 18, 0.9); 
  display: flex; 
  flex-direction: column;
  padding: 0; 
  text-decoration: none; 
  color: inherit; 
  transition: transform 0.2s ease, border-color 0.2s ease; 
  overflow: hidden; 
  min-height: 500px; 
}
.project-grid-card:hover { transform: translateY(-4px); border-color: rgba(244, 178, 255, 0.5); }
.project-grid-thumb { width: 100%; height: 300px; object-fit: cover; }
.project-grid-content { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.project-grid-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; justify-content: space-between; align-items: center; }

/* Text & Tags */
.project-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #64ffda; margin-bottom: 12px; font-weight: 600; }
.project-title { font-size: 1.25rem; font-weight: 700; color: #ffffff; margin: 0 0 12px 0; line-height: 1.4; }
.project-body { font-size: 0.95rem; color: #b0b0b0; line-height: 1.6; margin-bottom: 24px; flex-grow: 1; }

/* Meta & Chips */
.project-meta { margin-top: auto; }
.project-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { font-size: 0.75rem; font-family: monospace; background: rgba(255, 255, 255, 0.08); color: #d0d0d0; padding: 4px 10px; border-radius: 50px; border: 1px solid rgba(255, 255, 255, 0.1); white-space: nowrap; }
.chip.chip-highlight { background: rgba(100, 255, 218, 0.1); color: #64ffda; border-color: rgba(100, 255, 218, 0.3); }

/* View Code Link */
.project-links { display: flex; justify-content: flex-start; margin-top: 12px; font-size: 0.9rem; font-weight: 600; color: #ffffff; }
.project-ext { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: #64ffda; transition: gap 0.2s ease; }
a.project-card:hover .project-ext, .project-grid-card:hover .project-ext { gap: 10px; color: #64ffda; }

/* ---------- NEWS CAPSULE & LISTS ---------- */
.currently-section { margin-top: 72px; max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.currently-capsule { display: flex; justify-content: center; width: 100%; }
.currently-inner { max-width: var(--max-width); width: 100%; padding: 22px 32px; border-radius: 999px; background: radial-gradient(circle at 12% 0%, rgba(244, 178, 255, 0.25), rgba(9, 11, 24, 0.95)); border: 1px solid rgba(199, 125, 255, 0.35); box-shadow: 0 0 35px rgba(164, 120, 255, 0.25); display: flex; align-items: center; gap: 30px; flex-wrap: wrap; backdrop-filter: blur(6px); }
.currently-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-soft); background: rgba(255, 223, 107, 0.08); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 223, 107, 0.5); box-shadow: 0 0 12px rgba(255, 223, 107, 0.3); flex-shrink: 0; }
.currently-content { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 240px; }
.currently-item { color: var(--text-main); font-size: 0.92rem; line-height: 1.5; opacity: 0.94; }
.currently-item strong { color: var(--accent-strong); }
.currently-updated { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); text-align: right; }
.currently-updated span { color: var(--accent-soft); }
.current-link { color: var(--accent-soft); text-decoration: none; border-bottom: 1px dotted rgba(199, 125, 255, 0.6); transition: 0.2s ease; }
.current-link:hover { color: var(--accent-strong); border-bottom-style: solid; }
@media (max-width: 700px) { .currently-inner { border-radius: 32px; padding: 20px 20px; gap: 18px; } }

/* Grid Systems */
.skills-grid, .projects-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2.3fr); gap: 20px; }
.projects-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.awards-grid-layout, .pubs-grid-layout, .projects-grid-page { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .awards-grid-layout, .pubs-grid-layout, .projects-grid-page { grid-template-columns: 1fr 1fr; } }

/* Headers inside Skills/Publications Cards */
.skills-card h3 {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c0c0c0;  
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}
.award-list, .pub-list { list-style: none; padding: 0; margin: 0; }
.award-item, .pub-item { display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start; }
.award-item:last-child, .pub-item:last-child { margin-bottom: 0; }
.award-icon, .pub-bullet { font-size: 2rem; line-height: 0.7; color: var(--accent-strong); flex-shrink: 0; }
.award-meta, .pub-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.pub-link { display: inline-block; margin-top: 6px; font-size: 0.75rem; color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent-soft); }

/* ---------- CONTACT ---------- */
.contact-card { border-radius: var(--radius-large); border: 1px solid rgba(244, 178, 255, 0.6); background: radial-gradient(circle at top, rgba(244, 178, 255, 0.25), rgba(6, 8, 22, 0.98)); padding: 20px 18px 18px; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; z-index: 1; }
.contact-card::before { content: ""; position: absolute; inset: -30%; background: radial-gradient(circle at 100% 0, rgba(255, 223, 107, 0.3), transparent 60%); mix-blend-mode: screen; opacity: 0.5; pointer-events: none; }
.contact-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1.3fr; } }
.contact-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.contact-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 14px; }
.contact-meta { font-size: 0.8rem; color: var(--text-muted); }

/* Terminal */
/* --- TERMINAL BOX SIZE FIX --- */
.contact-terminal {
  background: rgba(7, 9, 24, 0.92);
  border-radius: 14px;
  border: 1px solid rgba(63, 74, 130, 0.9);
  padding: 20px; /* Added a bit more padding for looks */
  
  font-family: monospace;
  font-size: 0.85rem; /* Made font slightly larger for readability */
  color: #e2ecff;
  
  box-shadow: 0 0 16px rgba(11, 16, 40, 0.9);
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  min-width: 100%;

  min-height: 350px; 
}
.terminal-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--text-muted); font-size: 0.7rem; }
.term-dot { width: 7px; height: 7px; border-radius: 999px; background: #ff5f57; }
.term-dot:nth-child(2) { background: #febc2e; }
.term-dot:nth-child(3) { background: #28c840; }
.terminal-body { margin-top: 8px; line-height: 1.6; white-space: pre-line; word-wrap: break-word; color: #e2ecff; }
.cursor { display: inline-block; width: 7px; background: #e2ecff; animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- RESPONSIVE GLOBAL ---------- */
@media (max-width: 840px) {
  .skills-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .nav-inner { flex-wrap: wrap; }
  .nav-links { display: none; }
  .page { padding-top: 64px; }
}

/* Home Hero Mobile Fix */
@media (max-width: 900px) {
  .hero-home {
    flex-direction: column-reverse;
    justify-content: center;
    text-align: center;
    min-height: auto;
    padding-top: 60px;
  }
  .hero-text { margin-top: 20px; }
  .parallax-graphic { max-width: 280px; opacity: 0.6; margin-bottom: 20px; }
}

/* --- RESTORE BACKGROUNDS FOR SKILLS/AWARDS/PUBS --- */
.skills-card {
  background: var(--bg-card); 
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-large);
  padding: 20px; 
  box-shadow: 0 0 18px rgba(3, 7, 18, 0.9);
  height: 100%;
  display: flex;
  flex-direction: column;
  
  /* Smooth hover effect */
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.skills-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 178, 255, 0.4);
}

/* --- RESTORE ACTIVE LINK STATE --- */
.nav-links a.active { 
  color: var(--accent-strong); 
  font-weight: 600; 
  text-shadow: 0 0 6px rgba(150, 120, 255, 0.6); 
  position: relative; 
}

.nav-links a.active::after { 
  content: ""; 
  position: absolute; 
  bottom: -3px; 
  left: 0; 
  width: 100%; 
  height: 2px; 
  background: var(--accent-strong); 
  box-shadow: 0 0 6px rgba(150, 120, 255, 0.7); 
  border-radius: 2px; 
}

/* --- PREVENT DRAGGING (Navbar Polish) --- */
.nav-links a,
.nav-cta,
.nav-left,
.nav-logo {

  -webkit-user-drag: none;

  user-select: none;
  -webkit-user-select: none; 
  -moz-user-select: none;    
  -ms-user-select: none;    
}

/* --- CUSTOM HIGHLIGHT (Dark Antique Gold) --- */
::selection {
  background: #b8860b; 
 
  color: #ffffff; 

  text-shadow: none;
}

/* Firefox Support */
::-moz-selection {
  background: #b8860b;
  color: #ffffff;
  text-shadow: none;
}