/* 
Reset padding and margin and set box-sizing
*/

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  /* transition: background-color 0.3s, color 0.3s; */
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links and buttons to optimize for opt-in styling instead of opt-out.
*/

a,
button {
  color: inherit;
  text-decoration: inherit;
}

button {
  background: none;
  border: none;
}

/* 
Set a consistent line height across fonts and browsers because I am using system fonts and also because I want the japanese and english to line up on top of each other
*/

html {
  line-height: 1.3;
}

/* 
Set common styles on body
*/

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 32px;
  font-weight: 300;
  color: var(--text-color);
  margin: 20px;
  background: var(--bg-color);
}

:root {
  --text-color: #01ff2f;
  --hover-color: rgb(232, 255, 211);
  --bg-color: #3f402c;
}

.underline {
  text-decoration: underline;
  cursor: pointer;
}

.underline:hover {
  color: var(--hover-color);
}

/* is this needed for home page? */
/* nav {
  margin-bottom: 50px;
  position: fixed;
background: var(--bg-color);
z-index: 100;
padding: 20px 20px 0 20px;
top: 0;
left: 0;
width: 100vw;
} */

/* header styles */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  position: fixed;
  background: var(--bg-color);
  padding: 20px;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 25;
  /* border-bottom: 1px solid var(--text-color); */
}

header h1,
#nav-btn.logo,
#day-mode {
  font-size: 12px;
}

header a,
header .underline {
  text-underline-offset: initial;
}

#day-mode {
  opacity: 0;
  transition: opacity 1s;
}

button {
  font-size: 12px;
}

/* classes for toggling hover info on day-mode */

.sun:hover::after,
.night:hover::after {
  background: #000;
  color: #fff;
  position: absolute;
  display: inline-block;
  font-size: 16px;
  animation: 0.2s ease-in fade-in;
  right: 0;
  width: 100px;
}

.sun:hover::after {
  content: "The site is currently in day mode, full colour experience";
}

.night:hover:after {
  content: "The site is currently in night mode, the lights are down";
}

#favicon {
  max-width: 16px;
  translate: 0 2px;
  &:hover {
    animation: 0.5s ease-in-out spin forwards;
  }
}

.logo,
.menu {
  display: flex;
  gap: 8px;
  align-items: center;
}

.logo {
  min-width: 65vw;
}

.menu {
  position: relative; /* to allow for the hover::after repositionging on sun/moon */
}

#content,
#projects {
  margin-top: 60px;
}

/* expanding nav styles */

.dropdown-link-container {
  /* first, make our dropdown cover the screen */
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: 100vw;

  /* add margins and padding to taste */
  margin: 0;
  padding: 70px 20px 20px;
  background: var(--bg-color);

  /* our initial state */
  opacity: 1; /* fade out */
  /* move out of view */
  transform: translateY(-110%);
  transition:
    transform 0.2s,
    opacity 0.2s; /* transition these smoothly */
  pointer-events: none;

  z-index: 20;
}

.dropdown-opened {
  pointer-events: auto;
  opacity: 1; /* fade in */
  transform: translateY(0); /* move into view */
}

#nav-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#nav-links {
  display: flex;
  flex-direction: column;
}

#solar-info {
  font-size: 14px;
}

.mobile-dropdown-toggle {
  display: initial;
  transition: transform 0.2s;
}

/* Header <a> hover styles */

.flex-li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 30px;
  margin-bottom: 20px;
}

.one {
  width: 300px;
}

.two {
  width: 200px;
}

.hover-expand {
  transition:
    font-size 0.5s,
    margin-bottom 0.5s;
}

.hover-expand:hover {
  margin-bottom: 20px;
  transition: margin-bottom 0.5s;
}

a {
  display: inline-block;
}

a,
.underline {
  text-decoration: underline dotted 2.5px;
  text-underline-offset: 5px;
}

a:hover {
  color: var(--hover-color);
  /* font-size: 1.1em; */
}

li {
  list-style: none;
}

/* Description */

#description {
  flex: auto;
}

#artist-statement {
  max-width: 1080px;
}

/* Images */

figure {
  width: 100%;
  flex: auto;
}

img {
  width: 100%;
}

/* Weather responsive elements */

#solar-info p {
  margin-bottom: 20px;
}

.weather-serv,
#if-rain {
  display: none;
  margin-bottom: 20px;
}

/* fix underline offset for small text */
#data a, 
.contact a,
#community-message a,
#page-size-data {
  text-underline-offset: initial;
}

#data span {
  display: inline-block;
}

#open-meteo:hover::after {
  content: "Live data from open-meteo.com";
  background: #000;
  color: #fff;
  position: absolute;
  display: inline-block;
  font-size: 16px;
  animation: 0.2s ease-in fade-in;
}

/* Expanding nav styles */

/* project pages css */

.design-type {
  background: var(--text-color);
  color: var(--bg-color);
}

video {
  max-width: 100%;
}

#projects {
  margin-bottom: 100px;
}

/* footer styles */
footer {
  margin-top: 80px;
  font-size: 14px;
}

.contact {
  display: flex;
  gap: 0 30px;
  flex-wrap: wrap;
  gap: 15px;
}

#community-message {
  margin: 20px 0;
}

/* class library */

.f-right {
  width: 100%;
  display: flex;
  justify-content: right;
}

/* Tablet Media Query */

@media screen and (width >= 450px) {
  /* fixing dropdown container/hiding */
  

  body {
    padding-top: 0;
  }

  .details {
    flex-direction: row;
    gap: 60px;
  }

  #skills li {
    font-size: 10px;
    font-weight: 600;
  }
}

/* Desktop Media Query */

@media screen and (width >= 900px) {
  body {
    font-size: 32px;
  }

  .dropdown-link-container {
    background: none;
    position: initial;
    padding: 0;
    width: auto;
    height: auto;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  /* fix nav for wider screens */
  nav {
    position: initial;
    background: var(--bg-color);
    z-index: 0;
    padding: 0;
    width: auto;
  }

  #nav-info {
    flex-direction: row;
    padding-top: 50px;
    margin-bottom: 50px;
  }

  nav {
    flex-shrink: 0;
  }

  #solar-info {
    font-size: 16px;
    max-width: 30vw;
  }

  #nav-btn {
    display: none;
  }

  .logo {
    gap: 20px;
    min-width: 650px;
  }

  #favicon {
    max-width: 32px;
  }

  header h1,
  #day-mode {
    font-size: 32px;
  }

  #nav-info {
    padding-top: 80px;
  }

  .flex-li {
    justify-content: space-between;
    flex-wrap: nowrap;
    margin: 0;
  }

  .one,
  .four {
    width: 35%;
    margin-left: 0;
  }

  .two {
    min-width: 200px;
  }

  .two,
  .three {
    width: 14%;
  }

  #page-size-data:hover::after {
    content: "Live data collected from browser API";
    background: #000;
    color: #fff;
    position: absolute;
    display: inline-block;
    font-size: 16px;
    animation: 0.2s ease-in fade-in;
  }

  /* content page styles */

  .content-right {
    align-self: end;
  }

  #artist-statement p {
    font-size: 1em;
  }
}

/* JS ANIMATION CLASSES */

.remove {
  animation: forwards remove 1s ease-in;
}

.fade-in {
  animation: forwards 1s ease-in fade-in;
}

.half-rotate {
  transform: rotate(180deg);
  transition: transform 0.2 ease-in;
}

/* RESUSABLE CLASSES */

/* overlapping images */
.overlap {
  display: grid;
}

.overlap-child {
  grid-area: 1 / 1;
}

/* css animations */

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hover-scale {
  from {
    transform: scale(100%);
  }
  to {
    transform: scale(110%);
  }
}

@keyframes remove {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes tilt-n-move-shaking {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(5px, 5px) rotate(2deg);
  }
  50% {
    transform: translate(0, 0) rotate(0eg);
  }
  75% {
    transform: translate(-5px, 5px) rotate(-2deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* goofy element tilting code */

/* p {
  animation: 3s ease-in tilt-n-move-shaking infinite ;
  animation-play-state: paused;
}

p:hover {
  animation-play-state: running;
  animation-direction: normal;
} */
