/*-----------------------------------------------------
Responsive layout
Breakpoints:
  1800+      very wide screens: 4-column portfolio
  1025-1799  desktop: 3 columns, logo left / nav right
  561-1024   tablets, unfolded foldables, landscape phones: 2 columns
  0-560      phones and folded foldables: 1 column
  0-360      narrow phones and folded foldables (e.g. Galaxy Fold cover screen)
Plus: short landscape screens, and dual-screen devices with a hinge.
------------------------------------------------------*/

/* Container padding */
@media (max-width: 1200px){
	.container{
		padding-left: 30px;
		padding-right: 30px;
	}
}

@media (max-width: 670px){
	.container{
		padding-left: 18px;
		padding-right: 18px;
	}
}

@media (max-width: 360px){
	.container{
		padding-left: 14px;
		padding-right: 14px;
	}
}

/*-----------------------------------------------------
Portfolio grid
------------------------------------------------------*/

@media (min-width: 1800px){
	.works_3-columns .works-item{
		width: 25%;
	}
}

@media (max-width: 1024px){
	.works_3-columns .works-item{
		width: 50%;
		aspect-ratio: 4 / 3;
	}
}

@media (max-width: 560px){
	.works_3-columns .works-item{
		float: none;
		width: 100%;
		aspect-ratio: 1 / 1;
	}
}

/* Short, wide screens (phones on their side): two columns of shorter cards */
@media (max-height: 520px) and (orientation: landscape){
	.works_3-columns .works-item{
		float: left;
		width: 50%;
		aspect-ratio: 16 / 10;
	}
	.hero-homepage{
		padding: 44px 20px 36px;
	}
}

/*-----------------------------------------------------
Header: logo row, then Portfolio left / About right
------------------------------------------------------*/

@media (max-width: 1024px){
	header{
		height: auto;
		background: linear-gradient(to bottom, #f5f5f5 0, #f5f5f5 80px, #fafafa 80px);
	}

	header .container{
		flex-direction: column;
		align-items: stretch;
		padding-top: 0;
		padding-bottom: 0;
	}

	header .logo{
		justify-content: center;
		height: 80px;
	}

	header .logo img{
		height: 42px;
	}

	.nav-button,
	.close-btn{
		display: none !important;
	}

	#navigation{
		display: block;
		position: static;
		width: 100%;
		margin-left: 0;
	}

	.main-menu{
		position: static;
		transform: none;
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		gap: 0;
		padding: 0;
		min-height: 50px;
	}

	.main-menu > li{
		float: none;
		line-height: 1.4;
		margin: 0;
		padding: 0;
	}

	.main-menu li a{
		display: inline-block;
		padding: 12px 0;
		font-size: 1.2em;
		font-weight: 400;
		letter-spacing: 3.2px;
	}

	.main-menu li ul{
		visibility: hidden;
	}
}

@media (max-width: 360px){
	header .logo img{
		height: 36px;
	}
	.main-menu li a{
		letter-spacing: 2.4px;
	}
}

/*-----------------------------------------------------
Homepage hero
------------------------------------------------------*/

@media (max-width: 768px){
	.hero-homepage{
		padding: 64px 20px 40px;
	}

	/* Subtle scroll hint under the shapes */
	.hero-scroll-hint{
		display: block;
		text-align: center;
		margin-top: 22px;
	}
	.hero-scroll-hint .ti-arrow-down{
		font-size: 1.8em;
		color: rgba(0, 0, 0, 0.35);
		animation: hero-scroll-bounce 2s ease-in-out infinite;
	}
}

@media (max-width: 360px){
	.hero-homepage{
		padding: 52px 14px 34px;
	}
}

@keyframes hero-scroll-bounce{
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce){
	.hero-scroll-hint .ti-arrow-down{
		animation: none;
	}
	html{
		scroll-behavior: auto;
	}
}

/*-----------------------------------------------------
About, contact, 404, thanks
------------------------------------------------------*/

@media (max-width: 860px){
	.about-us{
		width: auto;
		margin: 48px auto 40px;
		padding: 0 22px;
	}
	.contact{
		margin-bottom: 90px;
	}
}

@media (max-width: 470px){
	.about-us-info{
		font-size: 1.6em;
		line-height: 1.9;
	}
	.about-us-info p{
		margin-bottom: 12px;
	}
	.about-avatar{
		width: 140px;
		height: 140px;
		margin-bottom: 28px;
	}
	.contact-intro{
		font-size: 1.55em;
	}
	.contact-submit{
		width: 100%;
	}
	.contact-actions{
		gap: 12px;
	}
}

/*-----------------------------------------------------
Project pages
------------------------------------------------------*/

@media (max-width: 1024px){
	.single-project{
		margin-top: 40px;
	}
	.single-project-back{
		text-align: center;
		margin-bottom: 24px;
	}
	.single-project-info{
		width: 100%;
		margin: 48px auto;
	}
}

@media (max-width: 670px){
	.single-project{
		margin-top: 28px;
	}
	.single-project h1{
		padding: 10px 0 18px 0;
	}
	.single-project-info{
		margin: 32px auto;
	}
	.single-project-info p{
		font-size: 1.65em;
		line-height: 1.9;
		margin-bottom: 20px;
	}
	.project-gallery{
		margin: 32px 0;
	}
	.project-video{
		margin: 32px 0;
	}
}

@media (max-width: 380px){
	.related-grid{
		grid-template-columns: 1fr;
	}
	.related-grid .related-item:nth-child(3){
		display: block;
	}
}

/*-----------------------------------------------------
Footer
------------------------------------------------------*/

@media (max-width: 400px){
	footer .container{
		flex-direction: column;
		justify-content: center;
		gap: 10px;
		height: auto;
		padding-top: 22px;
		padding-bottom: 22px;
	}
	footer .container .copyright{
		height: auto;
		line-height: 1.4;
	}
}

/*-----------------------------------------------------
Dual-screen and spanned foldables: keep content off the hinge
------------------------------------------------------*/

@media (horizontal-viewport-segments: 2){
	.works_3-columns .works-item{
		float: left;
		width: 50%;
		aspect-ratio: 4 / 3;
	}
	.related-grid{
		grid-template-columns: 1fr 1fr;
	}
}

/*-----------------------------------------------------
Short landscape screens (phones on their side): one-row header
------------------------------------------------------*/

@media (max-height: 520px) and (orientation: landscape) and (max-width: 1024px){
	header{
		height: 60px;
		background: #f5f5f5;
	}
	header .container{
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	header .logo{
		height: 60px;
	}
	header .logo img{
		height: 34px;
	}
	#navigation{
		width: auto;
	}
	.main-menu{
		gap: 0 36px;
		min-height: 0;
	}
	.hero-content h1{
		font-size: 40px;
		letter-spacing: 10px;
	}
}
