/* ==========================================================================
   P.S. Kesavan - Academic Style
   Clean, classic, readable
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@400;600&display=swap');

:root {
  /* Typography */
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Colors - Classic Academic */
  --bg-color: #fefefe;
  --bg-secondary: #f8f8f8;
  --text-color: #333;
  --text-light: #555;
  --text-muted: #777;
  --accent-color: #1a4a6e;
  --link-color: #1a5a8a;
  --link-hover: #0d3a5a;
  --border-color: #ddd;
  --border-light: #eee;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  /* Layout */
  --max-width: 720px;
  --header-height: 50px;
}

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  background: var(--bg-color);
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-color);
  margin-top: 0;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: var(--space-xs);
}

h2 {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
  color: var(--accent-color);
}

h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

p {
  margin: 0 0 var(--space-sm) 0;
}

strong {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
a {
  color: var(--link-color);
  text-decoration: none;
}

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

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */
ul, ol {
  margin: 0 0 var(--space-sm) 0;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.4em;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--header-height) + var(--space-lg)) var(--space-md) var(--space-xl);
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.text-muted {
  color: var(--text-muted);
}

.text-small {
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .content {
    padding: calc(var(--header-height) + var(--space-md)) var(--space-sm) var(--space-lg);
  }

  h1 {
    font-size: 1.5rem;
  }
}
