/* About page photo comment box */
.about-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 400px;
  max-width: 100%;
}
.about-photo-comment {
  margin-top: 8px;
  width: 95%;
  min-height: 38px;
  max-width: 400px;
  font-size: 0.85em;
  border: 2px solid var(--text2);
  border-radius: 8px;
  padding: 4px 8px;
  background: var(--bg);
  color: var(--text2);
  box-sizing: border-box;
  resize: none;
  opacity: 0.95;
  font-family: inherit;
  overflow-y: auto;
  white-space: pre-line;
  line-height: 1.3;
}
@media (max-width: 900px) {
  .about-photo-col {
    width: 100%;
    max-width: 400px;
  }
  .about-photo-comment {
    width: 98%;
    max-width: 400px;
  }
}
/* About page photo grid */
.about-photo-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 18px 0;
}
.about-photo {
  width: auto;
  max-width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
@media (max-width: 900px) {
  .about-photo-row {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .about-photo {
    width: 100%;
    max-width: 400px;
  }
}
@media (max-width: 640px) {
  .contact-right {
    text-align: left !important;
    padding-right: 2em !important;
    padding-left: 0 !important;
  }
}

@media (max-width: 640px) {
  .titlebar-path {
    display: none !important;
  }
}

.nav-card {
  background: var(--bg);
  border: 2px solid var(--text2);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0;
  transform: scale(0.8);
}

.nav-card.visible {
  opacity: 1;
  transform: scale(1);
}

.nav-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border-color: var(--text3);
}

.nav-card h3 {
  color: var(--text2);
  font-size: 1.5em;
  margin-bottom: 15px;
}

.nav-card p {
  color: var(--text);
  font-size: 0.95em;
  line-height: 1.6;
}
.nav-card a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: var(--text2);
  color: var(--panel);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.3s;
}

.nav-card a:hover {
  background: var(--text3);
}

@media (max-width: 768px) {
  .nav-cards {
    grid-template-columns: 1fr;
  }
}
.mobile-projects { display: none; }
.projects-struct { display: block; }

@media (max-width: 768px) {
  .mobile-projects { display: block; }
  .projects-struct { display: none; }
}
.projects-list .project-btn {
  display: inline-block;
  margin: 15px auto 0 auto;
  padding: 10px 20px;
  max-width: 140px;
  width: auto;
  box-sizing: border-box;
  text-align: center;
  background: var(--text2) !important;
  color: var(--panel) !important;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1em;
  transition: background 0.3s;
  border: none;
}
.projects-list .project-btn:hover {
  background: var(--text3) !important;
}
/* Project cards for mobile view */
/* Container handles left/right spacing */
.projects-list {
  display: block;
  padding-left: 12px;
  padding-right: 12px;
}

/* Each card fills container but respects padding */
.project-card {
  width: 100%;
  margin-bottom: 16px;       /* spacing between cards */
  box-sizing: border-box;     /* include padding/border in width */
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 12px 16px;
  text-align: center;
}


@media (max-width: 768px) {
  .project-card {
    margin-right: 12px;
    margin-left: 12px;
    width: auto;
    max-width: calc(100vw - 36px);
  }
}
.project-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 16px;
  border: 1px solid #ccc;
}
.project-info {
  flex: 1;
}
.project-title {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--text2);
  margin-bottom: 4px;
  text-align: center;
}
.project-summary {
  font-size: 0.98em;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}

/* Hide/show for mobile/desktop */
.mobile-only { display: none; }
.desktop-only { display: block; }

@media (max-width: 768px) {
  .projects-list { display: block; }
  .mobile-only { display: flex; }
  .desktop-only { display: none; }
}
@media (max-width: 768px) {
  .gutter {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .vim-window {
    margin: 20px !important;
  }
}
/* VIM window styles from index.html for global use */
.vim-window {
  max-width:1600px;
  margin:40px auto;
  border:1px solid #dcdcdc;
  border-radius:6px;
  overflow:hidden;
  background:var(--panel);
  transition: background 0.3s;
}
.titlebar, .statusbar {
  background: var(--status-bg);
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  transition: background 0.3s, color 0.3s;
}
.titlebar { border-bottom: 1px solid #e0e0e0; }
.statusbar { border-top: 1px solid #e0e0e0; }
.buffer {
  min-height: 70vh;
  padding: 20px;
    max-width: 100%;
}
/* Large font for sub pages (not index.html) */
.large-font .help, .large-font .buffer, .large-font .editor {
  font-size: 19px;
}
.large-font .gutter {
  font-size: 20px;
  line-height: 32px;
}
.large-font .gutter .ln, .large-font .gutter .tilde {
  height: 32px;
}
.large-font .help p {
  line-height: 32px;
}
.large-font .gallery-item .caption {
  font-size: 18px;
  min-height: 40px;
}
/* VIM default colorscheme */
:root{
  --preproc: #e67e22;
  --button-text: #000000;
  /* Core UI colors */
  --bg: #ffffff;          /* page background */
  --panel: #ebebeb;       /* panel / buffer background */
  --status-bg: #e9e6e6;   /* status bar bg */
  --kbd-bg: #e688885b;      /* kbd background */
  
  /* Editor chrome colors */
  --line-number: #bd7313; /* line numbers in gutter */
  --tilde: #5eb3f0;       /* ~ markers for empty lines */
  
  /* Syntax colors */
  --text1: #0f3e9b;       /* comments - green */
  --text2: #bd7313;       /* keywords/functions - blue */
  --text3: #bb2727;       /* values/strings - maroon */
  --text4: #3aaecf;       /* types - purple */
  
  /* UI text colors */
  --text: #000000;        /* primary text */
  --muted: #6a6a6a;       /* secondary text */
  --accent: #c2c0c2; /* links (matches keywords) */
}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, 'Courier New', monospace;min-height:900px}
.vim-window{max-width:1600px;margin:40px auto;border:1px solid #dcdcdc;border-radius:6px;overflow:hidden;background:var(--panel)}
@media (max-width: 640px) {
  .vim-window {
    margin: 12px;
    border-radius: 6px;
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
    border: 1px solid #dcdcdc;
    background: var(--panel);
  }
  .help, .buffer, .editor {
    box-sizing: border-box;
  }
  .help p, .help {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100vw;
  }
}
.titlebar {
  background: var(--status-bg);
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
}
.statusbar {
  background: var(--status-bg);
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
}
.titlebar { border-bottom: 1px solid #e0e0e0; }
.statusbar { border-top: 1px solid #e0e0e0; }
.statusbar .mode{font-weight:700}
.content p{color:var(--text);line-height:1.5}
a{color:var(--accent)}
.comment{color:var(--comment);font-style:italic}
kbd{background:var(--kbd-bg);border-radius:4px;padding:2px 6px;border:1px solid #d0d0d0;color:var(--text)}

/* Small responsive tweak */
@media (max-width:640px){.vim-window{margin:18px;}.file-list{flex-direction:column}}

/* Editor gutter + help alignment */
.editor{display:flex;align-items:flex-start;margin-top:12px;font-family:ui-monospace, Consolas, 'Liberation Mono', monospace}
 .editor{display:flex;align-items:flex-start;margin-top:12px;font-family:ui-monospace, Consolas, 'Liberation Mono', monospace;max-width:100%;}
.gutter{width:48px;padding:0px 4px 6px 0;color:var(--muted);text-align:right;font-size:14px;line-height:24px}
.gutter .ln{display:block;color:var(--line-number);height:24px}
.gutter .tilde{display:block;color:var(--tilde);height:24px}
.help{flex:1;padding:0px 16px;font-size:14px}
 .help{flex:1;padding:0px 16px;font-size:14px;max-width:100%;}
.help p {
  margin: 0;
  line-height: 24px;
  white-space: pre-line;
  word-break: break-word;
  overflow-wrap: break-word;
}
@media (max-width: 640px) {
  .help p {
    white-space:pre-line !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    max-width:100vw;
    margin-bottom: 10px;
    min-height: 1em;
  }
}

/* About page avatar positioned top-right inside the help area */
.about-avatar{position:absolute;right:18px;top:6px;width:96px}
.avatar-img{width:96px;height:96px;object-fit:cover;border-radius:6px;border:1px solid rgba(0,0,0,0.06)}

/* make sure help area is positioned relatively so avatar can be absolute */
.help{position:relative}

/* scheme buttons in statusbar */
.modes{
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.scheme-btn{background:transparent;border:1px solid rgba(0,0,0,0.06);padding:4px 8px;border-radius:4px;font-family:inherit;color:var(--button-text);cursor:pointer}
.scheme-btn.active{background:var(--accent);color:var(--button-text);border-color:transparent}
.scheme-btn:focus{outline:2px solid rgba(0,0,0,0.08)}

/* Syntax token classes */
.tok-preproc{color:var(--preproc);font-weight:600}
.tok-comment{color:var(--text1);font-style:italic}
.tok-keyword{color:var(--text2);font-weight:600}
.tok-value{color:var(--text3)}
.tok-type{color:var(--text4);font-weight:600}

/* Code-like links inside help use value color */
.help a{color:var(--text3);text-decoration:none}
.help a:hover{text-decoration:underline}

/* Desert colorscheme */
body.scheme-desert{
  --preproc: #ffb84d;
  --button-text: #0a0a0a;
  /* Core UI colors */
  --bg:#47454c;
  --panel:#2b2727;
  --status-bg:#b8b5b2;
  --kbd-bg:#b8da5a;
  
  /* Editor chrome colors */
  --line-number: #e4dc37;
  --tilde: #80b4e5;
  
  /* Syntax colors */
  --text1: #2fc7cc;      /* comments - olive */
  --text2: #f4cf7a;      /* keywords - orange */
  --text3: #f2b1a1;      /* values - brown */
  --text4: #ade147;      /* types - sandy */
  
  /* UI text colors */
  --text: #ffffff;
  --muted: #3e3d3d;
  --accent: #d0b73d;
}

/* Industry colorscheme (cool/blue) */
body.scheme-industry{
  --preproc: #47e313;
  /* Core UI colors */
  --bg:#3a3a3a;
  --panel:#000000;
  --status-bg:#757575;
  --kbd-bg:#f0f4f8;
  
  /* Editor chrome colors */
  --line-number: #7e8187;
  --tilde: #85b2ff;
  
  /* Syntax colors */
  --text1: #91ffff;      /* comments - teal */
  --text2: #c7d130;      /* keywords - blue */
  --text3: #ffffff;      /* values - purple */
  --text4: #a8d4ff;      /* types - magenta */
  
  /* UI text colors */
  --text: #dce9f9;
  --muted: #000000;
  --accent: #6daae8;
}

@media (max-width: 640px) {
  .titlebar, .statusbar {
    font-size: 12px;
    padding: 6px 6px;
    flex-direction: row;
    align-items: center;
  }
  .titlebar span.left, .statusbar span.left {
    flex: 1;
    text-align: left;
  }
  .titlebar span.right, .statusbar span.right {
    flex: 1;
    text-align: right;
  }
  .titlebar span.center, .statusbar span.center {
    display: none;
  }
  .buffer {
    padding: 8px 2px;
    min-height: 0;
  }
  .editor {
    flex-direction: row;
    margin-top: 4px;
    font-size: 13px;
  }
  .gutter {
    width: 32px;
    padding: 4px 0 4px 0;
    font-size: 12px;
    line-height: 20px;
  }
  .gutter .ln, .gutter .tilde {
    height: 20px;
    padding-right: 4px;
  }
  .help {
    padding: 4px 4px 4px 8px;
    font-size: 13px;
    overflow-wrap: break-word;
  }
  .about-avatar{right:8px;top:6px;width:72px}
  .avatar-img{width:72px;height:72px}
  .help p {
    line-height: 20px;
    padding: 0;
    margin: 0 0 6px 0;
    overflow-wrap: break-word;
  }
  .modes {
    gap: 2px;
    font-size: 12px;
    padding: 4px 0;
  }
  .scheme-btn {
    padding: 2px 6px;
    font-size: 12px;
    min-width: 44px;
    min-height: 32px;
  }
}

/* Gallery grid for photo thumbnails with varied tile sizes */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  grid-auto-rows: max-content;
  grid-auto-flow: dense;
  gap: 0;
  row-gap: 0;
  column-gap: 0;
  margin-top: 0;
  justify-content: center;
}
.gallery-item {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
/* Gallery images: show at natural size, never stretch up */
.gallery-item img {
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  border: none;
  margin: 0;
}
/* Responsive: stack on mobile */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0;
    justify-content: center;
    width: 100vw;
  }
}
.gallery-item{display:block;border-radius:6px;overflow:hidden;background:var(--panel);display:flex;flex-direction:column;margin:0}
.gallery-item img{display:block;max-width:100%;height:auto;border-radius:6px;border:1px solid rgba(0,0,0,0.06)}
.gallery-item .caption{padding:8px 6px 10px 6px;font-size:13px;color:var(--muted);background:transparent;min-height:36px}

/* helper classes when JS sets wide tiles */
.gallery-item.wide{grid-column:span 2}
.gallery-item.wider{grid-column:span 3}
/* span full row (used for bottom tile) */
.gallery-item.full{grid-column:span 4}

@media (max-width:640px){
  .gallery-grid{grid-template-columns:repeat(2,1fr);gap:6px}
  .gallery-item.wide, .gallery-item.wider{grid-column:span 1}
}
