/* ============================================================
   Sooraj Arakkal — portfolio
   Strictly minimal: white, black, one gray, hairlines.
   One typeface: Inter. All tokens below.
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --ink: #111111;
  --gray: #6B6B6B;
  --line: #EAEAEA;

  --font: "Inter", system-ui, -apple-system, sans-serif;

  --content: 44rem;   /* 704px reading column */
  --wide: 58rem;      /* project grid */
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #EFEFEF; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- layout ---------- */
.wrap { max-width: var(--content); margin: 0 auto; padding: 0 1.25rem; }
.wrap--wide { max-width: var(--wide); }

section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: none; }

/* small uppercase section labels */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  display: block;
  margin-bottom: 1.75rem;
}

h2 {
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin: -1.35rem 0 2.25rem;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}
.brand {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  font-size: 0.9rem;
  color: var(--gray);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 6rem 0 5rem; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 1.5rem;
}
.hero p { max-width: 34rem; color: var(--gray); }
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.25rem;
}
.hero-links a {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  transition: border-color 0.15s;
}
.hero-links a:hover { border-color: var(--ink); }

/* ---------- experience timeline ---------- */
.timeline { list-style: none; }
.timeline li {
  position: relative;
  padding: 0 0 2.75rem 2rem;
  border-left: 1px solid var(--line);
}
.timeline li:last-child { padding-bottom: 0.25rem; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.timeline .when {
  font-size: 0.78rem;
  color: var(--gray);
  letter-spacing: 0.02em;
}
.timeline h3 {
  font-weight: 600;
  font-size: 1.08rem;
  margin: 0.3rem 0 0.05rem;
}
.timeline .org { font-size: 0.95rem; color: var(--gray); margin-bottom: 0.6rem; }
.timeline .org a { color: inherit; text-decoration: none; }
.timeline .org a:hover { text-decoration: underline; }
.timeline ul { list-style: none; }
.timeline ul li {
  border: none;
  padding: 0 0 0.35rem 1.1rem;
  position: relative;
  font-size: 0.95rem;
}
.timeline ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  color: var(--gray);
}

/* ---------- skills ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips span {
  font-size: 0.82rem;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

/* ---------- projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}
.project-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.4rem 1.4rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s;
}
.project-card:hover { border-color: var(--ink); }
.project-card h3 {
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
}
.project-card p { font-size: 0.92rem; color: var(--gray); margin-bottom: 1rem; }
.project-card .tags {
  font-size: 0.75rem;
  color: var(--gray);
  letter-spacing: 0.03em;
}

/* ---------- writing list ---------- */
.post-list { list-style: none; }
.post-list li {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.post-list li:first-child { border-top: 1px solid var(--line); }
.post-list .date {
  font-size: 0.78rem;
  color: var(--gray);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.post-list a { font-weight: 500; text-decoration: none; }
.post-list a:hover { text-decoration: underline; }

/* ---------- contact / footer ---------- */
.contact p { max-width: 34rem; color: var(--gray); }
.contact .hero-links { margin-top: 1.75rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--gray);
}

/* ---------- blog post pages ---------- */
.post { padding: 4rem 0 5rem; border: none; }
.post header { margin-bottom: 2.5rem; }
.post h1 {
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0.85rem 0 0.6rem;
}
.post .meta { font-size: 0.82rem; color: var(--gray); }
.post h2 { font-size: 1.3rem; margin: 2.5rem 0 1rem; }
.post p { margin-bottom: 1.1rem; }
.post figure { margin: 1.75rem 0; }
.post img { max-width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.post figcaption { font-size: 0.8rem; color: var(--gray); margin-top: 0.5rem; }
.post .dark-bg-image img { background: #1e1e23; padding: 1.5rem; }
.post pre {
  background: #F6F6F6;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.post code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85em; }
.post p code, .post li code {
  background: #F6F6F6;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.back-link { font-size: 0.85rem; color: var(--gray); text-decoration: none; }
.back-link:hover { color: var(--ink); }

/* ---------- small screens ---------- */
@media (max-width: 40rem) {
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: 0.82rem; }
  .hero { padding: 4.5rem 0 3.5rem; }
  section { padding: 3.25rem 0; }
  .post-list li { flex-direction: column; gap: 0.15rem; }
}

/* ---------- fancy nav: sliding pill + scroll progress ---------- */
.site-nav { position: relative; align-items: center; }
.site-nav a {
  position: relative;
  z-index: 1;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}
.site-nav a.active { color: var(--ink); }
.nav-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #F2F2F2;
  border-radius: 999px;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.3, 0.9, 0.3, 1), width 0.25s cubic-bezier(0.3, 0.9, 0.3, 1), opacity 0.2s;
  pointer-events: none;
}
.nav-pill.visible { opacity: 1; }

.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--ink);
  transition: width 0.1s linear;
}

@media (max-width: 40rem) {
  .site-nav a { padding: 0.3rem 0.5rem; }
}

/* ---------- accent color (nav) ----------
   One variable controls all the color on the site. */
:root {
  --accent: #2B50EE;        /* cobalt */
  --accent-soft: #EBEFFE;   /* pill tint */
}

.nav-pill { background: var(--accent-soft); }
.site-nav a.active { color: var(--accent); }
.site-nav a:hover { color: var(--accent); }
.scroll-progress { background: var(--accent); }
.brand:hover { color: var(--accent); }

/* echo the accent on interactive edges, body stays black & white */
a:hover { text-decoration-color: var(--accent); }
.hero-links a:hover { border-color: var(--accent); color: var(--accent); }
.project-card:hover { border-color: var(--accent); }
:focus-visible { outline-color: var(--accent); }
