* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background: #fafafa;
  color: #333;
}

nav {
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid #ddd;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: #0066cc;
}

main {
  padding: 2rem 0;
}

h1 {
  margin-bottom: 1rem;
  color: #111;
}

h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #222;
}

p {
  margin-bottom: 1rem;
}

/* Embed Components */
.embed {
  margin: 1.5rem 0;
}

.embed-video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.embed-video iframe,
.embed-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.embed-audio iframe {
  width: 100%;
  height: 166px;
}

.embed-spotify iframe {
  height: 152px;
  border-radius: 12px;
}

.embed-spotify-album iframe {
  height: 352px;
  border-radius: 12px;
}

.embed-audio audio {
  width: 100%;
}

.media-item {
  margin-bottom: 3rem;
}

.media-item h3 {
  margin-bottom: 0.5rem;
  color: #222;
}

.media-item p {
  margin-bottom: 1rem;
  color: #666;
}

/* Writing Cards */
.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.writing-card {
  position: relative;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Overlay for background images - ensures text readability */
.writing-card.has-bg {
  border: none;
}

.writing-card.has-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.writing-card.has-bg > * {
  position: relative;
  z-index: 2;
}

.writing-card.has-bg h3,
.writing-card.has-bg .type,
.writing-card.has-bg .excerpt {
  color: #fff;
}

.writing-card.has-bg .type {
  color: rgba(255, 255, 255, 0.8);
}

.writing-card.has-bg .read-link {
  color: #7cb8ff;
}

.writing-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.writing-card h3 {
  margin-bottom: 0.5rem;
  color: #111;
  font-size: 2rem;
}

.writing-card .type {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.writing-card .excerpt {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.writing-card .read-link {
  display: inline-block;
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.writing-card .read-link:hover {
  text-decoration: underline;
}

/* Software Projects */
.project {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.project h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.project h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.project .tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.project .tag {
  font-size: 0.75rem;
  background: #e8e8e8;
  color: #555;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.project .description {
  margin-bottom: 1.5rem;
  color: #444;
}

.project .description p {
  margin-bottom: 0.75rem;
}

.project-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.project-images img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-images img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Installation Images */
.installation-images {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #ddd;
}

.installation-images h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 1rem;
}

.installation-images .images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.installation-images img {
  width: 100%;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.installation-images img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.project-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.project-links a:hover {
  background: #555;
}

.project-links a.secondary {
  background: transparent;
  border: 1px solid #333;
  color: #333;
}

.project-links a.secondary:hover {
  background: #f0f0f0;
}

/* p5.js Sketch Preview */
.sketch-preview {
  position: relative;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.sketch-preview img {
  width: 100%;
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.sketch-preview:hover img {
  opacity: 0.7;
}

.sketch-preview .play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.sketch-preview:hover .play-overlay {
  transform: translate(-50%, -50%) scale(1.1);
  background: #fff;
}

.sketch-preview .play-overlay::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 24px solid #333;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 6px;
}

/* Code blocks */
.project pre {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.project code {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  transition: all 0.2s;
  box-shadow:
    3px 3px 0px rgba(0, 0, 0, 0.3),
    6px 6px 0px rgba(0, 0, 0, 0.2),
    9px 9px 0px rgba(0, 0, 0, 0.1),
    12px 12px 20px rgba(0, 0, 0, 0.15);
}

.filter-btn:hover {
  border-color: #333;
  transform: translateY(-2px);
  box-shadow:
    4px 4px 0px rgba(0, 0, 0, 0.35),
    8px 8px 0px rgba(0, 0, 0, 0.25),
    12px 12px 0px rgba(0, 0, 0, 0.15),
    16px 16px 25px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
  background: #333;
  color: #fff;
  border-color: #333;
  box-shadow:
    3px 3px 0px rgba(0, 0, 0, 0.3),
    6px 6px 0px rgba(0, 0, 0, 0.2),
    9px 9px 0px rgba(0, 0, 0, 0.1),
    12px 12px 20px rgba(0, 0, 0, 0.15);
}

/* Creative Items Container */
.creative-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Media and software items span both columns */
.creative-item[data-category="media"],
.creative-item[data-category="software"] {
  grid-column: 1 / -1;
}

.creative-item {
  width: 100%;
}

.creative-item.hidden {
  display: none !important;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: transform 0.2s;
}

.lightbox-close:hover {
  transform: scale(1.2);
}

/* Homepage - Early 2000s Aesthetic */
.page-home {
  /* Placeholder background - replace with your image */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  /* Uncomment and update path when you add your background image:*/
  /* background-image: url('/images/IMG_6504.jpg'); */
  
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Content boxes with early 2000s drop shadows */
.content-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  padding: 2.5rem;
  margin-bottom: 2rem;
  /* Pronounced drop shadow for early 2000s depth effect */
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.15),
    0 12px 24px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.content-box:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 8px rgba(0, 0, 0, 0.12),
    0 10px 20px rgba(0, 0, 0, 0.18),
    0 16px 32px rgba(0, 0, 0, 0.12);
}

/* Homepage navigation styling - distinct buttons */
.page-home nav {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 2rem;
}

.page-home nav ul {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.page-home nav li {
  list-style: none;
}

.page-home nav a {
  display: block;
  padding: 0.75rem 2rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow:
    3px 3px 0px rgba(0, 0, 0, 0.3),
    6px 6px 0px rgba(0, 0, 0, 0.2),
    9px 9px 0px rgba(0, 0, 0, 0.1),
    12px 12px 20px rgba(0, 0, 0, 0.15);
}

.page-home nav a:hover {
  transform: translateY(-2px);
  box-shadow:
    4px 4px 0px rgba(0, 0, 0, 0.35),
    8px 8px 0px rgba(0, 0, 0, 0.25),
    12px 12px 0px rgba(0, 0, 0, 0.15),
    16px 16px 25px rgba(0, 0, 0, 0.2);
}

/* Title box - tight symmetric padding, shrink to fit, left aligned */
.page-home .content-box:first-of-type {
  padding: 1rem 1.5rem;
  width: fit-content;
}

/* Large title with text shadow for early 2000s feel */
.page-home h1 {
  font-size: 3.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
}

/* Reduce top margin on headings inside content boxes */
.page-home .content-box h2:first-child {
  margin-top: 0;
}

/* Bio box - Helvetica semi-bold */
.page-home .content-box:nth-of-type(2) {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
}

/* Contact box - reduce padding and shrink to fit */
.page-home .content-box:last-of-type {
  padding: 1.5rem 1.5rem 1.5rem 2.5rem;
  width: fit-content;
}

/* Contact box items - increase font size */
.page-home .content-box:last-of-type ul,
.page-home .content-box:last-of-type li {
  font-size: 1.25rem;
}

/* IT Page Styling */
.page-it {
  /* Placeholder background - replace with your image */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  /* Uncomment and update path when you add your background image:
  background-image: url('/images/your-it-background.jpg');
  */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.page-it nav {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 2rem;
}

.page-it nav ul {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.page-it nav li {
  list-style: none;
}

.page-it nav a {
  display: block;
  padding: 0.75rem 2rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow:
    3px 3px 0px rgba(0, 0, 0, 0.3),
    6px 6px 0px rgba(0, 0, 0, 0.2),
    9px 9px 0px rgba(0, 0, 0, 0.1),
    12px 12px 20px rgba(0, 0, 0, 0.15);
}

.page-it nav a:hover {
  transform: translateY(-2px);
  box-shadow:
    4px 4px 0px rgba(0, 0, 0, 0.35),
    8px 8px 0px rgba(0, 0, 0, 0.25),
    12px 12px 0px rgba(0, 0, 0, 0.15),
    16px 16px 25px rgba(0, 0, 0, 0.2);
}

.page-it .content-box:first-of-type {
  padding: 1rem 1.5rem;
  width: fit-content;
}

.page-it h1 {
  font-size: 3.5rem;
  margin: 0;
}

.page-it .content-box:nth-of-type(2) {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
}

.page-it .content-box h2:first-child {
  margin-top: 0;
}

/* Creative Page Styling */
.page-creative {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.page-creative .content-box:first-of-type {
  padding: 1rem 1.5rem;
  width: fit-content;
}

.page-creative h1 {
  font-size: 3.5rem;
  margin: 0;
}

.page-creative nav {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 2rem;
}

.page-creative nav ul {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.page-creative nav li {
  list-style: none;
}

.page-creative nav a {
  display: block;
  padding: 0.75rem 2rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow:
    3px 3px 0px rgba(0, 0, 0, 0.3),
    6px 6px 0px rgba(0, 0, 0, 0.2),
    9px 9px 0px rgba(0, 0, 0, 0.1),
    12px 12px 20px rgba(0, 0, 0, 0.15);
}

.page-creative nav a:hover {
  transform: translateY(-2px);
  box-shadow:
    4px 4px 0px rgba(0, 0, 0, 0.35),
    8px 8px 0px rgba(0, 0, 0, 0.25),
    12px 12px 0px rgba(0, 0, 0, 0.15),
    16px 16px 25px rgba(0, 0, 0, 0.2);
}

/* Creative page project cards - match content box styling */
.page-creative .project {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow:
    4px 4px 0px rgba(0, 0, 0, 0.3),
    8px 8px 0px rgba(0, 0, 0, 0.2),
    12px 12px 0px rgba(0, 0, 0, 0.1),
    16px 16px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.page-creative .project:hover {
  transform: translateY(-2px);
  box-shadow:
    5px 5px 0px rgba(0, 0, 0, 0.35),
    10px 10px 0px rgba(0, 0, 0, 0.25),
    15px 15px 0px rgba(0, 0, 0, 0.15),
    20px 20px 35px rgba(0, 0, 0, 0.2);
}

/* Creative page writing cards - match content box styling */
.page-creative .writing-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow:
    4px 4px 0px rgba(0, 0, 0, 0.3),
    8px 8px 0px rgba(0, 0, 0, 0.2),
    12px 12px 0px rgba(0, 0, 0, 0.1),
    16px 16px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.page-creative .writing-card:hover {
  transform: translateY(-2px);
  box-shadow:
    5px 5px 0px rgba(0, 0, 0, 0.35),
    10px 10px 0px rgba(0, 0, 0, 0.25),
    15px 15px 0px rgba(0, 0, 0, 0.15),
    20px 20px 35px rgba(0, 0, 0, 0.2);
}