/* canersaka.dev — early-2000s plain stylesheet.
   Colors come from the [data-theme] blocks at the bottom; "Classic" is the default. */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #555555;
  --link: #0000ee;
  --visited: #551a8b;
  --rule: #808080;
  --btn-bg: #e8e8e8;
  --btn-fg: #000000;
  --btn-light: #ffffff;
  --btn-dark: #808080;
  --box: #f4f4f4;
  --font: Verdana, Geneva, Tahoma, sans-serif;
}

html { background: var(--bg); }
body {
  margin: 0;
  padding: 16px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}
.page { max-width: 1120px; margin: 0 auto; }

h1 { font-size: 30px; margin: 10px 0 4px; }
h2 { font-size: 20px; margin: 24px 0 8px; }
h3 { font-size: 17px; margin: 18px 0 4px; }
p { margin: 8px 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 18px 0; }
ul, ol { margin: 6px 0 10px; padding-left: 24px; }
li { margin: 3px 0; }
code { font-family: "Courier New", Courier, monospace; font-size: 0.95em; }
pre { background: var(--box); border: 1px solid var(--rule); padding: 8px; overflow-x: auto; font-size: 13px; }
blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--rule); color: var(--muted); }
img, video { max-width: 100%; height: auto; }
a { color: var(--link); }
a:visited { color: var(--visited); }

.nav { font-size: 14px; }
.tagline { font-size: 16px; margin-top: 0; }
.meta, .small, .caption, .footer, .tags { color: var(--muted); font-size: 13px; }
.meta { margin: 0 0 6px; }
.course { margin: 0 0 4px; font-size: 13px; font-weight: bold; }
.tags { margin: 0 0 8px; }

table.info { border-collapse: collapse; font-size: 14px; margin: 8px 0; }
table.info th { text-align: left; padding: 2px 16px 2px 0; vertical-align: top; white-space: nowrap; font-weight: bold; }
table.info td { padding: 2px 0; vertical-align: top; }

.project { margin: 14px 0; }
.project h3 { font-size: 19px; margin-top: 0; }
.buttons { margin: 10px 0; }

/* classic bevelled buttons */
.btn {
  display: inline-block;
  padding: 3px 10px;
  margin: 2px 4px 2px 0;
  font: inherit;
  font-size: 14px;
  color: var(--btn-fg) !important;
  background: var(--btn-bg);
  border: 2px solid;
  border-color: var(--btn-light) var(--btn-dark) var(--btn-dark) var(--btn-light);
  text-decoration: none;
}
.btn:hover { text-decoration: underline; }
.btn:active { border-color: var(--btn-dark) var(--btn-light) var(--btn-light) var(--btn-dark); }
.btn-primary { font-weight: bold; }

/* proof: video / image area under a project */
.proof { margin: 10px 0 4px; }
.proof img { border: 1px solid var(--rule); background: var(--box); }
.video { position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; border: 1px solid var(--rule); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.proof video { max-width: 640px; border: 1px solid var(--rule); background: #000; }
.caption { margin: 4px 0 0; }

/* color picker, pinned to the corner */
.theme-box {
  position: fixed; top: 8px; right: 8px;
  font-size: 12px; color: var(--muted);
  background: var(--bg); padding: 4px 6px; border: 1px solid var(--rule);
}
.theme-box select { font: inherit; font-size: 12px; color: var(--fg); background: var(--btn-bg); border: 1px solid var(--rule); }

@media (max-width: 600px) {
  body { padding: 12px; font-size: 15px; }
  h1 { font-size: 26px; }
  .theme-box { position: static; display: inline-block; margin-bottom: 8px; }
  table.info th { white-space: normal; padding-right: 10px; }
}

/* ---------------- color schemes ---------------- */
[data-theme="paper"] {
  --bg: #f6f1e4; --fg: #2b2416; --muted: #6b6253; --link: #8a3b12; --visited: #5f3b2a;
  --rule: #b9ad97; --btn-bg: #ebe3d1; --btn-fg: #2b2416; --btn-light: #fffaf0; --btn-dark: #9c8f78; --box: #efe8d8;
  --font: Georgia, "Times New Roman", Times, serif;
}
[data-theme="gray"] {
  --bg: #c0c0c0; --fg: #000000; --muted: #333333; --link: #000080; --visited: #400040;
  --rule: #808080; --btn-bg: #c0c0c0; --btn-fg: #000000; --btn-light: #ffffff; --btn-dark: #404040; --box: #d4d4d4;
  --font: Tahoma, "MS Sans Serif", Arial, sans-serif;
}
[data-theme="night"] {
  --bg: #15171c; --fg: #e4e4e4; --muted: #9a9a9a; --link: #8ab4f8; --visited: #c58af9;
  --rule: #4a4d55; --btn-bg: #2c2f36; --btn-fg: #e4e4e4; --btn-light: #5a5e68; --btn-dark: #0b0c0f; --box: #1f2227;
}
[data-theme="terminal"] {
  --bg: #000000; --fg: #33ff33; --muted: #1fae1f; --link: #7fff7f; --visited: #33cc33;
  --rule: #1f6f1f; --btn-bg: #042604; --btn-fg: #33ff33; --btn-light: #2f8f2f; --btn-dark: #0a3a0a; --box: #041604;
  --font: "Courier New", Courier, monospace;
}
[data-theme="blue"] {
  --bg: #e8f0fb; --fg: #0a1a33; --muted: #4a5a73; --link: #0033cc; --visited: #551a8b;
  --rule: #7a93b8; --btn-bg: #d6e2f5; --btn-fg: #0a1a33; --btn-light: #ffffff; --btn-dark: #6d84a8; --box: #dbe6f7;
}

/* ---------------- tile layout (/tiles/) ---------------- */
.theme-box .layout-switch { margin-right: 10px; padding-right: 10px; border-right: 1px solid var(--rule); }
.theme-box .layout-switch b { color: var(--fg); }
body:has(.tiles) .page { max-width: 1240px; }
.compact-head h1 { margin: 0 0 2px; font-size: 26px; }
.compact-head .tagline { margin: 0 0 4px; font-size: 14px; }
.compact-head .small { margin: 0 0 12px; }
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}
.tile {
  border: 1px solid var(--rule);
  background: var(--box);
  padding: 8px;
  display: flex; flex-direction: column;
  font-size: 13px;
}
.tile h3 { font-size: 15px; margin: 6px 0 2px; line-height: 1.25; }
.tile .meta { margin: 0 0 4px; font-size: 12px; }
.tile .thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--rule); background: var(--bg); }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-blank { width: 100%; height: 100%; display: grid; place-items: center; font-weight: bold; font-size: 15px; color: var(--muted); letter-spacing: 1px; text-align: center; padding: 6px; box-sizing: border-box; }
.tile-short {
  margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tile .buttons { margin: 8px 0 0; }
.tile .btn { font-size: 12px; padding: 2px 8px; }

@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-height: 820px) and (min-width: 900px) {
  .tile .thumb { aspect-ratio: 2.4 / 1; }
  .tile-short { -webkit-line-clamp: 2; }
}

/* ---------------- list layout: media beside the text ---------------- */
.project { display: grid; grid-template-columns: minmax(0, 1fr) 380px 150px; gap: 24px; align-items: start; }
.tools { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.tools b { color: var(--fg); }
/* tools column: plain text, quiet */
.project-tools { font-size: 13px; padding-top: 4px; }
.project-tools .tools-label { margin: 0 0 2px; font-weight: bold; }
.project-tools .tools-text { margin: 0; color: var(--muted); line-height: 1.5; }
.project-text > h3 { margin-top: 0; }
.project-media .proof { margin: 0; }
.project-media .video, .project-media video, .project-media img { width: 100%; max-width: none; }
.project-media video { aspect-ratio: 16 / 9; object-fit: cover; }
.media-placeholder {
  aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 8px;
  border: 1px dashed var(--rule); color: var(--muted); font-size: 12px; background: var(--box);
}
@media (max-width: 1000px) {
  .project { grid-template-columns: minmax(0, 1fr) 320px; }
  .project-tools { grid-column: 1 / -1; display: flex; gap: 8px; }
  .project-tools .tools-label::after { content: ":"; }
}
@media (max-width: 800px) {
  .project { grid-template-columns: 1fr; }
  .project-media { max-width: 420px; }
}
