@import 'fonts.css';

/* Global */
:root {
  --primary-font: 'Wremena', 'Times New Roman', 'Times', serif;
  --secondary-font:
    'Standard', 'Arial', 'Helvetica Neue', 'Helvetica', monospace;
  --accent-color: #65df91;
  --text-color: #15151c;
  --text-color-secondary: #23232f;
  --text-color-tertiary: #5f5f6a;
  --link-color: #0c8300;
  --link-hover-color: #92a891;
  --fade-in-effect: fadein 800ms;
  --background-color: #dfdfdf;
  --border-color: #c9c9c9;
  --glowing-color: #a1dbb6;
  --padding-value: calc(1rem + 0.5vw);
  background-color: var(--background-color);
  font-size: 16px;
  font-family: var(--secondary-font);
  letter-spacing: -0.01em;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-animation: var(--fade-in-effect);
  -moz-animation: var(--fade-in-effect);
  -ms-animation: var(--fade-in-effect);
  -o-animation: var(--fade-in-effect);
  animation: var(--fade-in-effect);
}

::-moz-selection {
  background: var(--accent-color);
}

::selection {
  background: var(--accent-color);
}

html {
  overflow-y: scroll;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-size: 1rem;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  font-weight: 400;
  line-height: 1.1;
}

h1 {
  font-family: var(--primary-font);
  --min-font-size: 28px;
  --max-font-size: 44px;
  --rate-of-change: 1vw;
  font-size: clamp(
    var(--min-font-size),
    var(--min-font-size) + var(--rate-of-change),
    var(--max-font-size)
  );
  letter-spacing: -0.025em;
  font-weight: 200;
  margin-left: -0.04em;
  margin-top: 0;
  padding-bottom: 0.04em;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

h2 {
  --min-font-size: 14px;
  --max-font-size: 20px;
  --rate-of-change: 0.5vw;
  font-size: clamp(
    var(--min-font-size),
    var(--min-font-size) + var(--rate-of-change),
    var(--max-font-size)
  );
  text-transform: uppercase;
  margin-top: 1em;
}

h3,
h4,
h5,
h6 {
  text-transform: uppercase;
  margin-top: 2rem;
}

section {
  padding: var(--padding-value);
}

section.columns {
  columns: 2;
  column-gap: 4em;
  column-width: 16em;
}

.columns div {
  display: inline-block;
  padding-bottom: 1em;
  width: 100%;
}

/* Body */
p,
li {
  --min-font-size: 12px;
  --max-font-size: 16px;
  --rate-of-change: 0.5vw;
  font-size: clamp(
    var(--min-font-size),
    var(--min-font-size) + var(--rate-of-change),
    var(--max-font-size)
  );
  /*margin-left: var(--padding-value);*/
}

p {
  font-family: var(--secondary-font);
  font-weight: 400;
  color: var(--text-color-secondary);
  line-height: 1.5;
}

p + p {
  margin-top: 1.5em;
}

p img {
  height: 1em;
  padding-right: 0.1em;
  padding-left: 0.1em;
}

i,
em {
  font-style: italic;
  font-weight: 400;
}

b {
  font-family: var(--primary-font);
  letter-spacing: -0.025em;
  font-style: normal;
  line-height: 100%;
  font-weight: 700;
  font-size: 112%;
}

strong {
  font-weight: 700;
  letter-spacing: -0.045em;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: all 0.2s ease-out;
  display: inline;
}

a:hover,
a:focus {
  text-decoration: none;
  outline: none;
  background-color: var(--glowing-color);
  box-shadow: 0 0 0.5em 0.3em var(--glowing-color);
  border-radius: 0.25em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

div > ul,
aside > ul {
  padding-left: 0;
  display: grid;
  gap: 0.25em;
}

ul li {
  list-style-type: none;
  list-style-position: inside;
  display: flex;
  align-items: center;
}

ul li::before {
  content: '\2192';
  padding-right: 0.4em;
  vertical-align: middle;
  font-size: 0.85em;
  font-weight: bold;
  font-family: system-ui;
  height: 100%;
  padding-top: 0.18em;
}

.glowing {
  background-color: var(--glowing-color);
  border-radius: 0.75em;
  color: var(--text-color);
  box-shadow: 0 0 0.3em 0.3em var(--glowing-color);
}

a.glowing {
  border-bottom: 0;
  text-decoration: none;
  display: inline-block;
  margin-top: 2em;
  padding: 0.7em;
}

.glowing a {
  border-bottom: 0;
  text-decoration: none;
  color: inherit;
}

/* Glowing box */
.container-glowing {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.container-glowing .glowing {
  width: calc(3em + 15vw);
  max-width: 225px;
  border-radius: 1em;
  padding: var(--padding-value);
  margin-right: 1em;
  box-shadow: 0 0 0.7em 0.8em var(--glowing-color);
}

.container-glowing .glowing :first-child {
  margin-top: 0;
}

.container-glowing .glowing :last-child {
  margin-bottom: 0;
}

.glowing li::before {
  margin-left: 0;
}

@media (max-width: 850px) {
  .container-glowing .glowing {
    width: inherit;
    margin-left: 0;
    margin-top: 2em;
  }
}

@media (max-width: 650px) {
  .container-glowing .glowing {
    margin-top: 0;
  }
}

/* Intro Section */
section.intro {
  grid-template-columns: 2fr 1fr;
  display: grid;
  gap: calc(2 * var(--padding-value));
  margin-top: 0.5em;
}

@media (max-width: 850px) {
  section.intro {
    grid-template-columns: 1fr auto;
  }

  .container-glowing {
    align-items: start;
  }
}

@media (max-width: 650px) {
  section.intro {
    grid-template-columns: 1fr;
    padding-bottom: calc(2 * var(--padding-value));
  }

  .container-glowing {
    justify-content: start;
  }
}

/* Portfolio section */
section.portfolio {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 2fr;
  padding: 0;
  background-color: transparent;
  width: 100%;
}

.portfolio .column {
  border-right: 1px solid var(--border-color);
  padding: var(--padding-value);
}

.portfolio .column h2 {
  margin-top: 2em;
}

.portfolio .column h2:first-of-type {
  margin-top: 1em;
}

.portfolio figure {
  margin: 0;
  padding: calc(1em + 1vw);
  overflow-y: hidden;
  height: 70vh;
}

.portfolio figure div {
  animation: marquee-vertical 95s infinite linear;
  animation-delay: -20s;
  display: grid;
  gap: 1em;
}

.portfolio img {
  max-width: 100%;
  border-radius: 0.25em;
}

.portfolio a {
  border-bottom: 0;
  text-decoration: none;
}

.portfolio figure:hover div,
.portfolio figure:focus div {
  animation-play-state: paused;
  cursor: context-menu;
}

.portfolio figure:hover,
.portfolio figure:focus {
  cursor: context-menu;
}

.portfolio a:hover,
.portfolio a:focus {
  background-color: var(--accent-color);
  color: inherit;
  box-shadow: 0 0 0.3em 0.3em var(--accent-color);
}

.portfolio div.column__internal-wrapper,
.portfolio .column__internal-wrapper div {
  padding-left: 0;
}

.column__internal-wrapper {
  display: grid;
}

@media (max-width: 950px) {
  section.portfolio {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 850px) {
  section.portfolio {
    display: block;
    padding-left: 0;
  }

  .column__internal-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: var(--padding-value);
  }

  .portfolio div {
    padding-left: var(--padding-value);
  }

  .portfolio figure div {
    display: inline-flex;
    width: max-content;
    animation: marquee 40s infinite linear;
    animation-delay: -20s;
  }

  .portfolio figure {
    margin-top: 3em;
    margin-bottom: 2em;
    height: auto;
  }

  .portfolio img {
    width: auto;
    height: 8em;
  }

  .portfolio img + img {
    margin-left: 0.5em;
  }

  .portfolio a img {
    margin-left: 0.5em;
    margin-right: 0.5em;
  }
}

/* Work Table Grid */
.work .intro {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.work .intro h1 {
  flex-shrink: 0;
}

.work .nav {
  text-align: right;
}

.work-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--padding-value);
  table-layout: fixed;
}

.work-table thead th:nth-child(1) {
  width: 25%;
}
.work-table thead th:nth-child(2) {
  width: 10%;
}
.work-table thead th:nth-child(3) {
  width: 15%;
}
.work-table thead th:nth-child(4) {
  width: 35%;
}
.work-table thead th:nth-child(5) {
  width: 15%;
}

.work-table thead tr {
  border-top: none;
}

.work-table thead th {
  text-align: left;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  font-weight: 400;
  color: var(--text-color-tertiary);
  font-size: 90%;
}

.work-table tr {
  border-top: 1px solid var(--border-color);
}

.work-table tr:has(img) {
  border-top: none;
}

.work-table td {
  padding: 1rem 0;
  vertical-align: baseline;
  line-height: 1.5;
}

.work-table td:nth-child(4),
.work-table th:nth-child(4) {
  text-align: left;
}

.work-table td:nth-child(5),
.work-table th:nth-child(5) {
  text-align: right;
}

.work-table td p {
  margin: 0;
}

.work-table p a {
  color: inherit;
  border-bottom: 0;
  text-decoration: none;
}

.caption {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-color-tertiary);
  padding-top: 0.25em;
}

.work-table a:hover,
.work-table a:focus {
  background-color: var(--glowing-color);
  color: inherit;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--glowing-color);
  box-shadow: 0 -0.1em 0.5em 0.3em var(--glowing-color);
}

.work-table .gallery-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  justify-items: end;
}

.work-table .gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.5em;
  width: 50%;
  align-items: start;
  will-change: transform;
}

.work-table .gallery img {
  width: 100%;
  height: auto;
  border-radius: 0.05rem;
  display: block;
}

.work-table img + p {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-color-tertiary);
  margin-top: 0.5rem;
}

@media (max-width: 650px) {
  .work .intro {
    display: grid;
  }

  .work .nav {
    text-align: left;
  }

  .work-table,
  .work-table thead,
  .work-table tbody,
  .work-table tr {
    display: block;
    width: 100%;
  }

  .work-table thead {
    display: none;
  }

  .work-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
  }

  .work-table td {
    padding: 0;
  }

  .work-table td:nth-child(1) {
    grid-column: 1 / 2;
  }

  .work-table td:nth-child(2) {
    grid-column: 2 / 3;
    text-align: right;
  }

  .work-table td:nth-child(3),
  .work-table td:nth-child(4),
  .work-table td:nth-child(5) {
    grid-column: 1 / 3;
    text-align: left;
  }

  .work-table tr[aria-label] {
    grid-column: 1 / 3;
    display: block;
  }

  .work-table .gallery-wrapper {
    display: block;
  }

  .work-table .gallery {
    width: 100%;
  }
}

/* Marquee banner */
body > aside {
  border-bottom: 1px solid var(--text-color);
  padding-top: 1em;
  padding-bottom: 1em;
  overflow-x: hidden;
}

main ~ aside {
  border-top: 1px solid var(--text-color);
  border-bottom: 0;
  text-decoration: none;
}

.marquee {
  text-transform: uppercase;
}

p.marquee {
  margin: 0;
  font-size: 0.8em;
}

.marquee span + span {
  padding-left: 1em;
}

body > aside:hover,
body > aside:focus {
  cursor: context-menu;
}

body > aside:active {
  cursor: not-allowed;
}

.marquee:hover,
.marquee:focus {
  animation-play-state: paused;
}

body > aside a {
  color: inherit;
  border-color: inherit;
}

.portfolio figure {
  overflow-y: scroll;
}

@media (prefers-reduced-motion) {
  .portfolio figure div {
    animation: none;
  }
}

footer {
  padding: var(--padding-value);
}

/* Horizontal Marquee effect */
@keyframes marquee {
  from {
    transform: translateX(100vw);
  }

  to {
    transform: translateX(-100%);
  }
}

/* Portfolio Marquee effect */
@keyframes marquee-vertical {
  from {
    transform: translateY(60vh);
  }

  to {
    transform: translateY(-100%);
  }
}

/* Fade in Effect */
@keyframes fadein {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Horizontal Marquees */
.marquee-container {
  --gap: 1em;
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: var(--gap);
}

.marquee {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  min-width: 100%;
  gap: var(--gap);
  animation: scroll 20s linear infinite;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-100% - var(--gap)));
  }
}
