/* =============================================
   Edge Minimal Developers - Refined Design System
   ============================================= */

:root {
  /* Color Palette - Dark Grays & Accents */
  --base-100: #0a0a0a;
  --base-200: #0f0f0f;
  --base-300: #141414;
  --base-400: #1a1a1a;
  --base-500: #202020;

  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-muted: #525252;

  /* Aqua/Cyan accents as requested previously */
  --accent: #22d3d3;
  --accent-soft: rgba(34, 211, 211, 0.1);
  --border-color: rgba(255, 255, 255, 0.1);

  /* Typography - Unified Inter */
  --font-main: "Roboto", system-ui, sans-serif;
  --font-mono: "Roboto Mono", monospace;

  /* Layout */
  --container-max: 1200px;
  --section-padding: 120px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   Base Styles
   ============================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  background-color: var(--base-100);
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.5;
}

/* "Inter en modo MONOESPACIO" Styling Class 
   Applied to Titles, Lists, and Technical Keys */
/* Monospace ONLY for Titles, Subtitles and Terminal Keys */
h1,
h2,
h3,
  transition: height var(--transition);
h4,
h5,
h6,
.hero-tagline,
.section-label,
.btn-primary {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

/* Base Body Font for lists, descriptions and general text */
/* Base Body Font for lists, descriptions and general text */
.tech-stack li,
.feature-text,
.project-desc,
.features-description,
.contact-description,
.about-intro,
.copyright,
.project-tech span {
  font-family: var(--font-main);
}

/* Navigation uses mono for a terminal vibe */
.nav-links a,
.footer-nav a {
  font-family: var(--font-mono);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* =============================================
   Typography Scale (Exact Sizes)
   ============================================= */

/* Hero Section */
.tech-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
}

.hero-tagline {
  line-height: 1.2;
  min-height: 3.6em; /* Reserve space for up to ~3 lines to prevent button shifting */
}
.nav-links a {
  font-size: 16px;
  /* text-base */
  font-weight: 500;
  /* medium */
}

/* Contact Section spacing */
.contact .btn-secondary {
  margin-top: 1rem;
  align-self: flex-start;
  width: auto;
  max-width: fit-content;
  white-space: nowrap;
}


.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px;
  align-items: center;
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact .section-label {
  margin-bottom: 4px;
}

.contact-title {
  margin-bottom: 8px;
}

.contact-description {
  margin-bottom: 10px;
}

.contact-points {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 0;
}

.contact-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.contact-points li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.contact-panel {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  max-width: 420px;
  margin-left: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.contact-panel__title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-panel__note {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.contact-panel__form {
  width: 100%;
  margin-top: 18px;
}

.contact-panel__input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--base-200);
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-bottom: 12px;
  box-shadow: none;
}

.contact-panel__input:focus {
  outline: none;
  border-color: var(--accent);
}

.contact .contact-panel__submit {
  width: 100%;
}

.contact .btn-icon {
  width: 20px;
  height: 20px;
}

/* Contact Section background with left-heavy overlay */
.contact {
  position: relative;
  overflow: hidden;
  background-image: url("https://images.unsplash.com/photo-1592609931095-54a2168ae893?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  color: var(--text-primary);
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.95) 50%,
    rgba(0, 0, 0, 0.6) 70%,
    rgba(0, 0, 0, 0) 100%
  );
}

.contact .container {
  position: relative;
  z-index: 1;
}

/* About Section */
.about-title {
  font-size: 30px;
  /* text-3xl */
  font-weight: 600;
  /* semibold */
  margin-bottom: 1.5rem;
}

.about-intro {
  font-size: 20px;
  /* text-xl */
  color: var(--text-secondary);
}

.tech-stack li {
  font-size: 16px;
  /* text-base */
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Features Section */
.section-label {
  font-family: var(--font-mono);
  font-size: 16px;
  /* text-base */
  line-height: 1.75;
  /* /7 equivalent-ish */
  font-weight: 600;
  /* semibold */
  text-transform: uppercase;
  color: var(--accent);
}

.features-title {
  font-size: 36px;
  /* text-4xl mobile */
  font-weight: 600;
  /* semibold */
  margin-bottom: 1.5rem;
}

.features-description {
  font-size: 18px;
  /* text-lg */
  line-height: 2;
  /* /8 equivalent */
  color: var(--text-secondary);
}

.feature-title {
  font-size: 16px;
  /* text-base/7 */
  font-weight: 600;
  /* semibold */
  margin-bottom: 0.75rem;
}

.feature-text {
  font-size: 16px;
  /* text-base/7 */
  color: var(--text-secondary);
}

/* Projects & Footer */
.projects-title {
  font-size: 30px;
  font-weight: 600;
}

.project-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

.footer-nav a {
  font-size: 16px;
  /* text-base */
}

.copyright {
  font-size: 12px;
  /* text-xs */
  color: var(--text-muted);
}

/* =============================================
   Responsive Polish (sm: breakpoints)
   ============================================= */

@media (min-width: 640px) {
  .hero-title {
    font-size: 129.6px; /* 1.8x */
    /* sm:text-7xl */
  }

  .hero-tagline {
    font-size: 34.56px; /* reduced 20% */
    /* sm:text-2xl */
  }

  .features-title {
    font-size: 48px;
    /* sm:text-5xl */
  }
}

/* =============================================
   Section Separation (Background Tones)
   ============================================= */

#hero {
  background-color: var(--base-100);
}

#features {
  background-color: var(--base-200);
}

#about {
  background-color: var(--base-300);
}

#projects {
  background-color: var(--base-100);
}

#contact {
  background-color: var(--base-200);
}

.footer {
  background-color: var(--base-100);
  border-top: 1px solid var(--border-color);
  padding: 60px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer .logo-img {
  height: 32px;
  width: auto;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.footer-nav a {
  color: var(--text-secondary);
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  background: var(--base-200);
  transition: var(--transition);
}

.github-link:hover {
  color: var(--base-100);
  background: var(--accent);
  border-color: var(--accent);
}

.copyright {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .footer-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* =============================================
   Global Layout Components
   ============================================= */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px; /* Breathe within the box */
}

section {
  padding: var(--section-padding) 0;
}

/* =============================================
   Navigation
   ============================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px 0;
  z-index: 1000;
  transition: var(--transition);
}

.header-scrolled {
  padding: 15px 0;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-scrolled .logo-img {
  height: 30px;
  transition: height 0.24s cubic-bezier(0.33, 1, 0.68, 1);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-img {
  display: block;
  height: 40px;
  width: auto;
  transition: height 0.24s cubic-bezier(0.33, 1, 0.68, 1);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::before {
  content: "<";
  color: var(--accent);
}

.nav-links a.active::after {
  content: ">";
  color: var(--accent);
}

/* =============================================
   Hero Section
   ============================================= */

.hero {
  position: relative;
  /* Full-height hero, left-aligned within boxed container */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center; /* keep boxed container centered */
  background-image: url("assets/images/webp/mohammad-rahmani-nBXwqxjDa5c-unsplash.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Ensure the boxed container spans full available width inside flex */
.hero > .container {
  width: 100%;
}

/* Align the hero's boxed container to the left edge */
/* Boxed site: keep the container centered globally */

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* Negro, gradiente diagonal: arriba-izquierda 95% → derecha-abajo 50% */
  background-image: linear-gradient(
    to bottom right,
    rgba(0, 0, 0, 0.95),
    rgba(0, 0, 0, 0.5)
  );
  background-size: auto;
  background-position: center;
}

.hero-content {
  position: relative; /* sit above overlay */
  z-index: 2;
  max-width: var(--container-max);
  width: 100%;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2s ease;
  z-index: 0;
}

.hero-bg-layer.active {
  opacity: 1;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: 86.4px; /* 1.8x */
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 2.5rem;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 28.8px; /* reduced 20% */
  color: var(--accent);
  margin-bottom: 3rem;
  display: block; /* Ensure it starts on its own line */
  white-space: pre-wrap; /* Preserve newlines in typewriter output */
  line-height: 1.2;
  min-height: 3.6em;
}

.hero-tagline::after {
  content: "█";
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1rem;
}

@keyframes blink {
  from,
  to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.btn-primary {
  display: inline-flex;
}

/* Features Styling */
.features-header {
  max-width: 800px;
  margin: 0 auto 100px;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

.feature-card {
  padding: 40px;
  border: 1px solid var(--border-color);
  background: var(--base-300);
  border-radius: 4px;
}

.feature-icon {
  color: var(--accent);
  margin-bottom: 2rem;
  width: 32px;
}

.feature-title {
  font-family: var(--font-mono);
  font-size: 20px;
  margin-bottom: 1rem;
}

/* About Section */
.about-content {
  max-width: 700px;
  margin: 0 auto;
}

.tech-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (min-width: 900px) {
  .tech-stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.tech-stack li {
  list-style: none;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: transform var(--transition);
}

.tech-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition), filter var(--transition), opacity var(--transition);
}

.tech-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--base-300);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  overflow: hidden;
}

.tech-icon svg {
  width: 38px;
  height: 38px;
}

.tech-icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.tech-name {
  font-size: 16px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.tech-item:hover {
  transform: translateY(-6px);
}

.tech-item:hover .tech-logo {
  transform: scale(1.06);
  filter: drop-shadow(0 10px 22px rgba(34, 211, 211, 0.18));
}

.tech-item:hover .tech-name {
  color: var(--text-primary);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem;
  max-width: var(--container-max);
  margin: 50px auto 0;
}

.projects-cta {
  display: flex;
  justify-content: center;
  margin-top: 56px;
  margin-bottom: 16px;
}

.project-card {
  background: var(--base-200);
  border: 1px solid var(--border-color);
  transition: transform 0.4s ease;
}

/* Portfolio hero */
.portfolio-hero {
  position: relative;
  min-height: 180px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--base-300);
}

.portfolio-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1545239351-1141bd82e8a6?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.portfolio-hero__overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to bottom right,
    rgba(0, 0, 0, 0.95),
    rgba(0, 0, 0, 0.5)
  );
  z-index: 1;
}

.portfolio-hero__content {
  position: relative;
  z-index: 2;
  padding: 36px 0;
  text-align: center;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-image {
  height: 200px;
  background: var(--base-300);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-content {
  padding: 30px;
}

.project-tech {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.project-tech span {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 2px;
}

/* Buttons */
/* Buttons moved to retro.css for unified styling */

/* =============================================
   Mobile Menu
   ============================================= */

.mobile-menu-btn {
  display: none;
}

@media (max-width: 768px) {
  .nav {
    position: relative;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--base-200);
    border-radius: 4px;
    gap: 4px;
  }

  .mobile-menu-btn .menu-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 16px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .nav-links.nav-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }
}

/* Anchor offset for fixed header */
section[id] {
  scroll-margin-top: 100px;
}

/* Reveal Animations Classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s ease-out;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   Case Study Template Styles
   ============================================= */

.case-study-hero {
  padding-top: 80px; /* Account for fixed header */
}

.case-study-hero .case-study-tags {
  margin-top: 1.5rem;
  justify-content: center;
}

.case-study-section {
  padding: var(--section-padding) 0;
  background-color: var(--base-100);
}

.case-study-section--alt {
  background-color: var(--base-200);
}

.case-study-section .section-label {
  display: block;
  margin-bottom: 1rem;
}

.case-study-section .features-title {
  margin-bottom: 1.5rem;
}

.case-study-section .features-description {
  max-width: 800px;
}

/* Approach Highlights */
.approach-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Architecture Diagram */
.architecture-diagram {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.architecture-placeholder {
  width: 100%;
  max-width: 800px;
  height: 400px;
  background: var(--base-200);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
}

.architecture-placeholder svg {
  width: 64px;
  height: 64px;
}

/* Modules Grid */
.modules-grid {
  margin-top: 3rem;
}

/* Tech Stack Table */
.tech-stack-table {
  margin-top: 3rem;
  overflow-x: auto;
}

.stack-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 14px;
}

.stack-table th,
.stack-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.stack-table th {
  background: var(--base-300);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stack-table tr:hover {
  background: var(--base-200);
}

/* Impact Metrics */
.impact-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.metric-card {
  background: var(--base-300);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}

.metric-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Compliance Badges */
.compliance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.compliance-badge {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
}

/* Values Highlight */
.values-highlight {
  margin-top: 3rem;
}

.value-card {
  background: var(--base-300);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  padding: 2rem;
  border-radius: 0 8px 8px 0;
}

.value-name {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

.value-description {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* =============================================
   Portfolio Navigation & Filters
   ============================================= */

.portfolio-nav {
  background-color: var(--base-200);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  position: sticky;
  top: 70px; /* Below fixed header */
  z-index: 100;
}

.portfolio-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.portfolio-tab {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.portfolio-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.portfolio-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--base-100);
}

.portfolio-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.filter-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tag.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Portfolio Section Styles */
.portfolio-section {
  background-color: var(--base-100);
}

.portfolio-section--alt {
  background-color: var(--base-200);
}

.section-header {
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .portfolio-nav {
    top: 60px;
    padding: 1rem 0;
  }

  .portfolio-nav .container {
    overflow: hidden;
  }

  .portfolio-tabs {
    gap: 0.25rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    scrollbar-width: thin;
  }

  .portfolio-tabs::-webkit-scrollbar {
    height: 4px;
  }

  .portfolio-tabs::-webkit-scrollbar-track {
    background: var(--base-300);
  }

  .portfolio-tabs::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 2px;
  }

  .portfolio-tab {
    font-size: 12px;
    padding: 0.4rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .portfolio-filters {
    max-width: 100%;
    overflow: hidden;
  }

  .filter-tags {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    scrollbar-width: thin;
  }

  .filter-tags::-webkit-scrollbar {
    height: 4px;
  }

  .filter-tags::-webkit-scrollbar-track {
    background: var(--base-300);
  }

  .filter-tags::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 2px;
  }

  .filter-tag {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .portfolio-nav {
    top: 55px;
  }

  .portfolio-filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title {
    font-size: 24px;
  }
}

/* =============================================
   Breadcrumb Navigation
   ============================================= */

.breadcrumb {
  background-color: var(--base-200);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  /* margin-top removed - breadcrumb now appears below portfolio-hero */
}

.breadcrumb .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 14px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.breadcrumb-item::after {
  content: "/";
  color: var(--text-muted);
}

.breadcrumb-item:last-child::after {
  content: "";
}

.breadcrumb-item a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

.breadcrumb-item a:hover {
  color: var(--accent);
}

.breadcrumb-item.active {
  color: var(--accent);
}

.breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.breadcrumb-back:hover {
  color: var(--accent);
}

.breadcrumb-back svg {
  transition: transform var(--transition);
}

.breadcrumb-back:hover svg {
  transform: translateX(-4px);
}

@media (max-width: 480px) {
  .breadcrumb .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .breadcrumb-list {
    font-size: 12px;
  }

  .breadcrumb-back {
    font-size: 12px;
  }
}

/* =============================================
   Mobile Responsiveness Improvements
   ============================================= */

/* Small mobile devices (up to 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  section {
    padding: 60px 0;
  }

  /* Hero Section Mobile */
  .hero-title {
    font-size: 36px;
    margin-bottom: 1.5rem;
  }

  .hero-tagline {
    font-size: 16px;
    min-height: 4em;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }

  /* Features Section Mobile */
  .features-header {
    margin-bottom: 60px;
  }

  .features-title {
    font-size: 28px;
  }

  .features-description {
    font-size: 16px;
    line-height: 1.6;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 24px;
  }

  /* Projects Section Mobile */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-content {
    padding: 20px;
  }

  .project-tech {
    gap: 0.5rem;
  }

  .project-tech span {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
  }

  /* About Section Mobile */
  .tech-stack {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .tech-logo {
    width: 60px;
    height: 60px;
  }

  .tech-name {
    font-size: 14px;
  }

  /* Contact Section Mobile */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-panel {
    max-width: 100%;
    margin-left: 0;
    padding: 20px;
  }

  .contact-title {
    font-size: 24px;
  }

  .contact-points {
    gap: 6px;
  }

  .contact-points li {
    font-size: 14px;
  }

  .contact .btn-secondary {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
  }

  /* Footer Mobile */
  .footer {
    padding: 40px 0;
  }

  .footer-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  /* Portfolio Hero Mobile */
  .portfolio-hero__content {
    padding: 24px 0;
  }

  .portfolio-hero__content .features-title {
    font-size: 24px;
  }

  /* Case Study Mobile */
  .case-study-section {
    padding: 60px 0;
  }

  .approach-highlights {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .impact-metrics {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .metric-value {
    font-size: 36px;
  }

  .stack-table {
    font-size: 12px;
  }

  .stack-table th,
  .stack-table td {
    padding: 0.5rem;
  }
}

/* Medium mobile devices (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  section {
    padding: 80px 0;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-tagline {
    font-size: 20px;
    min-height: 3.6em;
  }

  .features-title {
    font-size: 32px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    max-width: 100%;
    margin-left: 0;
  }

  .tech-stack {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet devices (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 32px;
  }

  .hero-title {
    font-size: 72px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* End of Edge Minimal Developers - Refined Design System */
