/* ==========================================================================
   1. GLOBAL RESETS & THEME CONFIGURATION
   ========================================================================== */
:root {
  --bg-color: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --accent-color: #3498db;
  --accent-hover: #2980b9;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --border-radius: 12px;
  --max-content-width: 550px;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

html {
  /* Reserves a permanent visual space for the scrollbar track on all pages, 
     preventing any horizontal layout shifting when moving between short and long content */
  scrollbar-gutter: stable; 
}



/* ==========================================================================
   2. PINNED FIXED NAVIGATION HEADER
   ========================================================================== */
.fixed-top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-color);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px 15px 20px;
  /* Added a tight border separator to ground the pinned layout */
  border-bottom: 1px solid #262626; 
}

/* Navigation Menu Array */
.simple-menu {
  display: flex;
  list-style: none;
  gap: 25px;
  margin-bottom: 20px;
}

.menu-item a {
  color: #777777;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color var(--transition-speed) ease;
}

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

/* Primary Website Brand Title */
.main-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

/* ==========================================================================
   3. SCROLLING MAIN CONTENT SECTION
   ========================================================================== */
.scroll-content-container {
  display: flex;
  justify-content: center;
  width: 100%;
  /* Perfectly uniform top buffer so content scrolls out safely from behind the navbar */
  padding-top: 220px; 
  padding-bottom: 80px;
  padding-left: 20px;
  padding-right: 20px;
}

.content-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* Forces inner elements to space cleanly to full container widths */
  text-align: left;     /* Keeps secondary page content text properly aligned left */
  max-width: var(--max-content-width);
  width: 100%;
}

/* Base Typographic Hierarchies for Content Pages */
h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  text-align: center;
}

p, .description-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: left;
}

/* Scoped Override: Centers description text only on the home page index */
#body-home .description-text {
  text-align: center;
}

/* ==========================================================================
   4. INLINE PARAGRAPH LINKS & MENUS
   ========================================================================== */
p a, .description-text a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  transition: color 0.2s ease, opacity 0.2s ease;
}

p a:hover, .description-text a:hover {
  color: var(--accent-hover);
  text-decoration: none;
  opacity: 0.9;
}

.link-list {
  list-style: none;
  padding: 0;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-list li a {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-list li a:hover {
  transform: translateX(5px);
  color: var(--accent-color);
  text-decoration: underline;
}

/* ==========================================================================
   5. VISUAL GRAPHICS FRAMEWORK
   ========================================================================== */
.image-wrapper {
  width: 90%; /* Spans full container width evenly for perfect margins */
  max-width: var(--max-content-width);
  margin: 0 auto 30px auto;
  border-radius: var(--border-radius);
  overflow: hidden;
 /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); */
}

.responsive-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.center-image {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto 30px auto;
}

/* ==========================================================================
   6. EMBEDDED CONTACT FORM
   ========================================================================== */
.embedded-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 30px 0;
  background-color: #222222;
  padding: 30px;
  border-radius: var(--border-radius);
  border: 1px solid #2d2d2d;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.form-input, 
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background-color: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus, 
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.form-textarea {
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--accent-color);
  color: var(--text-primary);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 5px;
}

.submit-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(1px);
}

/* ==========================================================================
   7. FLUID MOBILE ADAPTABILITY
   ========================================================================== */
@media (max-width: 600px) {
  .fixed-top-header {
    padding: 20px 15px 12px 15px;
  }
  
  .main-title {
    font-size: 2.2rem;
  }
  
  .simple-menu {
    gap: 15px;
    margin-bottom: 15px;
  }
  
  .scroll-content-container {
    padding-top: 175px; /* Compresses top gap safely on mobile viewports */
    padding-bottom: 40px;
  }

  h2 {
    font-size: 1.6rem;
  }

  p, .description-text {
    font-size: 1rem;
  }
  
  .embedded-contact-form {
    padding: 20px;
  }
}

/* ==========================================================================
   8. AUTOMATED ACTIVE PAGE MENU HIGHLIGHTING
   ========================================================================== */
/* When the unique ID on the <body> matches the class name of the menu item, 
   the active page link transforms to highlight exactly where the user is browsing */
#body-home .menu-home,
#body-about .menu-about,
#body-essays .menu-essays,
#body-contact .menu-contact {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 2px;
}
