/* ==========================================================================
   dipakwani.com — v3
   Minimal dark, typographic layout inspired by the Figma "resume" template.
   ========================================================================== */

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #ababab;
  --dim: #6e6e6e;
  --line: #383838;
  --line-soft: #222;
  --surface: #0d0d0d;
  --accent: #fff;

  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-xl: 20px;   /* header / footer display */
  --fs-md: 15px;   /* body */
  --fs-sm: 11px;   /* labels */
  --lh: 1.35;

  --pad-x: 20px;
  --max: 1440px;
}

@media (min-width: 800px) {
  :root { --fs-xl: 22px; --fs-sm: 12px; --pad-x: 30px; }
}
@media (min-width: 1200px) {
  :root { --fs-xl: 24px; }
}
@media (min-width: 1280px) {
  :root { --fs-md: 16px; --lh: 1.4; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh);
  letter-spacing: -0.01em;
}

::selection { background: #fff; color: #000; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
ul, ol { padding: 0; list-style: none; }

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

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 0.85em; letter-spacing: 0; }

.skip-link {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: #000; color: #fff; border: 1px solid #fff; padding: 12px 16px;
  border-radius: 12px; opacity: 0; pointer-events: none; z-index: 100;
}
.skip-link:focus { opacity: 1; pointer-events: auto; }

/* Arrow links ------------------------------------------------------------ */
.arrow { display: inline-block; transition: transform .2s ease; }
a:hover .arrow { transform: translate(2px, -2px); }

.link {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .25s ease, color .2s ease;
}
.link:hover { background-size: 100% 1px; }

.link-muted { color: var(--muted); transition: color .2s ease; }
.link-muted:hover { color: var(--fg); }

/* Shell ------------------------------------------------------------------ */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--pad-x) 10px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 96px;
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
@media (min-width: 1280px) { .site-header { padding-bottom: 160px; } }

.site-header .brand .role { color: var(--muted); font-weight: 400; }

.site-nav { display: flex; gap: 0.2em 0.9em; flex-wrap: wrap; }
.site-nav a { color: var(--muted); transition: color .2s ease; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--fg); }

main { flex: 1 0 auto; }

/* Two-column layout (sticky About on the left) ---------------------------- */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 368px) minmax(0, 1fr);
    gap: 20px;
  }
  .layout > .aside {
    position: sticky;
    top: 20px;
    align-self: start;
    padding-right: 20px;
  }
}

.aside { padding-bottom: 60px; }
.aside .bio { max-width: 420px; }
.aside .bio p + p { margin-top: 1em; }

.contact-list { margin-top: 37px; display: flex; flex-direction: column; gap: 2px; }
.contact-list a { color: var(--muted); }
.contact-list a:hover { color: var(--fg); }

/* Sections --------------------------------------------------------------- */
.section {
  border-top: 1px solid var(--line);
  padding: 30px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 37px;
}
.section:last-child { padding-bottom: 120px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.label {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.001em;
  line-height: 1.3;
}
.label .count { color: var(--dim); font-weight: 400; margin-left: 6px; }

.label-link { font-size: var(--fs-sm); color: var(--muted); }
.label-link:hover { color: var(--fg); }

/* Entries (projects / experience-style rows) ----------------------------- */
.entries { display: flex; flex-direction: column; gap: 48px; }

.entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 800px) {
  .entry { grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); gap: 37px; }
}

.entry-meta { display: flex; flex-direction: column; gap: 2px; }
.entry-title { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--fg); }
.entry-title a:hover { color: var(--muted); }
.entry-sub { color: var(--muted); }
.entry-links { display: flex; gap: 14px; margin-top: 10px; font-size: var(--fs-sm); }
.entry-links a { color: var(--muted); }
.entry-links a:hover { color: var(--fg); }

.entry-body { display: flex; flex-direction: column; gap: 12px; }
.entry-body p { max-width: 62ch; }

.bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
  max-width: 62ch;
}
.bullets li::before {
  content: "\2022";
  position: absolute;
  left: 4px;
  color: var(--muted);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  line-height: 1.5;
  transition: color .2s, border-color .2s;
}
a.tag:hover { color: var(--fg); border-color: var(--muted); }

.status {
  display: inline-flex; align-items: center; gap: 6px;
}
.status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #3ddc84; box-shadow: 0 0 8px rgba(61, 220, 132, .6);
}
.status[data-status="WIP"]::before,
.status[data-status="Experiment"]::before { background: #f5b942; box-shadow: 0 0 8px rgba(245, 185, 66, .5); }
.status[data-status="Archived"]::before { background: var(--dim); box-shadow: none; }

/* Writing list ----------------------------------------------------------- */
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.post-row:first-child { padding-top: 0; }
.post-row .post-row-title { font-weight: 600; transition: color .2s; }
.post-row:hover .post-row-title { color: var(--muted); }
.post-row .post-row-desc { grid-column: 1 / -1; color: var(--muted); max-width: 70ch; }
.post-row .post-row-meta { color: var(--dim); font-family: var(--mono); font-size: 12px; letter-spacing: 0; white-space: nowrap; }

.year-group { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 800px) {
  .year-group { grid-template-columns: 120px minmax(0, 1fr); gap: 37px; }
}
.year-group + .year-group { margin-top: 24px; }
.year-group .year { color: var(--muted); font-family: var(--mono); font-size: 13px; letter-spacing: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.filters button:hover { color: var(--fg); border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.empty-note { color: var(--dim); }

/* Grid of small columns (e.g. Now / Focus) ------------------------------- */
.columns { display: flex; flex-wrap: wrap; gap: 30px; }
.columns > * { flex: 1 0 0; min-width: 220px; display: flex; flex-direction: column; gap: 12px; }
.columns h3 { font-size: 15px; }

/* Article ---------------------------------------------------------------- */
.article-header { display: flex; flex-direction: column; gap: 14px; padding-bottom: 40px; }
.article-header h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.article-header .lede { color: var(--muted); font-size: 18px; max-width: 60ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; align-items: center; }

.prose {
  font-size: 17px;
  line-height: 1.65;
  max-width: 68ch;
  color: #e9e9e9;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--fg); line-height: 1.25; letter-spacing: -0.01em; margin-top: 2.2em; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 19px; }
.prose h4 { font-size: 17px; }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--fg); }
.prose strong { color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--dim); }
.prose blockquote {
  border-left: 2px solid var(--line);
  padding-left: 1em;
  color: var(--muted);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose img { border-radius: 6px; margin: 1.6em 0; }
.prose figcaption { color: var(--dim); font-size: 13px; margin-top: .5em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { color: var(--fg); }

.prose code {
  font-family: var(--mono);
  font-size: .85em;
  background: #161616;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: .1em .35em;
  letter-spacing: 0;
}
.prose pre {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  letter-spacing: 0;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* Rouge — minimal dark theme */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: #6e6e6e; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kt, .highlight .nt { color: #c792ea; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc { color: #a5d6a7; }
.highlight .m, .highlight .mi, .highlight .mf { color: #f78c6c; }
.highlight .nf, .highlight .fm, .highlight .nc { color: #82aaff; }
.highlight .o, .highlight .p { color: #b0b0b0; }
.highlight .na, .highlight .nb { color: #ffcb6b; }

.article-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.share { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.share a, .share button { color: var(--muted); font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.share a:hover, .share button:hover { color: var(--fg); }

/* Newsletter (restyles the existing include) ------------------------------ */
.newsletter-form h3 { font-size: 15px; margin-bottom: 4px; }
.newsletter-form h5 { font-size: 15px; font-weight: 400; color: var(--muted); margin: 0 0 16px; }
.newsletter-form form { display: flex; gap: 8px; flex-wrap: wrap; max-width: 460px; }
.newsletter-form input[type="email"] {
  flex: 1 1 220px;
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
}
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--muted); }
.newsletter-form button {
  font: inherit;
  font-weight: 600;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
}
.newsletter-form button:hover { opacity: .85; }

/* Footer ----------------------------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.site-footer .cta { font-size: var(--fs-xl); font-weight: 600; line-height: 1.3; }
.site-footer .cta a:hover { color: var(--muted); }
.site-footer .fine { font-size: var(--fs-sm); color: var(--dim); display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer .fine a:hover { color: var(--fg); }

/* Motion ----------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: reveal .6s cubic-bezier(.2, .7, .2, 1) both; }
  .reveal:nth-child(2) { animation-delay: .06s; }
  .reveal:nth-child(3) { animation-delay: .12s; }
  .reveal:nth-child(4) { animation-delay: .18s; }
  @keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
