/* ============================================
   Art of DDC - Portfolio
   Clean, minimal portfolio design
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #fafafa;
  --color-text: #1a1a1a;
  --color-text-light: #666;
  --color-border: #e0e0e0;
  --color-accent: #333;
  --color-hover: #000;
  --color-card-bg: #f0f0f0;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1400px;
  --nav-height: 72px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

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

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

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

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
}

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

.site-logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.site-logo span {
  font-weight: 300;
  color: var(--color-text-light);
  margin-left: 6px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-text);
  transition: width var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-text);
}

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  padding: 160px 40px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-light);
  font-weight: 300;
  margin-bottom: 40px;
  max-width: 520px;
}

.hero .cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1.5px solid var(--color-text);
  padding-bottom: 4px;
  transition: gap var(--transition);
}

.hero .cta-link:hover {
  gap: 12px;
}

.hero .cta-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.hero .cta-link:hover svg {
  transform: translateX(2px);
}

/* --- Section Titles --- */
.section-title {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px 32px;
}

.section-title h2 {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-light);
}

/* --- Page Header (for category pages) --- */
.page-header {
  padding: 140px 40px 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1rem;
  color: var(--color-text-light);
  font-weight: 300;
  max-width: 560px;
}

/* --- Project Grid --- */
.project-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Tighten vertical rhythm when sections follow each other (Personal page) */
.project-grid:has(+ .section-title) {
  padding-bottom: 24px;
}
.section-title + .project-grid + .section-title {
  padding-top: 8px;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-card-bg);
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.project-card img,
.project-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

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

.project-card:hover img,
.project-card:hover video {
  transform: scale(1.03);
}

.card-overlay h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.card-overlay .card-tag {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 300;
}

/* --- Placeholder images (colored blocks) --- */
.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: rgba(0,0,0,0.25);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ph-1 { background: #e8e4df; }
.ph-2 { background: #d4dce4; }
.ph-3 { background: #dfe4d4; }
.ph-4 { background: #e4d4d4; }
.ph-5 { background: #d4d4e4; }
.ph-6 { background: #e4ddd4; }
.ph-7 { background: #d4e4e0; }
.ph-8 { background: #e0d4e4; }
.ph-9 { background: #dde4d4; }

/* --- Project Detail Page --- */
.project-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 140px 40px 80px;
}

.project-detail .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 40px;
  transition: color var(--transition);
}

.project-detail .back-link:hover {
  color: var(--color-text);
}

.project-detail h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.project-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.project-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 48px;
}


.project-detail .credits-heading {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-light);
  margin-top: 64px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.project-detail .credits {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

.project-detail .credits strong {
  color: var(--color-text);
  font-weight: 500;
}

.project-images {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-images .image-item {
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-card-bg);
}

.project-images .image-item img,
.project-images .image-item video,
.project-images .image-item gif {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Side by side image pair --- */
.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 0;
}

.image-pair .image-item {
  margin: 0;
}

@media (max-width: 768px) {
  .image-pair {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* --- Video Embed --- */
.project-images .image-item.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.project-images .image-item.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* --- Case Study --- */
.case-study {
  max-width: 1100px;
  margin: 0 auto;
  padding: 140px 40px 80px;
}

.case-study .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 40px;
  transition: color var(--transition);
}

.case-study .back-link:hover {
  color: var(--color-text);
}

.case-study h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.15;
}

.case-study .case-tagline {
  font-size: 1rem;
  color: var(--color-text-light);
  font-weight: 400;
  margin-bottom: 48px;
}

.case-study h2 {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-light);
  margin-top: 64px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.case-study h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 36px;
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}

.case-study p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 20px;
}

.case-study .lede {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.case-study ul {
  margin: 0 0 20px 1.2em;
  padding: 0;
}

.case-study ul li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 8px;
}

.case-study .placeholder-note {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b07a3a;
  background: #fdf6e8;
  border-left: 3px solid #d6a25a;
  padding: 10px 14px;
  margin: 12px 0 20px;
  border-radius: 0 4px 4px 0;
}

.case-study figure {
  margin: 24px 0;
}

.case-study figure.full-bleed {
  margin-left: calc((100vw - 100%) / -2);
  margin-right: calc((100vw - 100%) / -2);
  max-width: none;
}

.case-study figure img,
.case-study figure video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: var(--color-card-bg);
}

.case-study figure.full-bleed img,
.case-study figure.full-bleed video {
  border-radius: 0;
}

.case-study figcaption {
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-weight: 300;
  margin-top: 12px;
  line-height: 1.55;
}

.case-study .image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
}

.case-study .image-row img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: var(--color-card-bg);
}

.case-study .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.case-study .meta-row span strong {
  color: var(--color-text);
  font-weight: 500;
  margin-left: 4px;
}

.case-study .credits {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

.case-study .credits strong {
  color: var(--color-text);
  font-weight: 500;
}

@media (max-width: 768px) {
  .case-study {
    padding: 120px 24px 60px;
  }
  .case-study .image-row {
    grid-template-columns: 1fr;
  }
}

/* --- About Page --- */
.about-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 160px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.about-photo {
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-card-bg);
  position: sticky;
  top: 100px;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.about-content h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.about-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.about-content .contact-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.about-content .contact-section h2 {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-links a {
  font-size: 0.95rem;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition);
}

.contact-links a:hover {
  color: var(--color-text-light);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

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

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

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

@media (max-width: 768px) {
  .header-inner {
    padding: 0 24px;
  }

  .menu-toggle {
    display: block;
    z-index: 101;
  }

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

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

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

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 40px 40px;
    gap: 24px;
    transition: right var(--transition);
    border-left: 1px solid var(--color-border);
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav a {
    font-size: 1rem;
  }

  .hero,
  .page-header,
  .project-grid,
  .section-title {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    padding-top: 130px;
    padding-bottom: 60px;
  }

  .page-header {
    padding-top: 120px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 120px 24px 60px;
  }

  .about-photo {
    position: static;
    max-width: 280px;
  }

  .project-detail {
    padding: 120px 24px 60px;
  }

  .site-footer {
    padding: 24px;
  }

  /* Show overlay by default on touch devices */
  .project-card .card-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 40%);
  }
}

/* --- Image lightbox (click to zoom) --- */
.zoomable {
  cursor: zoom-in;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 2000;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox-overlay.visible {
  opacity: 1;
}

.lightbox-overlay img,
.lightbox-overlay video {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .lightbox-overlay {
    padding: 16px;
  }
}
