/* ============================================================
   Anna's Blog — Professional Pastel Edition v3
   Fonts: DM Serif Display (headings) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── Design Tokens ── */
:root {
  --rose:           #e8b4c0;
  --rose-soft:      #f5dfe5;
  --rose-deep:      #b5546a;
  --lilac:          #c9bfe0;
  --lilac-soft:     #edeaf7;
  --lilac-deep:     #6b5b9e;
  --sage:           #bdd4c8;
  --cream:          #faf7f4;
  --cream-mid:      #f0ebe4;
  --cream-border:   #e4ddd5;
  --text-primary:   #2c2438;
  --text-secondary: #5c5068;
  --text-muted:     #8a7f96;
  --text-on-dark:   #faf7f4;
  --surface:        #ffffff;
  --surface-tint:   rgba(255,255,255,0.88);

  --space-xs:  0.375rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3.5rem;

  --text-xs:   0.8rem;
  --text-sm:   0.925rem;
  --text-base: 1.0625rem;
  --text-lg:   1.2rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 4px rgba(44,36,56,0.07);
  --shadow-md: 0 4px 16px rgba(44,36,56,0.10);
  --shadow-lg: 0 8px 32px rgba(44,36,56,0.13);

  --focus-ring: 0 0 0 3px rgba(107,91,158,0.45);
  --transition: 0.2s ease;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--cream);
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(232,180,192,0.15) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(201,191,224,0.15) 0%, transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ── Skip Link ── */
.skip-to-main {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--lilac-deep);
  color: var(--text-on-dark);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  z-index: 9999;
  transition: top var(--transition);
  text-decoration: none;
}
.skip-to-main:focus { top: 1rem; }

/* ── Focus ── */
:focus-visible { outline: 2px solid var(--lilac-deep); outline-offset: 3px; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.9rem, 4vw, var(--text-3xl)); }
h2 { font-size: clamp(1.4rem, 3vw, var(--text-2xl)); }
h3 { font-size: clamp(1.1rem, 2.5vw, var(--text-xl)); }
h4 { font-size: var(--text-lg); }

p {
  margin-bottom: 1.1rem;
  color: var(--text-secondary);
  max-width: 68ch;
}

a {
  color: #6b5b9e; /* meets WCAG AA contrast ratio */
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition);
}
a:hover { color: var(--rose-deep); }

strong { font-weight: 600; color: var(--text-primary); }
em     { font-style: italic; }

/* ════════════════════════════════════════
   NAVIGATION — Responsive Hamburger
   ════════════════════════════════════════ */
nav {
  background: var(--surface-tint);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--cream-border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(228,221,213,0.8), 0 2px 12px rgba(44,36,56,0.05);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-brand:hover { color: var(--lilac-deep); }

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  line-height: 1;
}
.nav-toggle:hover  { background: var(--rose-soft); color: var(--rose-deep); }
.nav-toggle:focus-visible { outline: 2px solid var(--lilac-deep); outline-offset: 2px; }

.nav-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Nav links */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

nav ul li a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  display: inline-block;
}
nav ul li a:hover {
  background: var(--rose-soft);
  color: var(--rose-deep);
}
nav ul li a.active,
nav ul li a[aria-current="page"] {
  background: linear-gradient(135deg, var(--rose-soft), var(--lilac-soft));
  color: var(--lilac-deep);
  font-weight: 600;
}

/* ════════════════════════════════════════
   HEADER — Left aligned
   ════════════════════════════════════════ */
header {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--cream-border);
    background: linear-gradient(160deg, var(--rose-soft) 0%, var(--cream) 55%, var(--lilac-soft) 100%);
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

header p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 50ch;
  margin: 0;
}

/* ── Page Layout ── */
#content {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  animation: fadeUp 0.45s ease forwards;
}

main { max-width: 720px; }

/* ════════════════════════════════════════
   BLOG LIST — Bubbly & fun cards
   ════════════════════════════════════════ */
ul {
  list-style: none;
  display: grid;
  gap: 1.1rem;
}

ul li,
.blog-list li {
  list-style: none;
  background: var(--surface);
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow var(--transition),
    border-color var(--transition),
    background var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Bubbly colour accent strip */
ul li::before,
.blog-list li::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rose), var(--lilac), var(--sage));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  opacity: 0;
  transition: opacity var(--transition);
}

ul li:hover,
.blog-list li:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 12px 36px rgba(107,91,158,0.16);
  border-color: var(--lilac);
  background: linear-gradient(150deg, #fff 60%, var(--lilac-soft) 100%);
}

ul li:hover::before,
.blog-list li:hover::before {
  opacity: 1;
}

ul li a,
.blog-list li a {
  font-family: 'DM Serif Display', serif;
  font-size: var(--text-xl);
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  margin-bottom: var(--space-xs);
  transition: color var(--transition);
}
ul li a:hover,
.blog-list li a:hover { color: var(--lilac-deep); }

ul li p,
.blog-list li p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
  max-width: none;
}
ul li p:last-child,
.blog-list li p:last-child {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 0;
}

/* "Read more" arrow that appears on hover */
ul li a::after,
.blog-list li a::after {
  content: ' →';
  opacity: 0;
  font-style: normal;
  transition: opacity var(--transition), transform var(--transition);
  display: inline-block;
}
ul li:hover a::after,
.blog-list li:hover a::after {
  opacity: 1;
  transform: translateX(4px);
}

/* ── Blog Post ── */
article h1, main > h1 {
  font-size: clamp(1.8rem, 4vw, var(--text-3xl));
  margin-bottom: var(--space-md);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--cream-border);
}

.post-meta span {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--cream-mid);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  border: 1px solid var(--cream-border);
  letter-spacing: 0.02em;
}

article p, main > p { max-width: 68ch; line-height: 1.85; }

article h2, main > h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--cream-border);
}

article h3, main > h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.875em;
  background: var(--lilac-soft);
  color: var(--lilac-deep);
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--lilac);
}

pre {
  background: #1e1828;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: var(--space-lg) 0;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(201,191,224,0.15);
}

pre code {
  background: none;
  color: #e2d9f3;
  border: none;
  padding: 0;
  font-size: var(--text-sm);
  line-height: 1.75;
}

blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--rose);
  background: var(--rose-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}
blockquote p { margin-bottom: 0; max-width: none; }

hr {
  border: none;
  border-top: 1px solid var(--cream-border);
  margin: var(--space-xl) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-border);
}
thead { background: linear-gradient(135deg, var(--rose-soft), var(--lilac-soft)); }
th {
  padding: 0.75rem 1.1rem;
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  border-bottom: 1px solid var(--cream-border);
}
td {
  padding: 0.75rem 1.1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--cream-border);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--cream-mid); }

/* Prose lists */
article ul, article ol, main ul, main ol {
  padding-left: 1.5rem;
  margin-bottom: var(--space-md);
}
article ul li, article ol li, main ul li, main ol li {
  list-style: revert;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0.2rem 0;
  margin-bottom: 0;
  box-shadow: none;
  transform: none !important;
  color: var(--text-secondary);
  cursor: default;
}
article ul li::before, article ol li::before,
main ul li::before, main ol li::before { display: none; }
article ul li:hover, article ol li:hover,
main ul li:hover, main ol li:hover {
  transform: none !important;
  box-shadow: none;
  border-color: transparent;
  background: none;
}
article ul li a, main ul li a {
  font-family: 'DM Sans', sans-serif;
  font-size: inherit;
  color: var(--lilac-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline;
  margin-bottom: 0;
}
article ul li a::after, main ul li a::after { display: none !important; }

/* ── Contact Form ── */
.contact-wrapper { max-width: 580px; }

form {
  background: var(--surface);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

fieldset { border: none; padding: 0; margin: 0; }

legend {
  font-family: 'DM Serif Display', serif;
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.form-group { margin-bottom: var(--space-md); }

label {
  display: block;
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--cream);
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input[type="text"]:hover,
input[type="email"]:hover,
textarea:hover { border-color: var(--lilac); }
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--lilac-deep);
  background: var(--surface);
  box-shadow: var(--focus-ring);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--rose-deep);
  box-shadow: 0 0 0 3px rgba(181,84,106,0.2);
}
textarea { min-height: 150px; resize: vertical; line-height: 1.7; }

input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-md);
  background: var(--lilac-deep);
  color: var(--text-on-dark);
  border: 2px solid transparent;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-md);
}
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--rose-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
input[type="submit"]:active,
button[type="submit"]:active { transform: translateY(0); }

/* ════════════════════════════════════════
   FOOTER — Left aligned
   ════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--cream-border);
  padding: var(--space-lg) var(--space-lg);
  text-align: left;
  background: var(--surface-tint);
  backdrop-filter: blur(8px);
}

footer p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0;
  max-width: none;
}

footer a { color: var(--lilac-deep); font-weight: 500; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 7px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--lilac); border-radius: 50px; }
::-webkit-scrollbar-thumb:hover { background: var(--lilac-deep); }

/* ── Selection ── */
::selection { background: var(--rose-soft); color: var(--rose-deep); }

/* ── High Contrast ── */
@media (forced-colors: active) {
  nav ul li a.active, input[type="submit"] { border: 2px solid ButtonText; }
}

/* ── Print ── */
@media print {
  nav, footer, .skip-to-main { display: none; }
  body { background: white; color: black; font-size: 12pt; }
  a { color: black; text-decoration: underline; }
}

/* ════════════════════════════════════════
   RESPONSIVE NAVIGATION (Hamburger)
   ════════════════════════════════════════ */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  nav ul {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    padding: 0.75rem var(--space-lg) 1rem;
    border-top: 1px solid var(--cream-border);
    background: var(--surface-tint);
    backdrop-filter: blur(20px);
  }

  /* JS toggle — add class "open" to nav to show menu */
  nav.open ul { display: flex; }

  nav ul li { width: 100%; }

  nav ul li a {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    text-align: left;
  }

  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0.6rem var(--space-lg);
  }
}

/* ── Responsive general ── */
@media (max-width: 768px) {
  :root {
    --space-lg: 1.5rem;
    --space-xl: 2.25rem;
  }

  #content { padding: var(--space-lg) 1rem; }

  header { padding: var(--space-lg) 1rem; }

  form { padding: var(--space-lg); }

  table {
    font-size: var(--text-xs);
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  pre { font-size: 0.8rem; padding: var(--space-md); }

  ul li, .blog-list li { padding: var(--space-md) 1.25rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  input[type="submit"],
  button[type="submit"] { width: 100%; justify-content: center; }

  footer { padding: var(--space-md) 1rem; }
}
.header-right i {
    font-size: 3.5rem;
    color: rgb(44, 43, 43);
    opacity: 0.85;
}
.validation {
    color: #b5546a;
    font-weight: 700;
    font-size: 0.85rem;
}