/**
 * FAAIZA MUNIR - AUTHOR WEBSITE
 * Base Typography & Layout Foundations
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-reading);
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Playful text selection accent using secondary coral/pink */
::selection {
  background-color: var(--color-accent-sec);
  color: #FFFFFF;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  max-width: 65ch;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease);
}

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

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  position: relative;
}

/* Thin Structural Rule */
.editorial-rule {
  border: none;
  border-top: 1px solid var(--border-rule);
  margin: 0;
}

.editorial-rule--dark {
  border-top-color: var(--border-rule-dark);
}

/* Screenreader Accessibility */
.sr-only {
  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;
  top: -100px;
  left: 20px;
  background: var(--color-pink);
  color: #fff;
  padding: 10px 18px;
  z-index: 9999;
  font-weight: 600;
  transition: top var(--duration-fast) var(--ease);
}

.skip-link:focus {
  top: 20px;
}
