/* ==========================================================================
   BASE STYLES
   ========================================================================== */

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: white;
  color: #000;
}

h1,
h2 {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
}

h2 {
  font-weight: 300;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px;
  border-bottom: 1px solid #000;
  min-height: 20px;
}

.logo a,
.menu a {
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  color: black;
  font-weight: bold;
  font-size: 24px;
}

.menu a:hover {
  color: black;
}

/* ==========================================================================
   SNAIL ANIMATION
   ========================================================================== */

.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  overflow: visible;
}

.snail-container {
  position: relative;
  top: 22px;
  width: 100%;
  pointer-events: none;
}

.snail {
  position: absolute;
  width: 40px;
  height: auto;
  animation: snail-loop 200s linear infinite;
  pointer-events: auto;
}

.snail:hover {
  animation-play-state: paused;
}

@keyframes snail-loop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(100vw - 40px));
  }
}

/* ==========================================================================
   LAYOUT WRAPPERS
   ========================================================================== */

.wrapper {
  padding: 0px;
  box-sizing: border-box;
}

.main {
  min-height: calc(100vh - 200px);
}

.divider {
  height: 1px;
  background: black;
  margin: 1rem 0;
}

/* ==========================================================================
   FILTER BAR (ARCHIVE PAGE)
   ========================================================================== */

.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
}

.filter-section {
  position: fixed;
  top: var(--header-height, 60px);
  left: 0;
  right: 0;
  z-index: 99;
  background: white;
  border-bottom: 1px solid black;
}

.main-content-area {
  padding-top: var(--fixed-elements-height, 120px);
}

.filter-bar {
  display: flex;
  overflow: hidden;
  position: relative;
  padding: 0;
  background: white;
  width: 100%;
}

.filter-bar ul {
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
  white-space: nowrap;
  animation: scroll-left 50s linear infinite;
}

.filter-bar ul li {
  flex-shrink: 0;
}

.filter-bar li {
  flex: 0 0 auto;
}

.filter-bar a {
  display: inline-block;
  padding: 0;
  text-decoration: none;
  color: #999;
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.filter-bar a:hover {
  color: #000;
}

.filter-bar a.active {
  color: #000;
  font-weight: bold;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   PROJECT PAGE 
   ========================================================================== */

.project-page-title {
  font-size: 34px;
  padding: 30px;
  font-family: "Times New Roman", Times, serif;
}

.project-top-bar {
  padding: 0px;

  background: linear-gradient(90deg, #fff, #fff, #fff, #eee, #fff, #fff, #fff);
  background-size: 400% 100%;
  animation: gradient-slide 20s linear infinite;

  border-bottom: 1px solid #000;
}

@keyframes gradient-slide {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

.project-back-link {
  font-size: 14px;
  color: #666;
  text-decoration: none;
}

.project-back-link:hover {
  color: #000;
}

.project-content-wrapper {
  padding: 0px;
  margin-top: 0px;
}

.project-info-section {
  margin-bottom: 2px;
  padding: 20px;
  border-bottom: 1px solid #333;
}

.project-info-section:last-of-type {
  border-bottom: none;
}

.project-info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2px;
}

.project-info-label {
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  padding: 5px;
}

.project-info-value {
  color: #333;
  font-size: 14px;
  padding: 5px;
}

.project-image {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
}

.project-image-caption {
  margin-top: 0.5rem;
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.project-image-caption a {
  color: #999;
}

.content-block--image img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

@media (max-width: 768px) {
  .project-page-title {
    font-size: 20px;
  }

  .project-content-wrapper {
    padding: 0;
  }

  .project-info-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .project-info-label {
    font-size: 12px;
  }

  .project-info-value {
    font-size: 14px;
  }
}

/* ==========================================================================
   PROJECT GRID (ARCHIVE PAGE)
   ========================================================================== */

.p-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
  margin: 0 auto;
  list-style: none;
}

.p-item {
  flex: 0 0 280px;
}

.p-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.p-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0;
}

.p-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.p-figure figcaption {
  text-align: center;
  font-size: 14px;
  padding-top: 10px;
  color: #000;
  line-height: 1.2;
}

.no-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f5f5f5;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.8rem;
}

/* ==========================================================================
   CONTENT BLOCKS
   ========================================================================== */

.content-blocks {
  margin: 0;
}

.content-block {
  margin-bottom: 0;
}

/* Text Block */
.content-block--text {
  font-size: 22px;
  color: #333;
  font-family: "Times New Roman", Times, serif;
  padding-left: 20px;
  padding-right: 20px;
  line-height: 33px;
}

.content-block--text p {
  margin-bottom: 20px;
}

.content-block--text h2,
.content-block--text h3 {
  margin-top: 0;
  margin-bottom: 0;
  color: #222;
}

/* Image Block */

.block-image {
  width: 100%;
  height: auto;
  cursor: pointer;
}

.block-caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* Gallery Block */
.content-block--gallery {
  margin: 0px;
}

.gallery-grid {
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.gallery-item {
  margin: 20px;
}

.gallery-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0 auto;
  align-content: center;
}

.gallery-caption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

/* Video Block */
.content-block--video {
  text-align: center;
  margin: 0;
  padding: 20px;
}

.block-video {
  width: 100%;
  height: auto;
  align-content: center;
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-page {
  padding: 0;
}

.page-header {
  margin-bottom: 3rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  margin: 0;
}

.about-content {
  margin: 0px auto;
  padding: 20px;
}

.about-content section {
  margin-bottom: 3rem;
  padding: 1rem;
}

.about-content h2 {
  font-size: 16px;
  margin-bottom: 1rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
  text-decoration: none;
  font-weight: 300;
}

.bio-text {
  line-height: 1.6;
  font-size: 19px;
  color:#666;
  font-family: "Times New Roman", Times, serif;
}

.bio-text p {
  margin-bottom: 1rem;
}

.cv-category {
  margin-bottom: 1rem;
}

.cv-category h3 {
  font-size: 16px;
  margin-bottom: 0.5rem;
  color: #333;
}

.cv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
  color:#333;
  line-height: 1.2;
  font-family: "Times New Roman", Times, serif;
  tr:nth-child(odd) {
    background-color: #f9f9f9;
  }
  tr:nth-child(even) {
    background-color: #ffffff;
  }
}

.contact a {
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #333;
  font-size: 14px;
}

.contact a:hover {
  color: #666;
  border-color: #666;
}


/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
  .p-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
  }
  .about-content {
    margin: 0px auto;
    padding: 10px;
  }
}

@media (max-width: 768px) {
  .logo a,
.menu a {
  font-size: 20px;
}

  .about-page {
    padding: 10px;
  }

  .bio-text {
    font-size: 17px;
  }
  .cv-table {
    font-size: 15px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .links-list {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .p-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-image {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .p-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-image {
    height: 250px;
  }

  .content-block--text {
    font-size: 16px;
  }
}
