/*
 * Global stylesheet for the teaching portfolio site.
 *
 * The design borrows inspiration from the bright, cheerful look of the
 * example portfolio provided by the user. A palette of teal and coral
 * brightens the interface while neutral backgrounds keep text easy to
 * read. The layout is simple and responsive, relying on flexbox for
 * navigation and hero elements. Drop‑down menus appear on hover to
 * organise pages into categories without cluttering the top bar.
 */

/* Root variables define the colour palette. Should you wish to
 * customise the look later, adjust these values only.
 */
:root {
  --primary-colour: #008080;    /* teal for headings and nav bar */
  --accent-colour: #ff8c69;     /* coral for highlights */
  --background-colour: #fdfdfd; /* light background */
  --section-bg: #ffffff;        /* white panels */
  --text-colour: #333333;       /* dark grey for body text */
  --footer-bg: #f5f5f5;        /* light grey for footer */
  --link-hover: #006666;        /* darker teal on hover */
}

/* Base styles */
html, body {
  margin: 0;
  padding: 0;
  /* Use Times New Roman for body text to provide a classic academic feel. */
  font-family: 'Times New Roman', Times, serif;
  /* Apply a fun background pattern inspired by school supplies. The image
   * fills the viewport and stays fixed when scrolling. A neutral colour
   * variable remains available in case the image fails to load. */
  background-color: var(--background-colour);
  background-image: url('images/background.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-colour);
  line-height: 1.6;
}

/* Headings and the site logo use a more elegant serif font for added
 * personality. Georgia is widely available and pairs nicely with Times New
 * Roman body text. */
/*
 * Headings and the site logo use an elegant serif font distinct from the
 * body text. Palatino provides a classic, aesthetically pleasing look
 * that remains widely available across systems. Fallbacks ensure
 * compatibility on platforms where Palatino may not be installed. This
 * pairing with Times New Roman for body text creates visual hierarchy
 * while maintaining a scholarly feel.
 */
h1,
h2,
h3,
h4,
h5,
h6,
nav .logo {
  font-family: 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Navigation styles */
nav {
  background-color: var(--primary-colour);
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

nav ul li {
  position: relative;
  margin-left: 1rem;
}

nav ul li a {
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  display: block;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

nav ul li a:hover {
  background-color: var(--link-hover);
}

/* Drop‑down menus */
nav ul li .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--primary-colour);
  min-width: 200px;
  z-index: 1;
  border-radius: 0 0 4px 4px;
}

nav ul li:hover .dropdown-content {
  display: block;
}

nav ul li .dropdown-content a {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* Hero section */
.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  background-color: var(--section-bg);
}

.hero img {
  border-radius: 50%;
  width: 200px;
  height: 200px;
  object-fit: cover;
  margin-right: 2rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hero .hero-text {
  max-width: 600px;
}

.hero .hero-text h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.2rem;
  color: var(--primary-colour);
}

.hero .hero-text h2 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  color: var(--accent-colour);
}

.hero .hero-text p {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

/* Generic section */
.section {
  background-color: var(--section-bg);
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 8px;
  max-width: 900px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section h2 {
  margin-top: 0;
  color: var(--primary-colour);
  font-size: 1.8rem;
}

.section ul {
  padding-left: 1.2rem;
}

.section ul li {
  margin-bottom: 0.5rem;
}

/* Footnote styles */
.footnotes {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #555;
}
.footnotes a {
  color: var(--primary-colour);
  text-decoration: underline;
}

/* Decorative images placed at the top of sections. They span the width of
 * the section and carry a gentle shadow and rounded corners to stand out
 * against the patterned background. */
.section-image {
  width: 100%;
  /* Limit the height to prevent overly tall images; crop as needed to fill
   * the width without distortion. */
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: 4rem;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul li {
    margin-left: 0;
  }
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero img {
    margin: 0 0 1.5rem 0;
  }
  .hero .hero-text {
    margin: 0;
  }
}