/* ============================================
   Kangjun Zhong — Minimal Art Portfolio
   ============================================ */

:root {
  /* Colors — warm white minimal */
  --color-bg: #faf8f5;
  --color-bg-alt: #f4f1ec;
  --color-text: #1a1a1a;
  --color-text-light: #6b6b6b;
  --color-text-muted: #999999;
  --color-accent: #c4a46c;
  --color-border: #e8e4de;
  --color-white: #ffffff;

  /* Typography — one font */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 60px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================ */
/* Reset & Base */
/* ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--color-accent);
}

ul { list-style: none; }

/* ============================================ */
/* Typography */
/* ============================================ */

h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

/* ============================================ */
/* Layout */
/* ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

/* ============================================ */
/* Header / Navigation */
/* ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.site-logo img {
  height: 40px;
  width: auto;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.main-nav a {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text);
  padding: var(--space-xs) 0;
}

.main-nav a.active {
  color: var(--color-accent);
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
}

.lang-switch button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 2px 4px;
  transition: color var(--transition-fast);
}

.lang-switch button.active {
  color: var(--color-text);
  font-weight: 600;
}

.lang-switch .separator {
  color: var(--color-border);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  width: 32px;
  height: 32px;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--color-text);
  margin: 4px 0;
  transition: var(--transition-base);
  border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 4px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -4px);
}

/* ============================================ */
/* Hero Section */
/* ============================================ */

.hero {
  height: 85vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #000;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
  color: #fff;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: var(--space-md);
  font-weight: 300;
  line-height: 1.1;
}

.hero-content .subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-lg);
  max-width: 500px;
  font-weight: 300;
}

.hero-content .tagline {
  font-size: 0.75rem;
  color: var(--color-accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  opacity: 0.8;
}

/* ============================================ */
/* Buttons */
/* ============================================ */

.btn {
  display: inline-block;
  padding: 10px 28px;
  font-family: var(--font-base);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  border-radius: 0;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.btn-dark {
  background: var(--color-text);
  color: #fff;
}

.btn-dark:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ============================================ */
/* Press Highlights on Home */
/* ============================================ */

.press-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.press-highlight-card {
  display: block;
  padding: var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  text-decoration: none;
  color: inherit;
}

.press-highlight-card:hover {
  border-color: var(--color-accent);
  color: inherit;
}

.press-highlight-source {
  font-size: 0.75rem;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.press-highlight-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.press-highlight-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.press-highlight-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .press-highlights {
    grid-template-columns: 1fr;
  }
}

/* ============================================ */
/* Featured Artworks on Home */
/* ============================================ */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.art-card {
  cursor: pointer;
}

.art-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--color-bg-alt);
}

.art-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition-base);
}

.art-card:hover .art-card-image img {
  opacity: 0.85;
}

.art-card-info {
  padding: var(--space-sm) 0 0;
}

.art-card-title {
  font-size: 0.9rem;
  margin-bottom: 2px;
  font-weight: 400;
}

.art-card-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================ */
/* About Preview (Home) */
/* ============================================ */

.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-preview-image img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: var(--color-bg-alt);
}

.about-preview-text h2 {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.about-preview-text p {
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================ */
/* Portfolio Page */
/* ============================================ */

.page-header {
  padding: calc(var(--header-height) + var(--space-md)) 0 var(--space-md);
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: var(--space-xs);
}

.page-header p {
  color: var(--color-text-light);
  font-size: 0.85rem;
  max-width: 450px;
  margin: 0 auto;
}

/* Filter Dropdowns */
.filter-dropdowns {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-lg) 0 var(--space-md);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

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

.filter-select {
  font-family: var(--font-base);
  font-size: 0.85rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border-radius: 0;
  transition: border-color var(--transition-fast);
  min-width: 140px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg);
}

.portfolio-item img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background: var(--color-bg-alt);
  padding: 8px;
  transition: opacity var(--transition-base);
}

.portfolio-item:hover img {
  opacity: 0.9;
}

.portfolio-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
}

.portfolio-item-overlay h3 {
  font-size: 0.95rem;
  margin-bottom: 2px;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.portfolio-item-overlay p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
}

/* ============================================ */
/* Lightbox */
/* ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

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

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-caption {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 0.85rem;
  padding: var(--space-md);
}

.lightbox-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

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

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-md);
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-nav.prev { left: var(--space-sm); }
.lightbox-nav.next { right: var(--space-sm); }

/* ============================================ */
/* Exhibition Page */
/* ============================================ */

.exhibition-timeline {
  max-width: 720px;
  margin: 0 auto;
}

.exhibition-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.exhibition-item:last-child {
  border-bottom: none;
}

.exhibition-year {
  font-size: 0.85rem;
  color: var(--color-accent);
  padding-top: 1px;
}

.exhibition-title {
  font-size: 1rem;
  margin-bottom: 2px;
  font-weight: 400;
}

.exhibition-note {
  font-weight: 300;
  color: var(--color-text-light);
}

.exhibition-venue {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.exhibition-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.exhibition-gallery img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: var(--color-bg-alt);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.exhibition-gallery img:hover {
  opacity: 0.8;
}

/* Exhibition Banner */
.exhibition-banner {
  width: 100%;
  height: 60vh;
  min-height: 380px;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.exhibition-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================ */
/* About Page */
/* ============================================ */

.about-page {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-page-image img {
  width: 100%;
}

.about-page-content h1 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: var(--space-xs);
}

.about-page-content .artist-title {
  font-size: 0.8rem;
  color: var(--color-text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.about-page-content p {
  margin-bottom: var(--space-md);
  line-height: 1.7;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* Resume / CV */
.resume-section {
  margin-top: var(--space-xl);
}

.resume-section h2 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.resume-list {
  margin-bottom: var(--space-xl);
}

.resume-list-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.resume-list-item:last-child {
  border-bottom: none;
}

.resume-year {
  font-size: 0.85rem;
  color: var(--color-accent);
}

.resume-detail h4 {
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 1px;
}

.resume-detail p {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ============================================ */
/* Contact Page */
/* ============================================ */

.contact-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.contact-info h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: var(--space-md);
}

.contact-info p {
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  line-height: 1.7;
  font-size: 0.9rem;
}

.contact-portrait {
  margin-bottom: var(--space-lg);
}

.contact-portrait img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: var(--color-bg-alt);
}

.contact-email {
  color: var(--color-accent) !important;
}

.contact-detail {
  margin-bottom: var(--space-sm);
}

.contact-detail-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.contact-form {
  padding: var(--space-lg);
  background: var(--color-bg-alt);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: var(--space-xs);
  color: var(--color-text-light);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-family: var(--font-base);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
  border-radius: 0;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-text);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.social-links a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-links a:hover {
  border-color: var(--color-accent);
  opacity: 1;
}

.social-links svg {
  width: 16px;
  height: 16px;
  fill: var(--color-text-muted);
  transition: fill var(--transition-fast);
}

.social-links a:hover svg {
  fill: var(--color-accent);
}

/* ============================================ */
/* Footer */
/* ============================================ */

.site-footer {
  background: var(--color-text);
  padding: var(--space-lg) 0;
  margin-top: var(--space-xl);
}

.site-footer .footer-copy {
  color: rgba(255,255,255,0.5);
}

.site-footer .footer-links svg {
  fill: rgba(255,255,255,0.4);
}

.site-footer .footer-links a:hover svg {
  fill: var(--color-accent);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-inner .footer-copy {
  font-size: 0.75rem;
}

.footer-inner .footer-links {
  display: flex;
  gap: var(--space-sm);
}

.footer-inner .footer-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.footer-inner .footer-links a:hover {
  opacity: 1;
}

.footer-inner .footer-links svg {
  width: 16px;
  height: 16px;
  fill: rgba(255,255,255,0.4);
  transition: fill var(--transition-fast);
}

/* ============================================ */
/* Animations */
/* ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.24s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.32s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.4s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================ */
/* Responsive */
/* ============================================ */

@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .about-preview,
  .about-page,
  .contact-page {
    grid-template-columns: 1fr;
  }

  .about-preview-image img {
    max-height: 350px;
  }

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

  .exhibition-gallery img {
    height: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 54px;
    --space-xl: 2rem;
    --space-2xl: 3rem;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--transition-base);
    pointer-events: none;
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .menu-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

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

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

  .portfolio-item img {
    height: 350px;
  }

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

  .resume-list-item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

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

  .exhibition-gallery img {
    height: 180px;
  }

  .contact-form {
    padding: var(--space-md);
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

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

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

  .hero {
    height: 70vh;
    min-height: 400px;
  }

  .container {
    padding: 0 var(--space-md);
  }
}
