@import url("https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&display=swap");

/* CSS Variables (Color Palette) */
:root {
  --color-primary-text: #484848;
  --color-body-text: #191b21;
  --color-link-brown: #6d4c41;
  --color-link-dark: #5d4e46;
  --color-link-hover: #4a3d35;
  --color-taupe: #cec6c5;
  --color-bg-light: #f5f5f5;
  --color-hover-bg: rgba(228, 228, 228, 0.7);
  --color-year-text: #666;
}

/* Global Styles */
* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Lora", serif;
  letter-spacing: 0.5px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Header / Cover Section */
.cover-background {
  background-image: url("../images/cover.jpg");
  height: 100vh;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

.cover-text {
  position: relative;
  width: 75%;
  margin: auto;
  padding: 1rem;
  top: 30%;
}

.cover-text h1,
.cover-text h2 {
  margin: 0.7rem 0;
}

/* Content Blocks */
.block {
  width: 90%;
  max-width: 1090px;
  margin: auto;
  padding: 0;
  background-color: var(--color-bg-light);
  border-radius: 30px;
}

@media (max-width: 1110px) and (min-width: 700px) {
  .block {
    width: 65%;
    max-width: 650px;
  }
}

/* Flexbox Layout */
.flex-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

.flex-item {
  padding: 1.5rem;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 700px) {
  .flex-item {
    padding: 1rem;
  }
}

.portfolio-section,
.about-section {
  align-self: stretch;
  max-width: 500px;
}

/* Portfolio fills the whole block so each project has room for two columns */
.portfolio-section {
  flex: 1;
  max-width: 100%;
}

/* Images */
.computer-image {
  width: 100%;
  max-width: 400px;
}

/* Contact Section */
.contact-section {
  text-align: center;
}

/* Footer */
footer {
  width: 100%;
  margin-top: 6rem;
  padding: 1rem;
  background-color: var(--color-taupe);
  text-align: center;
}

/* Navigation Bar */
nav a {
  padding: 1rem;
  text-decoration: none;
  color: var(--color-primary-text);
  font-weight: bold;
  border-radius: 12px;
  display: inline-block;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

nav a:hover {
  background-color: var(--color-hover-bg);
  color: var(--color-link-hover);
}

.nav-bar {
  position: fixed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  font-size: 18px;
  padding: 1rem 7%;
  z-index: 2;
}

.logo {
  height: 30px;
  width: 30px;
}

@media (max-width: 800px) {
  .nav-bar--mobile {
    display: none;
  }

  .nav-bar {
    padding: 1rem 5%;
  }
}

.scrolled {
  background-color: #fff;
}

/* Typography */
h1,
h2,
h3 {
  color: var(--color-primary-text);
  margin: 0.5rem;
  font-weight: bold;
}

h3 {
  text-align: center;
}

p {
  color: var(--color-body-text);
  margin: 0;
  line-height: 1.5;
}

.big-letter {
  font-size: 1.7vw;
  color: var(--color-primary-text);
}

@media (max-width: 1200px) {
  .big-letter {
    font-size: large;
  }
}

/* Spacing Utilities */
.space--big {
  height: 7rem;
}

.space--medium {
  height: 2rem;
}

.space--small {
  height: 1rem;
}

/* Portfolio Section */
.project-year {
  color: var(--color-year-text);
  font-size: 0.9em;
  font-weight: normal;
}

.project-latest {
  font-weight: 600;
}

.portfolio-section h3 a {
  color: var(--color-link-dark);
  text-decoration: none;
  border-radius: 12px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.portfolio-section h3 a:hover {
  background-color: var(--color-hover-bg);
  color: var(--color-link-hover);
}

.portfolio-section p {
  margin-bottom: 1rem;
  max-width: 650px;
  text-align: center;
}

.portfolio-section p a {
  color: var(--color-link-brown);
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.portfolio-section p a:hover {
  background-color: var(--color-hover-bg);
}

/* Contact Section */
.contact-section a {
  color: var(--color-link-brown);
  text-decoration: none;
  border-radius: 12px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.contact-section a:hover {
  background-color: var(--color-hover-bg);
  color: var(--color-link-hover);
}
