/* CSS Variables and Root Styles */
:root {
	--text: white;
	--border: #FFA936;
	--accent: #FEE262;
	--bg: #464678;
	--gradientTop: #9A6390;
	--gradientBottom: #9A6390;
}

/* Font Face Declarations */
@font-face {
  font-family: 'DungeonChunkMono';
  src: url('DungeonChunkMono.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
/* Dark Mode Media Query */
@media (prefers-color-scheme: dark) {
	:root {
		--text: white;
		--border: #FFA936;
		--accent: #FEE262;
		--bg: #464678;
		a:link { color: #FFA936; }
	}
	header {
		background: url('header.png');
	}
}

/* Universal Box Model */
* { 
	box-sizing: border-box;
}

/* Base Element Styles */
body {
	padding: 10px;
	font-family: 'Inconsolata', monospace;
	color: var(--text);
  background: url('pxArt.png') repeat-y center 100%,
              url('pxArt.png') repeat-y center 30%;
  background-size: contain, contain;
	cursor: auto;
  position: relative;
}

/* Prevent overflow on smaller screens */
img { max-width: 100%; }
pre { overflow-x: auto; }

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6, p  { 
	margin: 5px;
	line-height: 1.2;
}

h1 { 
	font-size: 2.0rem;
	letter-spacing: 2px;
	font-weight: 900;
	text-align: center;
	border-bottom: 2px ridge var(--border);
	padding-bottom: 5px;
}

h2 { 
	font-size: 1.25rem;
	font-weight: 500;
	text-align: center;
}

h3 { 
	font-size: 1.4rem;
}

h4 { 
	font-size: 1rem;
	color: var(--accent);
	padding-left: 12px;
}

/* Link Styles */
a:visited {
	color: var(--accent);
}

/* Layout Container System */
.container {
	max-width: 60rem;
	margin: 5vw auto 12px auto;
	border: 6px ridge var(--border);
	outline: 3px solid var(--gradientTop);
	outline-offset: 4px;
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	padding: 5px;
	gap: 5px;
  box-sizing: border-box;
	background-color: transparent;
	background-image: repeating-radial-gradient( var(--bg), var(--bg));
}

/* Container width classes */
.small { flex: 1 1 9%; }
.large { flex: 1 1 82%; }
.full { flex: 1 1 100%; }
.half { flex: 1 1 49%; }
.half-main { flex: 1 1 49%; }

/* Container overflow fix */
.container > * { min-width: 0; }

/* Section Backgrounds */
.half-main {
	background:rgba(154,90,144,1);
}

/* Header Styles */
header {
	background: url('header.png');
	background-size: cover;
	background-position: 100% 45%;
	width: 100%;
	height: 120px;
	border: 2px ridge var(--border);
	border-radius: 5px;
	position: relative;
}

header span {
	font-family: 'DungeonChunkMono', monospace;
	font-size: 3rem;
	position: absolute;
	bottom: 0;
	right: 10px;
	margin: 10px;
	font-weight: bold;
	text-shadow: 1px 1px var(--bg),
		0px 0px 8px var(--border),
		1px 1px 2px var(--bg),
		-1px -1px 2px var(--border);
	color: var(--text);
	letter-spacing: 2px;
}

/* Navigation Styles */
nav {
	border: 2px ridge var(--border);
	border-radius: 5px;
	padding: 5px;
	background: rgba(70, 70, 120, 1);
}

nav div {
	font-size: 1.25em;
	margin: 5px 5px 10px 5px;
}

nav a {
	background: none;
  display: block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0;
  border: none;
  border-radius: 0;
  transition: color 0.2s, text-decoration 0.2s;
  margin-bottom: 0.4em;
}

nav a:hover,
nav a:focus {
  text-decoration: underline;
  color: var(--accent);
  background: none;
}

nav a:last-child{
  margin-bottom: 0;
}

.nav-icon {
  vertical-align: middle;
  height: 1em;
  width: auto;
  margin-left: 0.4em;
  display: inline-block;
}

/* Section Styles */
section {
	border: 2px ridge var(--border);
	border-radius: 5px;
	background: transparent;
	padding: 5px;
}

div.small > img {
	display: block;
	margin: 5px auto;
	border:2px ridge var(--border);
	border-radius: 5px;
}

div h3 {
	text-align: center;
	margin-bottom: 10px;
}

/* Introduction Section */
.intro-flex {
  display: flex;
  align-items: flex-start;
  gap: 1.5em;
  padding: 0.5em 1em;
}

.my-photo {
  width: 150px;
  height: 140px;
  object-fit: contain;
  flex-shrink: 0;
}

.my-photo-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
}

.my-photo-caption {
  font-size: 0.75em;
  color: var(--accent);
  margin-top: 0.5em;
  text-align: center;
  width: 150px;
}

.intro-flex p {
  flex: 1 1 auto;
  min-width: 200px;
}

.full > h2 {
  font-size: 1.7rem;
  text-align: center;
  color: var(--text);
  letter-spacing: 1px;
  font-weight: 800;
  margin-top: 0.8em;
}

/* Find Me Block */
.find-me-block {
  margin: 0.5em 0 0;
  text-align: center;
	
}

.find-me-heading {
  font-size: 1.2em;
  color: var(--accent);
  font-family: 'DungeonChunkMono', monospace;
  margin-bottom: 0.5em;
  letter-spacing: 1px;
}

.find-me-icons {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  flex-wrap: wrap;
  max-width: 10em;
  margin: 0 auto;
}

.find-me-icon img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
  transition: transform 0.2s;
  vertical-align: middle;
}

.find-me-icon:hover img,
.find-me-icon:focus img {
  transform: scale(1.15);
  filter: brightness(1.5);
}

/* Tags System */
.tag {
  display: inline-block;
  background: rgba(254, 226, 98, 0.7);
  color: #464678;
  font-size: 0.85em;
  padding: 0.18em 0.7em;
  border-color: white;
  border-width: 1em;
  margin-right: 0.2em;
  margin-bottom: 0.2em;
  margin-top: 0.2em;
  font-weight: 500;
  letter-spacing: 0.5px;
  vertical-align: middle;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.tag:hover, .tag:focus {
  background: #fee262;
  color: #222;
}

/* Project Filter */
#project-filter-message {
  margin-bottom: 1em;
  font-weight: bold;
  color: var(--accent);
  font-size: 1.1em;
  text-align: center;
}

.show-all-link {
  font-weight: normal;
  font-size: 1em;
  color: var(--accent);
  margin-left: 1em;
}

.show-all-link:hover, .show-all-link:focus {
  color: #222;
}

/* Life Updates */
.life-updates {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.life-updates li {
  margin-bottom: 1em;
  font-size: 1rem;
  line-height: 1.4;
}

.life-updates .date {
  font-weight: bold;
  color: var(--accent);
  font-size: 0.95em;
}

/* Project Cards */
.project-card {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  background: rgba(70, 70, 120, 0.7);
  border: 2px ridge var(--border);
  border-radius: 10px;
  margin: 1.5em 0;
  padding: 1em;
  max-width: 100%;
  gap: 1.5em;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.08);
}

.project-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  flex-wrap: wrap;
  margin-left: 0;
}

.project-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 1px;
  flex: 1 1 auto;
  text-align: left;
}

.project-content {
  padding-left: 0;
  flex: 2 1 320px;
  min-width: 220px;
}

.project-description {
  margin-bottom: 0.5em;
  margin-left: 0em;
}

.project-tech {
  margin-left: 0em;
  font-size: 1em;
  color: #fff;
}

.project-links {
  display: flex;
  gap: 0.5em;
  align-items: center;
  flex-wrap: wrap;
}

.project-links a {
  display: inline-block;
  margin-right: 0.5em;
  color: var(--accent);
  background: rgba(255,255,255,0.08);
  padding: 0.3em 0.9em;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.project-links a:last-child {
  margin-right: 0;
}

.project-links a:hover {
  background: var(--accent);
  color: #222;
}

/* Project Details Expansion */
.expand-btn {
  background: rgba(255, 165, 54, 0.8);
  color: #222;
  border: none;
  padding: 0.3em 0.9em;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  font-size: 0.9em;
}

.expand-btn:hover {
  background: var(--border);
}

.project-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.1s ease, padding 0.1s ease, margin 0.1s ease;
  margin-top: 0;
  padding: 0 0em;
  opacity: 0;
}

.project-details.expanded {
  max-height: 1000px;
  margin-top: 1.5em;
  padding: 1.5em 0em;
  border-top: 1px solid rgba(255, 165, 54, 0.3);
  opacity: 1;
}

.project-details h4 {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.2em 0 0.6em 0;
  padding-left: 0;
}

.project-details h4:first-child {
  margin-top: 0;
}

.project-details ul {
  margin: 0.8em 0;
  padding-left: 1.5em;
}

.project-details li {
  margin-bottom: 0.6em;
  line-height: 1.4;
}

.project-details li strong {
  color: var(--accent);
  font-weight: 600;
}

.project-details p {
  line-height: 1.5;
  margin: 0.8em 0;
}

/* Project Image and Carousel Styles */
.project-image {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1em;
  overflow: hidden;
}

.project-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  margin: 1em 0;
  width: 100%;
  overflow: hidden;
  padding: 0 0px;
}

.project-slides-track {
  display: flex;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  overflow: hidden;
  justify-content: flex-start;
  align-items: center;
  transition: transform 0.3s ease;
}

.project-slides-track picture,
.project-slide {
  flex: 0 0 auto;
  max-width: 100%;
  height: 300px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  /* background: rgba(255,255,255,0.05); */
  display: block;
  transition: transform 0.3s ease;
}

.project-slides-track picture img,
.project-slide {
  flex: 0 0 auto;
  max-width: 100%;
  height: 300px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.project-slide.active {
  opacity: 1;
}

/* General Carousel Styles */
.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  margin: 1em 0;
  max-width: 100%;
  overflow: hidden;
  padding: 0 0px;
}

.carousel-track {
  width: 320px;
  height: 450px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.carousel-img {
  min-width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.carousel-img.active {
  display: block;
}

/* Arrow Button Styles - Consistent for all carousels */
.carousel-btn {
  display: flex;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  width: auto;
  height: auto;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
  margin: 0 5px;
}

.carousel-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.arrow-img {
  width: 32px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
  pointer-events: none;
}

/* Gallery Footer */
.gallery-footer {
  text-align: center;
  font-size: 0.95em;
  margin-top: 0.5em;
  color: var(--text);
}

.gallery-footer a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}

.gallery-footer a:hover {
  color: #222;
}

/* Utility Classes */
.chunky-heading {
  font-family: 'DungeonChunkMono', monospace;
  letter-spacing: 0.8px;
  font-weight:normal;
  font-size: 1.3rem;
}

/* Footer */
footer {
	text-align: center;
	margin-bottom: 5vw;
	font-size: 0.8rem;
}

footer a { 
	text-decoration: none;
}

/* Hamburger Menu Styles */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  position: absolute;
  top: 42px;
  left: 27px;
  z-index: 1001;
  background: rgba(70, 70, 120, 0.9);
  padding: 5px;
  border-radius: 5px;
  border: 2px solid var(--border);
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--accent);
  margin: 2px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

.mobile-nav-overlay.active {
  display: block;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  /* background: var(--gradientBottom); */
  background:
   url('pxArt.png') ; 
  background-size: contain;
  z-index: 1001;
  transition: left 0.3s ease;
  padding: 60px 20px 20px 20px;
  overflow-y: auto;
  border-right: 3px solid var(--border);
}

.mobile-nav.active {
  left: 0;
}

.mobile-nav nav {
  /* background: #464678; */
  background: rgba(70, 70, 120, 0.8);
  border: 2px ridge var(--border);
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.mobile-nav .find-me-block {
  background: rgba(70, 70, 120, 0.8);
  border: 2px ridge var(--border);
  border-radius: 5px;
  padding: 15px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Hide desktop navigation */
  .container > .small:first-of-type {
    display: none;
  }
  
  /* Show hamburger menu */
  .hamburger {
    display: flex;

  }
  
  /* Adjust container layout for mobile */
  .container {
    margin: 2vw auto 12px auto;
    padding: 3px;
    gap: 3px;
  }
  
  /* Make sections full width on mobile */
  .half-main,
  .half,
  .large {
    flex: 1 1 100%;
    min-width: 100%;
  }
  
  /* Adjust header for mobile */
  header {
    height: 80px;
  }
  
  header span {
    font-size: 1.8rem;
    bottom: 5px;
    right: 5px;
    margin: 5px;
  }
  /* Stack intro content vertically */
  .intro-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0.5em;
  }
  
  .my-photo {
    width: 120px;
    height: 120px;
    margin-bottom: 1em;
  }
  .my-photo-figure {
    min-width: 120px;
  }
  .my-photo-caption {
    width: 120px;
  }
  /* Improve project cards on mobile */
  .project-card {
    margin: 1em 0;
    padding: 1em;
  }
  
  .project-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8em;
  }
  
  .project-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  /* Carousel adjustments for consistent arrow positioning */
  .project-carousel {
    gap: 0.5em;
    padding: 0 0px;
    max-width: calc(100vw - 30px);
    margin: 1em auto;
    width: 100%;
  }

.project-slides-track picture img,
.project-slide {
  flex: 0 0 auto;
  max-width: 100%;
  height: 300px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
  
   .carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;          
    padding: 0;
    max-width: 100%;
  }

  .carousel-track
  {
  flex: 0 0 auto;
  max-width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 8px;
  display: flex;
  padding: 0 0;
  }

  .carousel-btn {
    flex: 0 0 auto;        
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
  }

  /* Typography adjustments */
  h1 {
    font-size: 1.6rem;
  }
  
  h2 {
    font-size: 1.1rem;
  }
  
  .chunky-heading {
    font-size: 1.1rem;
  }
  
  .project-title {
    font-size: 1.3rem;
  }
  
  /* Life updates - stack below main content */
  .life-updates-mobile {
    order: 10;
    margin-top: 1em;
  }
  
  /* Better spacing for small screens */
  section {
    padding: 8px;
    margin-bottom: 5px;
  }
  
  .container {
    border-width: 4px;
    outline-width: 2px;
  }
  
  /* Adjust find-me icons in mobile nav */
  .mobile-nav .find-me-icons {
    max-width: none;
    gap: 0.8em;
  }
  
  .mobile-nav .find-me-icon img {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 700px) {
  
  .project-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0.7em;
  }
  
  .project-content {
    min-width: 0;
    max-width: 100%;
  }

  .project-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  
  .intro-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .my-photo {
    margin-bottom: 1em;
  }

  .project-slides-track picture,
  .project-slide {
    height: auto;
  }
  
  .project-links {
    width: 100%;
    justify-content: flex-start;
  }
  
  .project-details.expanded {
    padding: 1em 0;
  }

  .carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;           
    padding: 0;
    max-width: 100%;
  }

  .carousel-btn {
    flex: 0 0 auto;        
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
  }
.carousel-track {
    height: 80vw;
  }
.carousel-track {
    flex: 1 1 auto;       
    width: auto; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .carousel-img {
  width: 80vw;        
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  }

.project-carousel {
  gap: 0.5em;
  padding: 0 0px;
  max-width: calc(100vw - 30px);
  margin: 1em auto;
  width: 100%;
}

}

/* Even smaller screens */
@media (max-width: 480px) {
  body {
    padding: 5px;
  }
  
  .container {
    margin: 1vw auto 8px auto;
  }
  
  header {
    height: 70px;
  }
  
  header span {
    font-size: 1.5rem;
  }

  .intro-flex {
    flex-direction: column;
    align-items: center;
    text-align: left;
    padding: 0 0.5em;
  }
  
  
  .my-photo {
    width: 100px;
    height: 100px;
  }
  .my-photo-figure {
    min-width: 100px;
  }
  
  .my-photo-caption {
    width: 100px;
  }

  
  /* Consistent arrow positioning on very small screens */
  .project-carousel {
    gap: 0.5em;
    padding: 0 0px;
    max-width: calc(100vw - 20px);
    width: 100%;
  }
   .carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;            /* keeps space for arrows */
    padding: 0;
    max-width: 100%;
  }

  .carousel-btn {
    flex: 0 0 auto;        /* don’t let arrows collapse */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1px;
  }
  
  .carousel-track {
    height: 85vw;
  }
  .carousel-track {
    flex: 1 1 auto;       
    width: auto; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .carousel-img {
  width: 90vw;        
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  }
 
}

