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

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface2: #1a1a26;
  --border: #2a2a3a;
  --accent: #6c63ff;
  --accent2: #00d4ff;
  --accent3: #ff6b6b;
  --green: #00e5a0;
  --text: #e8e8f0;
  --muted: #6b6b88;
  --mono: 'Space Mono', monospace;
  --sans: 'Syne', sans-serif;
}

body.light-mode {
  --bg: #f0f0f8;
  --surface: #ffffff;
  --surface2: #e8e8f5;
  --border: #d0d0e0;
  --text: #111118;
  --muted: #555570;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

/* NOISE TEXTURE OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface2);
}

.nav-links a.active {
  color: var(--accent);
  border: 1px solid var(--border);
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* DARK MODE TOGGLE */
#modeToggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#modeToggle:hover { background: var(--border); }

/* MAIN CONTENT */
main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* HERO */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent2);
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.25);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeDown 0.6s ease;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.7s ease 0.1s both;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeUp 0.7s ease 0.2s both;
}

/* STAT BAR */
.stat-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeUp 0.7s ease 0.3s both;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s ease both;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent, var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  border-color: var(--card-accent, var(--accent));
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

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

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.card-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--card-accent, var(--accent));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: gap 0.2s;
}

.card-link:hover { gap: 0.7rem; }

/* PROGRESS RING */
.progress-ring-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mini-ring {
  width: 48px;
  height: 48px;
  position: relative;
}

.mini-ring svg { transform: rotate(-90deg); }

.mini-ring .ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  transform: rotate(0deg);
}

/* CHART SECTION */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 3rem;
}

/* TOPIC LISTS */
.topic-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.topic-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border-radius: 10px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.topic-list li:hover { border-color: var(--border); }

.topic-list li input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.topic-list li label {
  cursor: pointer;
  flex: 1;
  font-size: 0.88rem;
}

.topic-list li.done label {
  text-decoration: line-through;
  color: var(--muted);
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-blue {
  background: rgba(108,99,255,0.12);
  color: var(--accent);
  border: 1px solid rgba(108,99,255,0.3);
}

.badge-green {
  background: rgba(0,229,160,0.1);
  color: var(--green);
  border: 1px solid rgba(0,229,160,0.25);
}

.badge-red {
  background: rgba(255,107,107,0.1);
  color: var(--accent3);
  border: 1px solid rgba(255,107,107,0.25);
}

.badge-cyan {
  background: rgba(0,212,255,0.08);
  color: var(--accent2);
  border: 1px solid rgba(0,212,255,0.25);
}

/* TWO COL LAYOUT */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  main { padding: 2rem 1rem; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
}

.panel h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--mono);
  font-size: 0.78rem;
}

/* PROGRESS BAR */
.prog-bar-wrap {
  margin-bottom: 1rem;
}

.prog-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.prog-bar-label span:last-child {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.75rem;
}

.prog-bar-track {
  height: 6px;
  background: var(--surface2);
  border-radius: 100px;
  overflow: hidden;
}

.prog-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-item.done::before { background: var(--green); }
.timeline-item.upcoming::before { background: var(--border); }

.timeline-item h4 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.timeline-item p { font-size: 0.8rem; color: var(--muted); }

/* STREAK */
.streak-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.streak-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-family: var(--mono);
  color: var(--muted);
  transition: all 0.2s;
}

.streak-dot.active {
  background: rgba(0,229,160,0.15);
  border-color: var(--green);
  color: var(--green);
}

/* PORTFOLIO */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-card p {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.tag-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* BTN */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #5b52ee;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108,99,255,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* PROFILE */
.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.profile-info h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.profile-info p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4rem;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse { animation: pulse 2s infinite; }

/* INTERVIEW QS */
.qa-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.qa-question {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--surface);
  transition: background 0.2s;
}

.qa-question:hover { background: var(--surface2); }

.qa-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--surface2);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

.qa-answer.open {
  padding: 1rem 1.25rem;
  max-height: 300px;
}

.qa-chevron { transition: transform 0.3s; }
.qa-question.open .qa-chevron { transform: rotate(180deg); }

/* CODE BLOCK */
.code-block {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
  color: #a8b4d0;
  margin: 0.75rem 0;
}

.code-block .kw { color: #6c63ff; }
.code-block .fn { color: #00d4ff; }
.code-block .str { color: #00e5a0; }
.code-block .cm { color: #555570; }

/* SKILLS GRID */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* GLOW */
.glow-text {
  text-shadow: 0 0 20px rgba(108,99,255,0.5);
}
