/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base */
html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  color: #fff;
  background: url("Wood.jpg") no-repeat center center fixed;
  background-size: cover;
}

.overlay {
  background-color: rgba(0, 0, 0, 0.6);
  min-height: 100vh;
  padding: 100px 20px 40px; /* Extra top padding for fixed navbar */
}

/* Wrapper for centered content */
.content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
nav ul {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  background-color: rgba(0, 0, 0, 0.85);
  padding: 10px 0;
  flex-wrap: wrap;
  margin: 0;
}

nav a {
  color: #ffd700;
  font-weight: bold;
  text-decoration: none;
  padding: 8px 12px;
  display: block;
}

nav a:hover {
  text-decoration: underline;
  background: rgba(255, 215, 0, 0.2);
  border-radius: 4px;
}

/* Active link highlight */
nav a[aria-current="page"] {
  border-bottom: 2px solid #ffd700;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0, 0, 0, 0.9);
  min-width: 180px;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  z-index: 1000;
}

.dropdown-content li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-content li:last-child {
  border-bottom: none;
}

.dropdown-content a {
  padding: 10px;
  color: #ffd700;
}

.dropdown-content a:hover {
  background: rgba(255, 215, 0, 0.2);
}

/* Show dropdown on hover/focus */
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  display: block;
}

/* Header */
header h1 {
  font-size: 3em;
  text-align: center;
  margin-bottom: 20px;
}

/* Main */
main {
  font-size: 1.2em;
  line-height: 1.6;
}

main section {
  margin-bottom: 40px;
}

main h2 {
  margin-bottom: 16px;
}

main p,
main ul {
  margin-bottom: 20px;
}

/* Image in bio */
figure {
  text-align: center;
  margin-bottom: 20px;
}

figure img {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9em;
  color: #ccc;
}

/* About Page Specific */
.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.about-image img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.about-text {
  max-width: 600px;
  font-size: 1.1em;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    max-width: 90%;
  }
}

/* Assignment list */
.assignment-list {
  list-style: none;
  padding: 0;
  margin: 20px auto;
  max-width: 400px;
  text-align: left;
}

.assignment-list li {
  margin: 10px 0;
}

.assignment-list a {
  display: block;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #ffd700;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease;
}

.assignment-list a:hover {
  background: rgba(255, 215, 0, 0.3);
}

/* Link Fixes */
a,
a:visited {
  color: #ffd700;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #ffe680;
  text-decoration: underline;
}

a:active {
  color: #ffcc00;
}

/* Two-column layout for assignments page */
.two-column {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.column {
  flex: 1 1 45%;
  min-width: 280px;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Responsive for mobile */
@media (max-width: 768px) {
  .two-column {
    flex-direction: column;
  }

  .column {
    width: 100%;
  }
}

/* Page Header - Assignments */
.assignments-header {
  text-align: center;
  margin-bottom: 40px;
}

.assignments-header .subheading {
  font-size: 1.1em;
  color: #ddd;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Two-column layout for assignments page */
.two-column {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.column {
  flex: 1 1 45%;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.column h2 {
  margin-bottom: 20px;
}

.assignment-list {
  width: 100%;
  max-width: 400px;
}

.assignment-list li:last-child {
  margin-bottom: 0;
}

/* Responsive for mobile */
@media (max-width: 768px) {
  .two-column {
    flex-direction: column;
  }

  .column {
    width: 100%;
    align-items: center;
  }

  .assignment-list {
    max-width: 90%;
  }
}

/* === Home Page Grid Layout === */
.homepage-grid {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 30px;
}

.grid-column {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (max-width: 768px) {
  .homepage-grid {
    flex-direction: column;
  }

  .grid-column {
    width: 100%;
  }
}

/* Accessibility skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  outline: 2px solid;
  display: inline-block;
  background: #fff;
} /* Contact form on About Me page */
  /* Form input/textarea/select styling */
#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm input[type="date"],
#contactForm select,
#contactForm textarea {
  width: 250px;
  padding: 6px 10px;
  font-size: 14px;
  margin-bottom: 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Label styling */
#contactForm label {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
}

/* Textarea size */
#contactForm textarea {
  height: 80px;
  resize: vertical;
}

/* Submit + Edit + Send Email buttons */
#contactForm button,
.confirmation-container button {
  padding: 8px 14px;
  font-size: 14px;
  margin-right: 8px;
  margin-top: 10px;
  border: none;
  border-radius: 4px;
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
}

#contactForm button:hover,
.confirmation-container button:hover {
  background-color: #45a049;
}

/* Confirmation section */
.confirmation-container {
  margin-top: 20px;
}

.confirmation-container h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.confirmation-container ul {
  list-style-type: none;
  padding: 0;
}

.confirmation-container li {
  margin-bottom: 6px;
}

/* Error messages */
.error {
  font-size: 12px;
  color: #ff4d4d;
  margin-top: 2px;
  margin-bottom: 8px;
}
