/* -----------------------------
   Base Styles
----------------------------- */

:root {
  --color-bg: #fdfdfd;
  --color-text: #222;
  --color-accent: #0077aa;
  --color-accent-hover: #d5d750;
  --color-border: #e0e0e0;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  overscroll-behavior: none; /* prevents scroll chaining */
  height: 100%;
  margin: 0;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-y: scroll;        /* always show scrollbar to avoid jump */
  -webkit-overflow-scrolling: auto; /* disables iOS bounce */
}

/* -----------------------------
   Layout
----------------------------- */

header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

nav {
  max-width: 720px; /* same as main content */
  margin: 0 auto;   /* center horizontally */
  padding: 0 1rem;  /* small horizontal padding */
  display: flex;
  justify-content: left;
  gap: 1.5rem;
}

nav a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--color-accent-hover);
}

main {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* -----------------------------
   Typography
----------------------------- */

h1, h2, h3 {
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* -----------------------------
   Footer
----------------------------- */

footer {
  text-align: center;
  border-top: 1px solid var(--color-border);
  padding: 1rem 1rem;
  color: #666;
  font-size: 0.9rem;
}

/* -----------------------------
   Lists / Sections
----------------------------- */

ul {
  list-style-type: none;
  padding-left: 0;
}

ul li {
  margin: 0.5rem 0;
}

a {
  color: var(--color-accent);
}

a:hover {
  color: var(--color-accent-hover);
}

.button {
  display: inline-block;
  padding: 0.5rem 0.5rem;
  background-color: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-bg)
}


/* -----------------------------
   Profile Pic
----------------------------- */
/* Desktop: image left, text right, stacked h1 above p */
.profile-intro {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.profile-pic {
  width: 340px;
  height: 340px;
  border-radius: 10%;
  object-fit: cover;
}

.profile-text {
  display: flex;
  flex-direction: column;
}

.profile-text h1 {
  margin: 0 0 1rem 0; /* spacing after heading */
}

.profile-text p {
  margin: 0 0 1rem 0; /* normal spacing */
}

/* Mobile: stack h1 -> image -> paragraphs */
@media (max-width: 642px) {
  .profile-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* or center for centered mobile */
  }

  .profile-pic {
    order: 2; /* image second */
    margin-bottom: 1rem;
    width: 100%;
  }

  .profile-text {
    order: 3; /* text container comes after image */
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .profile-text h1 {
    order: 1; /* heading first inside profile-text */
    margin-bottom: 1rem;
  }

  .profile-text p {
    order: 2; /* all paragraphs after header */
    margin-bottom: 1rem;
  }
}
