
/*
Zachary Berke, July 27, 2025, IST239-W01, Final Project

The stylesheet for the final project landing page. This
css defines a three column layout with header and footer,
as well as the styling for the various interactive components.
*/

/* Reset rules */
* {
  margin: 0;
  padding: 0;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/* Colors */
:root {
  --navy: #001f3f;
  --navy-light: #003366;
  --navy-accent: #336699;
}


/*------------------------- MAIN STYLE ----------------------------*/

/* Body and typography */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: Arial, sans-serif;	/* TODO: Find new fonts */
  line-height: 1.6;
  background-color: white;
  padding: 10px;
}

/* Ensures the container takes up any remaining space,
   so there's no empty space beneath the footer */
main {
  flex: 1;
}

/* Header and Footer */
header, footer {
  background-color: var(--navy);
  color: white;
  text-align: center;
  padding: 1rem;
}

/* Layout */
.container {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Three columns */
.left-column,
.center-column,
.right-column {
  padding: 1rem;
}


/* Define liquid layout w/ percentage widths for columns */

/* ----------------Left colum------------------ */
.left-column {
  flex: 1 1 30%;
  background-color: var(--navy-light);
  color: white;
}

/* Dropdown menu for the project links */
.left-column details {
  margin-bottom: 1rem;
  background-color: var(--navy-accent);
  border-radius: 4px;
  padding: 0.5rem;
}

/* Entry for each class unit */
.left-column summary {
  font-weight: bold;
  color: white;
  cursor: pointer;
  padding: 0.25rem 0;
}

/* The three project links per unit */
.left-column ul {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.5rem;
}

/* Increase vertical padding between list elements */
.left-column li {
	padding: 0.75rem 0;
}

/* Hyperlinks to projects */
.left-column a {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.left-column a:hover {
  text-decoration: underline;
}

.left-column p {
	color: white;
}

/* Project screenshots */
.screenshot {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0.5em 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}


/* ---------------Center column---------------- */
.center-column {
  flex: 2 1 40%;
  background-color: white;
  color: var(--navy-light);
  display: flex;
  flex-direction: column;
}

.blog-post {
  margin-bottom: 1.5em;
}

.blog-header {
  margin-bottom: 0.5em;
}

.title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0em;
}


/* --------------Right column------------------ */
.right-column {
  flex: 1 1 30%;
  background-color: var(--navy-light);
  color: white;
}


/* ------------------Header---------------------- */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-left {
  flex: 1 1 60%;
  text-align: left;
}

.header-right {
  flex: 1 1 35%;
  text-align: right;
}

/* Picture of myself */
.profile-photo {
  width: 125px;
  height: 125px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  border: 3px solid white;
}

/* School email address */
.email a {
  font-size: 0.9rem;
  color: var(--navy-accent);
  text-decoration: none;
}

.email a:hover {
  color: white;
  text-decoration: none;
}


/* ------------------Footer---------------------- */
footer {
  margin-top: 1rem;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.main-footer {
  text-align: center;
  flex: 1 1 100%;
}

.last-updated {
  position: absolute;
  right: 1rem;
  font-size: 0.85rem;
  color: var(--navy-accent);
}


/* Stack columns when screen width is too small */
@media (max-width: 760px) {
  .left-column,
  .center-column,
  .right-column {
    flex: 1 1 100%;
  }
  
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .header-left, .header-right {
    flex: 1 1 100%;
  }
}


/* ---------- Styling for the minesweeper clone ---------- */

#game {
  display: grid;
  grid-template-columns: repeat(10, 30px);
  gap: 2px;
  justify-content: center;
  margin: 20px auto;
}

/* Unrevealed cell */
.cell {
  width: 30px;
  height: 30px;
  background: #b3b3b3;
  border: 1px solid #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  user-select: none;
  cursor: pointer;
}

.cell.revealed {
  background: #eee;
  border: 1px solid #bbb;
  cursor: default;
  color: black;
}

/* Set background color for revealed bombs to red */
.cell.bomb {
  background: #f66;
}

/* --------------------Color Palette Generator------------------------ */

.widget {
  margin-top: 30px;
  padding: 15px;
  border: 1px solid #ccc;
  background: #f9f9f9;
  border-radius: 6px;
  color: black;
}

.radio-group label {
  margin-right: 10px;
}

.palette-display {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* Individual blocks for the palette colors */
.palette-display .swatch {
  width: 40px;
  height: 40px;
  border: 1px solid #aaa;
  border-radius: 4px;
}


/*---------------------Comment Section Form------------------------- */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.comment-form label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
}

.comment-form textarea {
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.comment-form input {
  font-size: 1rem;
  width: 40%;
}

.comment-form textarea {
  resize: vertical;
}

.comment-form button {
  align-self: center;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
}


/* Push comment section to bottom of center column */
.center-column {
  display: flex;
  flex-direction: column;
}

.post {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-body {
  flex: 0 0 auto;
}

.comment-section {
  margin-top: auto;
  padding-top: 2rem;
}

/* Left padding to comments so they aren't
right up against the left column */
.comments {
  padding-left: 2.25em;
}