/* -------------------------------------------------------
   Beetle Rodeo – full stylesheet
   Implements centered header, custom font, link colors,
   and modern layout best practices
------------------------------------------------------- */

/* Custom font */
@font-face {
  font-family: FriendlyScribbles;
  src: url(/assets/friendlyscribbles.ttf);
  font-display: swap;
}

/* Variables */
:root {
  --link-before: #85bb4c;
  --link-after: #5d8335;
  --bg-primary: #85bb4c;
  --overlay: rgba(46, 58, 37, 0.35);
  --brown-700: #7e4209;
  --border-accent: #b86314;
  --cta: #564e0b;
}

/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: #ffffff;
  font-family: FriendlyScribbles, Courier, monospace;
  line-height: 1.3;
  background-image: url('/assets/grass-tile.png');
  background-repeat: repeat;
  background-size: auto;
  background-color: var(--bg-primary);
}

/* Global links */
a {
  color: var(--link-before);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover,
a:focus-visible {
  color: var(--link-after);
  outline: none;
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Optional content wrapper */
main {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  background: rgba(46, 58, 37, 0.55);
  border: 4px ridge var(--border-accent);
  box-shadow: 4px 4px 0 var(--border-accent);
}

/* ---------------------------
   Header
--------------------------- */

.header {
  width: 100%;
  background-color: var(--brown-700);
}

.inner-header {
  width: 75%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;           /* vertical centering */
  justify-content: space-between;
  padding: 12px 0;
  background-color: var(--overlay);
  gap: 24px;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 60px;               /* keeps a balanced size inside the header */
  width: auto;                /* preserves aspect ratio */
  display: block;             /* removes inline whitespace */
  object-fit: contain;        /* ensures the full image fits */
  padding-left: 5px;          /* slight spacing from the left edge */
}

.logo-container a {
  color: #ffffff;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

/* Navigation (matches current HTML where <a> wraps <li>) */
.navigation-list {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 25px;
  list-style: none;
}

/* Make the anchors the nav items */
.navigation-list > a {
  display: flex;
  align-items: center;           /* centers the text vertically */
  padding: 8px 0;
  color: var(--link-before);
  font-size: 1.1rem;
}

/* Keep the li presentational since it is wrapped by <a> */
.navigation-list > a > li {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Hover and focus for nav links */
.navigation-list > a:hover,
.navigation-list > a:focus-visible {
  color: var(--link-after);
}

/* Responsive header */
@media (max-width: 600px) {
  .inner-header {
    flex-direction: column;
    align-items: center;
    padding: 12px;
    gap: 12px;
  }

  .navigation-list {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ---------------------------
   Page heading block
--------------------------- */

.page-header {
  text-align: center;
  background: rgba(86, 78, 11, 0.75);
  border-bottom: 4px ridge var(--border-accent);
  padding: 10px;
}

.page-header h1 {
  margin: 0;
  font-size: 2.5rem;
  text-shadow: 1px 1px #000000;
}

/* ---------------------------
   Foreground center image
--------------------------- */

.foreground {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 8px ridge var(--border-accent);
  object-fit: scale-down;
  max-width: 70vw;
  height: auto;
  display: block;
}

/* ---------------------------
   Project section
--------------------------- */

.project-section {
  margin-top: 30px;
}

.project-section h2 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--border-accent);
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.project-intro {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

.feature-list {
  list-style: square inside;
  margin: 10px 0 20px;
  padding: 0;
}

.feature-list li {
  margin-bottom: 8px;
}

/* ---------------------------
   Screenshots
--------------------------- */

.screenshot-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.screenshot {
  flex: 1 1 200px;
  border: 4px ridge var(--border-accent);
  background: #181a1b;
  padding: 5px;
  text-align: center;
}

.screenshot img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}

.screenshot figcaption {
  margin-top: 5px;
  font-size: 0.9rem;
}

/* ---------------------------
   Buttons
--------------------------- */

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  text-decoration: none;
  color: #ffffff;
  background: var(--cta);
  border: 2px solid var(--border-accent);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--border-accent);
  transition: background 0.2s ease-in-out;
}

.btn:hover,
.btn:focus-visible {
  background: #85780f;
  outline: none;
}

.project-cta {
  text-align: center;
  margin-bottom: 30px;
}

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

.site-footer {
  text-align: center;
  padding: 15px;
  background: #f0e68c;
  border-top: 4px ridge var(--border-accent);
  font-size: 0.9rem;
}

/* ---------------------------
   Responsive tweaks
--------------------------- */

@media (max-width: 600px) {
  .page-header h1 {
    font-size: 2rem;
  }
  .project-section h2 {
    font-size: 1.5rem;
  }
  .btn {
    width: 100%;
  }
}
