/*global*/
:root {
  --black: #181818;
  --darkgray: #1d1d1d;
  --gray: #333;
  --lightgray: #8d8d8d;
  --green: #08fdd8;
  --transparent-green: rgba(8, 253, 216, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--darkgray);
  color: var(--lightgray);
}

.container {
  width: 80%;
  margin: auto;
}

a {
  text-decoration: none;
  color: var(--lightgray);
  transition: color 0.3s;
}

a:hover {
  color: var(--green);
}

.hidden {
  display: none;
}

.scroll-disabled {
  height: 100%;
  overflow: hidden;
}

.menu-slidein {
  animation: menuSlidein 0.3s;
}

.menu-slideout {
  animation: menuSlideout 0.3s;
  animation-fill-mode: forwards;
}

h2 {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
}

h3 {
  color: var(--green);
  font-weight: 700;
}

p {
  line-height: 1.4;
}

/*header*/
header {
  position: sticky;
  top: 0;
  z-index: 999;
}

nav {
  background: var(--black);
  padding: 20px;
  text-align: right;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav img {
  width: 30px;
  height: 30px;
}

nav ul {
  margin: 0;
}

nav ul li {
  display: inline-block;
  margin-left: 50px;
  font-weight: 400;
}

/*showcase*/
#showcase {
  height: calc(100vh - 76px);
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-text {
  animation: slidein 1s;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadein 1.5s;
}

.hero-image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 50px 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.hero-image img:hover {
  transform: translateY(-10px);
}

h1 {
  font-size: 60px;
  font-weight: 900;
  color: #fff;
  margin: 20px 0;
  line-height: 1.1;
}

#showcase p {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 30px;
}

#showcase a {
  border: 1px solid;
  padding: 15px 20px;
  display: inline-block;
  color: var(--green);
  transition: background 0.3s;
  font-weight: 500;
}

#showcase a:hover {
  background: var(--transparent-green);
}

/* Typing Animation */
.typing-text {
  display: inline-block;
  min-width: 200px;
}

.cursor {
  display: inline-block;
  color: var(--green);
  animation: blink 1s infinite;
  font-weight: 400;
  margin-left: 2px;
}

/*projects*/
.card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  align-items: center;
  margin: 100px 0;
  width: 80%;
  padding: 30px;
  background: var(--gray);
}

.card a:first-of-type {
  position: relative;
}

.card img {
  width: 100%;
}

.placeholder-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--lightgray);
}

.placeholder-image span {
  color: var(--lightgray);
  font-size: 18px;
  font-weight: bold;
}

.overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background-color: var(--transparent-green);
  transition: opacity 0.3s;
}

a:hover .overlay {
  opacity: 0;
}

.card h3 {
  font-size: 22px;
}

.card p {
  font-size: 18px;
  line-height: 1.6;
}

.card ul {
  padding: 0;
  font-size: 20px;
}

.card ul li {
  display: inline-block;
  margin-right: 10px;
  padding: 0;
}

.card i {
  margin-right: 15px;
}

.left-aligned-card div {
  text-align: right;
}

.left-aligned-card ul li {
  margin-right: 0;
  margin-left: 10px;
}

.left-aligned-card i {
  margin-right: 0;
  margin-left: 15px;
}

.right-aligned-card {
  margin-left: auto;
  margin-right: 0;
}

.right-aligned-card a {
  order: 1;
}

/*about*/
.about-content {
  text-align: center;
  max-width: 800px;
  margin: 50px auto;
  font-size: 20px;
  line-height: 1.6;
}

/*skills*/
.skills > ul {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: start;
  list-style: none;
  padding: 0;
  margin: 50px auto;
}

.skills > ul > li {
  margin: 0;
  font-weight: bold;
  color: var(--green);
  font-size: 18px;
}

.skills ul ul {
  list-style: none;
  padding: 15px 0 0 0;
  margin: 0;
  columns: 1;
}

.skills > ul > li:nth-child(2) ul {
  columns: 2;
  column-gap: 30px;
}

.skills ul ul li {
  margin: 8px 0;
  color: var(--lightgray);
  font-size: 16px;
  break-inside: avoid;
}

/*contact*/
#contact {
  text-align: center;
}

#contact .container .content {
  padding-top: 100px;
  font-size: 20px;
}

#contact .container .socials {
  margin-top: 50px;
}

.socials a:first-of-type {
  margin-right: 30px;
}

#projects,
#about,
#skills,
#contact {
  padding: 80px 0;
}

/*footer*/
footer {
  background: var(--black);
  text-align: center;
}

footer p {
  margin: 0;
  padding: 15px 0;
}

/*contact modal*/
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--darkgray);
  margin: 5% auto;
  padding: 0;
  border: 1px solid var(--gray);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--gray);
}

.modal-header h3 {
  margin: 0;
  color: var(--green);
  font-size: 22px;
}

.close {
  color: var(--lightgray);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: var(--green);
}

#contact-form {
  padding: 25px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--lightgray);
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gray);
  border-radius: 4px;
  background-color: var(--black);
  color: var(--lightgray);
  font-size: 16px;
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-message {
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  display: none;
}

.form-message.success {
  background-color: rgba(8, 253, 216, 0.1);
  color: var(--green);
  border: 1px solid var(--green);
}

.form-message.error {
  background-color: rgba(255, 99, 71, 0.1);
  color: #ff6347;
  border: 1px solid #ff6347;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 25px;
}

.btn-cancel,
.btn-send {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}

.btn-cancel {
  background-color: var(--gray);
  color: var(--lightgray);
}

.btn-cancel:hover {
  background-color: var(--lightgray);
  color: var(--darkgray);
}

.btn-send {
  background-color: var(--green);
  color: var(--darkgray);
}

.btn-send:hover {
  background-color: var(--transparent-green);
  color: var(--green);
  border: 1px solid var(--green);
}

.btn-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-send:disabled:hover {
  background-color: var(--green);
  color: var(--darkgray);
  border: none;
}

/*responsive*/
@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: 0;
    right: 0;
    width: 75vw;
    height: 100vh;
    background: var(--black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    display: none;
  }

  nav ul li {
    margin: 5vh 0;
  }

  nav li.hidden {
    display: block;
  }

  nav li i:hover {
    color: var(--green);
    cursor: pointer;
  }

  .card {
    width: calc(100% - 60px);
    grid-template-columns: 1fr;
  }

  .right-aligned-card a {
    order: 0;
  }

  .about-content {
    font-size: 18px;
  }

  .skills > ul {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-cancel,
  .btn-send {
    width: 100%;
  }

  .typing-text {
    min-width: 150px;
    font-size: 18px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-image {
    display: none;
  }

  h1 {
    font-size: 40px;
  }

  #showcase p {
    font-size: 18px;
  }
}

/*animations*/
@keyframes slidein {
  0% {
    transform: translateY(60px);
    opacity: 0;
  }
}

@keyframes fadein {
  0% {
    opacity: 0;
  }
  45% {
    opacity: 0;
  }
}

@keyframes menuSlidein {
  0% {
    transform: translateX(75vw);
  }
}

@keyframes menuSlideout {
  100% {
    transform: translateX(75vw);
  }
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}
