/*
  Define vars
*/

:root {
  --primary-bg-color: #151515;
  --secondary-bg-color: #202022;
  --primary-color: white;
  --secondary-color: #949495;
  --tertiary-color: #303030;
  --danger: rgb(231, 84, 84);
}

/*
  1. Use a more-intuitive box-sizing model.
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

/*
	2. Remove default margin
  */
* {
  margin: 0;
}

/*
	Typographic tweaks!
	3. Add accessible line-height
	4. Improve text rendering
  */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/*
	5. Improve media defaults
  */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/*
	6. Remove built-in form typography styles
  */
input,
button,
textarea,
select {
  font: inherit;
}

/*
	7. Avoid text overflows
  */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

html {
  scroll-behavior: smooth;
}

body {
  padding: 50px 20px;
  background-color: var(--primary-bg-color);
  color: var(--secondary-color);
  font-family: "Raleway", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary-color);
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

a {
  text-decoration: underline;
  color: var(--primary-color);
}

.header__before_name {
  font-size: 1rem;
}

.header__headline {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 1.4rem;
  color: var(--primary-color);
}

.header__name {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
  font-size: 2.5rem;
}

.header__about {
  margin: 30px 0;
  font-size: 1.2rem;
}

.header__nav {
  display: none;
}

section.header__contacts {
  display: flex;
  align-items: center;
  justify-content: start;
  flex-direction: row;
  margin: 50px 0;
  border: none;
}

.header__contacts a {
  font-size: 1rem;
  display: inline-block;
  border: solid var(--secondary-color) 1px;
  border-radius: 5px;
  height: 32px;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  margin: 0 10px;
  padding: 5px 10px;
}

.header__profile_picture {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin-right: 10px;
}

aside {
  /* Buat development agar tidak mengganggu */
  /* atau saat tidak ada info yg ingin ditampilkan */
  /* maka bisa set display: none; aja */
  display: none;

  margin-right: 20px;
  position: fixed;
  bottom: 0;
  z-index: 9;
  font-size: 0.85em;
  font-family: "Inter", sans-serif;
  font-weight: 300;
  color: white;
}

aside .close-btn {
  display: flex;
  position: absolute;
  right: 0;
  cursor: pointer;
  font-size: 1.3em;
  z-index: 10;
  color: silver;
}

.highlights__content a {
  align-self: flex-end;
  margin-top: 10px;
  padding: 3px 12px;
  background-color: var(--tertiary-color);
  color: white;
  border: solid white 1px;
  border-radius: 5px;
  font-weight: bolder;
}

aside h2 {
  display: block;
  text-align: center;
}

.aside__highlights article {
  /* display: flex; */
  display: block;
  margin-top: 0;
  margin-bottom: 20px;
  border: solid white 2px;
  box-shadow: 0px 0px 86px 30px rgba(0, 0, 0, 0.78);
  -webkit-box-shadow: 0px 0px 86px 30px rgba(0, 0, 0, 0.78);
  -moz-box-shadow: 0px 0px 86px 30px rgba(0, 0, 0, 0.78);
}

.aside__highlights > article > img {
  /* width: 25%; */
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.aside__highlights .highlights__content {
  background-color: var(--secondary-bg-color);
  /* width: 75%; */
  width: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

section,
article {
  margin: 34px 0;
}

section h2,
article h2,
aside h2 {
  font-size: 0.8em;
  font-weight: 200;
  text-align: center;
}

article h2 {
  background-color: var(--primary-bg-color);
  position: sticky;
  top: 0;
  z-index: 5;
}

section h3,
article h3 {
  font-weight: 300;
  font-size: 1.2rem;
}

.section__portfolio a {
  padding: 20px;
  margin: 10px 0;
}

article a p {
  color: var(--secondary-color);
}

article a,
aside a {
  text-decoration: none;
  display: block;
  background-color: var(--secondary-bg-color);
  margin: 10px 0;
  padding: 0;
}

.section__portfolio h3 {
  font-weight: 500;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.section__blogpost h3 {
  font-weight: 500;
}

.highlight__blogpost {
  padding: 15px 20px;
}

.highlight__blogpost h3 {
  margin-bottom: 10px;
}

img.dummy {
  width: 100%;
}

.dummy {
  animation: skeleton-animation 1s infinite ease-in-out;
}

.highlight__blogpost.skeleton h3 {
  background-color: var(--tertiary-color);
  width: 100%;
  margin-bottom: 10px;
}

.skeleton p {
  background-color: var(--tertiary-color);
  margin-bottom: 5px;
  line-height: 90%;
  width: 100%;
}

.skeleton p:last-child {
  width: 60%;
}

.section__contact_me form {
  margin-top: 30px;
}

div[class*="alert"] {
  opacity: 0;
  margin: 28px 20px;
  border: solid 1px white;
  border-radius: 5px;
  padding: 10px 30px 10px 5px;
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 6;
  transition: 0.5s;
}

div[class*="alert"] > .close-btn {
  display: block;
  position: absolute;
  right: 10px;
  cursor: pointer;
}

div.alert-success {
  background-color: rgb(26, 62, 41);
  color: rgb(153, 230, 171);
  border-color: rgb(37, 90, 50);
}

div.alert-danger {
  color: rgb(225, 134, 143);
  background-color: rgb(67, 12, 17);
  border-color: rgb(104, 18, 27);
}

.section__contact_me input,
.section__contact_me textarea {
  display: block;
  width: 100%;
  color: var(--secondary-color);
  background-color: var(--secondary-bg-color);
  border: solid 1px var(--tertiary-color);
  border-radius: 5px;
  /* margin-bottom: 20px; */
  margin-top: 5px;
}

.section__contact_me input {
  height: 38px;
}

.section__contact_me textarea {
  resize: none;
}

.section__contact_me .form-error {
  font-size: 0.8em;
  margin-top: 3px;
  margin-bottom: 5px;
  color: var(--danger);
  visibility: hidden;
}

[class^="input-"][class$="-error"] {
  border: 1px solid var(--danger) !important;
}

.section__contact_me ::placeholder {
  color: var(--secondary-color);
  opacity: 0.5; /* Firefox */
}

.section__contact_me ::-ms-input-placeholder {
  /* Edge 12 -18 */
  color: var(--secondary-color);
}

.section__contact_me label {
  font-family: "Inter", sans-serif;
  color: white;
}

.section__contact_me .required {
  color: var(--danger);
}

.section__contact_me button {
  background-color: transparent;
  color: white;
  font-family: "Inter", sans-serif;
  border: solid 1px white;
  border-radius: 5px;
  padding: 5px 15px;
  width: auto;
  cursor: pointer;
}

.section__contact_me button:disabled {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
  cursor: not-allowed;
}

footer p {
  text-align: center;
  font-size: 0.8rem;
}

.view-more {
  font-family: "Inter", sans-serif;
  padding: 5px !important;
  font-size: 0.7em;
  text-align: center;
  justify-content: center;
}

.blink {
  animation: blink 1s steps(1) infinite;
  -webkit-animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    color: var(--tertiary-color);
    background-color: white;
    border: solid var(--tertiary-color) 1px;
  }
}
@-webkit-keyframes blink {
  50% {
    color: var(--tertiary-color);
    background-color: white;
    border: solid var(--tertiary-color) 1px;
  }
}

/* SCROLLBAR */

::-webkit-scrollbar {
  width: 8px;
}

/* Track */
::-webkit-scrollbar-track {
  background: var(--primary-bg-color);
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--tertiary-color);
  border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* ANIMATION */
@keyframes skeleton-animation {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.9;
  }

  100% {
    opacity: 0.5;
  }
}

/* Medium devices (tab, above 768 px) */
@media (min-width: 768px) {
  .section__blogpost a {
    display: flex;
    margin-bottom: 20px;
  }

  .section__blogpost > a > img {
    width: 25%;
    object-fit: cover;
    object-position: center;
  }

  .highlight__blogpost h3 {
    margin-bottom: 5px;
  }

  .section__blogpost .highlight__blogpost {
    background-color: var(--secondary-bg-color);
    width: 75%;
    padding: 5px 10px;
  }

  .aside__highlights article {
    display: flex;
  }

  .aside__highlights > article > img {
    width: 25%;
  }

  .aside__highlights .highlights__content {
    width: 75%;
  }

  .highlights__content button {
    align-self: center;
  }

  div[class*="alert"] {
    width: auto;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  body {
    padding: 0;
    display: flex;
  }

  header {
    height: 85vh;
    width: 50%;
    position: fixed;
    top: 40;
    padding: 20px;
  }

  main {
    margin-left: 50vw;
    width: 50%;
    padding: 20px;
  }

  aside {
    right: 0;
    width: 23%;
  }

  .aside__highlights article {
    display: block;
  }

  .aside__highlights > article > img {
    width: 100%;
  }

  .aside__highlights .highlights__content {
    width: 100%;
  }

  .section__blogpost h3 {
    font-size: 1rem;
  }

  .section__blogpost .highlight__blogpost {
    font-size: 0.9rem;
  }

  footer {
    position: fixed;
    display: flex;
    bottom: 20px;
    justify-content: center;
    width: 50%;
  }

  .header__nav {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: 52px;
  }

  .header__contacts {
    position: fixed;
    bottom: 50px;
  }

  .header__nav ul li {
    list-style-type: square;
  }

  .header__nav ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: 0.2s;
  }

  .header__nav ul li a:hover {
    color: var(--primary-color);
    font-weight: bolder;
  }

  section,
  article {
    margin: 34px 0;
  }

  article.section__portfolio {
    margin-top: 0;
  }
}

