/* ============================================================
   Vikas Kukreti — Personal Portfolio Website
   Powered by the vikassh.com Console UI color tokens & palette.
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root,
[data-theme="dark"] {
  --bg-shell: #161618;
  --bg-card: #222225;
  --bg-card-hover: #28282c;
  --bg-recessed: #1a1a1d;
  --bg-pill: #1f1f23;
  --bg-pill-hover: #2a2a30;
  --bg-nav: rgba(22, 22, 24, 0.86);

  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);

  --text: #f4f4f6;
  --text-dim: #a0a0a8;
  --text-faint: #8e8e98;

  /* Fixed first palette color: Console Emerald */
  --accent: #22c55e;
  --accent-hover: #34d36f;
  --accent-soft: rgba(34, 197, 94, 0.14);
  --accent-line: rgba(34, 197, 94, 0.38);
  --text-on-accent: #101612;

  /* Console Squircle Accents */
  --sq-green: #129666;
  --sq-blue: #2563eb;
  --sq-purple: #6d3ce8;
  --sq-amber: #d9820f;
  --sq-rose: #d6336c;
  --sq-teal: #118ab2;
  --key-green: #22c55e;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.26);
  --shadow-shell: 0 24px 64px rgba(0, 0, 0, 0.45);

  --font-display: "Bricolage Grotesque", "Hanken Grotesk", "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Standardized Type Scale */
  --fs-display: clamp(2.8rem, 7vw, 5.2rem);
  --fs-h1: clamp(1.9rem, 4vw, 2.9rem);
  --fs-h2: 1.35rem;
  --fs-lead: 1.2rem;
  --fs-body: 1rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;

  /* Standardized Radius Scale */
  --radius-xs: 6px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --max: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4.5rem, 9vw, 7.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg-shell: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --bg-recessed: #f1f3f5;
  --bg-pill: #eceef2;
  --bg-pill-hover: #e2e5eb;
  --bg-nav: rgba(248, 249, 250, 0.88);

  --line: rgba(20, 20, 24, 0.08);
  --line-strong: rgba(20, 20, 24, 0.15);

  --text: #141417;
  --text-dim: #4b4b55;
  --text-faint: #63636e;

  --accent: #13793b;
  --accent-hover: #0e622f;
  --accent-soft: rgba(19, 121, 59, 0.12);
  --accent-line: rgba(19, 121, 59, 0.35);
  --text-on-accent: #ffffff;

  --shadow-card: 0 8px 24px rgba(20, 20, 24, 0.06);
  --shadow-shell: 0 20px 56px rgba(20, 20, 24, 0.1);
}

/* 4-Color Accent Overrides */
[data-accent="green"] {
  --accent: #22c55e;
  --accent-hover: #34d36f;
  --accent-soft: rgba(34, 197, 94, 0.14);
  --accent-line: rgba(34, 197, 94, 0.38);
  --text-on-accent: #101612;
}
[data-theme="light"][data-accent="green"] {
  --accent: #13793b;
  --accent-hover: #0e622f;
  --text-on-accent: #ffffff;
}

[data-accent="blue"] {
  --accent: #4c8dff;
  --accent-hover: #68a0ff;
  --accent-soft: rgba(76, 141, 255, 0.15);
  --accent-line: rgba(76, 141, 255, 0.38);
  --text-on-accent: #10141d;
}
[data-theme="light"][data-accent="blue"] {
  --accent: #1d56c4;
  --accent-hover: #16449e;
  --text-on-accent: #ffffff;
}

[data-accent="purple"] {
  --accent: #a478ff;
  --accent-hover: #b591ff;
  --accent-soft: rgba(164, 120, 255, 0.15);
  --accent-line: rgba(164, 120, 255, 0.38);
  --text-on-accent: #14101f;
}
[data-theme="light"][data-accent="purple"] {
  --accent: #6332cb;
  --accent-hover: #5024ad;
  --text-on-accent: #ffffff;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--line);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-pill-hover) var(--bg-shell);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-shell);
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

::selection {
  background: var(--accent);
  color: var(--text-on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

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

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--text-on-accent);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.inline-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 0.2em;
}
.inline-link:hover {
  text-decoration-color: var(--accent);
}

/* ---------- Sticky Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-nav);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: var(--fs-body);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.nav-links a {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.nav-links a:hover {
  background: var(--bg-pill);
  color: var(--text);
}
.nav-links a.is-active {
  background: var(--accent);
  color: var(--text-on-accent);
}

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

/* 4-Color Accent Picker Pill (from Console UI) */
.accent-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.62rem;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
}

.accent-dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease);
}
.accent-dot:hover {
  transform: scale(1.12);
}
.accent-dot.is-selected {
  box-shadow: 0 0 0 2px var(--text);
}
.dot-green { background: #22c55e; }
.dot-blue { background: #3b82f6; }
.dot-purple { background: #8b5cf6; }
.dot-orange { background: #f58216; }

.circle-icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  color: var(--text-dim);
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.circle-icon-btn:hover {
  background: var(--bg-pill-hover);
  color: var(--text);
}
.circle-icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-cta {
  padding: 0.48rem 1.05rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--text-on-accent) !important;
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}
.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-pill);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 17px;
  height: 1.6px;
  background: var(--text);
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6.6px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.6px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.72rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.btn-ghost {
  background: var(--bg-pill);
  color: var(--text-dim);
}
.btn-ghost:hover {
  background: var(--bg-pill-hover);
  color: var(--text);
  transform: translateY(-2px);
}
.btn .arrow {
  transition: transform 180ms var(--ease);
}
.btn:hover .arrow {
  transform: translate(2px, -2px);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(4rem, 9vw, 7rem) clamp(3.5rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}

.hero-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.6rem;
}

.status-pill,
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.82rem;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--key-green);
}

.hero-location {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.hero-role {
  margin-top: 1.35rem;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 62ch;
}
.hero-role strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section-pad);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
  margin-bottom: clamp(2rem, 4.5vw, 3.25rem);
}

/* ---------- About ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  font-weight: 600;
  color: var(--text);
  max-width: 65ch;
}

.about-body p {
  margin-top: 1.15rem;
  color: var(--text-dim);
  font-size: var(--fs-body);
  max-width: 65ch;
}

.about-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.card-heading {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.glance-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.glance-row {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.glance-row:first-child {
  padding-top: 0;
  border-top: 0;
}
.glance-row dt {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
}
.glance-row dd {
  margin-top: 0.25rem;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- Experience ---------- */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.exp-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: background-color 160ms var(--ease);
}
.exp-card:hover {
  background: var(--bg-card-hover);
}

.exp-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.exp-role,
.earlier-role {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.exp-company {
  margin-top: 0.22rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent);
}
.exp-company a:hover {
  text-decoration: underline;
}

.exp-body {
  margin-top: 1rem;
  max-width: 74ch;
}
.exp-body p {
  color: var(--text-dim);
  font-size: var(--fs-body);
}
.exp-body ul {
  list-style: none;
  margin-top: 0.85rem;
}
.exp-body ul li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  margin-bottom: 0.55rem;
}
.exp-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}
.exp-tech {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.exp-earlier {
  margin-top: 2.5rem;
}
.sub-label {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 700;
  margin-bottom: 1rem;
}
.earlier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

/* ---------- Core Technical Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.stack-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.stack-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.stack-card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.app-squircle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  flex-shrink: 0;
}
.app-squircle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sq-green { background: var(--sq-green); }
.sq-blue { background: var(--sq-blue); }
.sq-purple { background: var(--sq-purple); }
.sq-amber { background: var(--sq-amber); }
.sq-rose { background: var(--sq-rose); }
.sq-teal { background: var(--sq-teal); }

.stack-card h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--text);
}

.stack-domain {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent);
}

.stack-detail {
  margin-top: 0.6rem;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.contact-text {
  margin-top: 1.15rem;
  color: var(--text-dim);
  font-size: var(--fs-body);
  max-width: 48ch;
}

.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.contact-link:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.contact-link .label {
  width: 6.5rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
}
.contact-link .value {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  font-size: var(--fs-body);
}
.contact-link .arrow {
  color: var(--text-dim);
  transition: transform 180ms var(--ease), color 180ms var(--ease);
}
.contact-link:hover .arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  padding-block: 2.25rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer .credit {
  color: var(--text-faint);
  font-size: var(--fs-sm);
}
.footer .credit span {
  color: var(--accent);
  font-weight: 600;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a {
  color: var(--text-dim);
  font-size: var(--fs-sm);
  transition: color 150ms var(--ease);
}
.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-layout,
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .earlier-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 72px;
    right: 0 !important;
    bottom: 0;
    left: 0 !important;
    width: 100vw;
    height: calc(100dvh - 72px);
    min-height: calc(100vh - 72px);
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 1.5rem var(--gutter);
    background: var(--bg-shell);
    transform: translateX(100%);
    transition: transform 250ms var(--ease);
    overflow-y: auto;
  }
  .nav-links.is-open {
    transform: translateX(0);
  }
  .nav-links a {
    display: block;
    padding: 0.9rem 1.1rem;
    font-size: var(--fs-lead);
    background: var(--bg-card);
  }
}

@media (max-width: 420px) {
  .logo-name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
