/* Background lives on html, not body */
html {
  min-height: 100vh;
  background: linear-gradient(180deg, #000000 0%, #02101f 25%, #03284a 65%, #064c86 100%);
  background-color: #000;        /* fallback to prevent white flash */
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;  /* keeps gradient smooth on scroll */
  overscroll-behavior: contain;  /* prevents iOS white flash bounce */
}

/* Body layout */
body {
  min-height: 100vh;
  color: #e5e7eb;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  text-align: left;
  display: flex;
  align-items: flex-start;       /* align to top */
  justify-content: center;
  padding: 24px 24px 48px 24px;  /* tighter top padding */
  animation: fadein 1s ease;
  background: transparent;
}

/* iOS safe-area handling */
@supports (padding: max(0px)) {
  body {
    padding-top: max(8px, env(safe-area-inset-top) + 4px);
  }
}

/* Mobile layout: allow scrolling and reduce spacing */
@media (max-width: 768px) {
  html, body {
    display: block;
    padding: 8px 16px 40px 16px; /* smaller top padding */
  }

  .wrap {
    padding: 16px 16px 24px 16px; /* reduce top padding on mobile */
  }
}

/* Fade-in animation */
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Main container */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 32px 24px; /* reduced top padding */
}

/* Headings */
h1 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 16px;
  color: #fff;
  text-align: left;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 64px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  color: #f3f4f6;
  text-align: left;
}

/* Paragraphs and text */
.bio {
  font-size: 17px;
  color: #cbd5e1;
  margin-bottom: 24px;
  line-height: 1.7;
}

.links {
  margin-bottom: 48px;
  color: #94a3b8;
  font-size: 16px;
  text-align: left;
}

/* Hyperlinks */
a, a:visited {
  color: #f97316 !important; /* orange */
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border 0.2s ease, color 0.2s ease, text-shadow 0.3s ease;
}

a:hover {
  border-bottom: 1px solid #f97316;
  color: #f97316;
  text-shadow: 0 0 8px rgba(249,115,22,0.5);
}

/* Essay list */
ul.essay-list {
  list-style: none;
  padding-left: 0;
  margin-top: 8px;
  text-align: left;
}

ul.essay-list li {
  margin-bottom: 12px;
  padding-left: 16px;     /* subtle indent */
  text-indent: -8px;      /* keeps link visually aligned */
  position: relative;
}

ul.essay-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: #f97316;
  font-weight: 600;
}

@media (max-width: 480px) {
  ul.essay-list li {
    padding-left: 12px;
    text-indent: -6px;
  }
}

ul.essay-list a {
  font-size: 18px;
  color: #e5e7eb;
  border-bottom: 1px solid transparent;
}

ul.essay-list a:hover {
  border-color: #f97316;
  color: #f97316;
  text-shadow: 0 0 6px rgba(249,115,22,0.5);
}

/* Remove accidental top margin from first element */
.wrap > :first-child { margin-top: 0; }

/* Footer */
footer {
  margin-top: 48px;
  color: #64748b;
  font-size: 14px;
  text-align: left;
} 