/* ============================================
   POWERFOLIO DEMO - ARCHITECT PORTFOLIO
   Swiss Minimalism / Bauhaus Inspired
   ============================================ */

/* Font Import - Cormorant Garamond for elegance, DM Sans for clean body */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Colors - Pure B&W with subtle grays */
  --color-black: #0a0a0a;
  --color-white: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;

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

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-width: 1400px;
  --content-padding: clamp(1.5rem, 5vw, 4rem);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-white);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.heading-lg {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
}

.heading-md {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.3;
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
}

.body-md {
  font-size: 1rem;
  line-height: 1.6;
}

.body-sm {
  font-size: 0.875rem;
  line-height: 1.5;
}

.label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.container-full {
  width: 100%;
  padding: 0 var(--content-padding);
}

/* ============================================
   DEMO PAGE WRAPPER
   ============================================ */
.demo-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-lg) 0;
  background: transparent;
  transition: background var(--transition-base), padding var(--transition-base);
}

.site-header.scrolled {
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(10px);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.site-logo span {
  font-weight: 300;
  font-style: italic;
}

.header-nav {
  display: flex;
  gap: var(--space-xl);
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  position: relative;
  padding: var(--space-xs) 0;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-black);
  transition: width var(--transition-base);
}

.header-nav a:hover::after {
  width: 100%;
}

/* ============================================
   HERO SECTION - ARCHITECT INTRO
   ============================================ */
.hero-section {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding-top: 120px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl) var(--content-padding);
}

.hero-label {
  margin-bottom: var(--space-lg);
}

.hero-name {
  margin-bottom: var(--space-lg);
}

.hero-name em {
  font-style: italic;
  font-weight: 300;
}

.hero-bio {
  max-width: 480px;
  color: var(--color-gray-600);
  margin-bottom: var(--space-xl);
}

.hero-social {
  display: flex;
  gap: var(--space-lg);
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-gray-500);
  transition: color var(--transition-fast);
}

.social-link:hover {
  color: var(--color-black);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.hero-image {
  position: relative;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--transition-slow);
}

.hero-image:hover img {
  filter: grayscale(0%);
}

.hero-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(10, 10, 10, 0.1));
  pointer-events: none;
}

/* Hero scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: var(--content-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

/* ============================================
   HERO SECTION COMPACT - With circular avatar
   ============================================ */
.hero-section-compact {
  padding-top: 100px;
  padding-bottom: var(--space-lg);
}

.hero-compact-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.hero-avatar {
  flex-shrink: 0;
}

.hero-avatar img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--transition-slow);
}

.hero-avatar:hover img {
  filter: grayscale(0%);
}

.hero-content-compact {
  flex: 1;
}

.hero-content-compact .hero-label {
  margin-bottom: var(--space-sm);
}

.hero-content-compact .hero-name {
  margin-bottom: var(--space-sm);
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero-content-compact .hero-bio {
  max-width: 600px;
  color: var(--color-gray-600);
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
}

.hero-content-compact .hero-social {
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .hero-compact-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-avatar img {
    width: 120px;
    height: 120px;
  }

  .hero-content-compact .hero-social {
    justify-content: center;
  }
}

.scroll-indicator span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  color: var(--color-gray-400);
}

.scroll-indicator::after {
  content: '';
  width: 1px;
  height: 60px;
  background: var(--color-gray-300);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio-section {
  padding: var(--space-lg) 0 var(--space-2xl);
  background: var(--color-white);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-gray-200);
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.section-count {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--color-gray-400);
}

/* ============================================
   POWERFOLIO OVERRIDES - DEMO STYLING
   ============================================ */

/* Hide main image (background-image is used for display) */
.elpt-portfolio-content .portfolio-item-wrapper img {
  opacity: 0;
}

/* Portfolio container - inherits padding from .container class */
.demo-portfolio-wrapper {
  /* padding inherited from .container */
}

.demo-portfolio-wrapper .elpt-portfolio {
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Override PowerFolio default filter centering */
.demo-portfolio-wrapper .elpt-portfolio-filter {
  text-align: left !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Ensure grid stays within container */
.demo-portfolio-wrapper .elpt-portfolio-content {
  box-sizing: border-box;
  width: 100%;
}

/* Filter buttons - minimalist style */
.demo-portfolio-wrapper .elpt-portfolio-filter {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  text-align: left;
  padding: 0;
}

.demo-portfolio-wrapper .portfolio-filter-item {
  background: transparent !important;
  border: 1px solid var(--color-gray-300) !important;
  color: var(--color-gray-600) !important;
  padding: var(--space-sm) var(--space-lg) !important;
  font-family: var(--font-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  transition: all var(--transition-fast) !important;
  cursor: pointer;
}

.demo-portfolio-wrapper .portfolio-filter-item:hover {
  border-color: var(--color-black) !important;
  color: var(--color-black) !important;
}

.demo-portfolio-wrapper .portfolio-filter-item.item-active {
  background: var(--color-black) !important;
  border-color: var(--color-black) !important;
  color: var(--color-white) !important;
}

/* Portfolio grid */
.demo-portfolio-wrapper .elpt-portfolio-content {
  margin: 0;
  overflow: hidden;
}

.demo-portfolio-wrapper .portfolio-item-wrapper {
  padding: var(--space-sm);
}

/* Portfolio items */
.demo-portfolio-wrapper .portfolio-item {
  aspect-ratio: auto;
  min-height: 300px;
  filter: grayscale(100%);
  transition: filter var(--transition-slow), transform var(--transition-slow);
}

.demo-portfolio-wrapper .portfolio-item:hover {
  filter: grayscale(0%);
}

/* Info wrapper - refined overlay */
.demo-portfolio-wrapper .portfolio-item-infos-wrapper {
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.4) 50%, transparent 100%) !important;
}

/* Title styling */
.demo-portfolio-wrapper .portfolio-item-title {
  font-family: var(--font-display) !important;
  font-size: 1.5rem !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Category styling */
.demo-portfolio-wrapper .portfolio-item-category {
  font-family: var(--font-body) !important;
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  opacity: 0.7;
  margin-top: var(--space-sm);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: auto;
  padding: var(--space-2xl) 0;
  background: var(--color-black);
  color: var(--color-white);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
}

.footer-brand {
  max-width: 400px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: var(--space-lg);
}

.footer-tagline {
  color: var(--color-gray-400);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer-column h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  margin-bottom: var(--space-lg);
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-column a {
  font-size: 0.9375rem;
  color: var(--color-gray-300);
  transition: color var(--transition-fast);
}

.footer-column a:hover {
  color: var(--color-white);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

.footer-credits {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

.footer-credits a {
  color: var(--color-gray-400);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credits a:hover {
  color: var(--color-white);
}

/* ============================================
   SINGLE PROJECT PAGE
   ============================================ */
.single-project {
  padding-top: 100px;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-bottom: var(--space-xl);
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--color-black);
}

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

.back-link:hover svg {
  transform: translateX(-4px);
}

/* Project hero */
.project-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  margin-bottom: var(--space-2xl);
}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
}

.project-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-2xl);
  background: linear-gradient(to top, rgba(10, 10, 10, 0.8) 0%, transparent 100%);
  color: var(--color-white);
}

.project-category {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  margin-bottom: var(--space-md);
}

.project-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
}

/* Project content */
.project-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-2xl);
  padding: 0 var(--content-padding);
  max-width: var(--max-width);
  margin: 0 auto var(--space-3xl);
}

/* Project meta sidebar */
.project-meta {
  position: sticky;
  top: 120px;
  align-self: start;
}

.meta-group {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-gray-200);
}

.meta-group:last-child {
  border-bottom: none;
}

.meta-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  margin-bottom: var(--space-xs);
}

.meta-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-black);
}

/* Project description */
.project-description h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: var(--space-lg);
}

.project-description p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-gray-700);
  margin-bottom: var(--space-lg);
}

.project-description p:last-of-type {
  margin-bottom: 0;
}

/* Project gallery */
.project-gallery {
  padding: var(--space-2xl) var(--content-padding) var(--space-3xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-gray-200);
}

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

.gallery-item {
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-item.wide {
  grid-column: span 2;
  aspect-ratio: 21/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(50%);
  transition: filter var(--transition-slow), transform var(--transition-slow);
}

.gallery-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

/* Project navigation */
.project-nav {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xl) var(--content-padding);
  border-top: 1px solid var(--color-gray-200);
  max-width: var(--max-width);
  margin: 0 auto;
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-width: 300px;
}

.project-nav-link.next {
  text-align: right;
  align-items: flex-end;
}

.nav-label {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gray-400);
}

.nav-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-black);
  transition: color var(--transition-fast);
}

.project-nav-link:hover .nav-title {
  color: var(--color-gray-500);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    order: 2;
    padding: var(--space-xl) var(--content-padding);
  }

  .hero-image {
    order: 1;
    height: 60vh;
  }

  .scroll-indicator {
    display: none;
  }

  .project-content {
    grid-template-columns: 1fr;
  }

  .project-meta {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-gray-200);
    margin-bottom: var(--space-xl);
  }

  .meta-group {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .hero-image {
    height: 50vh;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }

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

  .gallery-item.wide {
    grid-column: span 1;
    aspect-ratio: 4/3;
  }

  .project-nav {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .project-nav-link.next {
    text-align: left;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Initial state for animated elements */
.hero-label,
.hero-name,
.hero-bio,
.hero-social {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.hero-label { animation-delay: 0.2s; }
.hero-name { animation-delay: 0.3s; }
.hero-bio { animation-delay: 0.4s; }
.hero-social { animation-delay: 0.5s; }
