/* ==========================================================
   Om Prasad Sahoo - Developer Portfolio Stylesheet
   Refined Human-Crafted Architecture (2026)
   ========================================================== */

/* Google Fonts: Plus Jakarta Sans & JetBrains Mono */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-muted: rgba(14, 165, 233, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(14, 165, 233, 0.35);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #090d16;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
  border: 1px solid #090d16;
}

::-webkit-scrollbar-thumb:hover {
  background: #0ea5e9;
}

/* Base Typography */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background-color: #090d16;
  color: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Fluid Typography */
.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.025em;
}

/* Section Background Subtle Watermark Numbers */
.section-header-wrap {
  position: relative;
  overflow: visible;
}

.section-watermark {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(4rem, 12vw, 7.5rem);
  font-family: var(--font-heading);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.025);
  user-select: none;
  pointer-events: none;
  line-height: 1;
  z-index: 0;
  letter-spacing: -0.05em;
}

html:not(.dark) .section-watermark {
  color: rgba(0, 0, 0, 0.03);
}

/* Restrained Editorial Accent for Names & Highlights */
.accent-highlight {
  color: var(--accent);
}

/* Unified Surface & Card System (Flat + Subtle Border) */
.glass-panel,
.bento-card,
.surface-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.bento-card:hover,
.surface-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.35);
}

/* Navigation Links */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 9999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: #ffffff !important;
}

/* Buttons (Solid Restrained Accent & Refined Outlines) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  background-color: var(--accent);
  border: 1px solid transparent;
  border-radius: 0.75rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -2px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  background-color: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: rgba(51, 65, 85, 0.8);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.4);
  transform: translateY(-1px);
}

/* Skill & Project Filter Tabs */
.skill-filter-btn, .project-filter-btn {
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 0.625rem;
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.skill-filter-btn:hover, .project-filter-btn:hover {
  background: rgba(51, 65, 85, 0.7);
  color: #ffffff;
  border-color: rgba(14, 165, 233, 0.3);
}

.skill-filter-btn.active, .project-filter-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px -1px rgba(14, 165, 233, 0.35);
}

/* Skill Cards */
.skill-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.skill-card.hide, .project-item.hide {
  display: none !important;
}

/* Project Cards */
.project-item {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-item:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.4);
}

/* Cert Cards */
.cert-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.cert-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

/* Skill Progress Bars */
.progress-track {
  background: rgba(30, 41, 59, 0.8);
  border-radius: 9999px;
  overflow: hidden;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  width: 0%;
  background-color: var(--accent);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scroll-Triggered Reveal Animations (Subtle & Quiet) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Back-to-Top Floating Button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(51, 65, 85, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1f5f9;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.35);
}

#back-to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#back-to-top:hover {
  background: #1e293b;
  border-color: var(--accent);
  color: var(--accent);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.15s ease-out;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* Light Mode Styles (Intentional, Clean Editorial Architecture) */
html:not(.dark) body {
  background-color: #f8fafc;
  color: #0f172a;
}

html:not(.dark) header {
  background-color: rgba(255, 255, 255, 0.92);
  border-color: #e2e8f0;
}

html:not(.dark) .glass-panel,
html:not(.dark) .bento-card,
html:not(.dark) .surface-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.04);
}

html:not(.dark) .bento-card:hover,
html:not(.dark) .surface-card:hover {
  border-color: #0284c7;
  box-shadow: 0 10px 20px -6px rgba(0, 0, 0, 0.08);
}

html:not(.dark) .bg-slate-900\/60,
html:not(.dark) .bg-slate-900\/70,
html:not(.dark) .bg-slate-900\/80,
html:not(.dark) .bg-slate-900 {
  background-color: #ffffff;
  border-color: #e2e8f0;
}

html:not(.dark) .bg-slate-800\/50,
html:not(.dark) .bg-slate-800\/60,
html:not(.dark) .bg-slate-800\/80,
html:not(.dark) .bg-slate-800 {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #1e293b;
}

html:not(.dark) .bg-slate-950\/40,
html:not(.dark) .bg-slate-950\/80,
html:not(.dark) .bg-slate-950 {
  background-color: #f8fafc;
}

html:not(.dark) .text-white {
  color: #0f172a !important;
}

html:not(.dark) .text-slate-100,
html:not(.dark) .text-slate-200,
html:not(.dark) .text-slate-300 {
  color: #334155 !important;
}

html:not(.dark) .text-slate-400 {
  color: #64748b !important;
}

html:not(.dark) .skill-filter-btn,
html:not(.dark) .project-filter-btn {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

html:not(.dark) .skill-filter-btn:hover,
html:not(.dark) .project-filter-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html:not(.dark) .skill-filter-btn.active,
html:not(.dark) .project-filter-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

html:not(.dark) .btn-secondary {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

html:not(.dark) .btn-secondary:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

html:not(.dark) input,
html:not(.dark) textarea {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html:not(.dark) #back-to-top {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Print Optimization */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  canvas, #toast, header, footer, .no-print, button, #back-to-top {
    display: none !important;
  }

  main {
    padding-top: 0 !important;
  }

  .glass-panel, .bento-card, .surface-card, .bg-slate-900\/70, .bg-slate-800\/60 {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  h1, h2, h3, h4, span, p, div {
    color: #111827 !important;
    text-shadow: none !important;
  }
}
