/* light theme */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #1c1c22;
  --muted: #6b6b76;
  --accent: #e0119d;      /* Tron pink, deepened for contrast on white */
  --glow: none;
  --rule: #ebe7ee;
  --ph-bg: #faf4f8;
  --ph-border: #efc3e0;
  --max: 860px;
}
/* dark theme: follows the OS unless the visitor picked light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #0b0b12; --text: #ecebf3; --muted: #9b99ab; --accent: #ff3fd2;
    --glow: 0 0 10px rgba(255, 63, 210, 0.55);
    --rule: #23222f; --ph-bg: #14131d; --ph-border: #4a2a45;
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0b0b12; --text: #ecebf3; --muted: #9b99ab; --accent: #ff3fd2;
  --glow: 0 0 10px rgba(255, 63, 210, 0.55);
  --rule: #23222f; --ph-bg: #14131d; --ph-border: #4a2a45;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* top navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav .brand { color: var(--text); font-weight: 600; }
.nav .brand span { font-weight: 400; color: var(--muted); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; align-items: center; }
.theme-btn {
  background: none; border: 1px solid var(--rule); color: var(--muted); border-radius: 14px;
  font: inherit; font-size: 0.85rem; padding: 2px 10px; cursor: pointer;
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }
.nav ul a { color: var(--muted); }
.nav ul a.active, .nav ul a:hover { color: var(--accent); text-decoration: none; }

main { max-width: var(--max); margin: 0 auto; padding: 36px 20px 60px; }

h1 { font-size: 2.4rem; font-weight: 300; margin: 0 0 4px; letter-spacing: -0.5px; }
h1 b { font-weight: 600; color: var(--accent); text-shadow: var(--glow); }
h2 {
  font-size: 1.35rem; font-weight: 500; color: var(--accent); text-shadow: var(--glow);
  margin: 44px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.05rem; margin: 0 0 2px; }

.links { margin: 6px 0 4px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.tagline { color: var(--muted); margin: 0 0 24px; }

/* about block */
.about { display: flex; gap: 36px; align-items: flex-start; }
.about .bio { flex: 1; }
.about .bio p { margin: 0 0 12px; }
.profile { width: 240px; flex-shrink: 0; }
.profile .ph { aspect-ratio: 4 / 5; }
.profile-caption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 6px; }

/* placeholders for photos/videos Shlok will send later */
.ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--ph-bg); border: 1.5px dashed var(--ph-border); border-radius: 6px;
  color: var(--muted); font-size: 0.8rem; padding: 8px;
}
img.media, video.media { width: 100%; border-radius: 6px; display: block; }

/* news */
table.news { width: 100%; border-collapse: collapse; }
table.news td { padding: 6px 0; vertical-align: top; border-bottom: 1px solid var(--rule); }
table.news td.date { width: 110px; color: var(--muted); white-space: nowrap; padding-right: 16px; }

/* project rows (home + projects page) */
.proj { display: flex; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.proj:last-child { border-bottom: none; }
.proj .thumb { width: 200px; flex-shrink: 0; }
.proj .thumb .ph { aspect-ratio: 16 / 10; }
.proj .body { flex: 1; min-width: 0; }
.proj .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.proj p { margin: 0 0 6px; }
.proj ul { margin: 4px 0 0; padding-left: 20px; }
.proj li { margin-bottom: 3px; }
.tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.75rem; padding: 1px 8px; border-radius: 10px;
  border: 1px solid var(--rule); color: var(--muted);
}

/* CV page */
.cv-entry { display: flex; gap: 20px; padding: 8px 0; }
.cv-entry .when { width: 140px; flex-shrink: 0; color: var(--muted); font-size: 0.92rem; padding-top: 1px; }
.cv-entry .what { flex: 1; min-width: 0; }
.cv-entry .where { font-style: italic; color: var(--muted); font-size: 0.93rem; }
.cv-entry p { margin: 4px 0; }
.cv-entry ul { margin: 4px 0 0; padding-left: 20px; }
.cv-entry li { margin-bottom: 2px; }
.skills dt { font-weight: 600; margin-top: 10px; }
.skills dd { margin: 2px 0 0; }

footer {
  max-width: var(--max); margin: 0 auto; padding: 20px;
  border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.85rem;
}

@media (max-width: 640px) {
  h1 { font-size: 1.9rem; }
  .about { flex-direction: column; }
  .profile { width: 170px; }
  .proj { flex-direction: column; }
  .proj .thumb { width: 100%; }
  .cv-entry { flex-direction: column; gap: 2px; }
  .cv-entry .when { width: auto; }
  .nav ul { gap: 14px; }
}
