/* === leonrenlab — Creative Workshop Aesthetic === */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg: #141210;
  --bg-warm: #1a1714;
  --surface: #1f1c18;
  --surface-raised: #262219;
  --surface-hover: #2e2a22;
  --border: #332e26;
  --border-light: #3d3730;
  --accent: #d4a04a;
  --accent-glow: rgba(212, 160, 74, 0.15);
  --accent-bright: #e8bc6a;
  --text: #e8e0d4;
  --text-secondary: #a89e90;
  --text-muted: #706858;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 8px;
  --radius-lg: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
  z-index: 9999;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* === Navigation === */
nav {
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
  height: 64px;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

nav .logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  padding: 6px 0;
  position: relative;
}

nav .logo::after {
  content: '_';
  animation: blink 1.2s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

nav .links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

nav .links a {
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.01em;
}

nav .links a:hover {
  color: var(--text);
  background: var(--surface);
}

nav .links a.active {
  color: var(--accent);
  background: rgba(212, 160, 74, 0.08);
}

/* === Page Layout === */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px clamp(20px, 4vw, 48px) 80px;
}

.page h1 {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page .subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-weight: 400;
}

/* Decorative line under page title */
.page h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-top: 16px;
  border-radius: 1px;
}

/* === Gallery Grid === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Stagger card entrance */
.card {
  --delay: 0;
  animation: cardIn 0.6s var(--ease-out) backwards;
  animation-delay: var(--delay);
}

.card:nth-child(1) { --delay: 0.05s; }
.card:nth-child(2) { --delay: 0.1s; }
.card:nth-child(3) { --delay: 0.15s; }
.card:nth-child(4) { --delay: 0.2s; }
.card:nth-child(5) { --delay: 0.25s; }
.card:nth-child(6) { --delay: 0.3s; }
.card:nth-child(7) { --delay: 0.35s; }
.card:nth-child(8) { --delay: 0.4s; }
.card:nth-child(9) { --delay: 0.45s; }

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.3s;
  perspective: 800px;
  position: relative;
}

.card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-light), 0 0 40px var(--accent-glow);
  border-color: var(--border-light);
  text-decoration: none;
  color: inherit;
}

.card .thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.card:hover .thumb img {
  transform: scale(1.06);
}

/* Animated preview on hover */
.card .thumb .preview {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

.card:hover .thumb .preview {
  opacity: 1;
}

/* Placeholder when no thumbnail */
.card .thumb .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg) 100%);
  position: relative;
}

/* Subtle grid pattern on placeholder */
.card .thumb .placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(var(--text-muted) 1px, transparent 1px),
    linear-gradient(90deg, var(--text-muted) 1px, transparent 1px);
  background-size: 24px 24px;
}

.card .info {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--border);
}

.card .info h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.card .info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Accent bar on card hover */
.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out);
  border-radius: 1px;
}

.card:hover::after {
  transform: scaleX(1);
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 100px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state h2 {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.empty-state p {
  font-size: 0.9rem;
}

/* === About / Content Pages === */
.content {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px clamp(20px, 4vw, 48px) 80px;
}

.content h1 {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.content h1::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-top: 20px;
  margin-bottom: 8px;
  border-radius: 1px;
}

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

.content a {
  border-bottom: 1px solid var(--accent);
  transition: border-color 0.2s;
}

.content a:hover {
  border-color: var(--accent-bright);
}

/* === Responsive === */
@media (max-width: 700px) {
  nav { padding: 0 16px; height: 56px; }
  nav .links { gap: 0; }
  nav .links a { padding: 6px 10px; font-size: 0.78rem; }
  .gallery { grid-template-columns: 1fr; }
  .page { padding: 36px 16px 60px; }
  .page h1 { font-size: 1.8rem; }
}

@media (max-width: 440px) {
  nav .links a { padding: 6px 6px; font-size: 0.72rem; }
  nav .logo { font-size: 0.78rem; }
}
