@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-dark: #0b0c10; /* Obsidian deep background */
  --bg-card: rgba(255, 255, 255, 0.02); /* Translucent card */
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(99, 102, 241, 0.35); /* Soft indigo glow border */
  --color-primary: #8b5cf6; /* Glowing violet */
  --color-secondary: #6366f1; /* Indigo */
  --color-accent: #06b6d4; /* Neon cyan */
  --text-main: #f8fafc; /* Crisp white-grey */
  --text-muted: #cbd5e1; /* Brighter grey-blue for enhanced text contrast */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: transparent; /* Disables blinking text caret globally when clicking text */
}

input, textarea, [contenteditable] {
  caret-color: auto; /* Restores default typing caret for form fields */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

hr.line-light,
hr.line-dark {
  max-width: 6rem;
  padding: 0;
  text-align: center;
  border: none;
  border-top: solid 3px var(--color-primary);
  border-radius: 3px;
  margin: 1.5rem auto;
  opacity: 0.8;
}

hr.line-light {
  border-top-color: var(--color-accent);
}

section {
  padding: 5rem 0;
}

section h2 {
  font-size: 2.25rem;
  line-height: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (min-width: 992px) {
  section h2 {
    font-size: 3.25rem;
    line-height: 3.25rem;
  }
}

.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  border-width: 2px;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-xl {
  padding: 1.1rem 2.5rem;
  font-size: 1.25rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color) !important;
  color: #fff !important;
}

.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
  background: var(--color-secondary) !important;
  border-color: var(--color-secondary) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.btn-social {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.3rem;
  line-height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: #fff !important;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-social:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-4px) rotate(8deg);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.45);
}

.scroll-to-top {
  z-index: 1042;
  right: 1.5rem;
  bottom: 1.5rem;
  display: none;
}

.scroll-to-top a {
  width: 3.5rem;
  height: 3.5rem;
  background-color: rgba(11, 12, 16, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  line-height: 3.2rem;
  border-radius: 50%;
  color: #fff;
  transition: all 0.3s ease;
}

.scroll-to-top a:hover {
  background-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.hicon {
  height: 1.8rem;
  width: 1.8rem;
  vertical-align: middle;
}

.picon {
  height: 1.4rem;
  width: 1.4rem;
  vertical-align: middle;
}

#about li {
  font-size: 2rem;
}

.skill_tag, .skill_big_tag, .skill_small_tag {
  display: inline-block;
  margin: 0.35rem;
  padding: 0.45rem 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.skill_big_tag {
  font-size: 1.3rem;
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
  color: #fff;
}

.skill_tag {
  font-size: 1.05rem;
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}

.skill_small_tag {
  font-size: 0.9rem;
}

.skill_tag:hover, .skill_big_tag:hover, .skill_small_tag:hover {
  transform: translateY(-3px);
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
  color: #fff;
}

.about_me {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.about_me p:last-child {
  margin-bottom: 0;
}

#mainNav {
  background: rgba(11, 12, 16, 0.8) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
}

#mainNav .navbar-brand {
  color: #fff !important;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

#mainNav .navbar-nav {
  margin-top: 1rem;
}

#mainNav .navbar-nav li.nav-item a.nav-link {
  color: var(--text-muted) !important;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#mainNav .navbar-nav li.nav-item a.nav-link:hover,
#mainNav .navbar-nav li.nav-item a.nav-link:focus {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

#mainNav .navbar-nav li.nav-item a.nav-link.active {
  color: #fff !important;
  background: rgba(99, 102, 241, 0.15) !important;
  border: 1px solid var(--border-hover);
}

@media (min-width: 992px) {
  #mainNav {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  #mainNav .navbar-brand {
    font-size: 1.85rem;
  }
  #mainNav .navbar-nav {
    margin-top: 0;
  }
  #mainNav.navbar-shrink {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    background: rgba(11, 12, 16, 0.9) !important;
  }
  #mainNav.navbar-shrink .navbar-brand {
    font-size: 1.45rem;
  }
}

header.masthead {
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, rgba(11, 12, 16, 0) 70%), var(--bg-dark);
  padding-top: calc(8rem + 72px);
  padding-bottom: 8rem;
}

header.masthead h1 {
  font-size: 3rem;
  line-height: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-top: 1.5rem;
}

header.masthead h2 {
  font-size: 1.35rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  font-weight: 500;
}

header.masthead h5 {
  font-family: 'Inter', sans-serif;
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

header.masthead .avatar-container {
  padding: 0;
  border: 4px solid transparent;
  background: linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box, 
              linear-gradient(135deg, var(--color-primary), var(--color-accent)) border-box;
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.3);
  animation: float 6s ease-in-out infinite;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
}

header.masthead .avatar-container:hover {
  transform: scale(1.04) rotate(2deg);
  box-shadow: 0 0 50px rgba(6, 182, 212, 0.45);
}

header.masthead .avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.13); /* Crops out the baked-in black padding/border inside Me.png */
  transition: transform 0.4s ease;
}

header.masthead .avatar-container:hover img {
  transform: scale(1.18); /* Parallax-like zoom effect on hover */
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@media (min-width: 992px) {
  header.masthead {
    padding-top: calc(10rem + 106px);
    padding-bottom: 10rem;
  }
  header.masthead h1 {
    font-size: 5rem;
    line-height: 4.5rem;
  }
  header.masthead h2 {
    font-size: 2rem;
  }
}

.portfolio {
  background-color: var(--bg-dark);
  padding-bottom: 2rem;
}

.portfolio .portfolio-item {
  cursor: pointer;
  position: relative;
  display: block;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: none; /* Removed border to prevent corner artifacts; handled by ::after */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  margin-bottom: 30px;
  /* Prevent rendering artifacts on rounded corners during transforms */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* Pseudo-element to render the border on top of the scaled child elements (fixes corner subpixel bleeding) */
.portfolio .portfolio-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  pointer-events: none;
  z-index: 20; /* Render on top of scaled image and caption overlay */
  transition: border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio .portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), 0 0 25px rgba(99, 102, 241, 0.2);
}

.portfolio .portfolio-item:hover::after {
  border-color: var(--border-hover);
}

.portfolio .portfolio-item img.img-fluid {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 650;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-radius: 16px; /* Matched to parent border-radius since there is no inline border */
}

.portfolio .portfolio-item:hover img.img-fluid {
  transform: scale(1.05);
}

.portfolio .portfolio-item .portfolio-item-caption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: rgba(11, 12, 16, 0.85) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  z-index: 10;
  border-radius: 16px; /* Matched to parent border-radius since there is no inline border */
}

.portfolio .portfolio-item:hover .portfolio-item-caption {
  opacity: 1 !important;
}

.portfolio-item-caption-content {
  font-size: 1.1rem !important;
  line-height: 2rem !important;
  font-weight: 500;
  color: #fff;
  width: 100%;
}

.portfolio-item-caption-content p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

@media (min-width: 800px) {
  .portfolio .item-large {
    max-width: 100%;
  }
}

.archive-note {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 750px;
  margin: 3rem auto 1.5rem auto;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  line-height: 1.6;
}

@media (max-width: 767.98px) {
  .archive-note {
    font-size: 0.95rem;
    margin: 2rem 1rem 1rem 1rem;
    padding: 1rem;
  }
}

section#about {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #111217 50%, var(--bg-dark) 100%) !important;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding-top: 2rem;
}

section#contact {
  background-color: var(--bg-dark);
}

.project-info {
  padding-top: 8rem;
  padding-bottom: 6rem;
}

.project-info h1, .project-info h2 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.project-info p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.project-info h4 {
  font-size: 1.8rem;
  font-weight: 600;
}

.project-info h5 {
  font-size: 1.35rem;
  color: var(--text-muted);
}

.project-info video, 
.project-info iframe, 
.project-info img {
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  max-width: 100%;
  transition: all 0.3s ease;
}

.project-info video:hover, 
.project-info iframe:hover, 
.project-info img:hover {
  border-color: var(--border-hover);
}

/* Modern Project Page Layout Styles */
.project-hero-section {
  padding: 2rem 0 0 0;
}

.project-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  max-width: 100%;
}

.project-badges-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-main);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-badge:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-primary);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.15);
}

.project-badge .badge-icon {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  margin-bottom: 0 !important;
}

@media (max-width: 575.98px) {
  .project-info {
    overflow-x: hidden;
  }

  .project-info > .row > .col-11 {
    flex: 0 0 calc(100% - 3rem);
    max-width: calc(100% - 3rem);
  }

  .project-info h1,
  .project-info h2 {
    font-size: clamp(2rem, 10vw, 2.35rem);
    line-height: 1.1;
  }

  .project-title {
    max-width: 18rem;
  }

  .project-info p {
    font-size: 1.05rem;
  }

  .project-section-copy,
  .media-wrapper {
    max-width: min(100%, 19rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .project-badge {
    max-width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    font-size: 1rem;
    padding: 0.55rem 1rem;
  }

  .project-info p,
  .project-section-row h4,
  .project-section-row h5 {
    overflow-wrap: break-word;
  }
}

.project-info hr.line-light {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

.project-info div.col.text-center.mx-auto {
  margin-bottom: 1rem !important;
}

.project-info div.col.text-center.mx-auto:not(:has(a)) {
  display: none !important;
}

.project-section-row {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.project-sections-container > .project-section-row:first-child {
  margin-top: 1.5rem !important;
}

.project-section-row h4 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #fff;
}

.project-section-row p {
  margin-bottom: 1rem;
}

.project-section-copy {
  width: 100%;
  max-width: var(--project-copy-width, 100%);
}

@media (min-width: 992px) {
  .project-section-row:has(.media-column) {
    justify-content: center;
    column-gap: clamp(2rem, 4vw, 5rem);
  }

  .project-section-row:has(.media-column) > .text-column,
  .project-section-row:has(.media-column) > .media-column {
    flex: 0 1 auto;
    max-width: none;
    width: auto;
    padding-left: 15px;
    padding-right: 15px;
  }

  .project-section-row:has(.media-column) > .text-column {
    flex-basis: var(--project-copy-width, 42rem);
  }

  .project-section-row:has(.media-column) > .media-column {
    flex-basis: min(42vw, 720px);
  }

  .project-sections-container > .project-section-row:nth-child(odd) .project-section-copy {
    margin-left: 0;
  }

  .project-sections-container > .project-section-row:nth-child(even) .project-section-copy {
    margin-right: 0;
  }
}

.media-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  /* Prevent rendering artifacts on rounded corners during transforms */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.media-wrapper:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(99, 102, 241, 0.15);
}

.media-wrapper video,
.media-wrapper iframe,
.media-wrapper img {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 100%;
  display: block;
}

@media (min-width: 992px) {
  .project-sections-container > .project-section-row:nth-child(even) {
    flex-direction: row-reverse;
  }

  .project-section-row.media-left {
    flex-direction: row-reverse;
  }

  .project-section-row.media-right {
    flex-direction: row;
  }
}

.btn-label {
  margin-left: 0.5rem;
  font-size: 0.95rem;
  vertical-align: middle;
}

.footer {
  padding-top: 3rem;
  padding-bottom: 3rem;
  background-color: #08090d;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

a {
  color: var(--color-primary);
  transition: color 0.3s ease;
}

a:focus, a:hover, a:active {
  color: var(--color-accent);
  text-decoration: none;
}

.bg-primary {
  background-color: var(--bg-dark) !important;
}

.bg-secondary {
  background-color: #12131a !important;
}

.text-primary {
  color: var(--text-main) !important;
}

.text-secondary {
  color: var(--text-muted) !important;
}

.tech-highlight {
  color: #fff;
  background: #16172b !important;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95em;
  transition: all 0.2s ease;
  display: inline;
  margin: 0 0.1rem;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background-clip: padding-box !important;
}

.tech-highlight:hover {
  background: #1e2042 !important;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3) !important;
  text-decoration: none;
  border: 0 !important;
  outline: 0 !important;
}

/* Responsive Portfolio Grid Tags for Touch/Mobile Viewports (no hover) */
@media (max-width: 991.98px) {
  .portfolio .portfolio-item {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    padding: 0.8rem !important;
    gap: 0.8rem !important;
    max-width: 100% !important;
    margin-bottom: 24px !important;
  }
  
  .portfolio .portfolio-item img.img-fluid {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 900 / 650 !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    transform: none !important;
  }
  
  .portfolio .portfolio-item:hover img.img-fluid {
    transform: none !important;
  }
  
  .portfolio .portfolio-item .portfolio-item-caption {
    position: static !important;
    opacity: 1 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
  }
  
  .portfolio-item-caption-content {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    text-align: left !important;
    margin: 0 !important;
    width: 100% !important;
  }
  
  .portfolio-item-caption-content p {
    font-size: 0.75rem !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.35rem 0.8rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 9999px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    white-space: nowrap !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  }
  
  .portfolio-item-caption-content p img.picon {
    width: 0.95rem !important;
    height: 0.95rem !important;
    margin: 0 !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
  }
}

/* Selected Projects Layout Styles */
.selected-project-row {
  margin-bottom: 5rem;
}

.selected-project-media-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.selected-project-img-link:hover .selected-project-media-wrapper {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(99, 102, 241, 0.2);
}

.selected-project-media-wrapper img {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 650;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.selected-project-img-link:hover .selected-project-media-wrapper img {
  transform: scale(1.05);
}

.selected-project-title a {
  color: #fff;
  font-weight: 800;
  font-size: 2.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  background: linear-gradient(135deg, #fff 60%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

.selected-project-title a:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.selected-project-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.selected-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.selected-project-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.selected-project-tag:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
  color: #fff;
}

.selected-project-tag img.picon {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0 !important;
}

@media (max-width: 991.98px) {
  .selected-project-title a {
    font-size: 1.75rem;
  }
  .selected-project-row {
    margin-bottom: 3.5rem;
  }
}
