@import url('https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: 'EB Garamond', serif;
  background: #E4E2DD;
  position: relative;
}

/* Grain overlay always fixed behind */
#grain-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: visible !important;
  pointer-events: none;
  z-index: 0;
}

#grain-overlay canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Page container above the grain */
#page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* SPA fade in/out for entire page content */
.page {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.page.fade-in {
  opacity: 1;
}

.page.fade-out {
  transition: opacity .8s ease;
}

/* Inner content wrapper */
.container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 20px;
}

.projects-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  font-size: 40px;
  color: #333;
  margin-bottom: 20px;
  transition: opacity 1s ease;
}

h1 a {
  font-size: inherit;
  text-decoration: none;
  color: inherit;
}

h1 * {
  font-size: inherit;
}

.hidden {
  opacity: 0;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

a {
  font-size: 24px;
  color: #363737;
  text-decoration: underline;
  transition: color 0.3s ease;
  cursor: pointer;
}

a:hover {
  color: #EE4023;
}

.last-updated {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 16px;
  color: #363737;
  z-index: 2;
}

.contact-link {
  position: fixed;
  bottom: 50px;
  left: 20px;
  font-size: 24px;
  color: #363737;
  text-decoration: underline;
  transition: color 0.3s ease;
  z-index: 2;
}

.contact-link:hover {
  color: #EE4023;
}

.linkedin-link {
  position: fixed;
  bottom: 20px;
  left: 20px;
  font-size: 24px;
  color: #363737;
  text-decoration: underline;
  transition: color 0.3s ease;
  z-index: 2;
}

.linkedin-link:hover {
  color: #EE4023;
}

.work-content p {
  font-size: 24px;
  line-height: 1.5;
  color: #363737;
  margin-bottom: 20px;
}

.project-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.project-block.reverse {
  flex-direction: row-reverse;
}

.project-text {
  flex: 1;
  max-width: 500px;
  text-align: left;
}

.project-text h2 {
  font-size: 28px;
  margin-bottom: 8x;
}

.project-text p {
  font-size: 20px;
  line-height: 1.6;
  color: #363737;
}

.project-image {
  flex: 1;
  max-width: 400px;
}

.project-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;  /* Expand effect */
}

.project-image img:hover {
  transform: scale(1.05);
}

.about-text {
  font-size: 20px;
  line-height: 1.6;
  color: #363737;
  max-width: 600px;
  margin: 20px auto;
}

.lately-heading {
  font-size: 30px;
  margin: 40px 0 20px;
  color: #333;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 20px;
}

.project-date {
  font-style: italic;
  font-size: 16px;
  color: #aaa;
  margin: 0px 0 16px;
  display: block;
}
