/* ==========================================================================
   Minimalist Zen Portfolio Stylesheet
   Inspired by premium magazine layouts and Japanese minimalist design
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --font-sans: 'Outfit', 'Noto Sans Thai', sans-serif;
  --font-serif: 'Cormorant Garamond', 'Noto Sans Thai', serif;
  
  /* Color Palette */
  --bg-light-start: #F9F9F6;
  --bg-light-end: #EAEAEA;
  --bg-dark: #0A0A0A;
  --bg-dark-card: rgba(255, 255, 255, 0.05);
  
  --text-dark: #0A0A0A;
  --text-light: #F9F9F6;
  --text-muted-dark: #555555;
  --text-muted-light: #AAAAAA;
  
  --accent-yellow: #EAA82C;
  --accent-blue: #3A86C8;
  
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-shadow: rgba(0, 0, 0, 0.03);
  
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-light-start);
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: linear-gradient(180deg, var(--bg-light-start) 0%, var(--bg-light-end) 100%);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

blockquote {
  border-left: none;
  padding: 0;
  margin: 0;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  outline: none;
}

/* --- Helper Utilities --- */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
}

.text-center {
  text-align: center;
}

.serif-text {
  font-family: var(--font-serif);
}

.bold-text {
  font-weight: 800;
}

.font-light {
  font-weight: 300;
}

.section-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 40px;
}

/* --- Header & Navigation --- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(249, 249, 246, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  color: var(--text-dark);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-item {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted-dark);
  position: relative;
  padding: 4px 0;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text-dark);
  transition: var(--transition-fast);
}

.nav-item:hover, .nav-item.active {
  color: var(--text-dark);
}

.nav-item.active::after, .nav-item:hover::after {
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #28a745;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

.lang-toggle {
  padding: 6px 10px;
  border: 1px solid var(--text-dark);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.lang-toggle:hover {
  background-color: var(--text-dark);
  color: var(--bg-light-start);
}

/* --- Hero Section --- */
.hero-section {
  padding-top: 140px;
  min-height: 95vh;
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 80px;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.intro-eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: var(--text-muted-dark);
  font-weight: 600;
}

.hero-headline {
  font-size: 5.5rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-headline .serif-text {
  font-size: 5rem;
  font-style: italic;
}

.hero-intro {
  font-size: 1.05rem;
  color: var(--text-muted-dark);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-quote {
  border-left: 2px solid var(--accent-yellow);
  padding-left: 24px;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-quote p {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-style: italic;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.hero-quote cite {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: normal;
  color: var(--text-muted-dark);
}

.social-links-container {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
}

.social-pill {
  width: 42px;
  height: 42px;
  border: 1px solid var(--text-muted-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.social-pill:hover {
  background-color: var(--text-dark);
  color: var(--bg-light-start);
  border-color: var(--text-dark);
  transform: translateY(-3px);
}

.hero-stats {
  display: flex;
  gap: 48px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 32px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted-dark);
}

/* Hero Showcase Card (Right Column) */
.hero-showcase {
  display: flex;
  justify-content: center;
  position: relative;
}

.showcase-card {
  position: relative;
  background-color: var(--accent-yellow);
  width: 100%;
  max-width: 440px;
  aspect-ratio: 3 / 4;
  border-radius: 40px;
  padding: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: var(--transition-smooth);
}

.showcase-card:hover {
  transform: translateY(-8px);
}

.showcase-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: var(--transition-smooth);
}

.showcase-card:hover .showcase-img {
  scale: 1.03;
}

/* Overlay gradient inside card */
.showcase-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
  z-index: 2;
  pointer-events: none;
}

.badge-globe {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 50%;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 3;
}

.showcase-signature {
  position: relative;
  z-index: 3;
  color: var(--text-light);
  margin-bottom: 12px;
}

.sig-name {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-style: italic;
  line-height: 1;
}

.sig-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted-light);
}

.showcase-mini-thumbs {
  position: absolute;
  left: 24px;
  bottom: 110px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3;
}

.mini-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mini-thumb.active {
  border-color: var(--accent-yellow);
  transform: scale(1.1);
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-arrow-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  background-color: var(--text-light);
  color: var(--text-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 3;
  transition: var(--transition-smooth);
}

.showcase-arrow-btn:hover {
  background-color: var(--text-dark);
  color: var(--text-light);
  transform: rotate(360deg);
}

/* --- Section: About Me (Dark Section with Dicut Layered Layout) --- */
.about-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

/* Marquee scrolling text */
.marquee-wrapper {
  position: absolute;
  top: 10%;
  left: 0;
  width: 100%;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
  opacity: 0.04;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 25s linear infinite;
}

.marquee-content span {
  font-size: 10rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 2rem;
}

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

.about-container {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Center Stage: Dicut portrait with geometric backdrop */
.profile-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 480px;
}

/* Slat/Pillar Sunburst pattern behind the portrait */
.pillar-pattern {
  position: absolute;
  width: 320px;
  height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pillar {
  position: absolute;
  width: 16px;
  height: 240px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  transform-origin: center bottom;
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

/* Fan positioning for pillars */
.pillar:nth-child(1) { transform: rotate(-45deg) translateY(-80px); }
.pillar:nth-child(2) { transform: rotate(-30deg) translateY(-80px); }
.pillar:nth-child(3) { transform: rotate(-15deg) translateY(-80px); }
.pillar:nth-child(4) { transform: rotate(0deg) translateY(-80px); }
.pillar:nth-child(5) { transform: rotate(15deg) translateY(-80px); }
.pillar:nth-child(6) { transform: rotate(30deg) translateY(-80px); }
.pillar:nth-child(7) { transform: rotate(45deg) translateY(-80px); }

.profile-img-container {
  position: relative;
  z-index: 2;
  width: 260px;
  height: 360px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: var(--transition-smooth);
}

.profile-stage:hover .profile-img-container {
  transform: translateY(-8px) scale(1.02);
}

.profile-dicut-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
}

.about-details {
  display: flex;
  flex-direction: column;
}

.about-details .section-title {
  margin-bottom: 20px;
}

.about-bio {
  font-size: 1.1rem;
  color: var(--text-muted-light);
  line-height: 1.8;
  margin-bottom: 32px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  padding: 8px 18px;
  background-color: var(--bg-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.skill-tag:hover {
  background-color: var(--text-light);
  color: var(--bg-dark);
  border-color: var(--text-light);
}

/* --- Section 1: Journey (Timeline) --- */
.journey-section {
  background: var(--bg-light-start);
  padding: 120px 0;
}

.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 60px auto 0 auto;
  padding: 20px 0;
}

/* The vertical thin timeline line */
.timeline-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item.active {
  opacity: 1;
  transform: translateY(0);
}

/* Odd/Even layout for timelines */
.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

/* Dot on line */
.timeline-dot {
  position: absolute;
  top: 28px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-dark);
  z-index: 2;
  transition: var(--transition-smooth);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -5px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -5px;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.6);
  background-color: var(--accent-yellow);
  box-shadow: 0 0 10px rgba(234, 168, 44, 0.6);
}

.timeline-date {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.timeline-content {
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  background-color: rgba(255, 255, 255, 0.85);
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-muted-dark);
  line-height: 1.6;
}

/* --- Section 2: Competition History --- */
.competitions-section {
  padding: 120px 0;
  background: var(--bg-light-end);
}

.comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 60px;
}

.comp-card {
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  transition: var(--transition-smooth);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.comp-card:hover {
  transform: translateY(-6px);
  background-color: #FFFFFF;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
}

.comp-badge-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: #FFF;
  transition: var(--transition-smooth);
}

.comp-card:hover .comp-badge-wrapper {
  transform: rotate(15deg) scale(1.05);
}

.comp-badge-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comp-card-info {
  display: flex;
  flex-direction: column;
}

.comp-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-yellow);
  margin-bottom: 6px;
}

.comp-card-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.comp-desc {
  font-size: 0.85rem;
  color: var(--text-muted-dark);
  margin-bottom: 12px;
  line-height: 1.5;
}

.comp-date {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-muted-dark);
}

/* --- Section: Certificates Marquee Slider --- */
.certificates-section {
  background-color: var(--bg-light-start);
  padding: 100px 0 60px 0;
}

.certi-marquee-container {
  overflow-x: scroll;
  scrollbar-width: none; /* Hide scrollbar in Firefox */
  -ms-overflow-style: none;  /* Hide scrollbar in IE/Edge */
  width: 100%;
  position: relative;
  background-color: var(--bg-light-end);
  padding: 40px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 20px;
  cursor: grab;
  user-select: none;
}

.certi-marquee-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar in Chrome/Safari */
}

.certi-marquee-container.grabbing {
  cursor: grabbing;
}

/* Semi-transparent fade effect on sides of the slider */
.certi-marquee-container::before,
.certi-marquee-container::after {
  content: '';
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.certi-marquee-container::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-light-end) 0%, rgba(234, 234, 234, 0) 100%);
}

.certi-marquee-container::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-light-end) 0%, rgba(234, 234, 234, 0) 100%);
}

.certi-marquee-track {
  display: flex;
  width: max-content;
}

.certi-item {
  flex-shrink: 0;
  width: 320px;
  height: 220px;
  margin: 0 20px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #FFFFFF;
  padding: 8px;
  transition: var(--transition-smooth);
}

.certi-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.12);
}

.certi-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* --- Certificate Lightbox Modal --- */
.certi-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.certi-modal.active {
  opacity: 1;
  pointer-events: all;
}

.certi-modal-content {
  max-width: 90%;
  max-height: 85%;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.certi-modal.active .certi-modal-content {
  transform: scale(1);
}

.certi-modal-content img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.certi-modal-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--text-light);
  transition: var(--transition-fast);
  line-height: 1;
}

.certi-modal-close:hover {
  color: var(--accent-yellow);
  transform: scale(1.1);
}

/* --- Section 3: Projects & Web Apps --- */
.projects-section {
  padding: 120px 0;
  background: var(--bg-light-start);
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-action-hint {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted-dark);
  margin-bottom: 40px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Glassmorphism card */
.project-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--glass-shadow);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.project-img-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #EEE;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.project-card:hover .project-img-wrapper img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

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

.project-link {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--text-light);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

.project-card:hover .project-link {
  transform: scale(1);
}

.project-link:hover {
  background-color: var(--text-dark);
  color: var(--text-light);
}

.project-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted-dark);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  background-color: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  color: var(--text-muted-dark);
}

/* --- Section 4: School Activities --- */
.activities-section {
  padding: 120px 0;
  background: var(--bg-light-end);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
}

/* Film Photo frame style (Japanese Film Aesthetic) */
.film-photo-card {
  background-color: #FDFDFB; /* Warm film paper tint */
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), 0 2px 5px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
  border: 1px solid rgba(0,0,0,0.02);
}

.film-photo-card:hover {
  transform: translateY(-8px) rotate(1deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Rotate second item slightly to make the layout feel organic */
.film-photo-card:nth-child(2) {
  transform: rotate(-1deg);
}
.film-photo-card:nth-child(2):hover {
  transform: translateY(-8px) rotate(0.5deg);
}

.film-photo-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background-color: #0A0A0A;
}

.film-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.08) contrast(0.95) brightness(1.02);
  transition: var(--transition-smooth);
}

/* Film sprocket holes detailing */
.film-sprocket-holes {
  position: absolute;
  top: 8px;
  left: 0;
  width: 100%;
  height: 8px;
  background-image: radial-gradient(circle, rgba(255,255,255,0.2) 2px, transparent 2px);
  background-size: 16px 8px;
  z-index: 2;
  opacity: 0.8;
}

.film-stamp {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-family: monospace;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
  z-index: 2;
}

.film-caption {
  padding: 20px 4px 8px 4px;
}

.caption-date {
  font-family: monospace;
  font-size: 0.7rem;
  color: #A36A00; /* Amber print style date stamp */
  font-weight: bold;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.caption-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.caption-desc {
  font-size: 0.8rem;
  color: var(--text-muted-dark);
  line-height: 1.5;
}

/* --- Footer --- */
.main-footer {
  background-color: var(--text-dark);
  color: var(--text-light);
  padding: 80px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  color: var(--text-light);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted-light);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}

.footer-socials {
  display: flex;
  gap: 20px;
  font-size: 1.2rem;
}

.footer-socials a {
  color: var(--text-muted-light);
  transition: var(--transition-fast);
}

.footer-socials a:hover {
  color: var(--text-light);
}

.copyright {
  font-size: 0.75rem;
  color: var(--text-muted-light);
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  .hero-headline {
    font-size: 4.5rem;
  }
  .hero-headline .serif-text {
    font-size: 4.2rem;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-container {
    padding: 60px 20px;
  }
  .nav-links {
    display: none; /* Can build clean menu drawer if needed, kept simple for SPA scroll */
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-intro, .hero-quote {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-quote {
    border-left: none;
    border-top: 1px solid var(--accent-yellow);
    padding-left: 0;
    padding-top: 16px;
  }
  
  .social-links-container {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
    gap: 32px;
  }
  
  .about-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .timeline-line {
    left: 24px;
  }
  
  .timeline-item {
    width: 100%;
    padding: 16px 20px 16px 56px;
    text-align: left !important;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-dot {
    left: 19px !important;
    right: auto !important;
  }
  
  .comp-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }
  
  .footer-left {
    align-items: center;
  }
  
  .footer-right {
    align-items: center;
  }
}
