/*

TODO
- [x] wrap book image in link
- [x] make mobile friendly website
- [x] make events, other writing, speaking, about pages
- [x] tweak font colors
- [x] check color contrast accessibility
- [ ] brief flash of wrong font
- [x] add alt text for images
- [x] book/publication titles across the site need to be in italics
  - [x] wrap them in spans
- [x] add contact form
- [x] host on roohichoudhry.com
- [x] add redirect from brooklynstani.com to roohichoudhry.com
- [ ] add meta description
- [x] add designer name
  - [x] make it sticky to bottom (e.g. events page)
- [x] add emily's name for teaching photograph
- [x] also add my name to roohi's bio photo
- [x] optimize images
- [ ] optimize images further using the <picture> element
- [ ] add tracking
- [x] add target=_blank
*/

/* RESET CSS */
/* https://www.digitalocean.com/community/tutorials/css-minimal-css-reset */

html {
  box-sizing: border-box;

  font-size: 20px;
  line-height: 1.35;
}

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

body, h1, h2, h3, h4, h5, h6, p, ol, ul, figure, blockquote {
  margin: 0;
  padding: 0;
  font-weight: normal;
}

ol, ul {
  list-style: none;
/*  margin-bottom: var(--golden-1);*/
}

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

.hidden {
  display: none;
}



/* MAIN CSS */

:root {
  --padding: 1rem;
  --golden--2: 0.382rem;
  --golden--1: 0.618rem;
  --golden-0: 1rem;
  --golden-1: 1.618rem;
  --golden-2: 2.618rem;
  --golden-3: 4.236rem;
  --golden-4: 6.854rem;
  --golden-5: 11.089rem;

  --highlight-color: #E6B220;
  --link-color: #24759B;
  --text-color: #0F162B;
  --secondary-text-color: #5C6777;
  --bg-color: #fff;
  --menu-color: #0F162B;
  
  --body-font: "Alegreya", "EB Garamond", "Garamond", "Georgia", serif;
  --func-font: "Mohave", "Helvetica", sans-serif;


  --shadow-color: 212deg 15% 41%;
  --shadow-elevation-low:
    0.3px 0.5px 0.7px hsl(var(--shadow-color) / 0.52),
    0.5px 0.9px 1.2px -1.2px hsl(var(--shadow-color) / 0.52),
    1.3px 2.5px 3.2px -2.5px hsl(var(--shadow-color) / 0.52);
  --shadow-elevation-medium:
    0.3px 0.5px 0.7px hsl(var(--shadow-color) / 0.55),
    1px 1.9px 2.4px -0.8px hsl(var(--shadow-color) / 0.55),
    2.5px 5.1px 6.4px -1.7px hsl(var(--shadow-color) / 0.55),
    6.3px 12.5px 15.7px -2.5px hsl(var(--shadow-color) / 0.55);
  --shadow-elevation-high:
    0.3px 0.5px 0.7px hsl(var(--shadow-color) / 0.51),
    2.1px 4.1px 5.2px -0.4px hsl(var(--shadow-color) / 0.51),
    4px 7.9px 10px -0.7px hsl(var(--shadow-color) / 0.51),
    6.6px 13.2px 16.6px -1.1px hsl(var(--shadow-color) / 0.51),
    10.6px 21.2px 26.7px -1.4px hsl(var(--shadow-color) / 0.51),
    16.7px 33.4px 42px -1.8px hsl(var(--shadow-color) / 0.51),
    25.4px 50.8px 63.9px -2.1px hsl(var(--shadow-color) / 0.51),
    37.5px 75px 94.3px -2.5px hsl(var(--shadow-color) / 0.51);
}


html, body {
  font-family: var(--body-font);
  font-weight: normal;
	
	color: var(--text-color);
  height: 100vh;

  background-color: var(--bg-color);
}

.home-page {
  background-image: url("./images/waves.jpg");

  background-position: center;
/*  background-position: 0 -50vh;*/
  background-size: cover;
  background-repeat: no-repeat;
}

h1, h2, h3 {
  font-family: var(--func-font);
  font-weight: 400;
  text-transform: uppercase;
	line-height: 1.1;
/*  letter-spacing: 0.5px;*/
}

h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

p+h2, blockquote+h2 {
  margin-top: 2rem;
}

h3 {
  font-size: 1.2em;
  font-weight: 400;
  margin-bottom: 0.1rem;
  color: var(--secondary-text-color);
/*  text-transform: none;*/
}

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

a:hover {
  color: var(--highlight-color);
}

p, ul, ol {
  margin-bottom: var(--golden-1);
  font-size: 1em;
}



blockquote {
  border-left: 2px solid var(--highlight-color);
  padding-left: 1rem;

  margin: 2rem 0;
}


figcaption {
  font-size: .8em;
  color: var(--secondary-text-color);
}

.book-title {
  font-style: italic;
}




.logo {
  font-size: 2rem;
  line-height: 1.7rem;
}

.logo a {
  color: unset;
}

.logo a:hover {
  color: var(--highlight-color);
}

.home-page header {
  height: 90px;
}

.home-page main {
  height: calc(100vh - 90px - 60px - 2rem);
}

nav {
  height: 60px;
}


.home-page header {
/*  outline: 10px solid red; */
  position: relative;
}

header .mynah {
  position: absolute;

  top: 10px;
  left: 10px;
  width: 50px;
  height: 50px;

  z-index: 30;
}

header .logo {
  position: absolute;

  font-weight: 600;

  top: 2.5rem;
  left: 2rem;

  color: var(--text-color);
}

.sub-page header {
  position: relative;

  height: 200px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: start;

  z-index: 10;
}

.sub-page header .bg {
  object-fit:cover;
  position:absolute;
  width:100%;
  height: 100%;

  z-index: 10;
}

.sub-page .logo {
/*  outline: 1px solid green; */
  color: var(--bg-color);

  z-index: 20;
}

.sub-page header .head {
  height: 120px;
}



nav {
/*  outline: 5px solid brown; */
  position: fixed;
  width: 100%;
  bottom: 0;
  background-color: var(--menu-color);
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  gap: 3rem;
}

nav a {
/*   outline: 5px solid blue; */
  font-family: var(--func-font);
  font-size: 1.1rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--bg-color);

/*  opacity: .8;*/
}

nav a.selected {
  color: var(--highlight-color);

  opacity: 1;
}

.sub-page nav {
  position: relative;
  background-color: unset;

  z-index: 50;
}


.home-page main {
/*  outline: 10px solid red;*/
  display: flex;

  gap: 3rem;
  
  justify-content: center;
  align-items: center;
}

.home-page main > div {
/*   outline: 12px solid green; */
  width: 25vw;
  max-width: 40ch;
  min-width: 30ch;
}

.home-page main > div.cover {
/*  outline: 15px solid cyan; */
  width: 30vw;

  max-width: 500px;
  max-height: 75vh;

  display: flex;
  justify-content: center;
}

.home-page main > div.cover img {
/*  outline: 3px solid orange; */
  height: 75vh;
  border-radius: 6px;
  
  transition: all .3s ease-out;
  cursor: pointer;
  
  object-fit: contain;
  object-position: center center;

  filter: drop-shadow(0.3px 0.5px 0.7px hsl(var(--shadow-color))) 
          drop-shadow(0.5px 0.9px 1.2px hsl(var(--shadow-color)))
          drop-shadow(1.3px 2.5px 3.2px hsl(var(--shadow-color)));
}

.home-page main > div.cover img:hover {
  filter: drop-shadow(0.3px 0.5px 0.7px hsl(var(--shadow-color))) 
          drop-shadow(1px 1.9px 2.4px hsl(var(--shadow-color)))
          drop-shadow(2.5px 5.1px 6.4px hsl(var(--shadow-color)))
          drop-shadow(6.3px 12.5px 15.7px hsl(var(--shadow-color)));
}

.book-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1500px) {
  .home-page {
    background-position: 0 -30vw;
  }
}

@media (min-width: 1800px) {
  .home-page {
    background-position: 0 -40vw;
  }
}


@media (max-width: 1100px) {
  .home-page {
/*    background-position: ;*/
  }

  html, body, .home-page main {
    height: auto;
  }

  .home-page main {
    flex-direction: column;

    gap: 1rem;
    margin: 2rem;
    padding-bottom: 3rem;
  }

  .home-page main > div.cover {
    order: 1;
  }

  .home-page main > div {
    order: 2;
    width: unset;
  }

  .home-page main > div.cover img {
    height: auto;
  }

}

@media (max-width: 980px) {
  .home-page nav {
    position: static;
    flex-direction: column;
    align-items: start;
    gap: 1rem;
    height: auto;
    padding: 2rem;
  }

  .home-page main {
    padding-bottom: 0rem;
  }


  .sub-page header {
    height: auto;
  }

  .sub-page nav {
/*    outline: 10px solid red;*/
    position: relative;
    z-index: 20;
    flex-direction: column;
    align-items: start;
    height: 30vh;
    gap: 1rem;
    height: auto;
    padding: 1rem;
    padding-left: 2rem;
  }
}




.sub-page main {
  width: 90vw;
  max-width: 100ch;
  min-height: 80vh;

  margin: 4rem auto;
}

.sub-page footer {
  /*position:fixed;
  bottom:0;*/

  width: 90vw;
  max-width: 100ch;

  margin: 1rem auto;
  margin-top: 4rem;
}

.sub-page footer p {
  color: var(--secondary-text-color);
  font-size: .8em;
}

section {
  display: flex;
  gap: 4rem;
}

section .primary {
  width: 60ch;
}

section .secondary {
  width: 40ch;
}


@media (max-width: 800px) {
  .sub-page main {
    margin: 2rem auto;
  }

  section {
    flex-direction: column;
    gap: 2rem;
  }

  section .primary,
  section .secondary {
    width: 100%;
  }

  section .primary {
    max-width: 60ch;
  }

  section .primary {
    max-width: 40ch;
  }
}


/* EVENTS, WRITING, CLASSES */

.event, 
.writing,
.class {
  margin-bottom: 2rem;
}

.event div,
.writing div,
.class div,
.class p {
  margin-bottom: .25rem;
}

.event .info,
.event .host,
.writing .title,
.writing .meta {
  font-weight: 400;
}

.event .info {
  font-weight: 600;
}

.writing blockquote {
  margin-top: 0;
}

.writing .awards {
  color: var(--secondary-text-color);
}



/* ABOUT PAGE */

.bio {
  margin-bottom: 1rem;
}

.contact-form {

}

.contact-form > div {
  margin-top: 1rem !important;
  max-width: unset !important;
  border-radius: 6px !important;
}

.contact-form > div div {
  border-radius: 6px !important;
}



