/* ========================================
   DEFAULT THEME - 4567 Website Generator
   ======================================== 
   
   This is a CSS Zen Garden style theme. 
   All visual styling is controlled by this single file.
   The HTML structure remains unchanged across all themes.
   
   Theme Variables (customize these for quick theming):
   - --font-main: Primary font family
   - --color-bg: Background color
   - --color-fg: Foreground/text color
   - --color-accent: Accent color for links and highlights
   - --color-border: Border color
   - --max-width: Maximum content width
   - --btn-bg: Button background color
   - --btn-text: Button text color
   ======================================== */

:root {
  --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --color-bg: #f5f5f7;
  --color-fg: #1d1d1f;
  --color-accent: #1d1d1f;
  --color-border: #d2d2d7;
  --max-width: 770px;
  --btn-bg: #1d1d1f;
  --btn-text: #ffffff;
}

/* ========================================
   BASE STYLES
   ======================================== */

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-fg);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

main {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 2rem;
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 1.5rem 2rem 0 2rem;
  font-size: 1.1rem;
}

nav a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.03em;
}

nav a:hover {
  text-decoration: underline;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 2rem 0 1rem 0;
  line-height: 1.3;
  font-weight: 600;
  max-width: 93%;
}

h1 { font-size: 2.25rem; margin-top: 5rem; }
h2 { font-size: 1.875rem; margin-top: 4rem; }
h3 { font-size: 1.5rem; margin-top: 3.5rem; }
h4 { font-size: 1.25rem; margin-top: 3rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin: 1rem 0;
  line-height: 2.1rem;
  font-size: 1.4rem;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: underline;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* Strong and Emphasis */
strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

/* ========================================
   CODE BLOCKS & SYNTAX HIGHLIGHTING
   ======================================== */

/* Inline Code */
code {
  background: #f6f8fa;
  border: 1px solid #d1d9e0;
  border-radius: 0.35rem;
  padding: 0.2em 0.4em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', 'Menlo', 'Consolas', monospace;
  font-size: 0.85em;
  color: #d73a49;
  font-weight: 500;
}

/* Code Blocks */
pre {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 0.35rem;
  padding: 3rem 1rem 1rem 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
  color: #c9d1d9;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #c9d1d9;
  font-weight: 400;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', 'Menlo', 'Consolas', monospace;
}

/* Copy button for code blocks */
.code-container {
  position: relative;
}

.copy-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #21262d;
  color: #f0f6fc;
  border: 1px solid #30363d;
  border-radius: 0.35rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
  font-family: var(--font-main);
  z-index: 10;
}

.copy-button:hover {
  opacity: 1;
  background: #30363d;
  border-color: #444c56;
}

.copy-button.copied {
  background: #238636;
  border-color: #2ea043;
  color: white;
}

/* Code block with syntax highlighting */
.highlight {
  position: relative;
}

.highlight pre {
  margin: 0;
}

/* Language label for code blocks */
.code-lang {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #21262d;
  color: #7d8590;
  border: 1px solid #30363d;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  font-size: 0.65rem;
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  z-index: 10;
}

/* Basic Syntax Highlighting for Code Blocks */
pre code .comment {
  color: #7c7c7c;
  font-style: italic;
}

pre code .keyword {
  color: #c586c0;
  font-weight: 500;
}

pre code .string {
  color: #ce9178;
}

pre code .number {
  color: #b5cea8;
}

pre code .function {
  color: #dcdcaa;
}

pre code .variable {
  color: #9cdcfe;
}

pre code .operator {
  color: #d4d4d4;
}

pre code .punctuation {
  color: #cccccc;
}

/* ========================================
   BLOCKQUOTES
   ======================================== */

blockquote {
  border-left: 7px solid var(--color-accent);
  padding: 0.7rem 0 0.7rem 2.1rem;
  margin: 2.1rem 0;
  background: #ffffff;
  font-style: italic;
  color: #777;
  font-size: large;
  font-style: normal;
  color: #000;
}

blockquote p {
  margin: 0.5rem 0;
}

blockquote blockquote {
  margin: 0.5rem 0;
  border-left-color: #999;
}

/* ========================================
   LISTS
   ======================================== */

ul, ol {
  padding-left: 0%;
  margin: 1rem 0;
  line-height: 2.1rem;
  font-size: 1.4rem;
}

li {
  margin: 0.25rem 0;
}

/* Task Lists */
input[type="checkbox"] {
  margin-right: 0.5rem;
  accent-color: var(--color-accent);
}

/* ========================================
   TABLES
   ======================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

thead {
  border-bottom: 1px solid var(--color-border);
}

th {
  height: 3rem;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-fg);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
}

th[align="center"] {
  text-align: center;
}

th[align="right"] {
  text-align: right;
}

tbody {
  border: none;
}

tr {
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

tr:last-child {
  border-bottom: none;
}

td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: none;
  vertical-align: top;
}

td[align="center"] {
  text-align: center;
}

td[align="right"] {
  text-align: right;
}

td:first-child,
th:first-child {
  vertical-align: top;
}

.table-cell-header {
  font-weight: 600;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
}

/* ========================================
   HORIZONTAL RULES
   ======================================== */

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
  opacity: 0.6;
}

/* ========================================
   PROJECT CARDS (Legacy)
   ======================================== */

.project-card {
  border: 1.5px solid var(--color-border);
  border-radius: 0.35rem;
  padding: 1.2em 1.5em;
  margin-bottom: 1.5em;
  display: flex;
  gap: 1.5em;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}

.project-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.project-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid var(--color-border);
  background: #eee;
}

/* ========================================
   META LINKS & TAGS
   ======================================== */

.meta-links {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 1.5em 0 2em 0;
}

.meta-link-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding: 0.75em 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95em;
}

.meta-link-row:last-child {
  border-bottom: none;
}

.meta-label {
  font-weight: 700;
  color: var(--color-fg);
  min-width: 100px;
  text-align: left;
}

.meta-link-row a {
  color: var(--color-fg);
  text-decoration: none;
}

.meta-link-row a:hover {
  background: var(--color-fg);
  color: var(--color-bg);
}

.meta-tag {
  display: inline-block;
  border: 1px solid var(--color-border);
  border-radius: 0.35rem;
  padding: 0.1em 0.7em;
  margin-right: 0.4em;
  font-size: 0.92em;
  font-weight: 500;
  color: var(--color-fg);
  text-decoration: none;
  transition: background 0.2s, border 0.2s;
}

.meta-tag:hover {
  background: #e0e0e0;
  border-color: var(--color-fg);
  color: var(--color-accent);
}

/* ========================================
   PAGE HEADER & LAYOUT
   ======================================== */

.page-header {
  margin-bottom: 2em;
  border-bottom: var(--color-border) 1px solid;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1em;
}

.page-title {
  margin: 0;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 150ms ease-in-out;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border-radius: 0.35rem;
  height: 2rem;
  padding: 0 0.75rem;
  gap: 0.375rem;
  outline: none;
  line-height: 1.25rem;
}

.btn-primary:hover {
  border: 1px solid var(--btn-text);
  background: var(--btn-text);
  color: var(--btn-bg);
  text-decoration: none;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 2px;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Complete button reset to match anchor tag styling exactly */
button.btn-primary {
  border: none;
  margin: 0;
  padding: 0;
  background: none;
  font: inherit;
  cursor: inherit;
  outline: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 150ms ease-in-out;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border-radius: 0.35rem;
  height: 2rem;
  padding: 0 0.75rem;
  gap: 0.375rem;
  outline: none;
  line-height: 1.25rem;
}

button.btn-primary:hover {
  border: 1px solid var(--btn-text);
  background: var(--btn-text);
  color: var(--btn-bg);
  text-decoration: none;
}

button.btn-primary:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 2px;
}

button.btn-primary:active {
  transform: scale(0.97);
}

button.btn-primary:disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Button variants */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 150ms ease-in-out;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-fg);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border-radius: 0.35rem;
  height: 2rem;
  padding: 0 0.75rem;
  gap: 0.375rem;
  outline: none;
}

.btn-secondary:hover {
  background: var(--color-border);
  border: 1px solid var(--color-fg);
  color: var(--color-fg);
  text-decoration: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 150ms ease-in-out;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--btn-bg);
  background: transparent;
  color: var(--btn-bg);
  border-radius: 0.35rem;
  height: 2rem;
  padding: 0 0.75rem;
  gap: 0.375rem;
  outline: none;
}

.btn-outline:hover {
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
}

/* Button sizes */
.btn-sm {
  height: 1.75rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
}

.btn-lg {
  height: 2.75rem;
  padding: 0 1.5rem;
  font-size: 1rem;
}

/* ========================================
   PROJECT LIST (Home Page)
   ======================================== */

.project-list {
  display: block;
  margin-top: 2em;
}

.project-list.featured {
  margin-top: 5em;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2em;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.project-row.padded {
  padding: 0.2em 0;
}

.project-link {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font-family: inherit;
  font-size: 2.1em;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.project-link.compact {
  line-height: 1.05;
}

.project-thumb-inline {
  height: 27px;
  width: auto;
  object-fit: cover;
  border-radius: 0.35rem;
  vertical-align: middle;
  margin: -0.21em;
}

img.project-thumb-inline{
  height: 27px;
  width: auto;
  object-fit: cover;
  border-radius: 0.35rem;
  vertical-align: middle;
  margin: -0.21em;
}

/* Multiple thumbnails styling */
.project-thumbnails {
  display: inline-flex;
  margin-left: 0.7em;
  gap: 0em;
  align-items: center;
  width: 100%;
  max-height: 41px;
}

.project-thumbnails .project-thumb-inline {
  margin-left: 0;
}

.project-year {
  font-size: 0.7em;
  color: #888;
  margin-bottom: -2;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 0.35rem;
  background-color: rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
}

.section-title {
  margin-bottom: 0.7em;
  color: rgb(191, 191, 191);
}

/* ========================================
   IMAGES
   ======================================== */

.image-full {
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  border-radius: 0.35rem;
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

p img, 
li img, 
blockquote img {
  margin: 1em auto;
  max-width: 100%;
  width: auto;
}

img[style*="display: inline"],
img.inline {
  display: inline;
  width: auto;
  max-width: 100%;
  margin: 0 0.25em;
  vertical-align: middle;
}

.project-thumb-inline,
img[alt*="thumb"]:not(.project-thumb-inline),
img[alt*="icon"] {
  width: auto;
  max-width: 200px;
  margin: 0.5em;
}

.image-full,
img[alt*="full-width"],
img[alt*="hero"] {
  width: 100%;
  max-width: var(--max-width);
  margin: 2em auto;
}

/* ========================================
   VIDEOS & EMBEDS
   ======================================== */

iframe {
  max-width: 100%;
  border-radius: 0.35rem;
  margin: 1.5em 0;
}

iframe[src*="youtube.com"], 
iframe[src*="youtu.be"], 
iframe[src*="vimeo.com"] {
  width: 100%;
  height: 315px;
  aspect-ratio: 16/9;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 1.5em 0;
}

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

video {
  border-radius: 0.35rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #000;
}

.project-media-stack {
  display: grid;
  gap: 1.1rem;
}

.project-video-player,
.project-image-card,
.project-image-card .lightbox-trigger {
  width: 100%;
}

.project-image-card {
  margin: 0;
  border: none;
}

.project-image-card .lightbox-trigger {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.65rem;
  isolation: isolate;
  cursor: zoom-in;
}

.project-image-card .image-full {
  margin: 0;
}

.lightbox-trigger::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 18, 0.02), rgba(15, 15, 18, 0.28));
  opacity: 0;
  transition: opacity 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-trigger img {
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), filter 260ms ease;
}

.lightbox-trigger:hover::before,
.lightbox-trigger:focus-visible::before {
  opacity: 1;
}

.lightbox-trigger:hover img,
.lightbox-trigger:focus-visible img {
  transform: scale(1.018);
  filter: saturate(1.03);
}

.lightbox-trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.project-image-chip {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 700px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ========================================
   FORMS
   ======================================== */

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e6e6e6;
  border-radius: 0.35rem;
  font-size: 16px;
  font-family: inherit;
  background-color: #ffffff;
  color: #747474;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(99, 91, 255, 0.1);
  background-color: #ffffff;
}

.form-input:hover {
  border-color: #d1d5db;
}

.form-input::placeholder {
  color: #a0a6b1;
  opacity: 1;
}

label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: #7a7a7a;
  margin-bottom: 6px;
  margin-top: 16px;
}

label:first-of-type {
  margin-top: 0;
}

.form-input.spaced {
  margin: 1em 0;
}

.form-input.narrow {
  width: 100px;
}

.form-submit {
  width: 100%;
  margin-top: 2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 150ms ease-in-out;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--color-fg);
  background: var(--color-fg);
  color: var(--color-bg);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border-radius: 0.35rem;
  height: 2.5rem;
  padding: 0 1rem;
  gap: 0.375rem;
  outline: none;
}

.form-submit:hover {
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.form-submit:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 2px;
}

.form-submit:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
  background: #f8f8f8;
  border: 1.5px solid #eee;
  padding: 3em 5em;
  margin: 2em 0;
  border-radius: 0.35rem;
  max-width: 600px;
}

/* ========================================
   ONBOARDING (empty folder state)
   ======================================== */

.onboarding {
  padding: 3em 0;
  max-width: 560px;
}

.onboarding-lead {
  font-size: 1.05rem;
  color: var(--color-fg);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 0.35rem;
  overflow: hidden;
}

.onboarding-step {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
  line-height: 1.5;
}

.onboarding-step:last-child {
  border-bottom: none;
}

.onboarding-step-n {
  font-size: 0.7rem;
  font-weight: 700;
  color: #bbb;
  min-width: 1rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.onboarding-hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #999;
}

.onboarding-features {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.onboarding-features span {
  font-size: 0.72rem;
  color: #aaa;
  border: 1px solid var(--color-border);
  border-radius: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-weight: 500;
}

/* ========================================
   FOOTER
   ======================================== */

.footer-info {
  text-align: left;
  margin: 3em 0;
  color: #888;
  font-size: 0.95em;
}

.footer-custom {
  text-align: left;
  margin: 7em 0;
  color: #888;
  font-size: 0.95em;
}

.footer-actions {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

/* ========================================
   404 PAGE
   ======================================== */

.main-centered {
  max-width: 600px;
  margin: 3em auto;
}

.main-404 {
  max-width: 600px;
  margin: 5em auto;
  text-align: center;
}

.title-404 {
  font-size: 3em;
}

.subtitle-404 {
  font-size: 1.3em;
}

/* ========================================
   BREADCRUMB NAVIGATION
   ======================================== */

.breadcrumb-nav {
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.breadcrumb-link {
  color: var(--color-fg);
  text-decoration: none;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  transition: background-color 0.2s;
}

.breadcrumb-link:hover {
  background-color: var(--color-fg);
  color: var(--color-bg);
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ========================================
   FILES SECTION
   ======================================== */

.files-section {
  margin: 3rem 0 2rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.files-section h2 {
  margin-bottom: 1.5rem;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-item {
  border: 1px solid var(--color-border);
  border-radius: 0.35rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.file-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: var(--color-fg);
}

.file-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
}

.file-summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.file-copy {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-fg);
  overflow-wrap: anywhere;
}

.file-type-inline {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, rgba(29, 29, 31, 0.62));
}

.file-icon {
  --file-accent: var(--color-accent);
  position: relative;
  display: grid;
  place-items: end start;
  width: 3rem;
  min-width: 3rem;
  aspect-ratio: 0.82;
  padding: 0.42rem;
  border-radius: 0.6rem;
  border: 1px solid currentColor;
  color: var(--file-accent);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.file-link:hover .file-icon {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.file-icon::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0.95rem;
  height: 0.95rem;
  background: currentColor;
  opacity: 0.18;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.file-icon::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.48rem;
  background: currentColor;
  opacity: 0.12;
}

.file-icon-label {
  position: relative;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.file-icon-pdf {
  --file-accent: #d94a33;
}

.file-icon-archive {
  --file-accent: #9a5b1f;
}

.file-icon-document {
  --file-accent: #0d6efd;
}

.file-icon-spreadsheet {
  --file-accent: #2f855a;
}

.file-icon-presentation {
  --file-accent: #dd6b20;
}

.file-icon-text {
  --file-accent: #5c6773;
}

.file-icon-data {
  --file-accent: #1d3557;
}

.file-icon-audio {
  --file-accent: #0c8599;
}

.file-icon-design {
  --file-accent: #d63384;
}

.file-icon-generic {
  --file-accent: var(--color-accent);
}

.file-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.875rem;
  color: #666;
}

body.lightbox-open {
  overflow: hidden;
  overscroll-behavior: contain;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(18px) saturate(1.08);
  opacity: 0;
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.is-open .lightbox-backdrop {
  opacity: 1;
}

.lightbox-dialog {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lightbox-image {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 0;
  height: auto;
  max-width: none;
  margin: 0;
  object-fit: contain;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 18, 22, 0.92);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
  transition: left 360ms cubic-bezier(0.22, 1, 0.36, 1), top 360ms cubic-bezier(0.22, 1, 0.36, 1), width 360ms cubic-bezier(0.22, 1, 0.36, 1), height 360ms cubic-bezier(0.22, 1, 0.36, 1), transform 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: left, top, width, height, transform;
  touch-action: none;
}

.lightbox-close,
.lightbox-nav,
.lightbox-caption-row {
  pointer-events: auto;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: none;
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.52);
  color: #ffffff;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.88);
  outline-offset: 2px;
}

.lightbox-close span,
.lightbox-nav span {
  transform: translateY(-1px);
  font-size: 1.35rem;
  line-height: 1;
}

.lightbox-close {
  top: clamp(1rem, 2.5vw, 1.5rem);
  right: clamp(1rem, 3vw, 1.5rem);
  transform: translateY(-10px) scale(0.95);
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%) scale(0.95);
}

.lightbox-nav-prev {
  left: clamp(1rem, 2.8vw, 1.5rem);
}

.lightbox-nav-next {
  right: clamp(1rem, 2.8vw, 1.5rem);
}

.lightbox-caption-row {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 3vw, 1.6rem);
  transform: translateX(-50%) translateY(10px);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: min(calc(100vw - 2rem), 42rem);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 22, 0.56);
  color: #ffffff;
  backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-counter {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.72);
}

.lightbox-caption {
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox.is-open .lightbox-close,
.lightbox.is-open .lightbox-nav,
.lightbox.is-open .lightbox-caption-row {
  opacity: 1;
}

.lightbox.is-open .lightbox-close {
  transform: translateY(0) scale(1);
}

.lightbox.is-open .lightbox-nav {
  transform: translateY(-50%) scale(1);
}

.lightbox.is-open .lightbox-caption-row {
  transform: translateX(-50%) translateY(0);
}

.lightbox.has-single-image .lightbox-nav {
  display: none;
}

.file-type {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.file-size {
  font-size: 0.8rem;
  color: #888;
}

/* ========================================
   EXTERNAL LINK STYLING
   ======================================== */

.external-link-icon {
  margin-right: 0.5em;
  font-size: 0.9em;
  padding-left: 14px;
}

.project-link[target="_blank"] {
  position: relative;
}

.project-link[target="_blank"]:hover .external-link-icon {
  opacity: 1;
}

/* ========================================
   RESPONSIVE STYLES - TABLET
   ======================================== */

@media (max-width: 768px) {
  main {
    padding: 1.5rem;
  }
  
  h1 { font-size: 2rem; margin-top: 3rem; }
  h2 { font-size: 1.625rem; margin-top: 2.5rem; }
  h3 { font-size: 1.375rem; margin-top: 2rem; }
  
  pre {
    padding: 1rem;
    font-size: 0.85rem;
  }
  
  img {
    margin: 1em auto;
  }
  
  .image-full {
    margin: 1.5em auto;
  }
  
  .project-thumb-inline {
    max-width: 150px;
  }
  
  .page-header {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 1.5em;
    border: none;
  }
  
  .page-title {
    padding-bottom: 0em;
    margin-bottom: 0.21em;
    border-bottom: var(--color-border) 1px solid;
  }
  
  .header-actions {
    justify-content: flex-start;
  }
  
  .breadcrumb-nav {
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.75rem;
  }
  
  .footer-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .file-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .file-summary {
    width: 100%;
  }
  
  .file-meta {
    align-items: flex-start;
    flex-direction: row;
    gap: 1rem;
  }

  .project-image-chip {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.5rem 0.72rem;
    font-size: 0.68rem;
  }

  .lightbox-close,
  .lightbox-nav {
    width: 2.85rem;
    height: 2.85rem;
  }

  .lightbox-caption-row {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
    border-radius: 1.1rem;
    transform: translateY(10px);
  }

  .lightbox.is-open .lightbox-caption-row {
    transform: translateY(0);
  }
  
  iframe[src*="youtube.com"], 
  iframe[src*="youtu.be"], 
  iframe[src*="vimeo.com"] {
    height: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-backdrop,
  .lightbox-image,
  .lightbox-close,
  .lightbox-nav,
  .lightbox-caption-row,
  .lightbox-trigger::before,
  .lightbox-trigger img,
  .file-icon {
    transition: none !important;
    animation: none !important;
  }
}

/* ========================================
   RESPONSIVE STYLES - MOBILE
   ======================================== */

@media (max-width: 600px) {
  main {
    padding: 1rem;
    margin: 1rem auto;
  }
  
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    font-size: 1rem;
  }
  
  .project-card {
    flex-direction: column;
    gap: 0.75em;
    padding: 1em;
  }
  
  .project-thumb {
    width: 100%;
    height: auto;
    min-height: 150px;
  }

  ul, ol {
    padding-left: 1.25rem;
    margin: 1rem 0;
  }
  
  h1 { 
    font-size: 1.75rem;
    margin-top: 2rem;
    line-height: 1.2;
  }
  h2 { 
    font-size: 1.5rem;
    margin-top: 1.75rem;
    line-height: 1.3;
  }
  h3 { 
    font-size: 1.25rem;
    margin-top: 1.5rem;
  }
  h4 { 
    font-size: 1.125rem;
  }
  
  p {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  pre {
    padding: 0.75rem;
    font-size: 0.8rem;
    margin: 1rem -1rem;
    border-radius: 0;
  }
  
  table {
    font-size: 0.875rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  th, td {
    padding: 0.5rem;
    min-width: 80px;
  }
  
  blockquote {
    padding: 0.5rem 0 0.5rem 1rem;
    margin: 1rem 0;
    font-size: 0.95rem;
  }
  
  .footer-custom {
    font-size: 0.8em;
  }
  
  .meta-links {
    margin: 1em 0 1.5em 0;
    padding: 0 0.5em;
  }
  
  .meta-link-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5em 0;
    font-size: 1em;
  }
  
  .meta-label {
    min-width: 0;
    margin-bottom: 0.2em;
    font-size: 1em;
  }
  
  .meta-tag {
    font-size: 1em;
    margin-bottom: 0.3em;
    padding: 0.15em 0.9em;
  }
  
  .page-header {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 1.5em;
  }
  
  .page-title {
    padding-bottom: 0.75em;
    margin-bottom: 0.75em;
    border-bottom: var(--color-border) 1px solid;
  }
  
  .header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .btn-primary {
    justify-self: start;
  }
  
  .project-link {
    font-size: 1.8em;
  }
  
  .project-thumb-inline {
    height: 36px;
    margin-left: 0.5em;
  }
  
  .project-thumbnails {
    margin-left: 0.5em;
    gap: 0.3em;
  }
  
  table {
    font-size: 0.8rem;
    margin: 1rem 0;
  }
  
  th, td {
    padding: 0.5rem 0.75rem;
  }
  
  th {
    height: 2.5rem;
  }
}

/* ========================================
   RESPONSIVE STYLES - SMALL MOBILE
   ======================================== */

@media (max-width: 480px) {
  img {
    margin: 0.75em auto;
  }
  
  .project-thumb-inline {
    max-width: 120px;
  }
}

@media (max-width: 375px) {
  main {
    padding: 0.75rem;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.125rem; }
  
  nav {
    font-size: 0.95rem;
    gap: 0.5rem;
  }
}

/* ========================================
   RESPONSIVE STYLES - DESKTOP
   ======================================== */

@media (min-width: 1024px) {
  iframe[src*="youtube.com"], 
  iframe[src*="youtu.be"], 
  iframe[src*="vimeo.com"] {
    height: 500px;
  }
}
