/* ==========================================================================
   Rayaan — Creator Portfolio Stylesheet
   Modern, minimal dark theme crafted for GIPHY Creator Application
   ========================================================================== */

/* 1. CSS Custom Properties / Variables */
:root {
  --bg-primary: #0a0b0e;
  --bg-secondary: #12141a;
  --bg-card: #161821;
  --bg-card-hover: #1c1f2b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  
  /* Single Subtle Accent Color (Electric Violet / Purple) */
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-subtle: rgba(139, 92, 246, 0.12);
  --accent-border: rgba(139, 92, 246, 0.28);
  
  /* Typography Colors */
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;

  /* Fonts & Sizing */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --container-max: 1120px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Global Resets & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* 3. Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* 4. Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
  transition: var(--transition);
}

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

.creator-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 1.25rem;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-handle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-btn-outline {
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
}

.nav-btn-outline:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* 5. Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-main);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* 6. HERO SECTION */
.hero-section {
  padding: 5rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

/* 7. ABOUT SECTION */
.about-section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.about-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem;
  max-width: 860px;
  margin: 0 auto;
}

.about-heading {
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* 8. MY GIFS SECTION */
.gifs-section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.section-header.text-center {
  text-align: center;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 620px;
}

.section-header.text-center .section-subtitle {
  margin: 0 auto;
}

/* Responsive Grid for GIFs */
.gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 360px));
  gap: 1.75rem;
}

.gif-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.gif-card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.gif-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.gif-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f1016;
}

/* Used when replacing with actual <img> GIF elements */
.gif-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gif-card:hover .gif-media {
  transform: scale(1.03);
}

/* Polished SVG/CSS Placeholder Canvas */
.gif-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(
    circle at 50% 50%,
    hsl(var(--card-hue, 260) 25% 14%),
    #0c0d12
  );
  user-select: none;
}

.placeholder-emoji {
  font-size: 3.5rem;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gif-card:hover .placeholder-emoji {
  transform: scale(1.15);
}

.gif-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.placeholder-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 14, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.preview-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
}

.gif-card:hover .placeholder-overlay {
  opacity: 1;
}

.gif-info {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gif-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.gif-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* 9. GIPHY SECTION BANNER */
.giphy-section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.giphy-banner {
  background: linear-gradient(135deg, #13151f 0%, #171926 100%);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.giphy-banner-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1 1 450px;
}

.giphy-icon-box {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.giphy-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.giphy-title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.giphy-text {
  font-size: 1rem;
  color: var(--text-muted);
}

.giphy-banner-action {
  flex-shrink: 0;
}

.btn-giphy {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

/* 10. SOCIAL SECTION */
.social-section {
  padding: 5rem 0;
}

.social-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.social-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.social-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  flex-shrink: 0;
}

.social-card:hover .social-card-icon {
  color: var(--accent);
  border-color: var(--accent-border);
}

.social-card-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.social-platform {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.social-handle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.social-arrow {
  font-size: 1.25rem;
  color: var(--text-subtle);
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-card:hover .social-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* 11. FOOTER */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 2.25rem 0;
  background: var(--bg-primary);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 12. Media Queries for Responsiveness */
@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 0;
  }
  
  .nav-links {
    gap: 0.75rem;
  }
  
  .nav-link {
    font-size: 0.875rem;
    padding: 0.3rem 0.5rem;
  }
  
  .hero-section {
    padding: 3.5rem 0 3rem;
  }

  .about-section,
  .gifs-section,
  .giphy-section,
  .social-section {
    padding: 3.5rem 0;
  }

  .about-card {
    padding: 2rem 1.5rem;
  }

  .giphy-banner {
    padding: 2rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .giphy-banner-action {
    width: 100%;
  }

  .btn-giphy {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header-container {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .brand-handle {
    display: none;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

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