/* ============================================================
   Vishal Kumar Roy — Portfolio
   Theme: deep indigo accent on near-black, light mode supported
   Fonts: Space Grotesk (display), Inter (body)
   ============================================================ */

:root[data-theme="dark"] {
  --bg:        #0b0b12;
  --bg-alt:    #11111c;
  --surface:   #161624;
  --border:    #23243a;
  --text:      #ecedf5;
  --text-dim:  #a0a3b8;
  --accent:    #7c5cff;
  --accent-2:  #4ad7d1;
  --shadow:    0 10px 40px rgba(0, 0, 0, 0.4);
}
:root[data-theme="light"] {
  --bg:        #f6f7fb;
  --bg-alt:    #eceef6;
  --surface:   #ffffff;
  --border:    #e1e3ee;
  --text:      #15162a;
  --text-dim:  #555770;
  --accent:    #6246ea;
  --accent-2:  #19a7a1;
  --shadow:    0 10px 30px rgba(20, 22, 50, 0.08);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--accent); }

/* ===================== NAV ===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11, 11, 18, 0.75);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
:root[data-theme="light"] .nav { background: rgba(246, 247, 251, 0.8); }

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.nav__logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav__logo-mark {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1rem;
  margin-right: 6px;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}

.nav__links {
  display: flex;
  gap: 32px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-dim);
}
.nav__links a {
  position: relative;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }

.nav__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px; height: 40px;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { background: var(--surface); border-color: var(--accent); }

.icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: block; }

.menu-btn { display: none; }

/* ===================== HERO ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero__inner {
  text-align: center;
  position: relative;
  z-index: 2;
}
.hero__greeting {
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  font-weight: 500;
}
.hero__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--text), var(--text-dim));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.hero__sub {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.hero__socials {
  display: flex;
  gap: 18px;
  justify-content: center;
  color: var(--text-dim);
}
.hero__socials a {
  transition: color 0.2s ease, transform 0.2s ease;
}
.hero__socials a:hover { color: var(--accent); transform: translateY(-2px); }

.hero__glow {
  position: absolute;
  top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.18), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(124, 92, 255, 0.45); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--full { width: 100%; justify-content: center; }

/* ===================== SECTIONS ===================== */
.section {
  padding: 100px 0;
  position: relative;
}
.section--alt { background: var(--bg-alt); }

.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 50px;
}

/* ===================== ABOUT ===================== */
.about__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
}
.about__text p {
  color: var(--text-dim);
  margin-bottom: 18px;
  font-size: 1.02rem;
}
.about__text strong { color: var(--text); font-weight: 600; }

.about__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.about__facts { list-style: none; }
.about__facts li {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.about__facts li:last-child { border-bottom: none; }
.about__facts span { color: var(--text-dim); }
.about__facts strong { color: var(--text); font-weight: 600; }

/* ===================== TIMELINE ===================== */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.timeline__item {
  position: relative;
  padding-bottom: 50px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -28px; top: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(124, 92, 255, 0.12);
}
.timeline__content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.timeline__content:hover { transform: translateX(4px); border-color: var(--accent); }
.timeline__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.timeline__head h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}
.timeline__date {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
}
.timeline__company {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.timeline__content ul {
  padding-left: 18px;
  margin-bottom: 14px;
}
.timeline__content li {
  color: var(--text-dim);
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.timeline__content strong { color: var(--text); font-weight: 600; }

/* ===================== CHIPS ===================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips span {
  display: inline-block;
  padding: 5px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
}
:root[data-theme="dark"] .timeline__content .chips span,
:root[data-theme="dark"] .project .chips span { background: var(--bg); }

/* ===================== SKILLS ===================== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.skills__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.skills__card:hover { transform: translateY(-4px); border-color: var(--accent); }
.skills__card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}

/* ===================== PROJECTS ===================== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.project:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}
.project__thumb {
  height: 160px;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}
.project__thumb--1 { background: linear-gradient(135deg, #7c5cff, #4ad7d1); }
.project__thumb--2 { background: linear-gradient(135deg, #ff6b9d, #feca57); }
.project__thumb--3 { background: linear-gradient(135deg, #38a3a5, #57cc99); }
.project__thumb--4 { background: linear-gradient(135deg, #4361ee, #4cc9f0); }

.project__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.project__body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.project__tag {
  font-size: 0.7rem;
  padding: 3px 9px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-weight: 500;
}
.project__body p {
  color: var(--text-dim);
  font-size: 0.93rem;
  flex: 1;
}
.project__links {
  margin-top: auto;
}
.project__links a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap 0.2s ease;
}
.project__links a:hover { letter-spacing: 0.02em; }

/* ===================== CONTACT ===================== */
.contact__lede {
  color: var(--text-dim);
  margin-top: -32px;
  margin-bottom: 36px;
  max-width: 580px;
}
.contact__form {
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.field input,
.field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===================== FOOTER ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: var(--bg-alt);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer p { color: var(--text-dim); font-size: 0.88rem; }
.footer__socials {
  display: flex;
  gap: 18px;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.footer__socials a:hover { color: var(--accent); }

/* ===================== REVEAL ANIMATIONS ===================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards;
}
.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.15s; }
.reveal:nth-child(3) { animation-delay: 0.25s; }
.reveal:nth-child(4) { animation-delay: 0.35s; }
.reveal:nth-child(5) { animation-delay: 0.45s; }
.reveal:nth-child(6) { animation-delay: 0.55s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; gap: 28px; }
  .nav__links {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 18px;
  }
  .nav__links.open { display: flex; }
  .menu-btn { display: grid; }
  .section { padding: 70px 0; }
  .section__title { margin-bottom: 36px; }
  .timeline__head { flex-direction: column; gap: 4px; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero { padding: 110px 0 60px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .timeline { padding-left: 26px; }
  .timeline__content { padding: 20px; }
}
