/* =============================================================
   Vishnu Rajeev — Portfolio
   Design tokens + components. Values preserved from the original
   Claude Design export; only reorganized into reusable classes.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces */
  --bg: #f7f6f2;
  --surface: #f2f1ea;
  --header-bg: rgba(247, 246, 242, 0.82);

  /* Ink / text */
  --ink: #171613;
  --ink-2: #2c2a25;
  --muted: #55524a;
  --muted-2: #6b675c;
  --muted-3: #8a8578;
  --faint: #a8a396;

  /* Accent (user chose solid black) */
  --accent: #1a1a1a;

  /* Lines / borders */
  --line: #e6e4dc;
  --line-2: #ecebe3;
  --line-3: #e0ded5;
  --line-4: #dddbd2;
  --border-btn: #d8d5cb;

  /* Type */
  --font-sans: "Hanken Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --maxw: 1040px;
  --pad: 28px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, p { margin: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--ink); }

::selection { background: var(--accent); color: #fff; }

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

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.wrap { min-height: 100vh; }

.section {
  padding: 40px 0 92px;
  scroll-margin-top: 80px;
}
.section__head {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-bottom: 40px;
}
.section__head--between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.section__head--baseline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-3);
}
.section__index {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px var(--pad);
}
.brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-size: 15px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 14px;
  font-weight: 500;
}
.nav a { color: var(--muted); }
.nav a:hover,
.nav a[aria-current="true"] { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn--primary {
  padding: 13px 22px;
  font-size: 14.5px;
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { color: #fff; opacity: 0.88; }
.btn--ghost {
  padding: 13px 22px;
  font-size: 14.5px;
  background: transparent;
  color: var(--ink);
  border-color: var(--border-btn);
}
.btn--outline {
  padding: 10px 18px;
  font-size: 14px;
  background: transparent;
  color: var(--ink);
  border-color: var(--border-btn);
}
.btn--ghost:hover,
.btn--outline:hover { color: var(--ink); border-color: var(--ink); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 104px 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: center;
}
.hero__text {
  max-width: 780px;
}
.hero__media {
  justify-self: end;
}
.hero__photo {
  display: block;
  width: 300px;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 72px;
  }
  .hero__media {
    order: -1;
    justify-self: start;
  }
  .hero__photo {
    width: 168px;
    border-radius: 12px;
  }
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--border-btn);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 30px;
}
.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero__title {
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero__role {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2vw, 18px);
  letter-spacing: 0.01em;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero__stack {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
  margin-bottom: 34px;
}
.hero__lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  margin-bottom: 14px;
  max-width: 660px;
  text-wrap: pretty;
}
.hero__sub {
  font-size: 16px;
  color: var(--muted-2);
  margin-bottom: 36px;
  max-width: 640px;
  text-wrap: pretty;
}

/* ---------- About ---------- */
.about__text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 680px;
}
.about__text p {
  font-size: 16px;
  color: var(--muted);
  text-wrap: pretty;
}
.about__text p:first-of-type {
  font-size: 18px;
  color: var(--ink-2);
}

/* ---------- Experience ---------- */
.timeline { display: flex; flex-direction: column; }
.entry {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line-2);
}
.entry__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}
.entry__when {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
}
.entry__place {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}
.entry__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.entry__title { font-size: 19px; font-weight: 600; }
.entry__org {
  font-size: 14.5px;
  color: var(--accent);
  font-weight: 500;
}
.entry__org a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.18s ease;
}
.entry__org a:hover {
  color: inherit;
  text-decoration-color: var(--muted-3);
}
.entry__detail {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
  max-width: 660px;
  text-wrap: pretty;
}

/* Tag lists (reset ul) */
.tags {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  border: 1px solid var(--line-3);
  padding: 4px 9px;
  border-radius: 6px;
}

/* ---------- Selected work ---------- */
.work { display: flex; flex-direction: column; }
.project {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  padding: 40px 0;
  border-top: 1px solid var(--line-2);
  animation: fadeUp 0.5s ease both;
}
.project__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  padding-top: 8px;
}
.project__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.project__kind {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--faint);
}
.project__title {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.project__stack {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}
.project__para {
  font-size: 16px;
  color: var(--muted);
  max-width: 660px;
  text-wrap: pretty;
}
.project__features-label {
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 600;
  margin-top: 4px;
}
.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px 24px;
  max-width: 660px;
}
.feature {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.feature__mark { color: var(--accent); }
.project__note {
  font-size: 13.5px;
  font-style: italic;
  color: var(--muted-3);
  margin-top: 4px;
}
.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 600;
}
.link-arrow span { font-size: 16px; }

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px 40px;
}
.skill {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-2);
}
.skill__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}
.skill__items {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ---------- Education ---------- */
.edu { display: flex; flex-direction: column; }
.edu-entry {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line-2);
}
.edu-entry__when {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--faint);
  padding-top: 3px;
}
.edu-entry__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.edu-entry__degree { font-size: 18px; font-weight: 600; }
.edu-entry__school {
  font-size: 14.5px;
  color: var(--accent);
  font-weight: 500;
}
.edu-entry__school a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.18s ease;
}
.edu-entry__school a:hover {
  color: inherit;
  text-decoration-color: var(--muted-3);
}
.edu-entry__place { font-size: 13.5px; color: var(--muted-3); }
.edu-entry__detail {
  font-size: 15px;
  color: var(--muted);
  margin-top: 8px;
  max-width: 620px;
  text-wrap: pretty;
}

/* ---------- Footer / contact ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  scroll-margin-top: 80px;
}
.footer__inner { padding: 84px var(--pad); }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  align-items: start;
}
.footer__lead { max-width: 520px; }
.footer__title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 18px;
}
.footer__text {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
  text-wrap: pretty;
}
.footer__contact { font-style: normal; }
.footer__email {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.footer__email:hover { color: var(--ink); }
.footer__loc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--faint);
  margin-top: 20px;
}
.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-4);
  padding-bottom: 10px;
}
.footer__link:hover { color: var(--ink); }
.footer__link-handle {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
}
.footer__meta {
  margin-top: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

/* ---------- Motion ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .entry,
  .skill,
  .edu-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .entry__meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
}

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

/* ---------- Print ---------- */
@media print {
  .site-header,
  .skip-link,
  .actions,
  .footer__links { display: none; }
  body { background: #fff; color: #000; }
  .project { break-inside: avoid; }
}
