/* =============================================
   DESIGN TOKENS — Modern Developer Portfolio
   Stitch Design System: "The Technical Curator"
   ============================================= */

:root {
  /* Surfaces */
  --surface: #fcf9f4;
  --surface-bright: #fcf9f4;
  --surface-dim: #dcdad5;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f6f3ee;
  --surface-container: #f0ede8;
  --surface-container-high: #ebe8e3;
  --surface-container-highest: #e5e2dd;

  /* Primary */
  --primary: #974324;
  --primary-container: #b65a3a;
  --primary-fixed: #ffdbd0;
  --primary-fixed-dim: #ffb59c;
  --on-primary: #ffffff;
  --on-primary-container: #fffbff;

  /* Secondary */
  --secondary: #645d5a;
  --secondary-container: #ebe0dc;
  --on-secondary: #ffffff;
  --on-secondary-container: #6a6360;

  /* Tertiary */
  --tertiary: #68594a;
  --tertiary-container: #827261;
  --tertiary-fixed: #f4dfcb;
  --on-tertiary: #ffffff;

  /* Inverse */
  --inverse-surface: #31302d;
  --inverse-on-surface: #f3f0eb;
  --inverse-primary: #ffb59c;

  /* Text */
  --on-surface: #1c1c19;
  --on-surface-variant: #55433d;

  /* Outline */
  --outline: #88726b;
  --outline-variant: #dbc1b9;

  /* Error */
  --error: #ba1a1a;

  /* Typography scale */
  --font-display: "Epilogue", sans-serif;
  --font-body: "Newsreader", serif;
  --font-label: "Manrope", sans-serif;

  /* Spacing */
  --section-gap: 120px;
  --inner-max: 1200px;
  --inner-pad: clamp(24px, 5vw, 80px);

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows (editorial / ambient only) */
  --shadow-ambient: 0 8px 40px rgba(28, 28, 25, 0.06);
  --shadow-float: 0 16px 64px rgba(28, 28, 25, 0.08);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

/* =============================================
   RESET & BASE
   ============================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

.hidden {
  display: none !important;
}

/* =============================================
   TYPOGRAPHY UTILITIES
   ============================================= */

.label-md {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.body-lg {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--on-surface);
}

.body-md {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--on-surface);
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--primary);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--on-surface);
}

.section-title em {
  font-style: italic;
  font-weight: 200;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-container) 100%
  );
  color: var(--on-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(151, 67, 36, 0.3);
}

.btn-secondary {
  background: var(--secondary-container);
  color: var(--on-surface);
}

.btn-secondary:hover {
  background: var(--surface-container-high);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  background: var(--surface-container);
  transition: all 0.2s var(--ease-out);
}

.btn-back:hover {
  background: var(--surface-container-high);
  color: var(--on-surface);
}

/* =============================================
   NAVIGATION — Glassmorphic
   ============================================= */

#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(252, 249, 244, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 193, 185, 0.2);
  transition: box-shadow 0.3s var(--ease-out);
}

#main-nav.scrolled {
  box-shadow: var(--shadow-ambient);
}

.nav-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 0 var(--inner-pad);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo-bp {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: url("../assets/favicon/favicon-32x32.png");
  background-size: cover;
  background-position: center;
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  transition: all 0.2s var(--ease-out);
}

.nav-link:hover {
  background: var(--surface-container);
  color: var(--on-surface);
}

.nav-link-cv {
  background: var(--surface-container-high);
  color: var(--on-surface);
  font-weight: 600;
}

.nav-link-cv:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.nav-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--surface-container);
}

.nav-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
  transition: all 0.25s var(--ease-out);
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem var(--inner-pad) 1.5rem;
  gap: 0.25rem;
  background: rgba(252, 249, 244, 0.96);
  border-bottom: 1px solid rgba(219, 193, 185, 0.25);
}

.nav-mobile-menu.open {
  display: flex;
}

.nav-mobile-link {
  font-family: var(--font-label);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  padding: 0.75rem 0;
}

/* =============================================
   SECTION SHARED
   ============================================= */

.section-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 0 var(--inner-pad);
}

/* =============================================
   HERO SECTION
   ============================================= */

.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px var(--inner-pad) 80px;
  max-width: var(--inner-max);
  margin: 0 auto;
  gap: clamp(40px, 6vw, 100px);
}

.hero-content {
  flex: 0 0 auto;
  max-width: 560px;
}

.hero-eyebrow {
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
}

.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--on-surface);
  margin-bottom: 1.75rem;
}

.hero-title em {
  font-style: italic;
  font-weight: 200;
  display: block;
}

.hero-bio {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--on-surface-variant);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-social {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-link {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.social-link:hover {
  color: var(--primary);
}

.hero-visual {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 420px;
}

.hero-card {
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-ambient);
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 2;
}

.hero-card-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-stat-row {
  display: flex;
  align-items: normal;
  justify-content: space-between;
  gap: 1rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--on-surface);
  line-height: 1;
}

.hero-stat-label {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-surface-variant);
  margin-top: 0.375rem;
  line-height: 1.3;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--outline-variant);
  opacity: 0.5;
  flex-shrink: 0;
}

.hero-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-pill {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-container);
  color: var(--on-surface-variant);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.tech-pill:hover {
  background: var(--secondary-container);
  color: var(--on-surface);
}

.hero-decor {
  position: absolute;
  border-radius: var(--radius-full);
  opacity: 0.15;
  filter: blur(60px);
  pointer-events: none;
}

.hero-decor-1 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: -60px;
  right: -40px;
  animation: float-1 8s ease-in-out infinite;
}

.hero-decor-2 {
  width: 200px;
  height: 200px;
  background: var(--tertiary);
  bottom: -40px;
  right: 60px;
  animation: float-2 10s ease-in-out infinite;
}

@keyframes float-1 {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

@keyframes float-2 {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(15px) scale(0.95);
  }
}

/* =============================================
   ABOUT SECTION
   ============================================= */

.section-about {
  background: var(--surface-container-low);
  padding: var(--section-gap) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.about-left {
  position: sticky;
  top: 96px;
}

.about-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.systems-card,
.profiles-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-ambient);
}

.systems-title {
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.systems-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.system-item {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--on-surface);
  padding: 0.6875rem 0;
  border-bottom: 1px solid rgba(219, 193, 185, 0.25);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s var(--ease-out);
  cursor: default;
}

.system-item:last-child {
  border-bottom: none;
}

.system-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.system-item:hover {
  background: var(--surface-container-low);
  padding-left: 0.75rem;
  border-radius: var(--radius-md);
}

.system-item:hover::before {
  transform: scale(1.5);
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-link {
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  background: var(--surface-container-low);
  transition: all 0.2s var(--ease-out);
  display: block;
}

.profile-link:hover {
  background: var(--secondary-container);
  color: var(--on-surface);
  transform: translateX(4px);
}

/* =============================================
   FEATURED PROJECT
   ============================================= */

.section-featured {
  padding: calc(var(--section-gap) * 0.75) 0 var(--section-gap);
}

.featured-card {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}

.featured-visual {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}

.featured-img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

.featured-img-aurora {
  background: linear-gradient(
    135deg,
    #0d0a1a 0%,
    #1a0d2e 25%,
    #2d1a4a 50%,
    #3d2460 70%,
    #4a1a3d 85%,
    #1a0a28 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-animated-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orb-float 6s ease-in-out infinite;
}

.orb-1 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(151, 67, 36, 0.7), transparent);
  top: 20%;
  left: 20%;
  animation-delay: 0s;
}

.orb-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(104, 89, 74, 0.6), transparent);
  top: 50%;
  right: 10%;
  animation-delay: -2s;
}

.orb-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 181, 156, 0.4), transparent);
  bottom: 20%;
  left: 40%;
  animation-delay: -4s;
}

@keyframes orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(20px, -15px) scale(1.1);
  }
  66% {
    transform: translate(-10px, 10px) scale(0.95);
  }
}

.featured-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 219, 208, 0.15);
  backdrop-filter: blur(8px);
  color: var(--primary-fixed);
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 219, 208, 0.2);
  z-index: 2;
}

.featured-content {
  padding: 3rem 3rem 3rem 0;
}

.featured-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 4vw, 4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--on-surface);
  margin-bottom: 1.5rem;
}

.featured-title em {
  font-style: italic;
  font-weight: 200;
}

.featured-desc {
  font-size: 1.0625rem;
  color: var(--on-surface-variant);
  margin-bottom: 1.75rem;
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

/* =============================================
   TAGS / CHIPS
   ============================================= */

.tag {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--secondary-container);
  color: var(--on-surface-variant);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: all 0.2s;
}

.tag:hover {
  background: var(--surface-container-high);
}

/* =============================================
   PROJECTS SECTION
   ============================================= */

.section-projects {
  padding: var(--section-gap) 0;
  background: var(--surface);
}

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: clamp(48px, 5vw, 80px);
  gap: 2rem;
  flex-wrap: wrap;
}

.projects-filter {
  display: flex;
  gap: 0.375rem;
  background: var(--surface-container-low);
  padding: 0.375rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.filter-btn {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-full);
  transition: all 0.25s var(--ease-out);
}

.filter-btn:hover {
  color: var(--on-surface);
  background: var(--surface-container);
}

.filter-btn.active {
  background: var(--on-surface);
  color: var(--surface);
}

/* Project Grid */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Project Card — Editorial Asymmetric */
.project-card {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0;
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
  position: relative;
  margin-bottom: clamp(16px, 2vw, 24px);
}

.project-card:nth-child(even) {
  grid-template-columns: 2fr 3fr;
}

.project-card:nth-child(even) .project-img-wrap {
  order: 2;
}

.project-card:nth-child(even) .project-info {
  order: 1;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-float);
}

.project-card.filtered-out {
  display: none;
}

.project-img-wrap {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  position: relative;
  transition: transform 0.6s var(--ease-out);
}

.project-card:hover .project-img {
  transform: scale(1.04);
}

.project-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(28, 28, 25, 0.1), transparent);
  transition: opacity 0.3s;
}

/* Color themes for project images */
.proj-avesta {
  background: linear-gradient(
    135deg,
    #1a2a1a 0%,
    #2d4a2d 40%,
    #4a7a4a 70%,
    #3a5a3a 100%
  );
}
.proj-prata {
  background: linear-gradient(
    135deg,
    #1a1a2e 0%,
    #2d2d4a 40%,
    #4a3d6a 70%,
    #3d2a5a 100%
  );
}
.proj-bison {
  background: linear-gradient(
    135deg,
    #1a2a3d 0%,
    #2d4a6a 40%,
    #3a6a8a 70%,
    #2a4a6a 100%
  );
}
.proj-pointo {
  background: linear-gradient(
    135deg,
    #2a1a0a 0%,
    #4a2d1a 40%,
    #6a4a2d 70%,
    #4a2d1a 100%
  );
}
.proj-assetmgr {
  background: linear-gradient(
    135deg,
    #1a1a1a 0%,
    #2a2a3a 40%,
    #3a3a4a 80%,
    #2a2a2a 100%
  );
}
.proj-match3 {
  background: linear-gradient(
    135deg,
    #3d0a2a 0%,
    #6a1a4a 40%,
    #8a2a6a 70%,
    #5a1a4a 100%
  );
}
.proj-cotl {
  background: linear-gradient(
    135deg,
    #1a0a0a 0%,
    #3d1a1a 40%,
    #6a2a1a 70%,
    #4a1a0a 100%
  );
}
.proj-sands {
  background: linear-gradient(
    135deg,
    #2a1a0a 0%,
    #4a3a1a 40%,
    #6a5a2a 70%,
    #4a3a1a 100%
  );
}
.proj-beyond {
  background: linear-gradient(
    135deg,
    #0a1a2a 0%,
    #1a3a5a 40%,
    #2a5a7a 70%,
    #1a3a5a 100%
  );
}
.proj-faroz {
  background: linear-gradient(
    135deg,
    #0a2a1a 0%,
    #1a4a2a 40%,
    #2a6a3a 70%,
    #1a4a2a 100%
  );
}
.proj-cozy {
  background: linear-gradient(
    135deg,
    #2a1a0a 0%,
    #5a3a1a 40%,
    #7a5a2a 70%,
    #5a3a1a 100%
  );
}
.proj-nomad {
  background: linear-gradient(
    135deg,
    #1a2a1a 0%,
    #3a4a1a 40%,
    #5a6a2a 70%,
    #3a4a1a 100%
  );
}
.proj-virtual {
  background: linear-gradient(
    135deg,
    #0a1a3a 0%,
    #1a3a6a 40%,
    #2a4a6a 70%,
    #1a3a6a 100%
  );
}
.proj-winterjam {
  background: linear-gradient(
    135deg,
    #0a1a3a 0%,
    #1a2a5a 40%,
    #2a3a7a 70%,
    #1a2a5a 100%
  );
}

/* Decorative shapes inside project images */
.project-img::before,
.project-img::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.6;
}

.project-img::before {
  width: 60%;
  height: 60%;
  top: 10%;
  left: 10%;
  background: rgba(255, 219, 208, 0.12);
}

.project-img::after {
  width: 40%;
  height: 40%;
  bottom: 10%;
  right: 10%;
  background: rgba(151, 67, 36, 0.2);
}

/* Project label badge on image */
.project-img-label {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  font-family: var(--font-label);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  z-index: 2;
}

/* Project Info */
.project-info {
  padding: clamp(1.75rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

.project-category {
  color: var(--primary);
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--on-surface);
  transition: color 0.2s;
}

.project-card:hover .project-title {
  color: var(--primary);
}

.project-desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.project-cta {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: gap 0.2s var(--ease-out);
}

.project-card:hover .project-cta {
  gap: 0.625rem;
}

/* =============================================
   PROJECT DETAIL VIEW
   ============================================= */

#view-detail {
  padding-top: 96px;
  min-height: 100vh;
}

.detail-nav {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 2rem var(--inner-pad);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detail-breadcrumb {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
}

.detail-content-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 0 var(--inner-pad) var(--section-gap);
}

.detail-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  margin-bottom: clamp(60px, 6vw, 100px);
}

.detail-hero-visual {
  border-radius: var(--radius-xl);
  min-height: 380px;
  overflow: hidden;
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  min-height: 380px;
}

.detail-category {
  color: var(--primary);
  margin-bottom: 1rem;
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--on-surface);
  margin-bottom: 1.5rem;
}

.detail-title em {
  font-style: italic;
  font-weight: 200;
}

.detail-desc {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--on-surface-variant);
  margin-bottom: 2rem;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.detail-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.detail-section-heading {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}

.detail-section-heading:first-child {
  margin-top: 0;
}

.detail-text {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--on-surface-variant);
}

.detail-sidebar-card {
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.detail-sidebar-title {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.detail-tech-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-tech-item {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--on-surface);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(219, 193, 185, 0.25);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-tech-item:last-child {
  border-bottom: none;
}

.detail-tech-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* Code Editor with Tabs */
.detail-full-width {
  padding: 0 var(--inner-pad);
  margin-top: 3rem;
  clear: both;
}

.code-editor {
  background: var(--inverse-surface);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
}

.code-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.code-tabs::-webkit-scrollbar {
  height: 0px;
}

.code-tab {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 2px solid transparent;
  color: var(--on-surface-variant);
  font-family: var(--font-label);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.code-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--inverse-on-surface);
}

.code-tab.active {
  background: var(--inverse-surface);
  color: var(--primary-fixed);
  border-top-color: var(--primary-fixed);
}

.code-content {
  display: none;
  padding: 1.5rem;
  overflow-x: auto;
}

.code-content.active {
  display: block;
}

.code-content code {
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--inverse-on-surface);
  white-space: pre;
  display: block;
}

.code-editor .hljs-keyword {
  color: var(--primary-fixed);
  font-weight: 700;
}
.code-editor .hljs-string {
  color: var(--tertiary-fixed);
}
.code-editor .hljs-comment {
  color: var(--outline-variant);
  font-style: italic;
  opacity: 0.7;
}
.code-editor .hljs-title,
.code-editor .hljs-class,
.code-editor .hljs-type {
  color: var(--primary-fixed-dim);
}
.code-editor .hljs-function,
.code-editor .hljs-built_in {
  color: var(--secondary-container);
}
.code-editor .hljs-operator,
.code-editor .hljs-punctuation {
  color: var(--inverse-on-surface);
  opacity: 0.6;
}
.code-editor .hljs-number,
.code-editor .hljs-literal {
  color: var(--tertiary-fixed);
}

/* =============================================
   CONTACT SECTION
   ============================================= */

.section-contact {
  background: var(--surface-container-low);
  padding: var(--section-gap) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.contact-blurb {
  color: var(--on-surface-variant);
  margin-bottom: 2.5rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface-container-lowest);
  box-shadow: var(--shadow-ambient);
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
  color: inherit;
}

.contact-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-float);
  background: var(--surface-container-low);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--on-surface-variant);
}

.contact-item-label {
  color: var(--primary);
  margin-bottom: 0.125rem;
}

.contact-item-value {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--on-surface);
}

/* =============================================
   FOOTER
   ============================================= */

footer {
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  padding: 0;
}

.footer-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 3rem var(--inner-pad) 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: url("../assets/favicon/favicon-32x32.png");
  background-size: cover;
  background-position: center;
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  color: rgba(243, 240, 235, 0.6);
}

.footer-right {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-right a {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(243, 240, 235, 0.6);
  transition: color 0.2s;
}

.footer-right a:hover {
  color: var(--inverse-on-surface);
}

.footer-bottom {
  border-top: 1px solid rgba(243, 240, 235, 0.1);
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 1.25rem var(--inner-pad);
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: rgba(243, 240, 235, 0.4);
}

/* =============================================
   BACK TO TOP BUTTON
   ============================================= */

.btn-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(252, 249, 244, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--on-surface);
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s var(--ease-out);
  pointer-events: none;
  z-index: 50;
}

.btn-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-top:hover {
  background: var(--primary);
  color: var(--on-primary);
}

/* =============================================
   Removed CSS Scroll Animations, replaced by Anime.js logic
   ============================================= */

/* Project Carousel (Swiper) */
.detail-carousel {
  position: relative;
  width: 100%;
  margin: 0 auto 4rem;
}

.swiper {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-xl);
  background: var(--surface-container-low);
  box-shadow: var(--shadow-ambient);
}

.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custom Nav Styling */
.swiper-button-next,
.swiper-button-prev {
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white !important;
  transition: all 0.3s var(--ease-out);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 1.25rem !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: scale(1.1);
}

.swiper-pagination-bullet {
  background: white !important;
  opacity: 0.3 !important;
}

.swiper-pagination-bullet-active {
  background: var(--primary-fixed) !important;
  opacity: 1 !important;
  transform: scale(1.4);
}

@media (max-width: 768px) {
  .swiper {
    aspect-ratio: 4/3;
  }
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  .section-hero {
    flex-direction: column;
    min-height: unset;
    padding-top: 140px;
    padding-bottom: 80px;
  }

  .hero-content {
    max-width: 100%;
  }
  .hero-visual {
    width: 100%;
    justify-content: flex-start;
  }
  .hero-card {
    max-width: 100%;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-content {
    padding: 2.5rem;
  }

  .project-card,
  .project-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .project-card:nth-child(even) .project-img-wrap {
    order: 0;
  }
  .project-card:nth-child(even) .project-info {
    order: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 80px;
  }

  .nav-links {
    display: none;
  }
  .nav-menu-toggle {
    display: flex;
  }

  .section-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-title {
    font-size: clamp(3rem, 13vw, 5rem);
  }

  .hero-stat-num {
    font-size: 1.75rem;
  }

  .projects-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .featured-content {
    padding: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.75rem 1.25rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .project-img-wrap {
    min-height: 220px;
  }
  .project-img {
    min-height: 220px;
  }
}
