/* ==========================================================================
   TECHNICAL DOSSIER // EDITORIAL DESIGN SYSTEM
   AUTHOR: SAMIUM BASHIR BADHAN
   PALETTE:
     - Off-White Background:  #F5F4F1
     - Pure Dark / Black:     #111111
     - Deep Charcoal:         #1D1D1D
     - Accent Burgundy Red:   #8F1D25
     - Secondary Crimson Red: #B52A32
     - Fine Line Light Gray:  #D8D8D5
     - Muted Technical Gray:  #747474
     - Card Background:       #ECECE6
   ========================================================================== */

@import "tailwindcss";

/* --------------------------------------------------------------------------
   ROOT & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  --bg-primary: #F5F4F1;
  --bg-card: #ECECE6;
  --bg-card-hover: #E4E4DC;
  --bg-dark: #111111;
  --bg-charcoal: #1D1D1D;
  
  --text-primary: #111111;
  --text-secondary: #4A4A46;
  --text-muted: #747474;
  --text-inverse: #F5F4F1;
  
  --accent-red: #8F1D25;
  --accent-crimson: #B52A32;
  --accent-red-light: rgba(143, 29, 37, 0.08);
  --accent-red-border: rgba(143, 29, 37, 0.25);
  
  --line-color: #D8D8D5;
  --line-dark: #2A2A2A;
  
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;
  --font-display: 'Space Grotesk', sans-serif;
}

/* --------------------------------------------------------------------------
   BASE STYLES & RESET
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  cursor: default;
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY SYSTEM
   -------------------------------------------------------------------------- */
.font-serif-display {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
}

.font-mono-tech {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.font-sans-ui {
  font-family: var(--font-sans);
}

.font-display {
  font-family: var(--font-display);
}

/* --------------------------------------------------------------------------
   BACKGROUND GRID & TECHNICAL TEXTURE
   -------------------------------------------------------------------------- */
.blueprint-grid-bg {
  background-image: 
    linear-gradient(to right, rgba(216, 216, 213, 0.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(216, 216, 213, 0.5) 1px, transparent 1px);
  background-size: 36px 36px;
}

.blueprint-grid-dark {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   CUSTOM TECHNICAL CURSOR
   -------------------------------------------------------------------------- */
.tech-cursor {
  position: fixed;
  width: 6px;
  height: 6px;
  background-color: var(--accent-red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease;
}

.tech-cursor-follower {
  position: fixed;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(143, 29, 37, 0.7);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.2s ease, transform 0.12s ease-out;
}

.tech-cursor-follower::before,
.tech-cursor-follower::after {
  content: '';
  position: absolute;
  background: var(--accent-red);
}
.tech-cursor-follower::before {
  top: -4px;
  left: 50%;
  width: 1px;
  height: 4px;
  transform: translateX(-50%);
}
.tech-cursor-follower::after {
  left: -4px;
  top: 50%;
  height: 1px;
  width: 4px;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .tech-cursor, .tech-cursor-follower {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   SCROLL PROGRESS BAR
   -------------------------------------------------------------------------- */
.tech-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent-red);
  z-index: 10000;
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   TECHNICAL DOSSIER LABELS & BADGES
   -------------------------------------------------------------------------- */
.dossier-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-red);
  background: var(--accent-red-light);
  border: 1px solid var(--accent-red-border);
  padding: 0.25rem 0.65rem;
}

.dossier-tag-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E0E0DB;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.65rem;
}

.dossier-tag-neutral {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--line-color);
  padding: 0.2rem 0.5rem;
}

/* --------------------------------------------------------------------------
   SECTION HEADERS
   -------------------------------------------------------------------------- */
.section-marker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-marker::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--line-color);
}

.section-heading-large {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   HERO PORTRAIT & TECHNICAL FRAMING
   -------------------------------------------------------------------------- */
.portrait-container {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.portrait-frame {
  position: relative;
  border: 1px solid var(--text-primary);
  background: var(--bg-card);
  padding: 12px;
  box-shadow: 12px 12px 0px rgba(17, 17, 17, 0.9);
}

.portrait-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  background-color: #DFDFD8;
  border: 1px solid var(--line-color);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) contrast(110%);
  transition: filter 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.portrait-frame:hover .portrait-img {
  filter: grayscale(20%) contrast(105%);
  transform: scale(1.03);
}

/* Technical Corner Markings */
.corner-bracket {
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.corner-tl {
  top: 4px;
  left: 4px;
  border-top: 2px solid var(--accent-red);
  border-left: 2px solid var(--accent-red);
}
.corner-tr {
  top: 4px;
  right: 4px;
  border-top: 2px solid var(--accent-red);
  border-right: 2px solid var(--accent-red);
}
.corner-bl {
  bottom: 4px;
  left: 4px;
  border-bottom: 2px solid var(--accent-red);
  border-left: 2px solid var(--accent-red);
}
.corner-br {
  bottom: 4px;
  right: 4px;
  border-bottom: 2px solid var(--accent-red);
  border-right: 2px solid var(--accent-red);
}

/* --------------------------------------------------------------------------
   BARCODE & TECHNICAL STAMPS
   -------------------------------------------------------------------------- */
.barcode-element {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
  opacity: 0.8;
}

.barcode-bar {
  background-color: var(--text-primary);
  height: 100%;
}

/* --------------------------------------------------------------------------
   PROJECT POSTER & CASE STUDY CARDS
   -------------------------------------------------------------------------- */
.project-poster-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-poster-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-red);
  transition: width 0.4s ease;
  z-index: 10;
}

.project-poster-card:hover {
  transform: translateY(-4px);
  border-color: var(--text-primary);
  box-shadow: 8px 8px 0px rgba(17, 17, 17, 0.8);
}

.project-poster-card:hover::before {
  width: 100%;
}

.project-thumb-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  border-bottom: 1px solid var(--line-color);
  background: #E0E0D9;
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(85%) contrast(105%);
  transition: filter 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-poster-card:hover .project-thumb {
  filter: grayscale(0%) contrast(100%);
  transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   SKILL MATRIX CARD
   -------------------------------------------------------------------------- */
.skill-category-box {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  padding: 1.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-category-box:hover {
  border-color: var(--accent-red);
  box-shadow: 4px 4px 0px rgba(143, 29, 37, 0.15);
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #FFFFFF;
  border: 1px solid var(--line-color);
  padding: 0.45rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.skill-pill:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: var(--accent-red-light);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   TIMELINE / DOSSIER LOG
   -------------------------------------------------------------------------- */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--line-color);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-red);
  border-radius: 50%;
  transition: background 0.3s ease, transform 0.3s ease;
}

.timeline-item:hover::before {
  background: var(--accent-red);
  transform: scale(1.3);
}

/* --------------------------------------------------------------------------
   BLUEPRINT ARCHITECTURE NODES
   -------------------------------------------------------------------------- */
.blueprint-box {
  background: #181818;
  border: 1px solid #333333;
  color: #F5F4F1;
  position: relative;
  transition: all 0.3s ease;
}

.blueprint-box:hover {
  border-color: var(--accent-red);
  box-shadow: 0 0 20px rgba(143, 29, 37, 0.3);
}

.blueprint-node {
  background: #222222;
  border: 1px solid #444444;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  transition: all 0.3s ease;
}

.blueprint-node:hover {
  border-color: var(--accent-red);
  background: #281D1F;
}

.blueprint-arrow {
  color: var(--accent-red);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   CASE STUDY MODAL
   -------------------------------------------------------------------------- */
.modal-backdrop-editorial {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop-editorial.active {
  opacity: 1;
  visibility: visible;
}

.modal-content-dossier {
  background: var(--bg-primary);
  border: 2px solid var(--text-primary);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 16px 16px 0px rgba(0, 0, 0, 0.9);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop-editorial.active .modal-content-dossier {
  transform: translateY(0) scale(1);
}

/* --------------------------------------------------------------------------
   EDITORIAL BUTTONS
   -------------------------------------------------------------------------- */
.btn-editorial-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--text-primary);
  text-transform: uppercase;
  transition: all 0.25s ease;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.btn-editorial-primary:hover {
  background-color: var(--accent-red);
  border-color: var(--accent-red);
  color: #FFFFFF;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--text-primary);
}

.btn-editorial-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--text-primary);
  text-transform: uppercase;
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-editorial-outline:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--accent-red);
}

.btn-editorial-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   FILTER TABS
   -------------------------------------------------------------------------- */
.filter-tab-editorial {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-tab-editorial:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.filter-tab-editorial.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  box-shadow: 3px 3px 0px var(--accent-red);
}

/* --------------------------------------------------------------------------
   NAVIGATION
   -------------------------------------------------------------------------- */
.editorial-nav-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  position: relative;
  transition: color 0.2s ease;
  text-decoration: none;
}

.editorial-nav-link:hover {
  color: var(--accent-red);
}

.editorial-nav-link.active {
  color: var(--accent-red);
}

.editorial-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background-color: var(--accent-red);
}

/* --------------------------------------------------------------------------
   KEYBOARD FOCUS & A11Y
   -------------------------------------------------------------------------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


