:root {
  --bg: #000;
  --primary: #efefef;
  --accent: #f86f6f;

  --code-bg: #1d2222;
  --code-text: #fff;
  --code-comment: #bbb;
  --code-bash-cmd: #2db;
  --code-bash-cmd: #fa8b8b;
  --code-bash-arg: #db2;

  --standard-unit: 16px;

  --unit-sm: calc(var(--standard-unit) / 2);
  --unit: var(--standard-unit);
  --unit-lg: calc(var(--standard-unit) * 2);
  --unit-xl: calc(var(--unit-lg) * 2);
  --unit-2xl: calc(var(--unit-xl) * 2);
  --unit-4xl: calc(var(--unit-2xl) * 2);

  --gap-sm: var(--unit-sm);
  --gap-md: var(--unit);
  --gap-lg: var(--unit-lg);
}
*,
*:before,
*:after {
  box-sizing: border-box;
}

html {
  font-family: sans-serif;
  line-height: 1.8;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--primary);
  margin: 0;
}

h2 {
  font-size: 1rem;
}

.visually-hidden {
  display: block;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
a:hover .visually-hidden {
  display: unset;
  height: unset;
  width: unset;
  overflow: unset;
}
p {
  max-width: 650px;
}
header,
section {
  display: flex;
  padding-inline: var(--unit);
  flex-direction: column;
  margin-inline: auto;
  max-width: 40rem;
}
header#home,
section.home {
  margin-bottom: 60vh;
  align-items: center;
  justify-content: center;
}
section.home:first-of-type {
  padding-inline: unset;
}
.red {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.13rem;
}
.grid {
  display: grid;
  --grid-col-1-width: min(48vw, 20rem);
  --grid-col-2-width: min(52vw, 20rem);
  grid-template-columns: var(--grid-col-1-width) var(--grid-col-2-width);
}

.grid > * {
  padding: var(--unit);
}
.grid > img {
  padding: var(--gap-lg);
  width: 100%;
  height: auto;
  border: 1px solid var(--primary);
}
.grid > :nth-child(2n) {
  display: flex;
  align-items: center;
}
.grid > :nth-child(2n-1) {
  display: flex;
  align-items: center;
  justify-content: center;
}

#smiling-face > div {
  position: relative;
  flex-direction: column;
}

#smiling-face p {
  position: relative;
  width: 100%;
  text-align: right;
  margin: 0;
}

nav {
  padding: var(--unit);
  border: 1px solid var(--primary);
  ul {
    li.active {
      list-style: disclosure-closed;
      &::marker {
        color: var(--accent);
      }
    }
  }
  &.secondary-menu {
    width: min(calc(100% - var(--unit) * 2), 28rem);
  }
  &.secondary-menu ul {
    padding-left: calc(var(--unit) + var(--unit-sm));
  }
}
nav > h3 {
  margin-block: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}
a {
  animation: 200ms ease-in-out;
  display: inline-flex;
  flex-direction: column;
  color: var(--primary);
}

a[href*="scroll-down-arrow"] {
  margin-top: 10vh;
}

#scroll-down-arrow {
  height: 2rem;
}

.soc-med-container {
  position: relative;
  width: min(100%, 40rem);
  margin-top: var(--unit-xl);
}

.soc-med-container > img {
  height: auto;
  width: min(100%, 40rem);
}
.soc-med-container > a {
  position: absolute;
}
.soc-med-container > a:nth-of-type(1) {
  left: 65%;
  top: 3%;
}
.soc-med-container > a:nth-of-type(2) {
  left: 45%;
  top: 22%;
}
.soc-med-container > a > img {
  height: 25px;
  width: 25px;
}
.soc-med-container > a:nth-of-type(3) {
  left: 72%;
  top: 48%;
}
.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--unit);
  width: 100%;
  padding-bottom: 30vh;
}
@media (min-width: 500px) {
  .project {
    grid-template-columns: 1fr 1fr;
  }
}
.project h3 {
  margin: 0;
}
.project img {
  width: 100%;
  height: auto;
}
@media (min-width: 500px) {
  .project img {
    width: clamp(12rem, 33vw, 20rem);
  }
}
.project div {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
}
.project img[data-ai="true"] {
  border: solid var(--primary) 1px;
  padding: var(--unit-lg);
  width: 100%;
  height: auto;
}
@media (min-width: 500px) {
  #skills-container {
    grid-column: span 2;
  }
}
#skills {
  padding-bottom: 30vh;
  width: 100%;
}
#skills li {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
#skills li:first-child span {
  width: 78px;
}

#design {
  margin-bottom: 0;
}

#design > *:not(h1, nav) {
  margin-bottom: 40vh;
}

#design > div:first-of-type {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
#design > div:first-of-type span.red {
  position: absolute;
}
#design > div:first-of-type span.red:first-of-type {
  top: -10%;
  right: 18%;
}
#design > div:first-of-type span.red:nth-of-type(2) {
  top: 25%;
  left: 16%;
}
#design > div:first-of-type span.red:nth-of-type(3) {
  bottom: -6%;
  right: 27%;
}

#design > div:nth-of-type(2) {
  position: relative;
  height: 30vh;
  width: 100%;
}
#design > div:nth-of-type(2) span.red {
  position: absolute;
}
#design > div:nth-of-type(2) span.red:first-of-type {
  top: -0%;
  left: 16%;
}
#design > div:nth-of-type(2) span.red:nth-of-type(2) {
  bottom: 25%;
  right: 18%;
}

div ul ul {
  list-style: disc;
}

#design > div ul {
  list-style: disc;
}
#design > section > div {
  text-align: center;
}
#design > section > a {
  font-size: 4rem;
  line-height: 1;
  text-decoration: none;
  position: relative;
  display: unset;
}

#design > section > a::after {
  content: " ";
  background: var(--primary);
  height: 2px;
  width: 97%;
  display: block;
  position: absolute;
  left: 4px;
  bottom: 0;
}

#design > section > a > svg {
  position: relative;
  padding-inline: 2px;
}

/* Blogs */
.nav-link {
  padding: 0.5rem 1rem 0;
}
.date {
  color: var(--code-comment);
}
.dotted-spacing {
  display: inline-block;
  width: max-content;
}
code {
  background-color: var(--code-bg);
  color: var(--code-text);
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-family: "Courier New", Tahoma, "Verdana", "Arial", sans-serif;
}
code-block {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-family: "Courier New", Tahoma, "Verdana", "Arial", sans-serif;
  background-color: var(--code-bg);
  color: var(--code-text);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  overflow-x: scroll;
  text-wrap: nowrap;
  padding: 1rem;
  .comment {
    color: var(--code-comment);
  }
  .bash-cmd {
    color: var(--code-bash-cmd);
  }
  .bash-arg {
    color: var(--code-bash-arg);
  }
}
#never {
  position: absolute;
  height: 0;
  width: 0;
}
section:has(em) {
  border: 1px solid var(--bg);
}
section:has(em):hover {
  --gradient: linear-gradient(
    to right,
    hsl(0, 83%, 70%) 0%,
    hsl(45, 83%, 70%) 14%,
    hsl(90, 83%, 70%) 28%,
    hsl(135, 83%, 70%) 42%,
    hsl(180, 83%, 70%) 56%,
    hsl(225, 83%, 70%) 70%,
    hsl(270, 83%, 70%) 84%,
    hsl(315, 83%, 70%) 100%
  );
  border-image: var(--gradient) 1;
  border-width: 1px;
  border-style: solid;

  em {
    font-weight: bold;
    background: var(--gradient);
    background-clip: text;
    color: transparent;
    scale: 1.1;
  }
}

footer {
  padding-inline: var(--unit);
  text-align: right;
  justify-content: end;
  display: flex;
}
