/* variables declared here - these are the colors for our pages, as well as the font stacks and sizes. */
:root {
  --bk-one: #171321;            /*black*/
  --bk-two: #0d314b;            /*bkblue*/
  --bk-three: #4b0d49;          /*plum*/
  --link-hover: #ff17e4;
  --link: #e310cb;                    /*magenta*/
  --heading-icon-color: #86fbfb;      /*aqua*/
  --text-color: #f7f8fa;              /*white*/
  --font-size: 1.3rem;
  --mono: "Oxygen mono", monospace;
  --sans: Oxygen, sans-serif;
}
/* border box model: https://css-tricks.com/box-sizing/ */
html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
body {        
padding: 0;     /*padding 0 marging 0 epand other elements*/
margin: 0;
font-family: var(--sans);
background-color: var(--bk-one);
color: var(--text-color);
font-size: var(--font-size);
}
h1, 
h2, 
h3 {    /*remove auto margin of heading 1,2 and 3*/
margin: 0;
}
a {
color: var(--link);
}
a:hover {
color: var(--link-hover);
text-decoration: none;
}
img {
width: 100%;
}
/* background color for divs */
.section--bk-three {
background-color: var(--bk-three);
}
.section--bk-two {
background-color: var(--bk-two);
}

.gradient {
  background: linear-gradient(90deg, rgba(255,23,228,1) 0%, rgba(134,251,251,1) 100%);
  height: 2px;
}

/*intro style*/

#intro {
padding: 4rem 1rem 10rem 1rem;
max-width: 1200px;
margin: 0 auto;
}
#intro p {
font-size: 1rem;
line-height: 1.5;   /*1.5 times of the font size*/
}
#intro .name {
font-family: var(--mono);
}
#intro .name span {
font-family: var(--sans);
font-size: 4rem;
color: var(--heading-icon-color);
display: block;
}
#intro h2 {
font-size: 3rem;
font-weight: normal;
}

/* Contact me section */
#contact {
width: 400px;
text-align: center;
margin: 0 auto;
padding: 3rem 0;
}
#contact p:last-child {
margin-top: 3rem;
}

/* navbar */
nav {
font-family: var(--mono);
font-size: 80%;         /*average base font-size of document's 80%*/
padding: 4rem 1rem;
}
nav h1 a {
font-family: var(--sans);
}
nav ul {
list-style-type: none;
padding: 0;
margin: 0;
display: flex;
flex-flow: row wrap;
justify-content: center;
align-items: center;
gap: 2rem;
}
nav li:first-child {
flex-basis: 100%;   /*set a variabl widht for flex element*/
text-align: center;
}
nav [class*="fa-"] {
font-size: 150%;
color: var(--heading-icon-color);
}
nav h1 [class*="fa-"] {
font-size: 100%;
color: var(--heading-icon-color);
}
nav a {
color: var(--white);
text-decoration: none;
display: block;
}
nav a:hover,
nav [class*="fa-"]:hover {
color: var(--link);
}
.button {
background-color: var(--link);
color: var(--text-color);
padding: 0.5rem;
border-radius: 5px;
font-family: var(--mono);
text-decoration: none;
}
.button:hover {
color: var(--text-color);
background-color: var(--link-hover);
}

/* Footer Section */
footer {
text-align: center;
padding: 4rem 0;
}
footer ul {
list-style-type: none;
padding: 0;
margin: 2rem 0;
display: flex;
flex-flow: row wrap;
justify-content: center;
gap: 3rem;
font-size: 3rem;
}

/* Project section */
#projects {
padding: 4rem 1rem;
}
#projects h2 {
font-size: 2.5rem;
margin-bottom: calc(2.5rem * 1.5);
}
#projects h3 {
color: var(--heading-icon-color);
}
#projects h4 {
font-size: 1rem;
font-family: var(--mono);
margin: 0;
}
.blackbox {
background-color: var(--bk-one);
padding: 1rem;
border-radius: 10px;
color: var(--text-color);
font-size: 1rem;
line-height: 1.5;
}
#projects ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
gap: 1rem;
font-size: 1rem;
}
#projects img {
margin: 2rem 0 4rem 0;
border-left: 1px solid var(--heading-icon-color);
border-top: 1px solid var(--heading-icon-color);
border-radius: 25px;
padding: 1rem;
}



@media (min-width: 550px) {
article {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1rem;
}
#projects {
  max-width: 1200px;
  margin: 0 auto;
}
#projects img {
  grid-column: 1/6;
  grid-row: 1/2;
}
.text {
  grid-column: 5/11;
  grid-row: 1/2;
  order: 2;
  text-align: right;
}
#projects ul {
  justify-content: flex-end;
}
#projects .reverse .text {
  grid-column: 1/7;
  order: 2;
  text-align: left;
}
#projects .reverse img {
  grid-column: 6/11;
  grid-row: 1/2;
}
#projects .reverse ul {
  justify-content: flex-start;
}
}

@media (min-width: 850px) {       /* for big screen*/
nav {
  max-width: 1200px;
  margin: 0 auto;
}
nav li:first-child {
  flex-basis: auto;
  text-align: left;
  margin-right: auto;
}
}