/* =============================================
   CHRISTOPH BÜELER — PORTFOLIO
   ============================================= */

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

:root {
  --bg:        #0c0c0e;
  --bg2:       #111114;
  --bg3:       #18181c;
  --border:    rgba(255,255,255,0.07);
  --text:      #f0f0f0;
  --text-muted: #888;
  --text-dim:  #555;
  --accent:    #e8541a;
  --accent2:   #ff6b35;
  --accent-glow: rgba(232, 84, 26, 0.15);
  --green:     #22c55e;
  --radius:    16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===================== NAV ===================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  transition: background var(--transition), backdrop-filter var(--transition), border-bottom var(--transition);
}

.nav.scrolled {
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.1em;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  transition: border-color var(--transition), color var(--transition);
}

.nav-logo:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition) !important;
}

.nav-cta:hover {
  background: var(--accent2) !important;
  transform: translateY(-1px);
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 2rem 4rem;
}

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

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,84,26,0.3) 0%, transparent 70%);
  top: -100px;
  left: -150px;
  animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
  bottom: 100px;
  right: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(232,84,26,0.15) 0%, transparent 70%);
  bottom: -50px;
  left: 30%;
  animation: float 12s ease-in-out infinite 2s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-name em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,0.03);
  letter-spacing: 0.02em;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.hero-btn:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(232,84,26,0.35);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  margin: 0 auto;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ===================== STATS ===================== */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 3rem;
}

.stat-number {
  font-family: 'DM Serif Display', serif;
  font-size: 2.5rem;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.25rem;
}

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

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===================== PROJECTS ===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.projects-section {
  padding: 8rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

/* FILTER */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* GRID */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* CARD */
.project-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.12s; }
.project-card:nth-child(3) { animation-delay: 0.19s; }
.project-card:nth-child(4) { animation-delay: 0.26s; }
.project-card:nth-child(5) { animation-delay: 0.33s; }
.project-card:nth-child(6) { animation-delay: 0.40s; }
.project-card:nth-child(7) { animation-delay: 0.47s; }
.project-card:nth-child(8) { animation-delay: 0.54s; }

.project-card.hidden {
  display: none;
}

.project-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.card-featured {
  grid-column: span 2;
}

.card-dark {
  background: #0e0e12;
}

/* CARD VISUAL */
.card-visual {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: #0e0e12;
}

.card-featured .card-visual {
  height: 240px;
}

/* SLIDESHOW */
.card-slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.card-slideshow .slide.active {
  opacity: 1;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 1.2s ease;
}

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

.card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(12,12,14,0.1) 0%,
    rgba(12,12,14,0.5) 60%,
    rgba(12,12,14,0.85) 100%
  );
}


/* CARD BODY */
.card-body {
  padding: 1.5rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-live {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-done {
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.card-featured .card-title {
  font-size: 2rem;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-list li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-left: 1rem;
  position: relative;
}

.card-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.ctag {
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-role {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.02em;
  flex: 1;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
  flex-shrink: 0;
}

.card-link:hover {
  color: var(--accent2);
}

/* ===================== ABOUT ===================== */
.about-section {
  padding: 8rem 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.skill-pill {
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,0.02);
  transition: border-color var(--transition), color var(--transition);
}

.skill-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* TIMELINE */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-item {
  display: flex;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 2rem;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.tl-item:last-child::before {
  display: none;
}

.tl-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg2);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  z-index: 1;
  transition: background var(--transition);
}

.tl-item:first-child .tl-dot {
  background: var(--accent);
}

.tl-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tl-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.tl-content strong {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

.tl-content span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===================== CONTACT ===================== */
.contact-section {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.contact-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.contact-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,84,26,0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 0;
}

.contact-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.contact-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(255,255,255,0.02);
  transition: all var(--transition);
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

/* ===================== FOOTER ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .card-featured {
    grid-column: span 1;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .stat {
    padding: 1rem 1.5rem;
  }

  .stat-divider {
    display: none;
  }

  .stats-inner {
    gap: 0.5rem;
  }
}

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

  .nav-links li:not(:last-child) {
    display: none;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}
