/* Base reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #211a1a;
  color: #e5e5e5;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* Main content container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Header Section */
.header {
  margin-bottom: 3rem;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile {
  width: 80px;
  height: auto;
  border-radius: 16px;
  display: block;
}

.header-text h1 {
  font-family: 'Noto Serif', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}

.location {
  font-size: 0.95rem;
  color: #a3a3a3;
}

.bio {
  font-size: 1rem;
  color: #d4d4d4;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.nav-links a {
  color: #d6b614;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

/* Section Titles */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.25rem;
}

/* Project Cards */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.5rem 0;
}

.project-card a {
  text-decoration: none;
  color: #d6b614;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.project-card a:hover {
  color: #fff;
}

.line-separator {
  display: none;
}

.project-description {
  font-size: 0.95rem;
  color: #a3a3a3;
  line-height: 1.5;
}

/* Teaching Section */
.teaching-list {
  background-color: transparent;
  border: none;
  border-radius: 12px;
  padding: 0;
}

.teaching-list p {
  font-size: 0.95rem;
  color: #d4d4d4;
  line-height: 1.6;
  text-align: justify;
}

/* Now Page */
.now-content {
  background-color: transparent;
}

.now-content p {
  font-size: 0.95rem;
  color: #d4d4d4;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.now-content a {
  color: #d6b614;
  text-decoration: none;
  transition: color 0.2s ease;
}

.now-content a:hover {
  color: #fff;
}

.now-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.now-updated {
  font-size: 0.85rem;
  color: #a3a3a3;
  margin-top: 2rem;
  font-style: italic;
}

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid #5b5b5b;
  margin: 2rem 0;
}

/* Last Updated Footer */
.last-updated {
  font-size: 0.85rem;
  color: #a3a3a3;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #3a3a3a;
  text-align: center;
  font-style: italic;
}

/* Gallery Section */
.gallery-section {
  margin-top: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.photo-item:hover img {
  transform: scale(1.05);
}

.photo-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: #fff;
  padding: 1rem;
  font-size: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.photo-item:hover .photo-caption-overlay {
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90%;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-caption {
  color: #e5e5e5;
  font-size: 1rem;
  margin-top: 1rem;
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 0.7;
}

/* Blog Styles */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.blog-entry {
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 2rem;
}

.blog-entry:last-child {
  border-bottom: none;
}

.blog-title {
  font-family: 'Noto Serif', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.blog-title:hover {
  color: #d6b614;
}

.blog-date {
  font-size: 0.85rem;
  color: #a3a3a3;
  display: block;
  margin-bottom: 0.75rem;
}

.blog-excerpt {
  font-size: 0.95rem;
  color: #d4d4d4;
  line-height: 1.6;
}

/* Individual Blog Post */
.blog-post {
  margin-bottom: 3rem;
}

.blog-post-header {
  margin-bottom: 2rem;
}

.blog-post-title {
  font-family: 'Noto Serif', serif;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-post-date {
  font-size: 0.9rem;
  color: #a3a3a3;
  display: block;
}

.blog-post-content {
  font-size: 1rem;
  color: #d4d4d4;
  line-height: 1.8;
}

.blog-post-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
}

.blog-post-content blockquote {
  border-left: 3px solid #d6b614;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #e5e5e5;
}

.blog-post-content pre {
  background-color: #1a1a1a;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.blog-post-content code {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  color: #e5e5e5;
}

.blog-post-content a {
  color: #d6b614;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-post-content a:hover {
  color: #fff;
}

.blog-post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #2a2a2a;
}

.back-link {
  color: #d6b614;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #fff;
}

/* Responsive Design */
@media (max-width: 640px) {
  .container {
    padding: 3rem 1.5rem;
  }

  .profile-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-text h1 {
    font-size: 1.35rem;
  }

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

  .section-title {
    font-size: 1rem;
  }
}
