:root {
  --bg: #020617;
  --card-bg: rgba(30, 41, 59, 0.4);
  --card-border: rgba(148, 163, 184, 0.1);
  --card-hover: rgba(56, 189, 248, 0.05);
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.3);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --radius: 16px;
  --font-main: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Ambient Glow Effect */
.background-fx {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: 
    radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.08), transparent 25%);
  z-index: -1;
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; transition: 0.2s; }
a:hover { color: #fff; text-shadow: 0 0 8px var(--accent-glow); }

/* --- Topbar --- */
.topbar {
  position: fixed;
  top: 0; width: 100%;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 8vw;
  z-index: 100;
  border-bottom: 1px solid var(--card-border);
}

.logo { font-weight: 800; font-size: 1.1rem; tracking: -0.02em; }
.dot { color: var(--accent); }

.topbar nav a {
  color: var(--text-muted);
  margin-left: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.topbar nav a:hover { color: var(--text-main); }

/* --- Hero Section --- */
.hero {
  padding: 8rem 8vw 4rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin: 1rem 0;
  background: linear-gradient(to right, #fff, #94a3b8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent);
}

.status-indicator {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}

/* --- Bento Grid Layout --- */
main.bento-grid {
  padding: 2rem 8vw 4rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  /* Mobile layout default */
}

@media screen and (min-width: 900px) {
  main.bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas: 
      "about about skills"
      "exp exp edu"
      "exp exp contact";
  }
  .area-about { grid-area: about; }
  .area-exp { grid-area: exp; }
  .area-skills { grid-area: skills; }
  .area-edu { grid-area: edu; }
  .area-contact { grid-area: contact; }
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

/* --- Experience Items --- */
.exp-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border);
}
.exp-item:last-child { border-bottom: none; margin-bottom: 0; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-role { font-weight: 700; color: var(--text-main); font-size: 1.05rem; }
.exp-place { color: var(--accent); font-family: var(--font-mono); font-size: 0.85rem; }
.exp-dates { color: var(--text-muted); font-size: 0.85rem; font-family: var(--font-mono); }
.exp-desc { color: #cbd5e1; font-size: 0.95rem; margin-top: 0.5rem; }

/* --- Skills Tags --- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-left: 0;
  list-style: none;
}

.tags li {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  transition: 0.2s;
}

.tags li:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  cursor: default;
}

/* --- Education List --- */
.clean-list { list-style: none; padding: 0; }
.clean-list li {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.clean-list strong { color: var(--text-main); display: block; margin-bottom: 0.2rem; }

/* --- Contact Button --- */
.contact-btn {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  padding: 0.8rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.contact-btn:hover {
  background: #7dd3fc;
  color: #0f172a; 
  box-shadow: 0 0 15px var(--accent-glow);
}

/* --- Animations --- */
@keyframes pulse {
  0% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
  70% { opacity: 1; box-shadow: 0 0 0 6px rgba(56, 189, 248, 0); }
  100% { opacity: 0.4; box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* Initial State for JS Animations */
.hidden { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.show { opacity: 1; transform: translateY(0); }

/* Stagger delays for children elements if needed */
.stagger-delay:nth-child(1) { transition-delay: 100ms; }
.stagger-delay:nth-child(2) { transition-delay: 200ms; }
.stagger-delay:nth-child(3) { transition-delay: 300ms; }

footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--card-border);
}
.footer-tech { color: var(--accent); font-family: var(--font-mono); }

@media (max-width: 768px) {
  .topbar { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .topbar nav { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .topbar nav a { margin: 0; }
}