/* =============================================================
   Components — reusable UI primitives.
   Buttons, badges, marquee, cards, timeline, animations, logos.
   ============================================================= */

@layer components;
@layer components {

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: transform 0.2s, box-shadow 0.25s, background 0.2s, border-color 0.2s, color 0.2s;
}

.btn--primary {
  font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
  padding: 14px 30px;
  box-shadow:
    var(--shadow-soft-glow),
    var(--shadow-inset-light);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-medium-glow),
    var(--shadow-inset-light-strong);
}

.btn--ghost {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  padding: 13px 28px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.btn--ghost:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft-glow);
}

/* ---- Eyebrow (status pill) ---- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.7);
}
.eyebrow-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.45);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 0 6px rgba(34, 211, 238, 0);
  }
}

/* ---- Marquee ---- */
.marquee {
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  background: linear-gradient(
    90deg,
    var(--bg-primary) 0%,
    var(--bg-card) 20%,
    var(--bg-card) 80%,
    var(--bg-primary) 100%
  );
  overflow: hidden;
  padding: 18px 0;
  position: relative;
}
.marquee-track {
  display: flex;
  animation: marquee 35s linear infinite;
  white-space: nowrap;
}
.marquee-track:hover {
  animation-play-state: paused;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
}
.marquee-item::after {
  content: "·";
  color: var(--accent-blue);
  font-size: 16px;
  margin-left: 16px;
}
.marquee-item--accent {
  color: var(--accent-blue);
  font-weight: 600;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =============================================================
   Featured Project Card (hero)
   ============================================================= */
.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-depth), var(--shadow-soft-glow);
}
.featured-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad-primary);
  opacity: 0.9;
}

.featured-card__label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.featured-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}
.featured-card__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}
.featured-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.featured-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}
.featured-card__metric {
  background: var(--bg-secondary);
  padding: 14px 16px;
}
.featured-card__metric-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}
.featured-card__metric-value em {
  color: var(--accent-blue);
  font-style: normal;
}
.featured-card__metric-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.featured-card__stores {
  display: flex;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border-default);
}
.featured-card__store {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 6px 14px;
  border-radius: 3px;
  text-decoration: none;
  transition: color 0.2s;
  border: 1px solid var(--border-default);
}
.featured-card__store:hover {
  color: var(--accent-blue);
}

/* Decorative shadow stacks behind featured card */
.card-shadow-stack,
.card-shadow-stack--deep {
  position: absolute;
  height: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 0 0 10px 10px;
  z-index: -1;
}
.card-shadow-stack {
  bottom: -12px;
  left: 20px;
  right: 20px;
  opacity: 0.5;
}
.card-shadow-stack--deep {
  bottom: -22px;
  left: 40px;
  right: 40px;
  opacity: 0.25;
  z-index: -2;
}

/* ---- Tags (shared between featured-card and project cards) ---- */
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-subtle);
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  padding: 4px 10px;
  border-radius: 3px;
}
.tag--highlight {
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.3);
  background: var(--accent-tint);
}

/* =============================================================
   Project Card (case-study)
   ============================================================= */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  margin-bottom: 18px;
  box-shadow: var(--shadow-depth);
  position: relative;
}
.project-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift), var(--shadow-soft-glow);
}

.project-card__head {
  padding: 36px 40px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}
.project-card__title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.project-card__title em {
  font-style: italic;
  color: var(--accent-blue);
}
.project-card__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 600px;
}

.project-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 32px;
  border-top: 1px solid var(--border-default);
}
.project-col {
  padding: 32px 40px;
}
.project-col:first-child {
  border-right: 1px solid var(--border-default);
}
.project-col__label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-subtle);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-default);
}
.project-col__label--accent {
  color: var(--accent-blue);
}

.project-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}
.project-text strong {
  color: var(--text-primary);
  font-weight: 500;
}
.project-callout {
  border-left: 2px solid var(--accent-blue);
  padding: 12px 16px;
  background: var(--accent-tint);
  border-radius: 0 6px 6px 0;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}
.project-callout strong {
  color: var(--accent-cyan);
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

/* ---- Domain badges (used by project + app cards) ---- */
.domain {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 18px;
}
.domain--auction {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.domain--realestate {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(59, 130, 246, 0.30);
}
.domain--ecommerce {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(34, 211, 238, 0.28);
}
.domain--fashion {
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* ---- Project links (small "↗" pills) ---- */
.project-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  padding: 6px 14px;
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.project-link::before {
  content: "↗";
  color: var(--accent-blue);
}
.project-link:hover {
  color: var(--text-primary);
  border-color: var(--border-extra);
}

code.inline-code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-secondary);
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--text-muted);
  border: 1px solid var(--border-default);
}

/* =============================================================
   Stat Card (highlights)
   ============================================================= */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: var(--shadow-depth);
}
.stat-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift), var(--shadow-medium-glow);
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity 0.3s;
}
.stat-card:hover::before { opacity: 1; }

.stat-card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 18px;
  box-shadow:
    var(--shadow-soft-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.stat-card__icon svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.stat-card__value em {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}
.stat-card__label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-subtle);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.stat-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =============================================================
   Skill Card (Production Stack)
   ============================================================= */
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.3s, transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-depth);
}
.skill-card--full-row {
  grid-column: 1 / -1;
}
.skill-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift), var(--shadow-soft-glow);
}
.skill-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
}
.skill-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow:
    var(--shadow-soft-glow),
    var(--shadow-inset-light);
}
.skill-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.skill-card__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.skill-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  padding: 5px 11px;
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.skill-tag:hover {
  color: var(--text-primary);
  border-color: var(--accent-blue);
  background: var(--accent-tint);
}
.skill-tag--key {
  color: #fff;
  border-color: transparent;
  background: var(--grad-primary);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}
.skill-tag--key:hover {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.45);
}

/* =============================================================
   App Card (full portfolio grid)
   ============================================================= */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.3s, transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-depth);
}
.app-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift), var(--shadow-soft-glow);
}
.app-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.app-card__logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--bg-primary);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.app-card__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.app-card__company {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  margin-top: 3px;
  text-transform: uppercase;
}
.app-card__desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.app-card__domain {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
  text-transform: uppercase;
  align-self: flex-start;
}
.app-card__links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border-default);
}
.app-card__link {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  padding: 5px 11px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.app-card__link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-blue);
  background: var(--accent-tint);
}
.app-card__link--google { color: var(--accent-lime); }
.app-card__link--apple  { color: var(--accent-cyan); }

/* ---- App logo color variants ---- */
.logo-purple { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.logo-coral  { background: linear-gradient(135deg, #475569, #1e293b); }
.logo-teal   { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.logo-amber  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.logo-lime   { background: linear-gradient(135deg, #10b981, #059669); color: #fff !important; }
.logo-blue   { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.logo-pink   { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.logo-indigo { background: linear-gradient(135deg, #3b82f6, #1e40af); }

/* =============================================================
   Approach Cell (engineering philosophy grid)
   ============================================================= */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-default);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden;
}
.approach-cell {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%),
    var(--bg-card);
  padding: 36px 32px;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
}
.approach-cell:hover {
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift), var(--shadow-soft-glow);
  z-index: 2;
}
.approach-cell__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-blue);
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  display: block;
}
.approach-cell__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.approach-cell__body {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.72;
}
.approach-cell__body strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* =============================================================
   Experience Timeline
   ============================================================= */
.timeline {
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-blue), rgba(37, 99, 235, 0.1));
}
.timeline-item {
  position: relative;
  margin-bottom: 52px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -44px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent-blue);
}
.timeline-item:first-child::before {
  background: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.55);
}
.timeline-item__date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.timeline-item__role {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.timeline-item__company {
  font-size: 13px;
  color: var(--accent-blue);
  font-weight: 500;
  margin-bottom: 18px;
}
.timeline-item__company a {
  color: inherit;
  text-decoration: none;
}
.timeline-points {
  list-style: none;
  padding: 0;
}
.timeline-points li {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}
.timeline-points li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-size: 16px;
  line-height: 1.4;
}
.timeline-points li strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* =============================================================
   Reveal-on-scroll animation
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.07s; }
.reveal--delay-2 { transition-delay: 0.14s; }
.reveal--delay-3 { transition-delay: 0.21s; }

}
