/* Responsive overrides & enhancements */
/* Breakpoints (Bootstrap reference):
	 xs <576, sm ≥576, md ≥768, lg ≥992, xl ≥1200, xxl ≥1400 */

/* Base fluid typography scaling */
html { font-size: 100%; }
@media (max-width: 1199.98px){ html { font-size: 98%; } }
@media (max-width: 991.98px){ html { font-size: 96%; } }
@media (max-width: 767.98px){ html { font-size: 94%; } }
@media (max-width: 575.98px){ html { font-size: 92%; } }

/* Hero adjustments */
body.am-site.am-home .hero-wrapper{height:88vh;}
@media (max-width: 991.98px){
	body.am-site.am-home .hero-wrapper{height:82vh;min-height:520px;}
	body.am-site.am-home .hero-overlay .content .display-4{font-size:2.35rem;}
}
@media (max-width: 767.98px){
	body.am-site.am-home .hero-wrapper{position:relative;min-height:0;height:auto;padding:0;}
	body.am-site.am-home .hero-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;}
	body.am-site.am-home .hero-gradient{position:absolute;inset:0;z-index:1;}
	body.am-site.am-home .hero-overlay{position:relative;z-index:2;padding:3.75rem 0 3.25rem;}
	body.am-site.am-home .hero-overlay .content{padding:0 1rem;max-width:640px;margin:0 auto;}
	body.am-site.am-home .hero-overlay .content .display-4{font-size:2.05rem;line-height:1.15;}
	body.am-site.am-home .hero-overlay .lead{font-size:1.05rem;line-height:1.45;}
}
@media (max-width:575.98px){
	body.am-site.am-home .hero-overlay{padding:3.25rem 0 2.75rem;}
	body.am-site.am-home .hero-overlay .content .display-4{font-size:1.8rem;}
	body.am-site.am-home .hero-overlay .lead{font-size:.98rem;}
	body.am-site.am-home .stat-tile{padding:.65rem .35rem;font-size:.7rem;}
	body.am-site.am-home .stat-tile span{display:inline-block;margin-top:.15rem;font-size:.65rem;}
}

/* Stat tiles spacing on small screens */
@media (max-width: 767.98px){
	body.am-site.am-home .stat-tile{margin-bottom:.75rem;}
}

/* About section image & layout */
@media (max-width: 991.98px){
	body.am-site.am-home #about .about-photo{max-width:260px;}
}
@media (max-width: 767.98px){
	body.am-site.am-home #about .about-photo{max-width:220px;margin-bottom:1rem;}
}
@media (max-width: 575.98px){
	body.am-site.am-home #about .about-photo{max-width:180px;}
}

/* About section overflow guard */
@media (max-width: 767.98px){
	body.am-site.am-home #about .row{margin-left:0;margin-right:0;}
	body.am-site.am-home #about [class^="col-"],
	body.am-site.am-home #about [class*=" col-"]{padding-left:.75rem;padding-right:.75rem;}
}
@media (max-width:575.98px){
	body.am-site.am-home #about{overflow-x:hidden;}
	body.am-site.am-home #about .about-photo{height:auto;width:100%;max-width:220px;}
}

/* Featured blog card -> stack on small */
@media (max-width: 767.98px){
	body.am-site.am-home #featured-blog .card .row{flex-direction:column !important;}
	body.am-site.am-home #featured-blog .card .col-md-5,
	body.am-site.am-home #featured-blog .card .col-md-7{width:100%;}
}

/* Blog listing cards unify spacing */
@media (max-width: 575.98px){
	body.am-site .card .card-body{padding:1rem 1rem 1.1rem;}
	body.am-site .card h5{font-size:1.05rem;}
}

/* Timeline condense on small */
@media (max-width: 991.98px){
	body.am-site.am-home .timeline-item{margin-bottom:1.5rem;padding-left:2.1rem;}
	body.am-site.am-home .timeline::before{left:9px;}
	body.am-site.am-home .timeline-item::before{left:4px;width:11px;height:11px;}
}
@media (max-width: 575.98px){
	body.am-site.am-home .timeline-item{padding-left:1.9rem;}
	body.am-site.am-home .timeline::before{left:7px;}
	body.am-site.am-home .timeline-item::before{left:2px;width:10px;height:10px;}
}

/* Skills progress bars animation spacing */
@media (max-width: 767.98px){
	body.am-site.am-home #skills .progress{height:.55rem;}
}

/* Skills section overflow controls */
@media (max-width: 767.98px){
	body.am-site.am-home #skills .d-flex.flex-wrap.gap-2{flex-wrap:wrap;row-gap:.5rem;column-gap:.5rem;}
	body.am-site.am-home #skills .skill-badge{white-space:normal;word-break:break-word;overflow-wrap:break-word;flex:1 1 calc(50% - .5rem);max-width:calc(50% - .5rem);}
}
@media (max-width:575.98px){
	body.am-site.am-home #skills{overflow-x:hidden;}
	body.am-site.am-home #skills .skill-badge{font-size:.62rem;padding:.38rem .5rem;}
	body.am-site.am-home #skills .list-group-item{display:flex;flex-direction:column;align-items:flex-start;word-break:break-word;}
	body.am-site.am-home #skills .list-group-item .badge{margin-top:.35rem;}
}

/* General safety: remove accidental negative margins in these sections */
@media (max-width:575.98px){
	body.am-site.am-home #about .container, body.am-site.am-home #skills .container{overflow-x:hidden;}
}

/* List groups inside light sections tweak */
@media (max-width: 575.98px){
	body.am-site .am-light .list-group-item{padding:.6rem .75rem;font-size:.8rem;}
}

/* Video section grid adjustments */
@media (max-width: 767.98px){
	body.am-site.am-home #videos iframe, body.am-site.am-home #videos video{max-width:100%;height:auto;}
}

/* Prose content spacing */
@media (max-width: 767.98px){
	body.am-site .prose{font-size:1rem;}
	body.am-site .prose h2, body.am-site .prose h3, body.am-site .prose h4{margin-top:1.8rem;}
	body.am-site .prose img{margin-top:1rem;margin-bottom:1rem;}
}

/* Share block stacking */
@media (max-width: 575.98px){
	#share-block .btn{flex:1 0 48%;}
	#share-block .d-flex{gap:.5rem;}
}

/* Footer padding */
@media (max-width: 767.98px){
	footer.footer-glass .container{padding-top:2.5rem;padding-bottom:2.5rem;}
}

/* Forms (contact) tweaks */
@media (max-width: 575.98px){
	body.am-site #contact .form-control, body.am-site #contact textarea{font-size:.9rem;padding:.55rem .75rem;}
	body.am-site #contact .btn{width:100%;}
}

/* Header nav adjustments */
@media (max-width: 991.98px){
	#mainNav .navbar-brand{font-size:1.05rem;}
}
@media (max-width: 575.98px){
	#mainNav{padding-top:.35rem;padding-bottom:.35rem;}
}

/* Utility visibility helpers */
@media (max-width: 767.98px){
	.hide-md-down{display:none !important;}
}
@media (min-width: 768px){
	.show-md-up{display:block !important;}
}

/* Ensure tilt hover shadow not oversized on touch small devices */
@media (hover:none){
	.tilt:hover{box-shadow:var(--shadow-elev-2);}
}

