/* Base variables defining light and dark colour schemes */
:root {
  /* Use a softer off‑white background to make the light mode easier on the eyes */
  --bg-colour: #f5f7fa;
  --text-colour: #2d3748;
  --accent-colour: #4caf50;
  --card-bg: #ffffff;
  --button-bg: #4caf50;
  --button-text: #ffffff;
}

[data-theme="dark"] {
  --bg-colour: #121212;
  --text-colour: #f0f0f0;
  --accent-colour: #8bc34a;
  --card-bg: #1e1e1e;
  --button-bg: #8bc34a;
  --button-text: #121212;
}

/* Global styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-colour);
  color: var(--text-colour);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 1rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

header button#themeToggle {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-colour);
  transition: transform 0.2s ease;
}

header button#themeToggle:hover {
  transform: rotate(20deg);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
}

.hero {
  text-align: center;
  margin-top: 2rem;
}

.profile-img {
  /* Limit the size of the photo so it doesn't take over the entire page */
  width: 100%;
  max-width: 400px;
  height: auto;
  /* Do not limit height so the whole portrait can be displayed */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
  filter: saturate(1.1);
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.fun-section {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  text-align: center;
  width: 100%;
  max-width: 600px;
}

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

.fun-section button {
  background-color: var(--button-bg);
  color: var(--button-text);
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.fun-section button:hover {
  background-color: var(--accent-colour);
}

.excuse-output {
  font-style: italic;
  margin-top: 1rem;
  min-height: 2rem;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: var(--card-bg);
  color: var(--text-colour);
  font-size: 0.9rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}