/* ============================================
   idjoy Portfolio – Global Design System
   ============================================ */

/* ============================================
   Design Tokens (Single Source of Truth)
   ============================================ */

:root {
  /* Brand Colors */
  --color-brand-primary: #ce6a2c; /* Use ONLY for important CTAs */
  --color-dark-bg: #1d1f28; /* Neutral twilight base */
  --color-text-on-dark: #f6f7fa;
  --color-gradient-accent: #f28a41; /* Warm accent for gradients */

  /* Color Layering System (Depth Hierarchy) */
  /* Darker = deeper/background, Lighter = elevated/important */
  --layer-deepest: hsl(210, 16%, 18%);      /* Deep graphite */
  --layer-deep: hsl(210, 14%, 24%);
  --layer-mid: hsl(210, 12%, 30%);
  --layer-elevated: hsl(210, 10%, 36%);
  --layer-highest: hsl(210, 8%, 44%);      /* Elevated neutral surfaces */

  /* Neutral Palette */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-100: #f5f5f7;
  --color-gray-200: #e5e5e7;
  --color-gray-300: #d1d1d6;
  --color-gray-700: #3a3a3c;
  --color-gray-800: #2c2c2e;
  --color-gray-900: #1c1c1e;

  /* Typography Scale */
  --font-family-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: "SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace;

  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  --font-size-6xl: 3.75rem;     /* 60px */
  --font-size-7xl: 4.5rem;      /* 72px */
  --font-size-8xl: 6rem;        /* 96px */
  --font-size-9xl: 8rem;        /* 128px */

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;

  /* Spacing Scale (base unit 4px) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-pill: 9999px;  /* Full pill */

  /* Two-Layer Shadow System (Light from above: light top + dark bottom) */
  /* Small shadow (subtle elevation) */
  --shadow-sm-light: 0 -1px 2px 0 rgba(255, 255, 255, 0.03);
  --shadow-sm-dark: 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: var(--shadow-sm-light), var(--shadow-sm-dark);
  
  /* Medium shadow (standard elevation) */
  --shadow-md-light: 0 -2px 4px 0 rgba(255, 255, 255, 0.04);
  --shadow-md-dark: 0 4px 12px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: var(--shadow-md-light), var(--shadow-md-dark);
  
  /* Large shadow (prominent hover/focus) */
  --shadow-lg-light: 0 -4px 8px 0 rgba(255, 255, 255, 0.05);
  --shadow-lg-dark: 0 8px 24px 0 rgba(0, 0, 0, 0.5);
  --shadow-lg: var(--shadow-lg-light), var(--shadow-lg-dark);
  
  /* Brand CTA shadow (two-layer with brand color) */
  --shadow-cta-light: 0 -2px 4px 0 rgba(255, 255, 255, 0.04);
  --shadow-cta-dark: 0 8px 20px rgba(206, 106, 44, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-cta: var(--shadow-cta-light), var(--shadow-cta-dark);
  
  /* Inset shadows (sunken effect) */
  --shadow-inset-sm: inset 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 -1px 2px rgba(255, 255, 255, 0.02);
  --shadow-inset-md: inset 0 4px 8px rgba(0, 0, 0, 0.25), inset 0 -2px 4px rgba(255, 255, 255, 0.03);

  /* Z-index Layers */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  --nav-height: 64px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   CSS Reset & Base Styles
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-on-dark);
  font-size-adjust: from-font;
  padding-top: var(--nav-height);
  background-color: var(--color-dark-bg);
  background-image: radial-gradient(circle at 20% 10%, rgba(242, 138, 65, 0.35) 0%, rgba(206, 106, 44, 0.55) 28%, rgba(29, 31, 40, 0.92) 100%),
                    linear-gradient(180deg, rgba(29, 31, 40, 0.95) 0%, rgba(29, 31, 40, 1) 100%);
  background-blend-mode: screen, normal;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Reserve space for icon replacements to avoid CLS */
i[data-lucide] {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

i[class^="ri-"], i[class*=" ri-"] {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  line-height: 1;
  text-align: center;
}

/* ============================================
   Button System (Apple Pill Style)
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  transition: all var(--transition-base);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  border: none;
  outline: none;
}

/* Button Sizes */
.btn-lg {
  height: 56px;
  padding: 0 var(--space-8);
  font-size: var(--font-size-lg);
}

.btn-md {
  height: 48px;
  padding: 0 var(--space-6);
  font-size: var(--font-size-base);
}

.btn-sm {
  height: 40px;
  padding: 0 var(--space-5);
  font-size: var(--font-size-sm);
}

/* Primary Button (Brand CTA – Use ONLY for important actions) */
.btn-primary {
  background: var(--color-brand-primary);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.01em;
  
  /* Clean elevation shadow */
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(206, 106, 44, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Subtle gradient overlay for depth */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(0, 0, 0, 0.05) 100%);
  border-radius: var(--radius-pill);
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--transition-base);
}

/* Animated shine effect on hover */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover {
  background: #d67333;
  transform: translateY(-2px) scale(1.02);
  
  /* Enhanced shadow on hover */
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 8px 24px rgba(206, 106, 44, 0.35),
    0 16px 48px rgba(206, 106, 44, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:active {
  background: #b85f26;
  transform: translateY(0) scale(0.98);
  
  /* Pressed state */
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:active::before {
  opacity: 0.5;
}

.btn-primary:focus-visible {
  outline: 3px solid rgba(206, 106, 44, 0.4);
  outline-offset: 3px;
}

/* Secondary Button (Glass morphism style) */
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-on-dark);
  border: 1.5px solid rgba(245, 245, 247, 0.2);
  position: relative;
  overflow: hidden;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  
  /* Clean minimal shadow */
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Subtle gradient overlay */
.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  border-radius: var(--radius-pill);
  pointer-events: none;
  transition: opacity var(--transition-base);
}

/* Ripple effect on hover */
.btn-secondary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-secondary:hover {
  border-color: rgba(245, 245, 247, 0.35);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px) scale(1.02);
  
  /* Enhanced shadow on hover */
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover::after {
  width: 300px;
  height: 300px;
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 245, 247, 0.25);
  
  /* Pressed state */
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:active::before {
  opacity: 0.5;
}

.btn-secondary:focus-visible {
  outline: 3px solid rgba(245, 245, 247, 0.3);
  outline-offset: 3px;
}

.showcase__subtitle {
  font-size: clamp(var(--font-size-sm), 2vw, var(--font-size-lg));
  line-height: 1.7;
  color: rgba(245, 245, 247, 0.75);
  margin: 0;
  max-width: 72ch;
}

.showcase__highlights {
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
  font-size: clamp(var(--font-size-xs), 1.4vw, var(--font-size-sm));
  color: rgba(245, 245, 247, 0.8);
}

.showcase__highlights li {
  position: relative;
  padding-left: var(--space-4);
}

.showcase__highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(244, 194, 44, 0.85);
  box-shadow: 0 0 12px rgba(244, 194, 44, 0.45);
}

/* Text Link Button */
.btn-text {
  background: none;
  color: var(--color-text-on-dark);
  padding: 0;
  height: auto;
  font-weight: var(--font-weight-medium);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-text:hover {
  opacity: 0.7;
}

.btn-text:focus-visible {
  outline: 2px solid var(--color-text-on-dark);
  outline-offset: 4px;
}


/* ============================================
   Utility Classes
   ============================================ */

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Marker highlight utility */
.marker {
  display: inline;
  padding: 0 0.1em;
  border-radius: 2px;
  /* Marker effect under text */
  box-shadow: inset 0 -0.45em 0 #e59e2a;
  /* Readability boost on imagery: layered text shadows */
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.38),
    0 2px 6px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(0, 0, 0, 0.6);
}
