html {
  box-sizing: border-box;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 1.4;
  color: #000000;
  background-color: #FFFFFF;
  margin: 20px auto;
  max-width: 800px;
  padding: 0 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Homepage + interior page container - centered */
body:has(.homepage-container),
body:has(.page-container) {
  background-color: #000000;
  margin: 0;
  padding: 40px 0;
  max-width: none;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
}

.homepage-container {
  width: 66vw;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  background-color: #FFFFFF;
  border: 4px outset #CCCCCC;
  padding: 30px;
  box-sizing: border-box;
}

.page-container {
  width: 66vw;
  max-width: 100%;
  margin: 0 auto;
  background-color: #FFFFFF;
  border: 4px outset #CCCCCC;
  padding: 30px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.page-container nav {
  width: 100%;
  align-self: stretch;
  margin: 0;
}

.type-page .type-content,
.project-page .project {
  border: 3px inset #CCCCCC;
  background-color: #FFFFFF;
  padding: 20px;
  box-sizing: border-box;
}

/* Header with skeletons */
.header-with-skeletons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
  width: 100%;
}

/* ASCII Art / GIFs */
.skeleton-art {
  border: 2px inset #666666;
  padding: 10px;
  background-color: #000000;
  width: 150px;
  height: auto;
  flex-shrink: 0;
}

.skeleton-right {
  transform: scaleX(-1);
}

.flame-art {
  margin: 20px auto;
  display: block;
  border: 2px inset #FF3300;
  padding: 10px;
  background-color: #000000;
  max-width: 100%;
  height: auto;
}

/* Links - classic web 1.0 style */
a:link {
  color: #0000FF;
  text-decoration: underline;
}

a:visited {
  color: #800080;
  text-decoration: underline;
}

a:hover {
  color: #FF0000;
  text-decoration: underline;
  font-weight: bold;
}

a:active {
  color: #FF0000;
  text-decoration: underline;
}

/* Header */
.site-header {
  border: 4px outset #CCCCCC;
  background-color: #F0F0F0;
  padding: 10px 20px;
  flex: 1;
  min-width: 150px;
  max-width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

.site-header h1 {
  font-size: clamp(14pt, 5vw, 48pt);
  font-weight: bold;
  margin-bottom: 5px;
  color: #000080;
  text-shadow: 1px 1px 0px #CCCCCC;
  word-wrap: break-word;
  line-height: 1.2;
  text-align: center;
}

.flame-text {
  font-size: clamp(9pt, min(2vw, 22pt), 24pt);
  color: #FF3300;
  font-weight: bold;
  margin: 0 auto;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
}

/* Type Navigation */
.type-nav {
  margin: 30px 0;
  width: 100%;
}

.type-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.type-list li {
  margin: 15px 0;
  border: 3px outset #CCCCCC;
  background-color: #F0F0F0;
  padding: 15px;
  display: block;
  max-width: 100%;
  box-sizing: border-box;
}

.type-list li:hover {
  border: 3px inset #CCCCCC;
  background-color: #E0E0E0;
}

.type-list a {
  font-size: 18pt;
  font-weight: bold;
  text-decoration: none;
  color: #000080;
  display: block;
}

.type-list a:hover {
  color: #FF0000;
  text-decoration: underline;
}

/* Navigation */
nav {
  margin-bottom: 20px;
  padding: 10px;
  border: 2px inset #CCCCCC;
  background-color: #F5F5F5;
  text-align: center;
}

nav a {
  font-weight: bold;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 2px solid #000000;
  margin: 20px 0;
}

/* Type sections */
.type-section {
  margin-bottom: 40px;
  border: 2px outset #CCCCCC;
  padding: 15px;
  background-color: #FAFAFA;
}

.type-section h2 {
  font-size: 18pt;
  font-weight: bold;
  margin-bottom: 15px;
  text-transform: capitalize;
  color: #000080;
  border-bottom: 2px solid #000000;
  padding-bottom: 5px;
}

/* Project grid - using table-like layout */
.project-grid {
  display: block;
}

.project-card {
  display: block;
  margin-bottom: 20px;
  border: 2px inset #CCCCCC;
  padding: 10px;
  background-color: #FFFFFF;
}

.project-card a {
  text-decoration: none;
  color: #000000;
}

.project-card img {
  width: 100%;
  border: 2px inset #CCCCCC;
  margin-bottom: 10px;
  display: block;
}

.project-card h3 {
  font-size: 14pt;
  font-weight: bold;
  margin-bottom: 5px;
  color: #000080;
}

.project-card h3 a {
  color: #000080;
}

.project-card .date {
  color: #666666;
  font-size: 10pt;
  font-style: italic;
}

/* Project page */
.project header {
  margin-bottom: 20px;
  border: 3px outset #CCCCCC;
  background-color: #F0F0F0;
  padding: 15px;
}

.project h1 {
  font-size: 20pt;
  font-weight: bold;
  margin-bottom: 10px;
  color: #000080;
}

.meta {
  display: block;
  margin-top: 10px;
  font-size: 11pt;
}

.meta span {
  display: inline-block;
  margin-right: 15px;
  padding: 3px 8px;
  border: 1px inset #CCCCCC;
  background-color: #FFFFFF;
}

.meta .type {
  text-transform: capitalize;
  font-weight: bold;
  color: #000000;
  background-color: #E0E0E0;
}

.gallery {
  margin-bottom: 30px;
}

.gallery img,
.gallery iframe {
  cursor: pointer;
}

.gallery img {
  width: 100%;
  border: 2px inset #CCCCCC;
  margin-bottom: 15px;
  display: block;
}

.gallery img:hover {
  border: 2px outset #CCCCCC;
}

.pdf-display {
  width: 100%;
  height: 800px;
  border: 2px inset #CCCCCC;
  margin-bottom: 15px;
  display: block;
  cursor: pointer;
}

.pdf-display:hover {
  border: 2px outset #CCCCCC;
}

.vimeo-item {
  width: 100%;
  margin-bottom: 15px;
}

.vimeo-thumbnail {
  width: 100%;
  border: 2px inset #CCCCCC;
  display: block;
  cursor: pointer;
}

.vimeo-thumbnail:hover {
  border: 2px outset #CCCCCC;
}

.vimeo-display {
  width: 100%;
  height: 600px;
  border: 2px inset #CCCCCC;
  margin-bottom: 15px;
  display: block;
  cursor: pointer;
  padding: 10px;
  box-sizing: border-box;
}

.vimeo-display:hover {
  border: 2px outset #CCCCCC;
}

/* Image Popup */
.image-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  overflow: auto;
}

.popup-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  margin: 5vh auto;
  background-color: #FFFFFF;
  border: 4px outset #CCCCCC;
  padding: 20px;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #F0F0F0;
  border: 2px outset #CCCCCC;
  font-size: 24pt;
  font-weight: bold;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1001;
  color: #000000;
}

.popup-close:hover {
  background-color: #E0E0E0;
  border: 2px inset #CCCCCC;
}

.popup-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #F0F0F0;
  border: 3px outset #CCCCCC;
  font-size: 36pt;
  font-weight: bold;
  width: 60px;
  height: 60px;
  cursor: pointer;
  z-index: 1001;
  color: #000080;
  display: none;
}

.popup-prev {
  left: 10px;
}

.popup-next {
  right: 10px;
}

.popup-nav:hover {
  background-color: #E0E0E0;
  border: 3px inset #CCCCCC;
  color: #FF0000;
}

.popup-media {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  margin: 0 auto;
  border: 2px inset #CCCCCC;
}

.popup-pdf {
  width: 100%;
  height: 85vh;
  border: 2px inset #CCCCCC;
}

.popup-vimeo {
  width: 100%;
  height: 85vh;
  border: 2px inset #CCCCCC;
  padding: 10px;
  box-sizing: border-box;
}

.statement {
  border: 2px inset #CCCCCC;
  padding: 15px;
  background-color: #FAFAFA;
  line-height: 1.6;
}

.statement p {
  margin-bottom: 12px;
  text-align: justify;
}

.statement h1, .statement h2, .statement h3 {
  color: #000080;
  margin-top: 15px;
  margin-bottom: 10px;
}

.statement strong {
  font-weight: bold;
}

.statement em {
  font-style: italic;
}

.about-content {
  line-height: 1.6;
}

.about-content h1,
.about-content h2,
.about-content h3 {
  color: #000080;
  margin-top: 20px;
  margin-bottom: 10px;
}

.about-content h1 {
  font-size: clamp(14pt, 5vw, 48pt);
  border-bottom: 2px solid #000000;
  padding-bottom: 5px;
  text-align: center;
}

.about-content h2 {
  font-size: 18pt;
  border-bottom: 1px solid #CCCCCC;
  padding-bottom: 3px;
}

.about-content h3 {
  font-size: 20pt;
}

.about-content p {
  margin-bottom: 15px;
}

.about-content ul,
.about-content ol {
  margin-bottom: 15px;
  padding-left: 30px;
}

.about-content li {
  margin-bottom: 5px;
}

.about-content a {
  color: #0000FF;
  text-decoration: underline;
}

.about-content a:hover {
  color: #FF0000;
}

.about-content code {
  background-color: #F0F0F0;
  padding: 2px 4px;
  border: 1px solid #CCCCCC;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Hide skeletons and flame on mobile */
  .skeleton-art,
  .flame-art {
    display: none;
  }

  /* Make header full width on mobile */
  .header-with-skeletons {
    flex-direction: column;
    gap: 10px;
  }

  .site-header {
    width: 100%;
    min-width: unset;
  }

  /* Adjust homepage container for mobile */
  .homepage-container,
  .page-container {
    width: calc(100vw - 20px);
    max-width: 100%;
    padding: 15px;
  }

  /* Make type links more touch-friendly */
  .type-list li {
    padding: 20px;
    margin: 10px 0;
  }

  .type-list a {
    font-size: 16pt;
  }

  /* Adjust text sizes for mobile */
  .site-header h1 {
    font-size: clamp(18pt, 8vw, 32pt);
  }

  .flame-text {
    font-size: clamp(10pt, 3.5vw, 18pt);
    white-space: nowrap;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .homepage-container,
  .page-container {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: none;
  }

  body:has(.homepage-container),
  body:has(.page-container) {
    padding: 0;
    overflow-x: hidden;
  }

  .site-header {
    padding: 8px 15px;
  }

  .type-list a {
    font-size: 14pt;
  }
}
