/* set up variables so colors and fonts are easy to change later */
:root {
  --bg-green: #2b7a4b;
  --bg-dot: #1f6139;
  --text-dark: #1a1a1a;
  --nav-bg: #f7e6b8;
  --accent-red: #8c2222;
  --accent-gold: #d4af37;
  --border-brown: #2e1d0c;
  --card-bg: #f3e5c8;
  --paper-bg: #fbf5df;
  --hover-yellow: #eed08b;
  
  --font-main: 'DotGothic16', monospace, sans-serif;
  --font-pixel: 'Press Start 2P', monospace;
}

/* remove weird default spacing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* make clicking links scroll nicely */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

/* general body styling and background pattern */
body {
  font-family: var(--font-main);
  background-color: var(--bg-green);
  background-image: 
    radial-gradient(var(--bg-dot) 15%, transparent 16%), 
    radial-gradient(var(--bg-dot) 15%, transparent 16%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  color: var(--text-dark);
  font-size: 15pt;
  line-height: 1.6;
}

/* sticky navbar styling */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 70px;
  background-color: var(--nav-bg);
  border-bottom: 4px solid var(--accent-red);
  box-shadow: 0 6px 0px #0e331c;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* logo area */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-pixel);
  font-size: 11pt;
  color: var(--accent-red);
}

/* navigation links */
nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: var(--border-brown);
  font-weight: bold;
  font-size: 15pt;
  padding: 4px 12px;
  border: 2px solid transparent;
  transition: background-color 0.1s ease;
}

/* what happens when you hover on links */
nav a:hover {
  background-color: var(--hover-yellow);
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
}

/* center the main content */
main {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 30px 0;
}

/* big boxes for each main part of the page */
section {
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper-bg);
  padding: 50px;
  border: 5px solid var(--border-brown);
  outline: 4px solid var(--accent-gold);
  box-shadow: 10px 10px 0px #0e331c;
}

/* pixel text headers */
h2 {
  font-family: var(--font-pixel);
  font-size: 20pt;
  color: var(--accent-red);
  margin-bottom: 30px;
  border-bottom: 4px dashed #cca663;
  padding-bottom: 12px;
}

/* first screen with my picture */
#home {
  flex-direction: row;
  align-items: center;
  gap: 60px;
  background: #fff8e7;
}

.photo-box img {
  width: 400px;
  height: 400px;
  object-fit: cover;
  border: 5px solid var(--border-brown);
  box-shadow: 8px 8px 0px #cca663;
}

.intro-dialogue {
  flex: 1;
}

.intro-dialogue h1 {
  font-family: var(--font-pixel);
  font-size: 32pt;
  line-height: 1.6;
  color: var(--accent-red);
  margin-bottom: 18px;
}

.intro-dialogue p {
  font-size: 32pt;
  color: var(--border-brown);
}

/* little text under project header */
.projects-subtitle {
  font-size: 16pt;
  color: #5a3818;
  margin-top: -15px;
  margin-bottom: 25px;
  line-height: 1.5;
}

/* grid layout for the cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  flex: 1;
}

/* the actual project cards */
.project-card {
  position: relative;
  overflow: hidden;
  background-color: var(--card-bg);
  border: 4px solid var(--border-brown);
  box-shadow: 6px 6px 0px #cca663;
  min-height: 420px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 10px 10px 0px var(--accent-red);
}

/* front of the card */
.card-front {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 25px 20px;
  text-align: center;
  gap: 15px;
}

.card-front h3 {
  font-family: var(--font-pixel);
  font-size: 12pt;
  color: var(--accent-red);
  border-bottom: 2px dashed #cca663;
  padding-bottom: 8px;
  width: 100%;
}

/* box holding the project picture */
.logo-preview-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 220px;
  background-color: transparent;
  border: 3px solid var(--border-brown);
  box-shadow: 4px 4px 0px #cca663;
  padding: 0;
  overflow: hidden;
}

.project-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* smaller picture inside the hover menu */
.project-logo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin: 6px auto;
  border: 2px solid var(--border-brown);
  background-color: #ffffff;
  padding: 4px;
}

.hover-prompt {
  font-family: var(--font-pixel);
  font-size: 8pt;
  color: #5a3818;
}

/* the part that slides up when you hover */
.scroll-details {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--paper-bg);
  border-top: 6px solid var(--accent-red);
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.1);
}

.project-card:hover .scroll-details {
  transform: translateY(0);
}

.scroll-details h4 {
  font-family: var(--font-pixel);
  font-size: 12pt;
  color: var(--accent-red);
  border-bottom: 2px dashed #cca663;
  padding-bottom: 8px;
  text-align: center;
}

.scroll-details p {
  font-size: 15pt;
  color: #382414;
  line-height: 1.6;
}

/* tag showing what languages we used */
.project-tech {
  font-family: var(--font-pixel);
  font-size: 8pt;
  color: var(--border-brown);
  background-color: var(--hover-yellow);
  padding: 8px 10px;
  border: 2px solid var(--border-brown);
  text-align: center;
}

/* layout for the skills and bio section */
#skills-bio {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 60px;
}

.skills-column ul {
  list-style: none;
}

.skills-column li {
  margin-bottom: 18px;
  padding: 15px 18px;
  background-color: var(--card-bg);
  border: 3px solid var(--border-brown);
  font-size: 14pt;
}

.skills-column strong {
  color: var(--accent-red);
}

.autobiography-column p {
  font-size: 17.1pt;
  color: var(--border-brown);
  line-height: 1.8;
  padding: 15px 18px;
}

/* bottom section */
footer {
  min-height: 250px;
  background-color: #1c1208;
  color: var(--hover-yellow);
  padding: 45px 40px;
  border-top: 5px solid var(--accent-gold);
  font-size: 13pt;
  display: flex;
  align-items: center;
}

.footer-content {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  width: 125px;
  height: 125px;
  object-fit: contain;
}

.contact-info p {
  margin-bottom: 4px;
}

.contact-info a {
  color: var(--accent-gold);
  text-decoration: underline;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
}

/* scroll up button */
.back-to-top {
  font-family: var(--font-pixel);
  font-size: 10pt;
  color: #1c1208;
  background-color: var(--accent-gold);
  text-decoration: none;
  padding: 8px 15px;
  border: 3px solid #ffffff;
}

.back-to-top:hover {
  background-color: #ffffff;
  color: var(--accent-red);
}

/* fade in effect for scrolling down */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* apply the fade effect to sections and cards */
.project-card {
  animation: fadeInUp linear both;
  animation-timeline: view();
  animation-range: entry 10% cover 25%;
}