:root {
  /* Warm, Natural Color Palette */
  --primary-bg: #f5f3f0;
  --secondary-bg: #ffffff;
  --primary-text: #2d2822;
  --secondary-text: #5a5247;
  --accent-color: #9b8b7e;
  --accent-dark: #7a6c5f;
  --warm-brown: #8b7355;
  --soft-cream: #ede8e1;
  --earth-tone: #a88f7a;
  --border-color: #d4cdc3;
  --shadow-light: rgba(155, 139, 126, 0.15);
  --shadow-medium: rgba(155, 139, 126, 0.25);
  --shadow-warm: rgba(138, 115, 93, 0.3);
  --border-radius: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Responsive spacing system */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --touch-target-min: 44px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--primary-text);
  background: var(--primary-bg);
  min-height: 100vh;
  scroll-behavior: smooth;
}

/* Simple Header Styles - Framed Window */
.simple-header {
  background: var(--primary-bg);
  padding: 2.5rem 2rem;
}

.header-container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--secondary-bg);
  border: 10px solid var(--primary-text);
  box-shadow:
    0 0 0 2px var(--secondary-bg),
    0 6px 28px rgba(0, 0, 0, 0.25),
    inset 0 0 0 3px var(--soft-cream);
  padding: 1.75rem 2rem;
  transition: var(--transition);
}

.header-container:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 2px var(--secondary-bg),
    0 10px 38px rgba(0, 0, 0, 0.3),
    inset 0 0 0 3px var(--soft-cream);
}

.simple-header .name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 400;
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.simple-header .name a {
  color: var(--primary-text);
  text-decoration: none;
  transition: var(--transition);
}

.simple-header .name a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.simple-header .title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: var(--secondary-text);
  margin-bottom: 0.25rem;
  font-weight: 400;
  font-style: italic;
}

.simple-header .location {
  font-size: clamp(0.875rem, 1.75vw, 0.9375rem);
  color: var(--accent-color);
  font-weight: 400;
}

.portfolio-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md) 4rem var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 4rem;
  background: var(--primary-bg);
  align-items: center;
}

.project-card {
  background: var(--secondary-bg);
  border: 8px solid var(--primary-text);
  box-shadow:
    0 0 0 2px var(--secondary-bg),
    0 6px 28px rgba(0, 0, 0, 0.25),
    inset 0 0 0 3px var(--soft-cream);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 16px;
  width: 100%;
  max-width: 340px;
}

/* Mobile: Uniform card sizing - variations added at 1024px+ */

.project-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 2px var(--secondary-bg),
    0 12px 42px rgba(0, 0, 0, 0.3),
    inset 0 0 0 3px var(--soft-cream);
}

.project-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 240px;
  background: var(--secondary-bg);
  margin-bottom: 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  display: block;
  border-radius: 0;
}

.project-card:hover .project-image img {
  transform: scale(1.02);
}

.project-info {
  position: relative;
  background: transparent;
  padding: var(--spacing-lg) 0 0 0;
  text-align: right;
  max-width: 100%;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-text);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

.project-description {
  color: var(--secondary-text);
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
  font-weight: 400;
}

.social-nav {
  background: var(--secondary-bg);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--spacing-sm) 0;
  padding: 0.75rem 1.5rem;
  min-height: var(--touch-target-min);
  background: var(--warm-brown);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.9375rem;
  width: 100%;
  max-width: 280px;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-warm);
  background: var(--accent-dark);
  color: white;
  text-decoration: none;
}

.site-footer {
  background: var(--primary-text);
  color: var(--soft-cream);
  text-align: center;
  padding: 2rem;
}

.footer-content p {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Inner Pages Styles */
#description-row {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  text-align: left;
}

#description-row h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--primary-text);
  letter-spacing: -0.01em;
}

#description-row h1 a {
  color: var(--primary-text);
  text-decoration: none;
  transition: var(--transition);
}

#description-row h1 a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

#description-row h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

#description-row h4 {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--secondary-text);
  margin-bottom: 1rem;
}

#work-row {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.testContent {
  display: block;
  margin: 2rem auto;
  text-align: left;
}

.testContent iframe {
  border-radius: var(--border-radius);
  box-shadow: 0 6px 24px var(--shadow-medium);
  border: 1px solid var(--border-color);
}

.testContent img {
  border-radius: var(--border-radius);
  box-shadow: 0 6px 24px var(--shadow-medium);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.testContent img:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px var(--shadow-medium);
}

.testContent h2 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-color);
}

.testContent h2 a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

.testContent h2 a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.testContent h4 {
  font-size: 1.0625rem;
  color: var(--secondary-text);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.testContent button {
  background: var(--warm-brown);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.testContent button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-warm);
}

.testContent video {
  border-radius: var(--border-radius);
  box-shadow: 0 6px 24px var(--shadow-medium);
  border: 1px solid var(--border-color);
  max-width: 100%;
}

#output {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--soft-cream);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  color: var(--primary-text);
  font-size: 1rem;
  line-height: 1.6;
}

#action {
  color: var(--accent-color);
  font-weight: 500;
}

.hide {
  display: none;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Responsive media containers */
.responsive-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.responsive-embed iframe,
.responsive-embed video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
}

.responsive-embed.spotify {
  padding-bottom: 100%; /* Square on mobile */
  max-width: 500px;
  margin: 0 auto;
}

.project-image img {
  border-radius: 0 !important;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

footer {
  background: var(--primary-text);
  color: var(--soft-cream);
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

footer p {
  font-size: 0.875rem;
  opacity: 0.8;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ========================================
   RESPONSIVE BREAKPOINTS - Mobile First
   ======================================== */

/* 600px+ : Small Tablet / Large Phone Landscape */
@media (min-width: 600px) {
  .simple-header {
    padding: 2rem 1.5rem;
  }

  .portfolio-grid {
    padding: var(--spacing-2xl) var(--spacing-lg) 5rem var(--spacing-lg);
    gap: 4.5rem;
  }

  .project-card {
    max-width: 400px;
    padding: 18px;
  }

  .project-image {
    height: 260px;
  }

  .social-link {
    display: inline-flex;
    margin: var(--spacing-sm) var(--spacing-md);
    width: auto;
  }

  #description-row {
    padding: 2.5rem 1.5rem 2rem;
  }

  #work-row {
    padding: 2rem 1.5rem;
  }
}

/* 768px+ : Tablet Portrait */
@media (min-width: 768px) {
  .simple-header {
    padding: 2.5rem 2rem;
  }

  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 4rem 2rem;
    padding: var(--spacing-2xl) var(--spacing-xl) 6rem var(--spacing-xl);
    align-items: start;
    justify-items: center;
  }

  .project-card {
    max-width: 360px;
    padding: 20px;
  }

  .project-image {
    height: 270px;
  }

  .social-nav {
    padding: 2rem;
  }

  #description-row {
    padding: 3rem 2rem 2rem;
  }

  #work-row {
    padding: 2rem;
  }
}

/* 1024px+ : Desktop / Tablet Landscape */
@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 2fr;
    gap: 5rem 0.5rem;
    padding: 3rem 2rem 7rem 2rem;
    justify-items: start;
  }

  .project-card {
    padding: 22px;
    border-width: 10px;
  }

  /* Reintroduce asymmetric card sizing */
  .project-card:nth-child(1) {
    padding: 28px;
    border-width: 12px;
    max-width: 450px;
  }

  .project-card:nth-child(1) .project-image {
    height: 280px;
  }

  .project-card:nth-child(2) {
    padding: 18px;
    border-width: 9px;
    max-width: 280px;
    justify-self: end;
  }

  .project-card:nth-child(2) .project-image {
    height: 200px;
  }

  .project-card:nth-child(3) {
    padding: 22px;
    border-width: 8px;
    max-width: 250px;
  }

  .project-card:nth-child(3) .project-image {
    height: 300px;
  }

  .project-card:nth-child(4) {
    padding: 32px;
    border-width: 14px;
    max-width: 380px;
    justify-self: end;
  }

  .project-card:nth-child(4) .project-image {
    height: 320px;
  }

  /* Carefully reintroduce absolute positioning with safer values */
  .project-info {
    position: absolute;
    bottom: -110px;
    right: 0;
    padding: 18px 0;
    max-width: 280px;
    z-index: 5;
  }

  .project-card:nth-child(1) .project-info {
    bottom: -110px;
    max-width: 350px;
    right: -15px;
  }

  .project-card:nth-child(2) .project-info {
    bottom: -100px;
    max-width: 240px;
    right: 0;
  }

  .project-card:nth-child(3) .project-info {
    bottom: -110px;
    max-width: 220px;
    right: -20px;
  }

  .project-card:nth-child(4) .project-info {
    bottom: -110px;
    max-width: 300px;
    right: 0;
  }

  .social-link {
    margin: 0 1rem;
  }
}

/* 1200px+ : Large Desktop */
@media (min-width: 1200px) {
  .portfolio-grid {
    gap: 6rem 0.5rem;
    padding: 3rem 2rem 8rem 2rem;
  }

  /* Original full design with larger variations */
  .project-info {
    bottom: -120px;
  }

  .project-card:nth-child(1) .project-info {
    bottom: -120px;
    right: -20px;
  }

  .project-card:nth-child(3) .project-info {
    bottom: -130px;
    right: -30px;
  }

  .project-card:nth-child(4) .project-info {
    bottom: -125px;
  }
}
