/*
  Minimal portfolio — Sudhanshu Gautam
  Nothing extra. Let the words do the work.
*/

:root {
  --text: #1a1a1a;
  --muted: #666;
  --faint: #999;
  --border: #e0e0e0;
  --bg: #fff;
  --link: #1a1a1a;
  --link-hover: #000;
  --accent: #1a1a1a;
  --surface: #f8f8f8;
  --font: Inter, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 640px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 24px;
}

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

/* ---- Links ---- */
a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

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

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  transform: translateY(-200%);
  transition: transform .15s ease;
  z-index: 999;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---- Nav ---- */
.site-nav {
  margin: 0 0 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}

.site-nav a:first-child {
  color: var(--text);
  font-weight: 600;
  margin-right: auto;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-sep {
  display: none;
}

/* ---- Main ---- */
main {
  min-height: 60vh;
}

/* ---- Homepage ---- */
.home {
  padding: 60px 0 80px;
}

.home p {
  margin: 0 0 24px;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--muted);
}

.home .home-greeting {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 32px;
}

.home a {
  color: var(--text);
  font-weight: 500;
}

/* ---- Footer ---- */
.site-footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  color: var(--faint);
  font-size: 13px;
  margin: 0;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-weight: 600;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; margin-top: 32px; }
h3 { font-size: 1.1rem; margin-top: 24px; }

p { margin: 0 0 16px; }

ul, ol { padding-left: 1.25rem; }
li { margin: 6px 0; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

code, pre {
  font-family: var(--mono);
  font-size: .9em;
}

pre {
  padding: 16px;
  background: var(--surface);
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border);
}

blockquote {
  margin: 20px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--border);
  color: var(--muted);
}

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

/* ---- Writing ---- */
.writing-simple,
.post,
.article {
  max-width: var(--container);
  margin: 0 auto;
}

.writing-simple h1 {
  margin-bottom: 40px;
}

.post-list-simple {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list-simple li {
  margin: 0 0 20px;
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.post-list-simple .post-date {
  color: var(--faint);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
}

.post-list-simple a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.post-list-simple a:hover {
  text-decoration: underline;
}

/* ---- Post ---- */
.post-hero {
  margin-bottom: 40px;
}

.post-hero h1 {
  margin-bottom: 8px;
}

.post-hero .post-date {
  color: var(--faint);
  font-size: 0.9rem;
}

.post-content {
  max-width: var(--container);
}

.back-link {
  display: inline-block;
  margin-top: 48px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--text);
}

/* ---- Case studies ---- */
.case-studies-page {
  padding-top: 0 !important;
}

.case-studies {
  margin-top: 0;
}

.page-intro {
  margin-bottom: 48px;
}

.intro-text {
  color: var(--muted);
  font-size: 1.05rem;
}

.case-studies-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.case-study-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.case-study-card:last-child {
  border-bottom: none;
}

.case-study-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--faint);
  margin-bottom: 8px;
}

.case-title {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 12px;
}

.case-role {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.role-label {
  font-weight: 600;
  margin-right: 8px;
}

.case-section {
  margin-bottom: 16px;
}

.case-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  margin-top: 16px;
  margin-bottom: 6px;
}

.case-section p {
  color: var(--muted);
}

.impact-list,
.responsibilities-list {
  padding-left: 1.2rem;
  color: var(--muted);
}

.case-links {
  margin-top: 12px;
}

.case-link {
  font-size: 0.9rem;
  margin-right: 16px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.case-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.case-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 12px;
}

.case-card h3 { margin-top: 0; }
.case-card p { color: var(--muted); }

/* ---- Cards ---- */
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

/* ---- Tables ---- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

thead th {
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
}

tbody td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  vertical-align: top;
}

/* ---- Forms ---- */
input, textarea, select { font: inherit; }

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .page-wrap {
    padding: 24px 20px;
  }

  body {
    font-size: 16px;
  }

  .site-nav {
    margin-bottom: 40px;
    gap: 14px;
    font-size: 14px;
  }

  .home {
    padding: 32px 0 48px;
  }

  .home .home-greeting {
    font-size: 1.3rem;
  }

  .home p {
    font-size: 1.05rem;
  }

  .case-grid {
    grid-template-columns: 1fr;
  }

  .post-list-simple li {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
  }

  .post-list-simple .post-date {
    font-size: 0.8rem;
    min-width: auto;
  }

  .post-hero h1 {
    font-size: 1.5rem;
  }
}
