/* ── RESET ── */
/* NO CHANGES */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after { content: ''; content: none; }
table { border-collapse: collapse; border-spacing: 0; }

/* GENERAL REFERENCE 

CONTENTS: 
1. General Styling - body 
2. Headings & Typography - h1, h2 
3. Header & Navbar
3. General Links 
5. Footer 
6. Media Queries 



/* ── ROOT ── */
/* NO CHANGES */
:root {
  --bg:           #fff3ed;
  --black-text:   #1a1a1a;
  --red-text:     #c84133;
  --blue-text:    #2e5ca5;
  --body-font:    Domine, serif, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --cursive-font: "Dawning of a New Day", cursive, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Genereal Styling - 
these apply to all pages except home page. 
*/

body {
  background-color: var(--bg);
  color: var(--black-text);
  font-family: var(--body-font);
  overflow: auto;
  min-height: 100vh;
}

header {
  position: fixed;
  top: 0;
  right: 0;
  padding-top: 140px;
  padding-right: 160px;
}

nav ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
}

nav a {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--black-text);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover { 
  color: var(--blue-text); 
}

nav a[aria-current="page"] { 
  color: var(--red-text); 
}

#menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--red-text);
}



strong {
  color: var(--red-text);
}

h1 {
  font-family: var(--cursive-font);
  -webkit-text-stroke: 1px var(--blue-text);
  font-size: 7rem;
  color: var(--blue-text);
  white-space: nowrap;
  transform: rotate(-3deg);
  display: inline-block;
  margin-bottom: 30px;
  margin-top: 40px;
  margin-right: 20px;
  position: relative;
}

p {
  font-family: var(--body-font);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--black-text);
  margin-bottom: 28px;
  margin-left: 20px;
  margin-right: 20px;
}

h2 {
  font-family: var(--body-font);
  color: var(--red-text);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0px;
  margin-top: 80px;
}

/* General Pages — main content area for inner pages */
main {
  padding: 10px 0px 0px 60px;
}

main > img {
  width: 60px;
  vertical-align: middle;
  padding-top: 45px;
  padding-right: 10px;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

main > img:hover {
  transform: rotate(180deg) scale(1.08) rotate(-5deg);
}


/* ul when followed by h1 - this applies to all the case study pages */
h1 + ul {
  display: flex;
  list-style: none;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 40px;
  margin-left: 0px;
}

h1 + ul li + li {
  border-left: 2px solid var(--red-text);
  padding-left: 1.5rem;
  margin-left: 1.5rem;
}

/* Footer */
footer {
  border-top: 2px solid var(--blue-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  max-width: 80%;
  margin: 0 auto;
  margin-bottom: 40px;
}

footer a, footer span {
  font-size: 1rem;
  color: grey;
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--blue-text); }



/* ── CASE STUDY PAGES ── */

body.case-study > main {
  padding-top: 40px;
  padding-bottom: 60px;
  padding-left: 160px;
  padding-right: 300px;
}

body.case-study main > p img {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  flex-shrink: 0;
}

body.case-study main > p {
  display: flex;
  align-items: center ;
  gap: 2em;
  margin-left: 0;
  margin-right: 0;
}

body.case-study main > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
  align-items: start;
}

body.case-study figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
}


/* ─── HOME PAGE ──── */

html:has(body.home) {
  overflow: hidden;
  height: 100%;
}

body.home {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  overflow: hidden;
}

body.home div   { order: 1; }
body.home header { order: 2; }

body.home div {
  position: relative;
  width: 700px;
}

body.home h1 {
  position: absolute;
  top: -60px;
  right: -10px;
  font-family: var(--cursive-font);
  -webkit-text-stroke: 1px var(--blue-text);
  font-size: 6.2rem;
  color: var(--blue-text);
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
  transform: rotate(-6deg);
  display: block;
  margin: 0;
}

body.home figure {
  margin-left: 100px;
  width: 500px;
}

body.home figure img {
  width: 100%;
  display: block;
}

body.home div > img:nth-of-type(1) {
  position: absolute;
  top: 180px;
  left: 10px;
  width: 180px;
  z-index: 3;
  transition: transform 0.2s ease;
  transform: rotate(-6deg);
}

body.home div > img:nth-of-type(2) {
  position: absolute;
  top: 50px;
  right: -80px;
  width: 240px;
  z-index: 3;
  transition: transform 0.2s ease;
  transform: rotate(6deg);
}

body.home div > a {
  position: absolute;
  bottom: -30px;
  right: 50px;
  z-index: 3;
  display: block;
  transition: transform 0.2s ease;
}

body.home div > a img {
  width: 100px;
}

body.home div > img:nth-of-type(1):hover { transform: scale(1.1) rotate(4deg); }
body.home div > img:nth-of-type(2):hover { transform: scale(1.05) rotate(2deg); }
body.home div > a:hover                  { transform: scale(1.15) rotate(-5deg); }

body.home header {
  position: static;
  margin-top: 30px;
  width: 700px;
  padding: 0;
}

body.home nav ul {
  flex-direction: row;
  align-items: unset;
  gap: 80px;
  padding-left: 100px;
}

body.home nav a {
  font-size: 1.2rem;
}


/*bubble pop up (contact me) for the smiley face on home page. 
Got the code and idea from code pen!*/

body.home div > a span {
  color: var(--red-text);
  position: absolute;
  font-family: var(--body-font);
  font-size: 0.85rem;
  font-weight: 700;
  bottom: 0;
  left: -10px;
  right: -10px;
  padding: 5px 7px;
  text-align: center;
  border-radius: 4px;
  background: #fff;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body.home div > a span::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #fff;
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
}

body.home div > a:hover span {
  bottom: 115px;
  visibility: visible;
  opacity: 1;
}


body:not(.home) > div {
  display: flex;
  align-items: flex-start;
  padding-top: 40px;
  margin-left: 220px;
  margin-bottom: 40px;
  margin-top: 80px;
}

/*Placed the toolbar in an id, because the placement of this image is unique compared to the other pages.*/
#toolbar {
  width: auto;
  flex-shrink: 0;
  transform: rotate(-3deg);
}

#toolbar:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

#toolbar ~ main h1 {
  margin-bottom: 30px;
  margin-top: 0px;
  margin-left: 20px;
  margin-right: 20px;
}

#toolbar + main {
  flex: 1;
  max-width: 60%;
}


/*for the grid on my work page*/

body > main {
  padding-top: 40px;
  padding-bottom: 60px;
  padding-left: 160px;
  padding-right: 100px;
}

#work-grid {
  display: grid;
  grid-template-columns: repeat(3, 460px);
  row-gap: 80px;
  column-gap: 40px;
  margin-top: 60px;
  margin-left: 90px;
}

#work-grid a {
  text-decoration: none;
  color: var(--black-text);
  transition: transform 0.2s ease;
}

#work-grid a:nth-child(1) img { transform: rotate(-3deg); }
#work-grid a:nth-child(2) img { transform: rotate(2deg); }
#work-grid a:nth-child(3) img { transform: rotate(-3deg); }
#work-grid a:nth-child(4) img { transform: rotate(4deg); }
#work-grid a:nth-child(5) img { transform: rotate(2deg); }
#work-grid a:nth-child(6) img { transform: rotate(4deg); }

#work-grid a:hover {
  transform: scale(1.03);
}

#work-grid img {
  max-width: 250px;
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

#work-grid a p:first-of-type {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0;
}

#work-grid a:hover p:first-of-type {
  color: var(--red-text);
}

#work-grid a p:last-of-type {
  font-size: 0.9rem;
  color: grey;
  margin-bottom: 0;
}

/* ── dr.fajer & elio page ── */
 
body.dr-fajer > main,
body.elio > main {
  padding-top: 40px;
  padding-bottom: 60px;
  padding-left: 160px;
  padding-right: 300px;
}
 
/* Moodboard — text left, image right */
body.dr-fajer .moodboard,
body.elio .moodboard {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  margin-top: 60px;
  margin-bottom: 20px;
}
 
body.dr-fajer .moodboard-text,
body.elio .moodboard-text {
  flex: 1;
}
 
body.dr-fajer .moodboard-text h2,
body.elio .moodboard-text h2 {
  margin-top: 40px;
  margin-bottom: 20px;
}
 
body.dr-fajer .moodboard-text p,
body.elio .moodboard-text p {
  margin-left: 0;
  margin-right: 0;
}
 
body.dr-fajer .moodboard figure,
body.elio .moodboard figure {
  flex-shrink: 0;
}
 
body.dr-fajer .moodboard figure img,
body.elio .moodboard figure img {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
}
 
/* Colour swatches */
body.dr-fajer .colours,
body.elio .colours {
  margin-top: 30px;
  margin-bottom: 20px;
}
 
body.dr-fajer .colours h2,
body.elio .colours h2 {
  margin-bottom: 20px;
}
 
body.dr-fajer .colours p,
body.elio .colours p {
  margin-left: 0;
  margin-right: 0;
  margin-top: 20px;
}
 
body.dr-fajer .swatches,
body.elio .swatches {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-top: 30px;
}
 
body.dr-fajer .swatch,
body.elio .swatch {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
 
/* Typography section */
body.dr-fajer .typography h2,
body.elio .typography h2 {
  margin-bottom: 20px;
}

body.dr-fajer .typography p,
body.elio .typography p {
  margin-left: 0;
  margin-right: 0;
}

body.dr-fajer .posts p,
body.elio .posts p {
  margin-left: 0;
  margin-right: 0;
  margin-top: 10px;
}
 
/* Post grids — 4 columns */
body.dr-fajer .posts,
body.elio .posts {
  margin-top: 20px;
}
 
body.dr-fajer .posts h2,
body.elio .posts h2 {
  margin-bottom: 20px;
}
 
body.dr-fajer .post-grid,
body.elio .post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}
 
body.elio .post-grid figure img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}


body.dr-fajer .post-grid figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
 
 
/* ── ELIO — 3 column post grid override ── */
body.elio .post-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ── MEDIA QUERIES ── */

@media (max-width: 1200px) {

  /* ── NAV — inner pages only ── */

  body:not(.home) header {
    position: static;
    padding: 30px 30px 0px 20px;
  }

  body:not(.home) nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  body:not(.home) #menu-toggle {
    display: block;
    font-size: 3rem;
    padding: 10px;
  }

  body:not(.home) nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 65vw;
    height: 100vh;
    background-color: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    padding: 60px 40px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
    transition: right 0.3s ease;
    z-index: 100;
  }

  body:not(.home) nav ul.open {
    right: 0;
  }

  body:not(.home) nav a {
    font-size: 2rem;
  }

  #nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
  }

  #nav-overlay.open {
    display: block;
  }

  h1 + ul {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* ── HOME PAGE ── */

  html:has(body.home) {
    overflow: hidden;
    height: 100%;
  }

  body.home {
    height: 100%;
    overflow: hidden;
    padding: 20px 10px 10px;
    justify-content: center;
    align-items: center;
    gap: 0;
  }

  body.home div {
    width: 700px;
    transform: scale(0.88);
    transform-origin: top center;
    margin-bottom: -84px;
  }

  body.home header {
    order: 2;
    position: relative;
    z-index: 10;
    width: auto;
    max-width: 95vw;
    margin-top: 0;
    padding: 0;
    align-self: center;
  }

  body.home #menu-toggle {
    display: none;
  }

  body.home nav ul {
    display: flex !important;
    position: static;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 0;
    margin-top: 60px;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    transition: none;
    right: auto;
  }

  body.home nav a {
    font-size: 1.8rem;
  }

  /* ── ABOUT PAGE ── */

  body:not(.home) > div {
    margin-left: 0;
    margin-top: 0;
    padding-top: 0;
    flex-direction: column;
  }

  #toolbar {
    display: none;
  }

  #toolbar + main {
    max-width: 100%;
    padding: 0px 30px 20px 30px;
  }

  h1 {
    font-size: 7rem;
    white-space: normal;
    margin-top: 20px;
    
  }

  p {
    font-size: 1.3rem;
    line-height: 1.7;
    margin-left: 15px;
    margin-right: 15px;
  }

  footer {
    max-width: 90%;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }

  footer a, footer span {
    font-size: 1.1rem;
  }

  /* ── WORK PAGE ── */

  body > main {
    padding-top: 20px;
    padding-bottom: 50px;
    padding-left: 30px;
    padding-right: 30px;
  }

  #work-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 40px;
    margin-left: 40px;
  }

  #work-grid img {
    max-width: 100%;
  }

  #work-grid a p:first-of-type {
  font-size: 1.4rem;
  }

  #work-grid a p:last-of-type {
    font-size: 1.2rem;
  }

  h1 + ul {
  font-size: 1.5rem;
  gap: 15px;
  }

  h2 {
  font-size: 1.5rem;
  margin-top: 50px;
  }



  /* ── CASE STUDY PAGES ── */

  body.case-study > main {
    padding-top: 20px;
    padding-bottom: 40px;
    padding-left: 30px;
    padding-right: 30px;
  }

  body.case-study main > p {
    flex-direction: column;
  }

  body.case-study main > p img {
    max-width: 100%;
  }

  body.case-study main > div {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  /* ── DR FAJER & ELIO PAGES ── */

  body.dr-fajer > main,
  body.elio > main {
    padding-top: 20px;
    padding-bottom: 40px;
    padding-left: 30px;
    padding-right: 30px;
  }

  body.dr-fajer .moodboard,
  body.elio .moodboard {
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
  }

  body.dr-fajer .moodboard figure img,
  body.elio .moodboard figure img {
    max-width: 100%;
  }

  body.dr-fajer .swatches,
  body.elio .swatches {
    flex-wrap: wrap;
    gap: 15px;
  }

  body.dr-fajer .swatch,
  body.elio .swatch {
    width: 80px;
    height: 80px;
  }

  body.dr-fajer .post-grid,
  body.elio .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

}

/* ── PHONES (under 768px) ── */

@media (max-width: 768px) {

  body.home div {
    transform: scale(0.72);
    margin-bottom: -196px;
  }

}

/* ── SMALL PHONES (under 390px) ── */

@media (max-width: 390px) {

  body.home div {
    transform: scale(0.55);
    margin-bottom: -410px;
  }

  body.home nav ul {
    gap: 35px;
  }

}