/* ==========================================================================
   Shafaq Irshad — High-Tech Editorial Portfolio Stylesheet
   Zero-lag, hardware-accelerated, modern dark/light typography & bento UI
   ========================================================================== */

:root {
  --bg-primary: #07070a;
  --bg-secondary: #0e0e13;
  --bg-card: rgba(14, 14, 19, 0.75);
  --bg-card-hover: rgba(22, 22, 30, 0.9);
  --bg-glass: rgba(14, 14, 19, 0.8);
  
  --text-primary: #f4f1ec;
  --text-secondary: #a7a6ad;
  --text-muted: #6d6c75;
  
  --accent-red: #e5132b;
  --accent-cyan: #ff3d5a;
  --accent-purple: #f4f1ec;
  --accent-emerald: #46e3a8;
  --accent-amber: #d9b46a;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.2);
  --border-glow: rgba(229, 19, 43, 0.35);
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Syne', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  --container-max: 1280px;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f6f7f9;
  --bg-secondary: #eaecef;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass: rgba(245, 247, 250, 0.85);
  
  --text-primary: #0d0e12;
  --text-secondary: #4a4d55;
  --text-muted: #838894;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: rgba(0, 0, 0, 0.2);
  --border-glow: rgba(230, 57, 70, 0.3);
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.preloader-active {
  overflow: hidden;
  height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-smooth);
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
  outline: none;
  border: none;
}

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

/* Subtle Halftone / Dot Grid Overlay */
.bg-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.8;
}

[data-theme="light"] .bg-grid-overlay {
  background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
}

.ambient-glow {
  position: fixed;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 19, 43, 0.08) 0%, rgba(217, 180, 106, 0.04) 50%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

/* --------------------------------------------------------------------------
   Preloader / Kinetic Flash Intro (Fast, smooth, zero-lag)
   -------------------------------------------------------------------------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #050507;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.7, 0, 0.3, 1), visibility 0.6s;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-bg-flash {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  filter: grayscale(100%) contrast(140%);
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.preloader-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, #050507 90%);
  pointer-events: none;
}

.preloader-word-wrap {
  position: relative;
  z-index: 2;
  text-align: center;
}

.preloader-word {
  font-family: var(--font-sans);
  font-size: clamp(3.5rem, 13vw, 9.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 50px rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.2, 1, 0.3, 1);
}

.preloader-word.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.preloader-word.exit {
  opacity: 0;
  transform: translateY(-20px) scale(1.05);
}

.preloader-progress {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.preloader-bar-track {
  width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--text-primary);
  transition: width 0.08s linear;
}

.preloader-skip {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.preloader-skip:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   Header & Top Editorial Bar
   -------------------------------------------------------------------------- */
.top-editorial-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

.top-editorial-bar .meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Brand Logo (SI.) */
.brand-logo-link {
  display: inline-flex;
  align-items: flex-end;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #ffffff;
  transition: transform var(--transition-smooth);
  user-select: none;
}

.brand-logo-link:hover {
  transform: scale(1.08);
}

.brand-si {
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.brand-dot {
  display: inline-block;
  width: 7.5px;
  height: 7.5px;
  background: var(--accent-red);
  margin-left: 2px;
  margin-bottom: 2px;
  border-radius: 1.5px;
  box-shadow: 0 0 10px var(--accent-red), 0 0 16px rgba(230, 57, 70, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-logo-link:hover .brand-dot {
  transform: scale(1.25);
  box-shadow: 0 0 14px var(--accent-red), 0 0 24px rgba(230, 57, 70, 0.85);
}

.nav-links-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(18, 18, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  position: relative;
}

.nav-link {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

/* Hover: Turns red */
.nav-link:hover {
  color: var(--accent-red);
  background: rgba(230, 57, 70, 0.08);
}

/* Active State: Text turns red + subtle background capsule + upper glowing red bar */
.nav-link.active {
  color: var(--accent-red);
  background: rgba(230, 57, 70, 0.12);
  font-weight: 700;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  background: var(--accent-red);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent-red), 0 0 18px rgba(230, 57, 70, 0.7);
  animation: glowPulseBar 2.2s infinite ease-in-out;
}

@keyframes glowPulseBar {
  0%, 100% { opacity: 0.9; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1.15); filter: drop-shadow(0 0 6px #e63946); }
}

/* Contact button highlight like the sample */
.nav-link.nav-cta {
  background: var(--accent-red);
  color: #ffffff;
  padding: 6px 16px;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(230, 57, 70, 0.35);
  margin-left: 4px;
}

.nav-link.nav-cta:hover {
  background: #e63946;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.6);
  transform: translateY(-1px);
}

.nav-link.nav-cta.active::before {
  top: -5px;
  width: 26px;
}

.theme-toggle-btn {
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: color var(--transition-smooth), transform var(--transition-smooth);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  transform: rotate(15deg);
}

/* --------------------------------------------------------------------------
   Hero Section (Editorial Headline + Eye Capsule)
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 82vh;
  padding-top: 110px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.hero-main-headline-wrap {
  padding: 10px 0;
}

.hero-headline {
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 7.5vw, 6.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.hero-line {
  display: block;
}

.hero-line-1 {
  white-space: nowrap;
}

.hero-line-2 {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  white-space: nowrap;
}

/* Red Oval Hand-Drawn Highlight around "WORKS" */
.word-highlight-wrap {
  position: relative;
  display: inline-block;
  padding: 0 0.12em;
  color: var(--text-primary);
}

.hand-drawn-oval {
  position: absolute;
  left: -10%;
  top: -15%;
  width: 120%;
  height: 130%;
  pointer-events: none;
  overflow: visible;
  transform: rotate(-1.5deg);
  z-index: 2;
}

.hand-drawn-oval path {
  stroke: var(--accent-red);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 700;
  stroke-dashoffset: 0;
  animation: drawOval 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawOval {
  0% { stroke-dashoffset: 700; }
  100% { stroke-dashoffset: 0; }
}

/* Capsule / Pill showing user's eyes */
.eye-capsule-container {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  position: relative;
  cursor: pointer;
}

.eye-capsule {
  position: relative;
  width: clamp(140px, 18vw, 240px);
  height: clamp(52px, 7vw, 95px);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--border-active);
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: border-color var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.eye-capsule:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(230, 57, 70, 0.3);
  transform: translateY(-2px);
}

.eye-capsule img {
  position: absolute;
  width: 360%;
  max-width: none;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-49.5%, -37.5%);
  pointer-events: none;
  user-select: none;
  filter: contrast(108%) brightness(98%);
  transition: transform 0.4s ease;
}

.eye-capsule:hover img {
  transform: translate(-49.5%, -37.5%) scale(1.04);
}

.eye-capsule-hint {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0.7;
}



.hero-subtext-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: flex-end;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}

.hero-lead-text {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.65;
}

.hero-lead-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), background var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-primary);
  padding: 13px 26px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-active);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-smooth);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* Scroll indicator pill */
.hero-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 35px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.scroll-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: color var(--transition-smooth);
}

.scroll-indicator:hover {
  color: var(--text-primary);
}

.mouse-icon {
  width: 18px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 10px;
  position: relative;
}

.mouse-wheel {
  position: absolute;
  width: 3px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  animation: wheelScroll 1.8s infinite;
}

@keyframes wheelScroll {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 10px); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Scroll-Reveal Portrait Section (Expanding Full Image)
   -------------------------------------------------------------------------- */
.reveal-portrait-section {
  padding: 24px 32px 18px;
  min-height: auto;
  display: flex;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.portrait-reveal-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  align-items: center;
  width: 100%;
}

.portrait-visual-card {
  position: relative;
  max-width: 380px;
  max-height: 480px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-slow), border-color var(--transition-smooth);
}

.portrait-visual-card:hover {
  border-color: var(--border-active);
}

.portrait-visual-card img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center 26%;
  transform: scale(1.42);
  filter: contrast(106%) brightness(98%);
  transition: transform 0.6s ease;
}

.portrait-visual-card:hover img {
  transform: scale(1.46);
}

.portrait-badge-overlay {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portrait-badge-name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
}

.portrait-badge-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.portrait-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(141, 191, 156, 0.15);
  color: var(--accent-emerald);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid rgba(141, 191, 156, 0.3);
}

.portrait-content-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
}

.section-tag::before {
  content: '//';
  opacity: 0.6;
}

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-lead {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.stats-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 6px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  backdrop-filter: blur(10px);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.stat-box:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
}

.stat-box-number {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-box-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Skills & Tech Matrix Section
   -------------------------------------------------------------------------- */
.skills-section {
  padding: 24px 32px 36px;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.section-title-cyan {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.15;
}

.section-title-cyan .slash-prefix {
  font-family: var(--font-mono);
  font-weight: 600;
  opacity: 0.7;
}

.skills-bento-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.skill-bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), background var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
}

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

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.skill-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.skill-card-icon.cyan { color: var(--accent-cyan); background: rgba(230, 57, 70, 0.1); }
.skill-card-icon.purple { color: var(--accent-purple); background: rgba(241, 245, 249, 0.1); }
.skill-card-icon.emerald { color: var(--accent-emerald); background: rgba(255, 107, 107, 0.1); }
.skill-card-icon.red { color: var(--accent-red); background: rgba(230, 57, 70, 0.1); }

.skill-card-title {
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 700;
}

.skill-card-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 12px;
  line-height: 1.45;
}

.skill-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
}

.tech-tag:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Horizontal Pinned Projects Showcase (Scroll-Driven Right-to-Left)
   -------------------------------------------------------------------------- */
.horizontal-works-section {
  position: relative;
  height: 680vh; /* Smooth scroll track duration */
  background: var(--bg-primary);
  z-index: 10;
}

.horizontal-sticky-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100vw;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 85px 0 28px;
  box-sizing: border-box;
}

.horizontal-header-top {
  padding: 0 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.work-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f4f1ec;
  margin: 0;
  line-height: 1.2;
}

.work-tag-prefix {
  color: #e5132b;
  font-weight: 800;
  opacity: .95;
  text-shadow: 0 0 14px rgba(229, 19, 43, .55);
}

.horizontal-scroll-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.horizontal-scroll-pill .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
  animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

.horizontal-track-container {
  display: flex;
  gap: 5vw;
  padding: 0 8vw;
  will-change: transform;
  transform: translateX(0px);
  align-items: center;
  margin: auto 0;
}

.project-slide-card {
  flex: 0 0 clamp(780px, 76vw, 1150px);
  height: clamp(440px, 64vh, 560px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 48px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  transition: border-color var(--transition-smooth), transform var(--transition-smooth);
}

.project-slide-card:hover {
  border-color: var(--border-active);
}

.slide-content-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.slide-project-title {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 0;
}

.slide-project-italic-sub {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--accent-red);
  margin-top: 10px;
  margin-bottom: 16px;
  font-weight: 500;
}

.slide-project-body {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 520px;
}

.slide-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.slide-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* Visual Mockup Frame (Right Column) */
.slide-visual-col {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-mockup-frame {
  width: 100%;
  height: 100%;
  max-height: 360px;
  background: linear-gradient(145deg, #13131c 0%, #0a0a10 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

.mockup-header-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-header-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.mockup-header-dots .dot.red { background: #ff5f56; }
.mockup-header-dots .dot.yellow { background: #ffbd2e; }
.mockup-header-dots .dot.green { background: #27c93f; }

.mockup-header-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.mockup-preview-inner {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  text-align: center;
}

.mockup-glow-icon {
  font-size: 3.2rem;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 25px currentColor);
  transition: transform 0.4s ease;
}

.project-slide-card:hover .mockup-glow-icon {
  transform: scale(1.1) rotate(4deg);
}

.mockup-info-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.mockup-stats-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.mini-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-stat .stat-num {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mini-stat .stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Bottom Progress Track */
.horizontal-progress-track {
  width: calc(100% - 8vw);
  max-width: var(--container-max);
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 auto;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.horizontal-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-cyan));
  box-shadow: 0 0 10px var(--accent-red);
  transition: width 0.1s linear;
}

/* Responsive Handling */
@media (max-width: 900px) {
  .horizontal-works-section {
    height: auto;
  }
  .horizontal-sticky-viewport {
    position: static;
    height: auto;
    padding: 60px 20px 40px;
  }
  .horizontal-track-container {
    flex-direction: column;
    padding: 0;
    gap: 30px;
    transform: none !important;
  }
  .project-slide-card {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }
  .slide-visual-col {
    order: -1;
  }
  .slide-mockup-frame {
    max-height: 220px;
  }
  .horizontal-progress-track, .horizontal-scroll-pill {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Contact & Direct Message Section (Formspree Connected)
   -------------------------------------------------------------------------- */
.contact-section {
  padding: 30px 32px 24px;
  min-height: calc(100vh - 46px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 24px;
  align-items: stretch;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-direct-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 380px;
}

.contact-direct-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.social-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.social-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
}

.social-link-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.social-link-icon {
  font-size: 1.05rem;
}

.copy-email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-active);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  margin-top: 16px;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.copy-email-box:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-cyan);
}

.copy-email-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
}

.copy-email-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Contact Form */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 380px;
}

#portfolioContactForm {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  background: rgba(10, 10, 14, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
}

.form-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 13px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.form-submit-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.form-status-msg {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  display: none;
}

.form-status-msg.success {
  display: block;
  color: var(--accent-emerald);
}

.form-status-msg.error {
  display: block;
  color: var(--accent-red);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.editorial-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 12px 32px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}



/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .top-editorial-bar {
    padding: 0 20px;
  }
  .nav-links-wrap {
    display: none;
  }
  .portrait-reveal-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .skills-bento-container {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .hero-headline {
    font-size: clamp(2.2rem, 11vw, 3.8rem);
  }
  .hero-line-1, .hero-line-2 {
    white-space: normal;
  }
  .hero-section {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 85px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .reveal-portrait-section,
  .skills-section,
  .projects-section,
  .contact-section {
    padding: 60px 20px;
  }
  .hero-subtext-grid {
    grid-template-columns: 1fr;
  }
  .social-links-grid {
    grid-template-columns: 1fr;
  }
  .stats-bento-grid {
    grid-template-columns: 1fr;
  }
}
