/* GLOBAL STYLES
--------------------------------------*/

/*
  https://www.paulirish.com/2012/box-sizing-border-box-ftw/
*/
html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

:root {
  --gray1: #f8f9fa;
  --gray2: #f0f1f5;
  --gray2-reduced-opacity: #f0f1f5b3; /* 70% opacity */
  --gray3: #e3e5ee;
  --gray4: #c7cdd0;
  --featured-color: #7a8277;
  --nearly-black: #1c2426;
  --proj-display-border-color: #9c9699;
  --btn-padding: 15px;
  --card-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.05),
    0 12px 24px rgba(0, 0, 0, 0.05);
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: var(--gray3);
  margin: 0;
  font-family: "OpenSans", "sans-serif";
  display: grid;
  grid-template-rows: auto 1fr auto;
}


.btn {
  background: var(--featured-color);
  color: var(--gray2);
  text-decoration: none;
  text-align: center;
  padding: var(--btn-padding);
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 2rem;
  transition-duration: 250ms;
  transition-property: background, color, border-color;
}

.btn:hover {
  background: var(--gray2);
  color: var(--featured-color);
  border-color: #413d3f;
  cursor: pointer;
}

.content-wrapper {
  margin: 0 auto;
  padding: 30px;
  max-width: 1000px;
  width: 100%;
}

@media screen and (max-width: 651px) {
  .content-wrapper {
    padding: 5px 30px;
  }
}

h1 {
  font-family: "Norwester", "sans-serif";
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  line-height: 0.8;
  letter-spacing: 0.2rem;
}

@media screen and (max-width: 651px) {
  h1 {
    line-height: 1;
    font-size: clamp(2rem, 10vw, 3rem);
  }

  h2 {
    font-size: 1rem;
  }
}

h2 {
  font-family: "CooperHewitt", "sans-serif";
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  padding-top: 0;
}

h3 {
  font-family: "CooperHewitt", "sans-serif";
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
}


@font-face {
  font-family: "Norwester";
  src: url(../fonts/norwester/norwester.otf) format("opentype");
}

@font-face {
  font-family: "CooperHewitt";
  src: url(../fonts/cooperhewitt/CooperHewitt-Book.otf) format("opentype");
}

@font-face {
  font-family: "OpenSans";
  src: url(../fonts/open-sans-fontfacekit/webfonts/opensans_regular_macroman/OpenSans-Regular-webfont.woff)
    format("woff");
}

footer a {
  color: var(--gray4);
}

/* 'Banner' image for pages other than the homepage */
.header-img {
  background-image: url(../images/pexels-eddson-lens-covered-small.webp);
  height: 200px;
  background-position: 50% 10%;
  background-repeat: no-repeat;
  background-size: cover;
}
@media (min-width: 768px) {
  .header-img {
    background-image: url(../images/pexels-eddson-lens-semicovered-medium.webp);
    height: 275px;
  }
}

@media (min-width: 1200px) {
  .header-img {
    background-image: url(../images/pexels-eddson-lens-semicovered-large.webp);
    height: 375px;
  }
}

/* NAV BAR
--------------------------------------*/

.nav-container {
  display: flex;
  background-color: var(--gray3);
  justify-content: space-between;
  padding: 0rem 2rem;
}
.nav-container h3 {
  margin: 1rem 0;
  padding: 0.2rem 0 0 0;
  font-family: "Norwester", "sans-serif";
  letter-spacing: 0.1rem;
}
.nav-container h3 a {
  text-decoration: none;
  color: #1a191a;
}

@media screen and (max-width: 480px) {
  .nav-container h3 {
    display: none;
  }
  .nav-container {
    justify-content: center;
    padding: 0;
  }
  .nav-bar ul li a {
    padding: 1rem 0.5rem;
  }
}

.nav-bar {
  display: flex;
  padding: 0;
}
.nav-bar ul {
  display: flex;
  list-style: none; /* Removes the default bullet points */
  padding-left: 0; /* Removes default padding */
  margin: 0;
}
.nav-bar ul li {
  font-family: "OpenSans", "sans-serif";
  font-size: 1.3rem;
  transition-duration: 250ms;
  transition-property: background, color;
}
.nav-bar ul li:hover {
  background: var(--featured-color);
}
.nav-bar ul li a {
  /* By making the link a block item and
    putting the padding here, I make the whole
    box a clickable link, not just the text. */
  display: block;
  padding: 1rem;
  color: #413d3f;
  text-decoration: none;
}
.nav-bar ul li:hover a {
  color: var(--gray2);
}


/* HOME
--------------------------------------*/

.home {
  background-image: url(../images/pexels-eddson-lens-covered-mobile.webp);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .home {
    background-image: url(../images/pexels-eddson-lens-covered-medium.webp);
    background-size: cover;
  }
}

@media (min-width: 1200px) {
  .home {
    background-image: url(../images/pexels-eddson-lens-covered-large.webp);
    background-size: cover;
  }
}

.home main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-container {
  margin: 0 auto;
  min-height: clamp(10rem, 25vh, 20rem);
  width: 90%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
}

.hero-image-container {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  /* max-width: clamp(80%, 90%, 90%); */
  max-width: 70%;
  height: auto;
}

.hero-text p:first-of-type {
  margin-top: 3rem;
}
.hero-text p {
  font-family: "OpenSans", "sans-serif";
  font-size: clamp(1rem, 1.2vw, 1.3rem);
}

.hero-text h1 {
  font-family: "CooperHewitt", "sans-serif";
  font-size: clamp(2rem, 3vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.hero-text h3 {
  margin: 0
}

.hero-text {
  flex: 3;
  background-color: var(--gray2-reduced-opacity);
  padding: 25px;
  /* X-offset, Y-offset, Blur, Spread, Color */
  box-shadow: 0px 0px 30px 15px var(--gray2-reduced-opacity);
  
  /* round the sharp corners */
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.hero-text .btn {
  align-self: center;
  margin-top: 1.5rem; /* Add some space above the button */
}

@media screen and (max-width: 925px) {
  .hero-container {
    flex-direction: column;
    min-height: auto;
    gap: 1.5rem;
    margin-top: 5rem;
    margin-bottom: 6.5rem;
  }

  .hero-image {
    width: 60%; 
    max-width: 350px;
  }

  .hero-text {
    width: 100%;
  }
}

/* Use an outer container to position the about section */
.about-outer-container {
  max-width: 1000px;
  /* padding-bottom: clamp(10rem, 20vw, 25rem); */
  display: flex;
  flex-direction: column;
}

/* The about section is a (column) flexbox
containing two items */
.about-inner-container {
  background-color: #d1d4e0e6;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

.about-inner-container p {
  font-size: 1.3rem;
  line-height: 2rem;
  margin-top: 0;
  padding-top: 0;
}

.fade-in {
  opacity: 1 !important;
}

.home-content-row1 {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.home-content-row2 {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
}


/* PROJECTS
--------------------------------------*/


.projects .project-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  justify-content: space-between;
}

.project-button-grid .btn {
  width: clamp(300px, 100%, 380px);
  justify-self: center;
}

.projects .content-wrapper {
  margin-top: 1rem;
}

.projects .content-wrapper h1 {
  border-bottom: 0.1rem solid var(--proj-display-border-color);
  padding-bottom: 2rem;
  margin-bottom: 0;
}

.project-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10rem;
  padding-block: 1rem;
  padding: 5rem 0 3rem 0;
  max-width: 1000px;
}

.display-area {
  display: grid;
  /* Create one grid cell that holds all the project cards.
  Only the active card is shown; the rest are invisible.
  This is crucial for stacking items on the z-axis
  while also keeping them in the document flow, 
  ensuring they take up space. All children--the project showcases
  and the starter screen--need to go in one cell.*/
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  box-shadow: var(--card-shadow);
}

.project-showcase {
  /* Direct all cards to the first grid cell. If we didn't do this, 
  new rows would be automatically added. */
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none; /* Prevents clicking hidden buttons */
  transition: opacity 0.3s ease; /* Smooth fade effect! */
  z-index: 0;

  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: center;
  border: 0.5rem double var(--proj-display-border-color);
  background-color: var(--gray1);
  min-height: 600px;
  box-shadow: var(--card-shadow);
}

/* Target the showcase when it has the active class */
.project-showcase.active {
  opacity: 1;
  pointer-events: auto; /* Re-enable clicking */
  z-index: 1;
}
.project-showcase h3 {
  margin-top: 0;
}

.project-showcase p a {
  color: var(--gray1);
}

.project-showcase img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 80%;
  height: auto;
}

.starter-screen {
  grid-area: 1 / 1; /* Sit in the first cell */
  z-index: 0; /* Sit at the bottom */
  border: 0.5rem double var(--proj-display-border-color);
  background-color: var(--gray1);
  text-align: center;
  display: flex;
  flex-direction: column;
  /* For phones, the instructional text appears in the top of the box */
  justify-content: flex-start;
  align-items: center;
  padding: 4rem 2rem 2rem 2rem;
  min-height: 600px;
}

/* For tablets and computers, the instructional text appears in the center of the box */
@media (min-width: 768px) {
  .starter-screen {
    justify-content: center;
    /* Less top padding is needed here compared to phones */
    padding: 2rem; 
  }
}

.starter-screen h2 {
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  line-height: 1.2;
}

figure {
  margin: 0;
}

.janelia-image{
  /* Using box-shadow instead of border to avoid sub-pixel rendering issues where edges might disappear */
  box-shadow: 0 0 0 1px #1a191a;
  /* Add a tiny bit of padding to ensure the box-shadow isn't clipped by the container */
  margin: 1px;
  position: relative;
  z-index: 1;
}


.project-description {
  /* border: 0.5rem double #413d3f; */
  background-color: var(--gray1);
  padding: 1rem 1rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: clamp(1.1rem, 1.3vw, 1.3rem);
}

.project-description h3 {
  text-align: center;
}

.project-description .btn {
  align-self: center;
}

.project-description blockquote {
  margin-top: 0;
}

/* Target a paragraph that is followed by a blockquote */
.project-description p:has(+ blockquote) {
  margin-bottom: 0;
}

@media screen and (max-width: 1000px) {
  .project-showcase {
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 0;
  }

  .project-showcase figure {
    margin: 0;
  }

  .project-description {
    font-size: 1.2rem;
  }

  .project-description h3 {
    font-size: 1.8rem;
  }
}

@media screen and (max-width: 1049px) {
  .project-showcase img {
    max-width: 70%;
}
}


/* SERVICES
--------------------------------------*/

.services .content-wrapper h1 {
  border-bottom: 0.1rem solid var(--proj-display-border-color);
  padding-bottom: 2rem;
  margin-bottom: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
}

.services-grid img {
  max-width: 100%;
  height: auto;
}

@media screen and (max-width: 800px) {
  .services-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .services-grid img {
    max-width: 300px;
  }
}

.services p {
  font-size: clamp(1.1rem, 1.3vw, 1.3rem)
}

.contact-callout {
  text-align: center;
  padding: 8rem 2rem;
}

.contact-callout p {
  font-size: clamp(1.1rem, 1.3vw, 1.3rem);
}

@media screen and (max-width: 1000px) {
  .contact-callout p {
    font-size: 1.2rem;
  }
}


/* FOOTER
--------------------------------------*/
footer {
  background: var(--nearly-black);
  color: var(--gray4);
  width: 100%;
  min-height: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 20px;
}

@media screen and (min-width: 651px) {
  footer {
    flex-direction: row;
    justify-content: space-between;
  }
}

.socials {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.socials li {
  display: inline-block;
  margin-left: 10px;
}

.socials img {
  width: 32px;
}

.socials img:hover {
  opacity: 0.5;
}

