/* =========================================================
   RICHARD KNOTT PORTFOLIO
   Black / White / Gray Theme
========================================================= */

/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", Arial, sans-serif;
  background-color: #ffffff;
  color: #111111;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

ul {
  list-style: none;
}

/* =========================================================
   GLOBAL
========================================================= */

:root {
  --black: #0b0b0b;
  --dark-gray: #1b1b1b;
  --medium-gray: #666666;
  --light-gray: #eeeeee;
  --very-light-gray: #f6f6f6;
  --white: #ffffff;

  --border: #dddddd;

  --container-width: 1180px;
}

.container {
  width: min(var(--container-width), 90%);
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.section-light {
  background-color: var(--very-light-gray);
}

.eyebrow {
  margin-bottom: 12px;

  color: #777777;

  font-size: 0.76rem;
  font-weight: 600;

  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.section-heading {
  margin-bottom: 50px;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h2 {
  color: var(--black);

  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;

  letter-spacing: -0.03em;
}

h3 {
  color: var(--black);

  font-size: 1.08rem;
  font-weight: 600;
}

p {
  color: var(--medium-gray);
}

/* =========================================================
   HEADER
========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;

  z-index: 1000;

  background: transparent;

  border-bottom: none;
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.85);

  backdrop-filter: blur(8px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

/* =========================================================
   LOGO IMAGE
========================================================= */

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.logo:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.logo img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.main-nav {
  display: flex;
  align-items: center;
  gap: 46px;
}

.nav-link {
  position: relative;

  padding: 33px 0 14px;

  color: #ffffff;

  font-size: 0.78rem;
  font-weight: 500;

  text-transform: uppercase;
  letter-spacing: 0.2em;

  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.nav-link:hover {
  opacity: 0.75;
}

.nav-link::after {
  content: "";

  position: absolute;
  left: 50%;
  bottom: 0;

  width: 0;
  height: 1px;

  background-color: #ffffff;

  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 44px;
}

/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-button {
  display: none;

  border: none;
  background: transparent;

  color: #ffffff;

  font-size: 1.8rem;
  cursor: pointer;
}

/* =========================================================
   HERO
========================================================= */

.hero {
  position: relative;

  width: 100%;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background-image: url("images/hero-coffee-0.jpg");

  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* =========================================================
   HERO DARK OVERLAY
========================================================= */

.hero-overlay {
  position: absolute;

  inset: 0;

  z-index: 1;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.24),
    rgba(0, 0, 0, 0.4)
  );
}

/* =========================================================
   HERO CONTENT
========================================================= */

.hero-content {
  position: relative;

  z-index: 5;

  width: min(1100px, 90%);

  text-align: center;

  transform: translateY(28px);

  animation: heroFadeIn 1.2s ease forwards;
}

.hero h1 {
  margin: 0;

  color: #ffffff;

  font-family: "Cormorant Garamond", Georgia, serif;

  font-size: clamp(4rem, 8vw, 7.6rem);

  font-weight: 400;

  line-height: 0.95;

  text-transform: uppercase;

  letter-spacing: 0.035em;

  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.hero-subtitle {
  margin-top: 22px;

  color: rgba(255, 255, 255, 0.92);

  font-family: "Montserrat", sans-serif;

  font-size: clamp(1.1rem, 2vw, 1.55rem);

  font-weight: 300;

  letter-spacing: 0.025em;
}

/* =========================================================
   HERO BUTTONS
========================================================= */

.hero-buttons {
  margin-top: 46px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 22px;

  flex-wrap: wrap;
}

.hero-button {
  min-width: 225px;

  padding: 17px 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 20px;

  border-radius: 4px;

  font-family: "Montserrat", sans-serif;

  font-size: 0.92rem;
  font-weight: 500;

  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.hero-button:hover {
  transform: translateY(-2px);
}

.hero-button-primary {
  background-color: #ffffff;
  color: #111111;

  border: 1px solid #ffffff;
}

.hero-button-primary:hover {
  background-color: #eeeeee;
}

.hero-button-secondary {
  background-color: rgba(0, 0, 0, 0.22);

  color: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.78);
}

.hero-button-secondary:hover {
  background-color: #ffffff;

  color: #111111;

  border-color: #ffffff;
}

.arrow {
  font-size: 1.25rem;

  transition: transform 0.25s ease;
}

.hero-button-primary:hover .arrow {
  transform: translateX(5px);
}

/* =========================================================
   HERO SCROLL INDICATOR
========================================================= */

.scroll-indicator {
  position: absolute;

  left: 50%;
  bottom: 35px;

  z-index: 5;

  width: 32px;
  height: 38px;

  transform: translateX(-50%);
}

.scroll-indicator span {
  position: absolute;

  left: 7px;
  top: 0;

  width: 18px;
  height: 18px;

  border-right: 2px solid rgba(255, 255, 255, 0.85);
  border-bottom: 2px solid rgba(255, 255, 255, 0.85);

  transform: rotate(45deg);

  animation: scrollArrow 2s ease-in-out infinite;
}

/* =========================================================
   ABOUT
========================================================= */

/* =========================================================
   ABOUT
========================================================= */

.about-section {
  background-color: #f5f5f5;
}

.about-grid {
  display: grid;

  grid-template-columns: 0.8fr 1.2fr;

  gap: 80px;

  align-items: center;
}

/* =========================================================
   ABOUT PORTRAIT
========================================================= */

.about-photo {
  position: relative;

  max-width: 430px;

  margin: 0 auto;
}

.about-photo img {
  width: 100%;

  aspect-ratio: 4 / 5;

  object-fit: cover;

  object-position: center top;

  display: block;

  filter: grayscale(100%) contrast(1.03);

  border-radius: 3px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.about-photo:hover img {
  transform: translate(8px, -8px) scale(1.01);

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Small architectural accent */

.about-photo::after {
  content: "";

  position: absolute;

  right: -18px;
  bottom: -18px;

  width: 70%;
  height: 70%;

  border-right: 1px solid #999999;
  border-bottom: 1px solid #999999;

  z-index: -1;
}

/* =========================================================
   ABOUT TEXT
========================================================= */

.about-content {
  max-width: 650px;
}

.about-content h2 {
  margin-bottom: 32px;
}

.about-content p {
  margin-bottom: 20px;

  font-size: 1rem;

  line-height: 1.75;
}

.about-highlight {
  margin-top: 28px;

  color: #111111;

  font-weight: 600;
}

/* =========================================================
   ABOUT - TABLET / MOBILE
========================================================= */

@media (max-width: 850px) {
  .about-grid {
    grid-template-columns: 1fr;

    gap: 50px;
  }

  .about-photo {
    max-width: 380px;
  }

  .about-content {
    max-width: 100%;
  }
}

@media (max-width: 550px) {
  .about-photo {
    max-width: 320px;
  }

  .about-photo::after {
    right: -10px;
    bottom: -10px;
  }
}

/* ========================================================
    NAVIGATION CONTAINER
======================================================== */
.nav-container {
  width: min(1420px, 92%);
  height: 88px;

  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: transparent;
}

/* =========================================================
   PROJECTS
========================================================= */

.projects-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 28px;
}

.project-card {
  background-color: #ffffff;

  border: 1px solid var(--border);

  border-radius: 8px;

  overflow: hidden;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);

  border-color: #cccccc;

  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

.project-image {
  aspect-ratio: 16 / 9;

  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.025);
}

.placeholder-image {
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #dedede;

  color: #666666;

  font-size: 0.9rem;
  font-weight: 500;
}

.project-content {
  padding: 24px;
}

.project-content h3 {
  margin-bottom: 10px;
}

.project-content p {
  margin-bottom: 18px;

  font-size: 0.92rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;

  gap: 7px;

  margin-bottom: 17px;
}

.tags span {
  padding: 5px 10px;

  background-color: #eeeeee;

  color: #555555;

  border-radius: 999px;

  font-size: 0.7rem;
  font-weight: 500;
}

.project-link {
  color: #111111;

  font-size: 0.88rem;
  font-weight: 600;

  transition: opacity 0.2s ease;
}

.project-link:hover {
  opacity: 0.55;
}

/* =========================================================
   SKILLS / TEACHING
========================================================= */

.skills-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 55px;
}

.skill-column h3 {
  margin-bottom: 18px;
}

.skill-column ul {
  list-style: none;
}

.skill-column li {
  margin-bottom: 8px;

  color: #555555;

  font-size: 0.95rem;
}

/* =========================================================
   EXPERIENCE
========================================================= */

.experience-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 35px;
}

.experience-item {
  padding-top: 18px;

  border-top: 1px solid #cccccc;
}

.experience-item h3 {
  margin-bottom: 10px;
}

.experience-item p {
  font-size: 0.9rem;
}

/* =========================================================
   TESTIMONIALS
========================================================= */

.testimonials-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 26px;
}

.testimonial-card {
  padding: 30px;

  background-color: #ffffff;

  border: 1px solid #dddddd;

  border-radius: 8px;
}

.testimonial-card p {
  margin-bottom: 26px;

  color: #4f4f4f;

  font-size: 0.95rem;

  font-style: italic;
}

.testimonial-card footer {
  display: flex;
  flex-direction: column;
}

.testimonial-card strong {
  color: #111111;

  font-size: 0.9rem;
}

.testimonial-card span {
  color: #777777;

  font-size: 0.8rem;
}

/* =========================================================
   CONTACT
========================================================= */

.contact-simple {
  text-align: center;
}

.contact-text-center {
  max-width: 700px;

  margin: 18px auto 28px;

  font-size: 1rem;
}

.contact-links-center {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 30px;

  flex-wrap: wrap;
}

.contact-links-center a {
  position: relative;

  color: #111111;

  font-size: 0.9rem;
  font-weight: 600;
}

.contact-links-center a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -4px;

  width: 0;
  height: 1px;

  background-color: #111111;

  transition: width 0.25s ease;
}

.contact-links-center a:hover::after {
  width: 100%;
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
  padding: 32px 0;

  background-color: #111111;

  color: #ffffff;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}

.footer-logo {
  color: #ffffff;

  font-size: 0.9rem;
  font-weight: 600;

  letter-spacing: 0.08em;
}

.site-footer p {
  color: #bdbdbd;

  font-size: 0.8rem;
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(45px);
  }

  to {
    opacity: 1;
    transform: translateY(28px);
  }
}

@keyframes scrollArrow {
  0% {
    transform: translateY(-5px) rotate(45deg);

    opacity: 0.25;
  }

  50% {
    opacity: 0.95;
  }

  100% {
    transform: translateY(8px) rotate(45deg);

    opacity: 0.25;
  }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .experience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   MOBILE NAVIGATION
========================================================= */

/*@media (max-width: 850px) {*/
/*  .nav-container {*/
/*    height: 76px;*/
/*  }*/

/*  .logo img {*/
/*    width: 46px;*/
/*    height: 46px;*/
/*  }*/

/*  .mobile-menu-button {*/
/*    display: block;*/
/*  }*/

/*  .main-nav {*/
/*    background-color: rgba(0, 0, 0, 0.96);*/
/*  }*/

/*  .main-nav.active {*/
/*    display: flex;*/
/*  }*/

/*  .nav-link {*/
/*    padding: 8px 0;*/
/*    font-size: 0.85rem;*/
/*  }*/

/*  .nav-link::after {*/
/*    bottom: 0;*/
/*  }*/
/*}*/

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    /* HEADER */

    .nav-container {
        height: 72px;
        width: 92%;
    }

    .logo img {
        width: 44px;
        height: 44px;
    }

    .mobile-menu-button {
        display: block;
        color: #ffffff;
        font-size: 2rem;
        z-index: 1100;
    }

    .main-nav {
        position: fixed;

        top: 72px;
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 28px;

        padding: 35px 20px;

        background-color: rgba(0, 0, 0, 0.96);

        z-index: 1000;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-link {
        width: auto;

        padding: 8px 0;

        font-size: 0.95rem;

        text-align: center;
    }


    /* HERO */

    .hero {
        min-height: 100svh;
        background-position: center center;
    }

    .hero-content {
        width: 90%;
        transform: translateY(10px);
    }

    .hero h1 {
        font-size: clamp(3rem, 13vw, 4.5rem);
        line-height: 0.95;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 14px;
    }

    .hero-button {
        width: 255px;
        max-width: 90%;
    }


    /* GENERAL SECTIONS */

    .section {
        padding: 65px 0;
    }

    .container {
        width: 90%;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 35px;
    }


    /* PROJECTS */

    .projects-grid {
        display: grid;

        grid-template-columns: 1fr;

        gap: 24px;

        width: 100%;
    }

    .project-card {
        width: 100%;

        max-width: none;

        margin: 0;

        overflow: hidden;
    }

    .project-image {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .project-image img {
        width: 100%;
        height: 100%;

        object-fit: cover;
    }

    .project-content {
        width: 100%;

        padding: 22px;
    }

    .project-content h3 {
        font-size: 1.45rem;
    }

    .project-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }


    /* SKILLS / TESTIMONIALS / EXPERIENCE */

    .skills-grid,
    .experience-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }


    /* FOOTER */

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

}


/* =========================================================
   VERY SMALL SCREENS
========================================================= */

@media (max-width: 420px) {
  .hero h1 {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .hero-button {
    width: 220px;
  }
}




/* =========================================================
   FINAL MOBILE OVERRIDES
========================================================= */

@media screen and (max-width: 768px) {

    .mobile-menu-button {
        display: block;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;

        width: 100%;

        flex-direction: column;
        align-items: center;

        gap: 24px;
        padding: 30px 20px;

        background: rgba(0, 0, 0, 0.96);
    }

    .main-nav.active {
        display: flex;
    }

    .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .project-card {
        width: 100%;
        max-width: 100%;
    }
}