/* Base layout */
/* Global dark theme base */
body {
  margin: 0;
  font-family: 'Lora', serif;
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.6;
}

/* Headings */
h1, h2, h3 {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

h1 {
  font-size: 2rem;
  margin-top: 1rem;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
}

/* Top navbar */
.site-header {
  background-color: #1e1e1e;
  border-bottom: 1px solid #333;
}

.header-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

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

.top-nav a {
  color: #fffff0;
  text-decoration: none;
  font-weight: bold;
}

.top-nav a:hover {
  color: #fff;
}

/* Main content area */
.site-main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-main h1 {
  margin-top: 0;
  font-size: 2rem;
  color: #fff;
}

figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.5rem auto;
  max-width: 100%;
}

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

figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #aaa;
  font-style: italic;
  text-align: center;
  line-height: 1.4;
}


.image-row {
  display: flex;
  flex-wrap: wrap; /* Allows wrapping to the next line */
  gap: 1rem;        /* Optional: space between images */
  justify-content: flex-start;
}

.image-row img {
  max-width: 100%;   /* Prevents overflow */
  height: auto;      /* Keeps aspect ratio */
  flex: 1 1 200px;   /* Responsive sizing */
}

/* Project grid layout */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Individual project cards */
.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  text-decoration: none;
  color: white;
  background: #1a1a1a;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
}

.project-card .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.75);
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 0rem;
}

.project-card:hover img {
  opacity: 0.15;
}

.project-card:hover .overlay {
  opacity: 1;
}

.project-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

/* Two-column layout inside main */
.main-body {
  display: flex;
  flex-direction: row;
  gap: 10rem;
  align-items: flex-start;
}

/* Max width container for page content */
.main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* Left text column */
.main-text {
  flex: 3;
  max-width: 400px;
}

/* Right grid column */
.main-grid {
  flex: 2;
}

/* Responsive stack on smaller screens */
@media (max-width: 800px) {
  .main-body {
    flex-direction: column;
  }

  .main-text,
  .main-grid {
    max-width: 100%;
  }
}

/*  Contact form */
form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
}

textarea {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  resize: vertical;
  background-color: #1e1e1e;
  color: #e0e0e0;
  font-family: 'Lora', serif;
}

button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background-color: #ffd479;
  color: #121212;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  align-self: flex-start;
}

button:hover {
  background-color: #fff3b0;
}

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

a:visited {
  color: grey;
}

a:hover {
  color: lightgrey;
  text-decoration: underline;
}

a:active {
  color: darkgrey;
}