/* Global Styles */
html, body {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
}

body {
  background-color: rgba(250, 235, 215, 0.443);
  font-family: 'Courier New', Courier, monospace;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
}

/* Custom Font */
@font-face {
  font-family: 'cochocib';
  src: url('assets/CochocibScript.ttf') format('truetype');
}
 
/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* pushes title left, nav right */
  padding: 0 50px;
  height: 150px;
}

.header-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  font-family: 'cochocib';
  font-size: clamp(40px, 10vw, 175px);
  color: rgb(197, 42, 30);
  line-height: 1;
  padding-top: 35px; /* fine-tune visually */
}

.home-button {
  position: fixed;
  top: 20px;
  left: 30px;
  font-family: 'cochocib';
  font-size: 75px;
  color: rgb(197, 42, 30);
  text-decoration: none;
  background: transparent;
  border: none;
  z-index: 1000;
  transition: transform 0.2s ease;
}

.home-button:hover {
  transform: scale(1.1);
  color: rgb(150, 30, 20);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.project {
  max-width: 250px;
  text-align: left;
}

.project img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.projects header{
  font-family: 'cochocib';
  color: rgb(77, 43, 43);
  justify-content: center;
  align-items: center;
  font-size: 100px;
}

.projects p {
  text-align: center;
}

/* Navigation */
nav {
  display: flex;
  justify-content: flex-end;
  font-size: clamp(10px, 3vw, 20px);
  gap: 15px;
  font-family: 'Courier New', Courier, monospace;
}

nav a {
  color: rgb(77, 43, 43);
  text-decoration: none;
  font-weight: bold;
}

nav a:visited {
  color: rgba(77, 43, 43, 0.798);
}

#ribbon {
  align-items: center;
  justify-content: center;
}

/* Main */
main {
  flex-grow: 1;
  flex: 1;
  width: 100vw;
  margin: 0 auto;
  text-align: left;
}

section {
  margin: 40px auto;
}

/* Intro Section */
.intro-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 20px 50px;
}

.profile-pic {
  max-width: 200px;
  height: auto;
  margin-top: 0;
  margin-left: 12vw; /* Push image inward from the right edge */
}

.intro-text {
  width: 60%;
  margin-right: 6vw;
}

/* Text Elements */
h1, h2, h3, p {
  font-family: 'Courier New', Courier, monospace;
}

h1 {
  text-align: center;
  font-size: 135%;
  padding-top: 40px;
}

h2 {
  text-align: center;
  font-size: 125%;
}

h3 {
  text-align: left;
  font-size: 115%;
}

p {
  text-align: left;
}

.story {
  text-align: center;
  font-family: 'cochocib';
  color: rgb(197, 42, 30);
  font-size: 80px;
}

/* Education & Experience Layout */
.row {
  display: grid;
  gap: 20px;
}

.row.two-columns {
  display: flex;
  justify-content: center;
  gap: 40px;
  max-width: 80%;
  margin: 0 auto;
}

.row.two-columns .column {
  flex: 1;
}

.row.two-columns .column:first-child {
  text-align: right;
}

.row.two-columns .column:last-child {
  text-align: left;
}

/* Experience specific override for container width */
#experience {
  width: 100%;
}

#experience .row.two-columns {
  display: flex;
  justify-content: center;
  gap: 40px;
  max-width: 80%;
  margin: 0 auto;
  flex-wrap: wrap;
}

/* Skills Section */
.row.five-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 90%;
  margin: 0 auto;
  gap: 20px;
  text-align: center;
  justify-items: center;
}

/* Footer */
footer {
  background-color: antiquewhite;
  text-align: left;
  padding: 20px;
  width: 100%;
  position: relative;
  height: 50px;
}

footer a {
  font-size: 95%;
  color: rgb(197, 42, 30);
}

/* Responsive Layouts */
@media screen and (max-width: 992px) {
  .row.five-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    height: auto;
  }

  nav {
    justify-content: center;
    flex-wrap: wrap;
  }

  .intro-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }

  .intro-text {
    width: 100%;
    margin-right: 0;
  }

  .profile-pic {
    margin: 0 auto 20px auto; /* center on small screens */
  }

  .row.two-columns {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .row.two-columns .column {
    width: 100%;
    text-align: center;
  }

  #experience .row.two-columns .column {
    text-align: left;
  }
}

@media screen and (max-width: 600px) {
  .row.five-columns {
    grid-template-columns: 1fr;
  }
}
