/* 
  Project: Allam Raja Rathna Reddy Portfolio
  Theme: Cinematic Tech, Dark Navy/Charcoal, Glassmorphism
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Cinematic Color Palette */
  --bg-color: #0b1016;
  /* Deep charcoal/navy background */
  --surface-color: #121921;
  /* Slightly lighter for cards */
  --primary-accent: #0284c7;
  /* Futuristic blue */
  --secondary-accent: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --nav-bg: rgba(11, 16, 22, 0.85);

  /* Glassmorphism */
  --glass-bg: rgba(18, 25, 33, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);

  /* Shadows */
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 15px rgba(2, 132, 199, 0.3);

  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Poppins', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-accent);
}

img {
  max-width: 100%;
  border-radius: 8px;
}

/* Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow-subtle);
}

.text-gradient {
  background: linear-gradient(90deg, var(--text-primary), var(--secondary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated shifting gradient for page titles */
.text-gradient-animated {
  background: linear-gradient(90deg, var(--text-primary), var(--secondary-accent), var(--primary-accent), var(--text-primary));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s linear infinite;
  text-shadow: 0 0 30px rgba(56, 189, 248, 0.15);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.brand-avatar-icon,
.brand-logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--secondary-accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav-brand:hover .brand-avatar-icon,
.nav-brand:hover .brand-logo-icon {
  transform: scale(1.1) rotate(4deg);
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.7);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(0.65rem, 1.25vw, 1.6rem);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
  /* Animated Virtual Production Gradient (White to Light Blue) */
  background: linear-gradient(90deg, #ffffff, var(--secondary-accent), #ffffff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 10s linear infinite;

  text-shadow: 0 0 5px rgba(56, 189, 248, 0.2);
  /* Subtle permanent glow behind transparent text */
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}

/* Staggered offsets for natural uncoupled gradient flows (all 9 nav items) */
.nav-links li:nth-child(1) a {
  animation-duration: 9s;
  animation-delay: -2s;
}

.nav-links li:nth-child(2) a {
  animation-duration: 12s;
  animation-delay: -5s;
}

.nav-links li:nth-child(3) a {
  animation-duration: 8s;
  animation-delay: -1s;
}

.nav-links li:nth-child(4) a {
  animation-duration: 11s;
  animation-delay: -7s;
}

.nav-links li:nth-child(5) a {
  animation-duration: 14s;
  animation-delay: -3s;
}

.nav-links li:nth-child(6) a {
  animation-duration: 10s;
  animation-delay: -8s;
}

.nav-links li:nth-child(7) a {
  animation-duration: 13s;
  animation-delay: -4s;
}

.nav-links li:nth-child(8) a {
  animation-duration: 11s;
  animation-delay: -6s;
}

.nav-links li:nth-child(9) a {
  animation-duration: 9s;
  animation-delay: -9s;
}

.nav-links li:nth-child(10) a {
  animation-duration: 11s;
  animation-delay: -3s;
}

.nav-links a:hover,
.nav-links a.active {
  /* Reduced glow to ~60-70% intensity */
  text-shadow: 0 0 15px rgba(2, 132, 199, 0.6), 0 0 25px rgba(56, 189, 248, 0.7);
  transform: translateY(-3px) scale(1.05);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  position: relative;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Sections Base */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

.btn-primary:hover {
  background: var(--secondary-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  border-color: var(--primary-accent);
  background: rgba(2, 132, 199, 0.1);
  transform: translateY(-2px);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Footer */
footer {
  background: var(--surface-color);
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.social-links a:hover {
  color: var(--primary-accent);
  transform: translateY(-3px);
  display: inline-block;
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Media Queries */
@media (max-width: 992px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--surface-color);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.4s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    right: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .container {
    padding: 0 1.2rem;
  }

  section {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .timeline-item {
    margin-left: 15px !important;
    padding: 1.2rem !important;
    padding-left: 45px !important;
  }

  .timeline::before {
    left: 15px !important;
  }

  .timeline-item::before {
    left: 9px !important;
  }
}

/* --- PAGE SPECIFIC STYLES --- */

/* Hero Section (Home / Front Page) */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--nav-height);
  overflow: hidden;
}

/* Cinematic Background Effect */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.15) 0%, rgba(11, 16, 22, 0) 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, rgba(11, 16, 22, 0) 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero .grid-2 {
  align-items: center;
  gap: 4rem;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-text h2 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  color: var(--secondary-accent);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-text p.subhead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.executive-summary {
  padding: 2rem;
  margin-top: 2rem;
  border-left: 3px solid var(--primary-accent);
}

.executive-summary p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.portrait-wrapper {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.portrait-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, var(--surface-color), #0a0e14);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.portrait-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: transform 0.5s ease;
}

.portrait-placeholder:hover img {
  transform: scale(1.03);
}

.portrait-badge {
  position: absolute;
  bottom: 2rem;
  right: -2rem;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.portrait-badge span {
  display: block;
  color: var(--primary-accent);
  font-weight: 700;
}

@media (max-width: 992px) {
  .hero {
    padding-top: calc(var(--nav-height) + 2rem);
    text-align: center;
  }

  .hero .grid-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .executive-summary {
    text-align: left;
  }

  .portrait-badge {
    right: 1rem;
    bottom: 1rem;
  }
}


/* About Page */

.about-header {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 2rem;
  text-align: center;
}

.resume-section {
  margin-bottom: 4rem;
}

.resume-section h2 {
  font-size: 2rem;
  color: var(--primary-accent);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--glass-border);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 3rem;
  text-align: left;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 38px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-accent);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}

.timeline-title {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 1.1rem;
  color: var(--secondary-accent);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.timeline-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
}

.timeline-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.timeline-desc ul {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}


/* Page Header (Filmography, Coding, Automation) */

.page-header {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 2rem;
  text-align: center;
}

/* Filmography Page */

/* Filter Controls */
.controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  background: var(--glass-bg);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select {
  padding: 0.8rem 1.5rem;
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-family: var(--font-primary);
  outline: none;
  cursor: pointer;
  min-width: 200px;
  transition: border-color 0.3s ease;
}

.filter-group select:focus {
  border-color: var(--primary-accent);
}

/* Film Grid */
.film-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1200px) {
  .film-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .film-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .film-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 400px) {
  .film-grid {
    grid-template-columns: 1fr;
  }
}

.film-card {
  background: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  border: 1px solid var(--glass-border);
}

.film-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
  border-color: var(--primary-accent);
}

/* DNEG Highlight */
.film-card.dneg-highlight::before {
  content: 'DNEG';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary-accent);
  color: #fff;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-bottom: 1px solid var(--glass-border);
  border-radius: 0;
  transition: transform 0.5s ease;
}

.film-card:hover .poster {
  transform: scale(1.05);
}

.poster-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.film-info {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
  background: var(--surface-color);
}

.film-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.film-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.film-role {
  color: var(--secondary-accent);
  font-weight: 500;
  font-size: 0.95rem;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  color: var(--text-secondary);
  font-size: 1.2rem;
  background: var(--glass-bg);
  border-radius: 12px;
}


/* Automation Page */

.positioning-text {
  max-width: 800px;
  margin: 0 auto 4rem auto;
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
}

.service-card {
  padding: 2.5rem;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--primary-accent);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary-accent);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.service-card ul {
  list-style: none;
  padding-left: 0;
  color: var(--text-secondary);
}

.service-card ul li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5rem;
}

.service-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--secondary-accent);
}

/* Flow Diagrams */
.flow-diagram-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.flow-item {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid var(--primary-accent);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  min-width: 120px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  flex: 1 1 min-content;
}

.flow-arrow {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.diagram-title {
  width: 100%;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--secondary-accent);
}

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.benefit-item h4 {
  font-size: 1.2rem;
  color: var(--primary-accent);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.benefit-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(to bottom, var(--bg-color), rgba(2, 132, 199, 0.1));
  border-top: 1px solid var(--glass-border);
  text-align: center;
  padding: 6rem 2rem;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .flow-diagram {
    flex-direction: column;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }
}


/* Coding & Technical Page */

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-top: 3rem;
}

.skill-category {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-accent);
}

.category-title {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.category-title-icon {
  font-size: 2.5rem;
  color: var(--primary-accent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-item {
  background: var(--surface-color);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
  border-color: var(--secondary-accent);
  box-shadow: 0 5px 15px rgba(56, 189, 248, 0.1);
}

.skill-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.skill-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.skill-bar-container {
  background: #1e293b;
  border-radius: 3px;
  margin-top: 1rem;
  overflow: hidden;
  height: 8px;
}

.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
  border-radius: 3px;
  width: 0;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  /* Cinematic smooth easing */
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ==========================================================================
   BLOG & ENGINEERING JOURNAL SYSTEM
   ========================================================================== */

/* Blog Hero & Author Badge */
.blog-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-hero-header {
  margin-bottom: 2.5rem;
}

.blog-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.25rem 0.5rem 0.6rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.blog-author-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.author-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--secondary-accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.author-badge-text {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.author-role {
  font-size: 0.8rem;
  color: var(--secondary-accent);
}

/* Blog Controls: Search & Category Filter Pills */
.blog-controls {
  padding: 1.5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-search-box {
  position: relative;
  width: 100%;
}

.blog-search-box .search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1rem;
  pointer-events: none;
}

.blog-search-box input {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 3.2rem;
  background: rgba(11, 16, 22, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
}

.blog-search-box input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.35);
  background: rgba(11, 16, 22, 0.85);
}

.blog-search-box .clear-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.blog-search-box .clear-btn:hover {
  color: var(--text-primary);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.cat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cat-pill:hover {
  background: rgba(2, 132, 199, 0.15);
  color: var(--text-primary);
  border-color: var(--primary-accent);
}

.cat-pill.active {
  background: linear-gradient(135deg, var(--primary-accent), #026ca5);
  color: #ffffff;
  border-color: var(--secondary-accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.pill-count {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
}

/* Featured Article Spotlight */
.featured-card {
  padding: 2.5rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: linear-gradient(145deg, rgba(18, 25, 33, 0.85), rgba(11, 16, 22, 0.9));
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent), #ffffff);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(2, 132, 199, 0.2);
}

.featured-badge-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.badge-featured {
  background: rgba(56, 189, 248, 0.15);
  color: var(--secondary-accent);
  border: 1px solid var(--secondary-accent);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-tag {
  color: var(--secondary-accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.read-time, .publish-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.featured-title {
  font-size: 1.9rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.featured-title a {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.featured-title a:hover {
  color: var(--secondary-accent);
}

.featured-summary {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 950px;
}

.featured-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: monospace;
}

.tech-tag-sm {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
}

/* Articles Section & Grid */
.section-subheading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.subheading-title {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.article-counter-badge {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

.blog-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--glass-border);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border-radius: 12px;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(2, 132, 199, 0.15);
}

.blog-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.blog-card-title {
  font-size: 1.3rem;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

.blog-card-title a {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.blog-card-title a:hover {
  color: var(--secondary-accent);
}

.blog-card-summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  margin-bottom: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.card-tags {
  display: flex;
  gap: 0.4rem;
}

.blog-card-action {
  text-align: right;
}

.read-more-link {
  background: none;
  border: none;
  color: var(--secondary-accent);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  transition: gap 0.2s ease, color 0.2s ease;
}

.read-more-link:hover {
  color: #ffffff;
  gap: 0.7rem;
}

/* Reader Modal Fullscreen Experience */
.reader-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  overflow-y: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reader-modal-overlay.active {
  display: block;
  opacity: 1;
}

.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent), #ffffff);
  width: 0%;
  z-index: 2100;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  transition: width 0.1s ease-out;
}

.reader-modal-container {
  max-width: 860px;
  margin: 3rem auto 6rem auto;
  padding: 3rem;
  background: rgba(14, 20, 28, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.reader-modal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--glass-border);
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(2, 132, 199, 0.2);
  border-color: var(--primary-accent);
  color: var(--secondary-accent);
}

.reader-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-icon:hover {
  color: var(--secondary-accent);
  border-color: var(--secondary-accent);
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

/* Modal Article Typography & Elements */
.article-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.article-full-title {
  font-size: 2.3rem;
  line-height: 1.25;
  margin-bottom: 1.75rem;
}

.article-author-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.author-modal-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--secondary-accent);
}

.author-modal-info {
  display: flex;
  flex-direction: column;
}

.author-modal-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.author-modal-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.article-body-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e2e8f0;
}

.article-body-content p {
  margin-bottom: 1.5rem;
}

.article-body-content .lead-paragraph {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.7;
  color: #f1f5f9;
  border-left: 3px solid var(--secondary-accent);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
}

.article-body-content h3 {
  font-size: 1.6rem;
  color: #ffffff;
  margin: 2.5rem 0 1.25rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.article-body-content ul, 
.article-body-content ol {
  margin: 1.25rem 0 1.75rem 1.75rem;
}

.article-body-content li {
  margin-bottom: 0.65rem;
}

.article-body-content blockquote {
  margin: 2.5rem 0;
  padding: 1.75rem 2rem;
  background: rgba(2, 132, 199, 0.08);
  border-left: 4px solid var(--primary-accent);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 1.2rem;
  color: #f8fafc;
}

.code-block-wrapper {
  margin: 2rem 0;
  border-radius: 10px;
  background: #070b10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

.code-lang {
  color: var(--secondary-accent);
  font-family: monospace;
  font-weight: 600;
}

.code-title {
  color: var(--text-secondary);
  font-family: monospace;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #38bdf8;
}

.callout-text {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.95rem;
  color: #7dd3fc;
  margin: 1.25rem 0;
}

/* Article Footer Card */
.article-footer-card {
  margin-top: 3.5rem;
  padding: 2rem;
  border-radius: 12px;
}

.tags-row {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.author-bio-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--primary-accent);
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.3);
}

.author-bio-box h4 {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.author-bio-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

.bio-links a {
  color: var(--secondary-accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.bio-links a:hover {
  text-decoration: underline;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0284c7;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3000;
  pointer-events: none;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer Brand Wrap */
.footer-brand-wrap {
  margin-bottom: 1.5rem;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-card {
    padding: 1.75rem;
  }
  
  .featured-title {
    font-size: 1.5rem;
  }
  
  .reader-modal-container {
    margin: 1.5rem 1rem 4rem 1rem;
    padding: 1.75rem;
  }
  
  .article-full-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 600px) {
  .category-pills {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  
  .author-bio-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .author-badge-text {
    display: none;
  }
}

/* Avatar Switcher */
.avatar-switcher {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  z-index: 10;
  position: relative;
}

.avatar-toggle-btn {
  background: rgba(18, 25, 33, 0.7);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.avatar-toggle-btn:hover {
  background: rgba(2, 132, 199, 0.2);
  color: #ffffff;
  border-color: var(--primary-accent);
}

.avatar-toggle-btn.active {
  background: var(--primary-accent);
  color: #ffffff;
  border-color: var(--secondary-accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}
