/* ================================
   CSS RESET
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ================================
   GLOBAL STYLES
================================ */
@font-face {
  font-family: 'Press Start 2P';
  src: url('PressStart2P-Regular.ttf') format('truetype');
  font-display: swap;
}

body {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.6;
  background-color: #005050;
  color: yellow;
  padding-top: 80px;
}

h1, h2, h3 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: yellow;
}

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
  padding-left: 0;
  padding-right: 0;
}

/* ================================
   REUSABLE SECTIONS / CONTAINERS
================================ */
.scroll-section {
  background: #002222;
  border: 1px solid red;
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem auto;
  width: 90%;
  max-width: 1000px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.scroll-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-section:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(255, 0, 0, 0.4);
  border: 1px solid yellow;
}

/* ================================
   NAVIGATION BAR
================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(0, 90, 90, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid yellow;
  color: yellow;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nav-brand {
  font-weight: bold;
  font-size: 1.25rem;
  color: yellow;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links li a {
  color: yellow;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: red;
  transition: width 0.3s ease;
}

.nav-links li a:hover {
  transform: scale(1.05);
  color: yellow;
}
.nav-links li a:hover::after {
  width: 100%;
}

/* ================================
   PROJECT HOVER EFFECT (Original)
================================ */
.project:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
  transition: all 0.3s ease;
}

/* ================================
   CONTACT FORM STYLING
================================ */
.styled-form input,
.styled-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid yellow;
  border-radius: 8px;
  background-color: #003636;
  color: yellow;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.styled-form input::placeholder,
.styled-form textarea::placeholder {
  color: rgba(255, 255, 0, 0.6);
}

.styled-form input:focus,
.styled-form textarea:focus {
  outline: none;
  background-color: #004f4f;
  box-shadow: 0 0 0 2px red;
}

/* ================================
   CALL TO ACTION BUTTON
================================ */
.cta-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: yellow;
  color: darkcyan;
  font-weight: bold;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #ffe100;
}

/* ================================
   SCROLLBAR STYLING
================================ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #002b2b;
}
::-webkit-scrollbar-thumb {
  background-color: yellow;
  border-radius: 10px;
}

/* ================================
   RANDOM QUOTES BLOCK
================================ */
#random-thought {
  opacity: 1;
  transition: opacity 1s ease-in-out;
  color: yellow;
}

.fade-out {
  opacity: 0;
}

/* ================================
   PROJECT GRID & PROJECT CARDS
================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-items: center;
  margin-top: 2rem;
}

.project-card {
  background: rgba(0, 79, 79, 0.5);
  border: 1px solid red;
  border-radius: 20px;
  padding: 1.5rem;
  width: 100%;
  max-width: 350px;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

.project-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
  max-height: 250px; /* 🛠️ LIMIT how tall images can be */
  object-fit: cover; /* 🛠️ crops nicely without squashing */
}

.project-card h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: yellow;
}

.project-card p {
  margin-bottom: 1rem;
  color: yellow;
}

/* ================================
   REUSED FOR JOURNAL EDITOR
================================ */
.journal-editor input,
.journal-editor textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid yellow;
  border-radius: 8px;
  background-color: #003636;
  color: yellow;
  font-size: 1rem;
  font-family: 'Press Start 2P', monospace;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.journal-editor input::placeholder,
.journal-editor textarea::placeholder {
  color: rgba(255, 255, 0, 0.6);
}

.journal-editor input:focus,
.journal-editor textarea:focus {
  outline: none;
  background-color: #004f4f;
  box-shadow: 0 0 0 2px red;
}

/* ================================
   JOURNAL TAG DISPLAY
================================ */
.entry-tag {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.25rem 0.5rem;
  background-color: rgba(255, 255, 0, 0.15);
  color: yellow;
  border: 1px solid yellow;
  border-radius: 6px;
  font-size: 0.7rem;
}

/* ================================
   JOURNAL SECTION LAYOUT
================================ */
.journal-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

details summary {
  cursor: pointer;
  color: red;
  margin-top: 1rem;
  font-size: 0.85rem;
}

details p {
  margin-top: 0.5rem;
  color: yellow;
  line-height: 1.6;
  white-space: pre-wrap;
}


/* ================================
   RESPONSIVE DESIGN
================================ */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem;
  }

  .nav-brand {
    width: 100%;
    text-align: center;
  }

  .nav-links {
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
  }

  .nav-links a {
    padding: 0.75rem 0.75rem;
    width: 100%;
    display: block;
    border-radius: 8px;
  }

  .nav-links a:hover {
    background-color: rgba(0, 79, 79, 0.4);
  }

  img {
    max-width: 300px;
  }
}

/* ================================
   MODAL STYLING
================================ */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7); /* Slight dark background */
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: darkcyan;
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid red;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  color: yellow;
  text-align: center;
  box-shadow: 0 0 20px red;
  font-family: 'Press Start 2P', monospace;
}

.close-button {
  color: yellow;
  float: right;
  font-size: 2rem;
  cursor: pointer;
}

.close-button:hover {
  color: red;
}

.modal-timeline {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.version-block {
  border: 1px solid yellow;
  border-radius: 12px;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
}

.version-block img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

#journal-lock {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid red;
  border-radius: 12px;
  z-index: 10;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  color: yellow;
  box-shadow: 0 0 15px red;
}

#journal-lock input[type="password"] {
  width: 80%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid yellow;
  border-radius: 8px;
  background-color: #003636;
  color: yellow;
  font-family: 'Press Start 2P', monospace;
  text-align: center;
  font-size: 0.85rem;
}

#journal-lock input[type="password"]::placeholder {
  color: rgba(255, 255, 0, 0.5);
}

#journal-lock button {
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  font-family: 'Press Start 2P', monospace;
  background-color: yellow;
  color: darkcyan;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#journal-lock button:hover {
  background-color: #ffe100;
}
