/* ═══════════════════════════════════════
   Tejas Singh Bhati — Dark Scientific
   ═══════════════════════════════════════ */

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

:root {
  --bg:         #080B10;
  --bg-1:       #0D1117;
  --bg-2:       #111720;
  --border:     #1E2733;
  --border-2:   #2A3441;

  --ink:        #D8DBE0;
  --ink-2:      #9AA3AF;
  --ink-3:      #5A6474;

  --accent:     #2EE8B5;
  --accent-dim: rgba(46,232,181,0.08);
  --accent-glow:rgba(46,232,181,0.18);

  --red:        #FF4D6A;

  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --serif: 'EB Garamond', Georgia, serif;

  --max: 860px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

/* cursor: hide default everywhere */
*, *::before, *::after { cursor: none !important; }

html { scroll-behavior: smooth; font-size: 15px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── CUSTOM CURSOR ─────────────────── */
.cursor-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  mix-blend-mode: screen;
}

.cursor-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s, width 0.15s, height 0.15s, opacity 0.15s;
  box-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-glow);
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(46,232,181,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.06s, width 0.25s, height 0.25s, border-color 0.25s;
  will-change: left, top;
}

/* Crosshair lines on cursor ring */
.cursor-ring::before,
.cursor-ring::after {
  content: '';
  position: absolute;
  background: rgba(46,232,181,0.25);
}
.cursor-ring::before {
  width: 1px; height: 10px;
  left: 50%; top: -14px;
  transform: translateX(-50%);
}
.cursor-ring::after {
  width: 10px; height: 1px;
  top: 50%; left: -14px;
  transform: translateY(-50%);
}

body.cursor-hover .cursor-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 30px var(--accent-glow);
}
body.cursor-hover .cursor-ring {
  width: 44px; height: 44px;
  border-color: rgba(46,232,181,0.6);
}
body.cursor-click .cursor-dot {
  width: 3px; height: 3px;
  opacity: 0.5;
}
body.cursor-click .cursor-ring {
  width: 60px; height: 60px;
  opacity: 0;
  border-color: var(--accent);
}

/* ── HELPERS ─────────────────────────── */
.mono { font-family: var(--mono); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ── NAV ──────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled {
  background: rgba(8,11,16,0.9);
  backdrop-filter: blur(12px);
  border-color: var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-sig { font-size: 0.68rem; color: var(--accent); letter-spacing: 0.1em; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.68rem;
  color: var(--ink-3);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ── HERO ─────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 6rem var(--pad) 4rem;
}

.hero-label {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.45s forwards;
}

.hero-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  line-height: 1.8;
  max-width: 520px;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.6s forwards;
}

.hero-meta {
  font-size: 0.6rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.72s forwards;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.85s forwards;
}

.btn-ghost {
  font-size: 0.65rem;
  color: var(--ink-3);
  text-decoration: none;
  border: 1px solid var(--border-2);
  padding: 6px 14px;
  letter-spacing: 0.08em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  animation: pulse 2s ease-in-out infinite;
  opacity: 0;
  animation: fadeUp 0.6s ease 1.1s forwards, pulse 2.5s ease-in-out 1.7s infinite;
}

/* ── SECTION ──────────────────────────── */
.section { padding: 5rem 0; border-top: 1px solid var(--border); }

.sec-label {
  font-size: 0.6rem;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  margin-bottom: 3rem;
}

/* ── EXPERIENCE ───────────────────────── */
.exp-block {}

.exp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.exp-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.exp-org { font-size: 0.65rem; color: var(--ink-3); letter-spacing: 0.04em; }
.exp-date { font-size: 0.62rem; color: var(--accent); white-space: nowrap; padding-top: 4px; }

.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.exp-list li {
  font-size: 0.78rem;
  color: var(--ink-2);
  line-height: 1.75;
  padding-left: 1.25rem;
  position: relative;
}
.exp-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.05em;
}
.exp-list strong { color: var(--ink); font-weight: 400; }
.exp-list em { color: var(--ink); font-style: italic; font-family: var(--serif); }

.exp-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat-n {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}
.stat-l { font-size: 0.6rem; color: var(--ink-3); letter-spacing: 0.06em; }

/* ── PROJECTS ─────────────────────────── */
.proj-list { display: flex; flex-direction: column; }

.proj-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 2rem;
  row-gap: 0.75rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  align-items: start;
}
.proj-row:not(.no-link):hover { background: var(--accent-dim); padding-left: 0.5rem; padding-right: 0.5rem; margin: 0 -0.5rem; }
.proj-row:hover .proj-name { color: var(--accent); }

.proj-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.proj-idx { font-size: 0.6rem; color: var(--ink-3); }
.proj-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  transition: color 0.2s;
  line-height: 1.1;
}
.proj-full { font-size: 0.6rem; color: var(--ink-3); letter-spacing: 0.02em; margin-top: 2px; }

.proj-desc {
  font-size: 0.75rem;
  color: var(--ink-2);
  line-height: 1.75;
  grid-row: 1;
  grid-column: 2;
}

.proj-tags {
  grid-row: 2;
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.proj-tags span {
  font-size: 0.58rem;
  color: var(--ink-3);
  border: 1px solid var(--border-2);
  padding: 2px 6px;
  letter-spacing: 0.04em;
}

.proj-date {
  font-size: 0.6rem;
  color: var(--ink-3);
  white-space: nowrap;
  grid-row: 1;
  grid-column: 3;
  padding-top: 4px;
}

/* ── STACK ────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
}

.stack-col {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stack-col:last-child { border-right: none; }

.stack-head {
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.stack-items {
  font-size: 0.72rem;
  color: var(--ink-2);
  line-height: 2;
}

/* ── ACHIEVEMENTS ─────────────────────── */
.ach-list { display: flex; flex-direction: column; }

.ach-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.ach-n { font-size: 0.62rem; color: var(--border-2); padding-top: 3px; }

.ach-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.ach-desc { font-size: 0.73rem; color: var(--ink-2); line-height: 1.7; }
.ach-tag { font-size: 0.58rem; color: var(--accent); white-space: nowrap; padding-top: 3px; }

/* ── CONTACT ─────────────────────────── */
.contact-wrap { text-align: center; }

.contact-head {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  max-width: 440px;
  margin: 0 auto;
}

.c-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s;
}
.c-link:hover { border-color: var(--accent); }
.c-link:hover .c-val { color: var(--accent); }
.c-link:last-child { border-bottom: none; }

.c-lbl { font-size: 0.6rem; color: var(--ink-3); letter-spacing: 0.1em; min-width: 60px; text-align: left; }
.c-val { font-size: 0.72rem; color: var(--ink-2); text-align: right; transition: color 0.2s; }

/* ── FOOTER ───────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer .mono { font-size: 0.6rem; color: var(--ink-3); }
.footer-top { text-decoration: none; transition: color 0.2s; }
.footer-top:hover { color: var(--accent); }

/* ── SCROLLBAR ─────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── ANIMATIONS ────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.8; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ───────────────────────── */
@media (max-width: 700px) {
  .proj-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .proj-desc, .proj-tags, .proj-date { grid-column: 1; grid-row: auto; }
  .ach-row { grid-template-columns: 28px 1fr; }
  .ach-tag { display: none; }
  .exp-stats { gap: 1.5rem; flex-wrap: wrap; }
  .nav-links { display: none; }
}

@media (max-width: 500px) {
  .hero-name { font-size: 2.4rem; }
  .hero-actions { flex-direction: column; align-items: center; }
}
