/* --------------------------------------------------
   IMPORTS & FONTS
-------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap');

@font-face {
  font-family: 'Sigurd';
  src: url('./fonts/Sigurd-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal italic bold;
}


/* --------------------------------------------------
   ROOT VARIABLES
-------------------------------------------------- */
:root {
  --light: #c20067;
  --midlight: rgba(194, 0, 103, 0.25);
  --bg: #fafafa;
  --highlight: #e7f7f5; 
  --soft: #F1F0EE;
  --bglite: rgba(250, 250, 250, 0.8);
  --mid: rgba(0, 0, 0, 0.55);
  --dark: rgba(0, 0, 0, 0.9);
  --out: #23907f;
  --serif: 'Sigurd', serif;
  --sans: 'Public Sans', Helvetica, Arial, sans-serif;
  --mono: 'DM Mono', 'Courier New', mono;
}


/* --------------------------------------------------
   BASE STYLES
-------------------------------------------------- */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--sans);
  line-height: 1.6;
  color: var(--dark);
  background: #fafafa;
}

a {
  color: var(--light);
  text-decoration: none;
}

a:hover {
  background-color: var(--midlight);
}

::selection {
  background: var(--soft);
  color: var(--out);
}

p::-moz-selection {
  background: var(--highlight);
  color: var(--out);
}

a::selection {
  background-color: var(--highlight);
  color: var(--light);
}

a::-moz-selection {
  background: var(--highlight);
  color: var(--light);
}


/* --------------------------------------------------
   TYPOGRAPHY
-------------------------------------------------- */
h1 {
  font-family: var(--serif);
  margin: 0 0 1rem 0;
  font-size: 4em;
  font-weight: 300;
  font-variation-settings: "slnt" -9;
  line-height: 100%;
}

#main h1 {
  font-size: 6rem;
  margin: 0;
  padding: 0;
  line-height: 100%;
}

h3 {
  font-size: 1.25rem;
  font-weight: 00;
  margin: .5rem 0;
}

p {
  margin: 0.75rem 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 170%;
  text-rendering: optimizeLegibility;
}

#focus-areas p,
.col p {
  margin: 0 0 2rem 0;
}

#main p {
  font-size: 24px;
  line-height: 170%;
  margin-top: 0;
}

.serif {
  font-family: var(--serif);
}


/* --------------------------------------------------
   LAYOUT & STRUCTURE
-------------------------------------------------- */
.section {
  padding: 10px;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 5rem 10rem 5rem;
  background-color: var(--bglite);
  -moz-box-shadow: 0px 0px 7px var(--bglite);
  -webkit-box-shadow: 0px 0px 7px var(--bglite);
  box-shadow: 0px 0px 7px var(--bglite);
}

.row {
  display: flex;
  flex: 1;
  gap: 4em;
}

.col {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0;
}

.full {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.connect-links {
  display: flex;
  gap: 1em;
}

#canvas {
  position: fixed;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
}

#main {
  padding: 13rem;
  margin: 0 auto;
  z-index: 100;
}

footer {
  width: 100vw;
  padding: 1rem 2rem;
  background-color: var(--soft);
  display: flex;
  flex-flow: row;
}

footer p {
  font-size: .92rem;
}


/* --------------------------------------------------
   PROJECT LISTING
-------------------------------------------------- */
#projects {
  margin: auto;
  width: 80vw;
  display: flex;
  flex-flow: row wrap;
  gap: 32px;
}

.project-card {
  padding: 1.5rem 0rem;
  min-width: 250px;
  flex: 0 0 29%;
  background-color: var(--bglite);
  -moz-box-shadow: 0px 0px 7px var(--bglite);
  -webkit-box-shadow: 0px 0px 7px var(--bglite);
  box-shadow: 0px 0px 7px var(--bglite);
  border-radius: 4px; 
}

.project-card > a {
  color: var(--dark);
}

.project-card > a:hover {
  text-decoration: none;
  background-color: none;
}

.project-info {
  font-size: 16px;
  color: var(--mid);
}

.preview-image {
  background-color: #e2e2de;
  background-position: 50%;
  background-size: cover;
  border-radius: 12px;
  display: block;
  padding-bottom: 65%;
  transition: all .4s ease !important;
  width: 100%;
}

.preview-image:hover {
  transform: scale(1.05);
}

.project-context {
  display: flex;
  color: var(--out);
}

.dot::before {
  display: inline;
}


/* --------------------------------------------------
   PROJECT PAGES
-------------------------------------------------- */
.pj-info {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  margin: 32px auto 160px;
  padding: 16px;
}

.pj-dark {
  background-color: var(--dark);
  color: var(--highlight);
}

.pj-info > p,
.pj-stack > p {
  font-size: 18px;
  word-spacing: 1px;
}

.pj-info > p {
  max-width: 600px;
}

.pj-frame {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 2em;
  height: 74vh;
}

.pj-frame > .img-container {
  max-width: 500px;
}

.pj-details {
  display: flex;
  gap: 4em;
  padding-bottom: 4em;
}

.pj-stack {
  max-width: 600px;
}

.pj-skills {
  text-align: right;
  font-weight: 400;
  line-height: 150%;
  font-size: 12px;
}

.spacer {
  height: 120px;
}


/* --------------------------------------------------
   PLAYGROUND
-------------------------------------------------- */
.expflex {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1em;
  width: 70vw;
}

.gray {
  background-color: var(--soft);
}

.expwindow {
  padding: 2em;
  border: 1px solid var(--mid);
  border-radius: 22px;
}

.expwindow > a {
  max-width: 100%;
}

.expflex .col {
  gap: 1em;
}

details {
  max-width: 100%;
  border: 1px solid var(--highlight);
  margin-top: 1em;
  padding: .5em;
  font-family: var(--mono);
}

.expwindow > img, 
.gallery {
  padding-top: 1em;
  max-width: 100%;
}

.exptitle {
  display: flex;
  align-items: baseline;
}

.exptitle > p {
  margin: 0;
  flex: 2;
}

.out-text {
  color: var(--out);
  padding: .1em .3em;
  border-radius: 2em;
  border: 1px solid var(--out);
}

.out {
  background-color: var(--bg);
}

.out:hover {
  transition: transform 300ms;
  box-shadow: 4px 4px var(--out);
  transform: translate(-.1em, -.1em);
  cursor: pointer;
}

#darkbg {
  background-color: #f1f1f1;
  height: inherit;
}


/* --------------------------------------------------
   MEDIA ELEMENTS
-------------------------------------------------- */
.imghero {
  width: 90%;
  max-height: 600px;
  object-fit: cover;
  border-radius: 20px;
  margin: 1em 0em;
}

.img-container > p {
  padding-top: 0em;
}

.imgwrapper {
  display: flex;
  gap: 1em;
  width: calc(100% - 1em);
  padding: 1em 0em;
  justify-content: center;
}

.imgwrapper img {
  object-fit: cover;
}

.wc2 {
  width: calc(100%/2);
  object-fit: cover;
  border-radius: 20px;
}

.wc3 {
  width: calc(100%/3);
  border-radius: 20px;
}

#img-tall {
  height: auto;
}

.vidwrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.vidwrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


/* --------------------------------------------------
   NAVIGATION
-------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  height: 36px;
  background: transparent;
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;              
  pointer-events: none;   
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);   
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.nav > * {
  position: relative;
  z-index: 1;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-blur::before {
    background: var(--bglite);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
  }
}

.topnav a {
  font-size: 18px;
  font-weight: 500;
}


/* --------------------------------------------------
   MOBILE
-------------------------------------------------- */
@media only screen and (max-width: 520px) {
p {font-size: 16px;}
h1 {font-size: 4rem}
#main {padding: 6em 1em;}
#main > h1 {font-size: 4.5rem;}
#main > p {font-size: 18px;}
.section { padding: 4em 2px; margin: 1em; }
#projects {margin: 0; width: auto; display: block;}
.project-card {padding: 2rem 0rem; min-width: 300px;}

/* ~ PROJECT ~ */
.pj-frame {padding: .5em}
.pj-details {flex-direction: column;}
.m-hide  { display: none;}
.expflex { position:static; left: 0; transform: none;
width:90vw; flex-direction: column;}
}

@media only screen and (max-width: 664px) {
#projects {margin: 0; width: auto; display: block;}
.project-card {padding: 2rem 0rem; min-width: 300px;}
.expflex { position:static; left: 0; transform: none;
width:90vw; flex-direction: column;}
}

/* --------------------------------------------------
   DESKTOP
-------------------------------------------------- */
@media only screen and (min-width: 480px) {
  .d-hide { display: none; }
}


/* --------------------------------------------------
   ANIMATIONS
-------------------------------------------------- */
.fade-in { opacity: 0; animation: fadeIn 1.2s ease-out forwards; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#info.fade-in { animation-delay: 0.2s; }
#work.fade-in { animation-delay: 0.4s; }
#focus-areas.fade-in { animation-delay: 0.6s; }
#connect.fade-in { animation-delay: 0.8s; }
