/*
Author: Md Shah Alam
Date: September 16, 2023
Description: This CSS file styles the website's header and navigation.
This is my personal portfolio site. I am only using CSS flexbox layout to create responsive 
and flexible design for the header and navigation sections.
*/

/* Reset and Global Styles */
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
}

:root {
  --default-color: #434855;
  --theme-color: #0050ff;
}

/* Body Styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'Epilogue', sans-serif;
  font-size: 15px;
  color: var(--default-color);
}

h1, h2, h3, h4, h5, h6,
ul {
  margin: 0;
  padding: 0;
}

/* Image Styles */
img {
  width: 100%;
  height: auto;
  display: block;
}

/* Link Styles */
a {
  text-decoration: none;
  color: var(--default-color);
}

/* List Styles */
ul {
  list-style-type: none;
}

/* Header Styles */
header {
  background: url('../image/bg-4.jpg') 0% / cover no-repeat padding-box;
}

/* Container Styles */
.container {
  margin: 0 auto;
  padding: 2em;
  width: 100%;
}

.centered {
  margin-inline: auto;
  width: 70vw;
}

@media screen and (max-width: 768px) {
  .centered {
    width: 100%;
  }
}

/* Navigation Bar Styles */
.nav-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.nav-bar .brand span {
  display: flex;
  justify-content: center;
  font-size: 1em;
}

.nav-bar .brand span:first-child {
  font-size: 58px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .2rem;
}

.nav-bar .brand span:not(:first-child) {
  background-image: linear-gradient(-225deg, #171716 0%, #454442 29%, #73726e 67%, #898983 100%);
  background-clip: border-box;
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textclip 10s linear infinite;
  color: transparent;
}

@keyframes textclip {
  to {
    background-position: -200% center;
  }
}

/* Menu Styles */
.menu ul * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
}

.menu li a {
  position: relative;
  font-size: 1em;
  text-transform: uppercase;
}

.menu li a:before {
  position: absolute;
  top: 50%;
  left: 20%;
  right: 20%;
  height: 2px;
  content: '';
  opacity: 0;
  border-left: 12px solid var(--default-color);
  border-right: 12px solid var(--default-color);
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
}

.menu li a:hover,
.menu .current a:before {
  color: var(--theme-color);
}

.menu li a:hover:before,
.menu .current a:before {
  left: 0;
  right: 0;
  opacity: 1;
}

@media screen and (min-width: 769px) {
  .menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .menu li {
    flex: 1 1 auto;
    text-align: center;
    padding: 1em;
  }
  .menu li a {
    padding: .5em 1em;
  }
  .overlay {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .menu {
    display: none;
  }
  .hamburger-menu {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    z-index: 100;
    transition: all 0.35s ease;
  }

  .hamburger-menu span {
    width: 40px;
    height: 5px;
    background: #434855;
    margin: 2px auto;
  }

  .hamburger-menu:hover .bar {
    background-color: var(--theme-color);
  }

  .hamburger-menu.active span:nth-of-type(1) {
    transform: translateY(11px) translateX(0) rotate(45deg);
    background: var(--default-color);
  }

  .hamburger-menu.active span:nth-of-type(2) {
    opacity: 0;
    background: var(--default-color);
  }

  .hamburger-menu.active span:nth-of-type(3) {
    transform: translateY(-8px) translateX(0) rotate(-45deg);
    background: var(--default-color);
  }

  .overlay {
    position: fixed;
    background-color:aliceblue;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s, height 0.35s;
    overflow: hidden;
  }
  .overlay.open {
    opacity: 0.9;
    visibility: visible;
    height: 100%;
    z-index: 1;
  }
  .overlay-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 6em;
    text-transform: uppercase;
  }
  .overlay-menu li {
    padding: 2em 0;
  }
  .overlay-menu a {
    color: var(--default-color);
    font-size: 2em;
  }
}


/*
Home page
---------------------------------------*/
/* Banner styles */
.banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  margin: 2em auto;
}

/* Landscape and bigger*/
@media screen and (min-width: 769px) {
  .banner .profile {
    flex: 1 0 calc(33% - .5em);
  }
}

/* Portrait */
@media screen and (max-width: 768px) {
  .banner .profile {
    flex: 1 0 100%;
  }
}

.banner .card {
  text-align: center;
  padding: 4em 1em;
  background: white;
  box-shadow: 0 0 5px 0 lightgrey;
}

.banner .card h2 {
	margin-top: .5em;
  font-size: 2em;
  position: relative;
}

.banner .card h2:after {
  content: '';
  height: 3px;
  width: 100px;
  background: var(--theme-color);
  position: absolute;
  left: 0;
  right: 0;
  margin-inline: auto;
  bottom: -5px;
}

.banner .card h3 {
  margin-top: 2em;
  font-size: 2em;
  font-weight: 200;
  color: var(--theme-color);
}

.banner .card h2 + span {
  color: var(--default-color);
  margin-top: 1em;
  display: inline-block;
}

.banner .card ul,
.information ul {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5em;
}

.banner .card li {
  margin-inline: 5px;
}

.banner h1 {
  font-size: 5em;
  color: var(--theme-color);
  font-weight: 800;
}

.profile-image {
  width: 40%;
  border-radius: 50%;
  overflow: hidden;
  margin-inline: auto;
}

.profile-image .ratio-box {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%;
}

.profile-image .ratio-box img {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  object-fit: cover;
  object-position: 50% 25%;
  filter: grayscale(100%);
  transition: all 0.35s ease;
}

@media screen and (min-width: 768px) {
  .banner .content {
    padding: 2em;
  }
}

.card:hover .profile-image .ratio-box img {
  filter: grayscale(0);
}

.banner .content p {
  font-size: 1.2em;
  line-height: 1.5;
  text-align: justify;
  color: var(--default-color);
}


/*
Page content
---------------------------------------*/
.button {
  display: flex;
  justify-content: flex-start;
	margin-top: 5em;
}

.button .btn {
  color: #ebedff!important;
}

@media screen and (max-width: 768px) {
  .button {
    justify-content: space-between;
  }
}

.button a {
	margin: .5em;
	padding: .5em 1em;
	border: 1px solid linear-gradient(42deg, rgba(0,0,0,1) 0%, rgba(9,9,121,1) 35%, rgba(0,80,255,1) 100%);
	border-radius: 5px;
	transition: all 0.35s ease;
  background: rgb(0,0,0);
  background: linear-gradient(42deg, rgba(0,0,0,1) 0%, rgba(9,9,121,1) 35%, rgba(0,80,255,1) 100%);
  color: white;
  line-height: 1;
}

.button a:hover {
	color: #d0dfff;
  background: rgb(0,80,255);
  background: linear-gradient(42deg, rgba(0,80,255,1) 0%, rgba(9,9,121,1) 35%, rgba(0,0,0,1) 100%); 
}

.content h1 {
	font-size: 5em;
  font-weight: 800;
  margin-block: .5em;
}
.content h1 a:after {
	content: '';
  background: url('../image/icon-download.png') 0% / cover no-repeat padding-box;
  display: inline-block;
  width: 40px; 
	height: 50px;
}

.content h1::first-letter {
  color: var(--theme-color);
  transition: all 0.35s ease;
}

@media screen and (max-width: 768px) {
  .content h1 {
    font-size: 4em;
  }
  .content h1 a:after {
    width: 35px; 
	  height: 45px;
  }
}

/* iPhone */
@media screen and (max-width: 391px) {
  .content h1 {
    font-size: 3em;
  }
  .content h1 a:after {
    width: 35px; 
	  height: 40px;
  }
}

.resume section,
.projects section {
	padding: 2em 0;
	line-height: 1.5;
}


/*
Resume page
---------------------------------------*/
@media screen and (max-width: 768px) {
  .resume {
    text-align: justify;
  }
}
.resume section h2 {
	position: relative;
}

.resume section h2:before {
  content: '';
  height: 3px;
  width: 50px;
  background: var(--theme-color);
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
}

@media screen and (min-width: 769px) {
  .resume .summary p,
  .resume article,
  .experience h2 ~ div,
  .resume article > h4 {
    margin-left: 2em;
  } 
}

.resume section h2,
.experience h2 + div {
	margin-bottom: 1.5em;
}
.resume ul {
	/*all: revert;*/
	list-style-type: disc;
}

.resume a {
	font-size: 1.2em;
	font-weight: 900;
	transition: all 0.35s ease;
}

.resume a:hover {
	color: var(--theme-color);
}
.resume section a + span {
	font-size: .8em;
	font-weight: 400;
}
.resume section a:before {
	content: '';
  background-image: url('../image/web-link-24.png');
  background-size: 100%;
  display: inline-block;
  width: 16px;
  height: 16px;
 	margin-right: .3em;
}

.resume article > h3 {
	margin: 1em 0 1em .4em;
	font-weight: 200;
}

.resume article > ul {
	margin-top: .5em;
	margin-left: 2em;
}

@media screen and (min-width: 769px) {
  .resume article > h3 {
    margin: .5em 0 .5em 1em;
  }
  .resume article > ul {
    margin-left: 4em;
  }
}

.resume article:nth-of-type(2) h4,
.resume .skills article:nth-of-type(2) h3 {
	margin-top: 1em;
}

.resume .skills h3 {
	font-weight: 900;
}

/*
Projects page
---------------------------------------*/
/* Base styles */
.projects .project-list h2 {
		font-weight: 200; 
		margin-bottom: 2em;
}
.projects .project-list {
  display: flex;
  flex-wrap: wrap;
}

.project-item {
	background: ghostwhite;
}

.project-list .project-item {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2em;
}

.project-list .project-item .thumbnail {
  overflow: hidden;
  width: 100%;
}

.project-list .project-item .ratio-box {
  width: 100%;
  height: 0;
  padding-top: 75%;
  position: relative;
}

.project-list .project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  filter: grayscale(0);
  transition: filter 0.35s ease;
}

/* Hover effect */
.project-list .project-item img:hover {
  filter: grayscale(100%);
}

/* Landscape */
@media screen and (min-width: 769px) {
    .project-list .project-item div {
        flex: 1 0 calc(100% - 50%);
    }
}

.project-list .project-content {
	padding: 1em;
}

.project-list .project-content h3 {
	font-size: 1.5em;
	position: relative;
}

.project-list .project-content h3:before {
	content: '';
	left: 0;
	bottom: 0;
	width: 80px;
	height: 4px;
	background: var(--theme-color);
	position: absolute;
}

.project-list .project-content a {
  color: #3e78f7;
}

.project-list .project-content a:hover {
  color: #0a51e9;
}

.project-list .project-content ul {
  list-style: initial;
  margin-left: 30px;
}

@media screen and (max-width: 768px) {
   .project-list .project-item .project-content {
   	order: 2;
   }
}


/* Footer styles */
footer {
  border-top: 1px solid hsl(0, 10%, 90%);
}

.information {
  padding: 2em 0;
}

.information li {
  margin-inline: .5em;
}

.information .info span,
.information ul {
  margin-top: 1em;
}

@media screen and (min-width: 769px) {
  .information {
    display: flex;
    justify-content: space-between;
  }

  .information .info {
    text-align: center;
  }
  
  .information .info span {
    display: block;
  }
}
