/* This file controls how the site LOOKS. You rarely need to touch it.
   Easy things to change are marked EDIT. */

:root {
  --text: #1a1a1a;        /* EDIT: main text colour */
  --muted: #6b6b6b;       /* grey used for small text */
  --accent: #2f5d50;      /* EDIT: link colour */
  --background: #fdfcfa;  /* EDIT: page background */

  /* FONTS. The fonts themselves are loaded by a <link> line near the top of each page.
     Each list is "first choice, then backups if the first can't load". */
  --body-font: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;     /* EDIT: body text */
  --heading-font: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;     /* EDIT: headings */
}

body {
  margin: 0 auto;
  max-width: 640px;
  padding: 3rem 1.5rem;
  font-family: var(--body-font);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--background);
}

h1, h2, h3 {
  font-family: var(--heading-font);
  font-weight: 400;  /* "Regular" weight, as requested */
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

nav a {
  margin-right: 1.25rem;
  font-family: var(--body-font);
  font-size: 0.95rem;
}

a {
  color: var(--accent);
}

section {
  padding: 2.5rem 0;
  border-top: 1px solid #e6e3dd;
}

header {
  padding-bottom: 2rem;
}

.sayings li {
  margin-bottom: 0.5rem;
}

/* Placeholder text is shown in grey italics so you can spot what still needs
   writing. When you replace the text, also delete class="placeholder". */
.placeholder {
  color: var(--muted);
  font-style: italic;
}

footer {
  border-top: 1px solid #e6e3dd;
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- PHOTOS: MAC-STYLE FOLDER + FINDER WINDOW ---------- */
/* Uses the Mac's own system font (San Francisco on Apple devices; the closest
   system font elsewhere). Colours follow macOS dark mode. */
.mac {
  --mac-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --win: #1e1e1e;          /* file area */
  --side: #2a2a2c;         /* sidebar */
  --bar: #2c2c2e;          /* toolbar */
  --line: #3a3a3c;         /* hairlines */
  --edge: #000;            /* outer window edge */
  --label: #ebebf0;        /* main text */
  --label2: #98989d;       /* secondary text */
  --blue: #0a84ff;         /* selection + sidebar icons */
  font-family: var(--mac-font);
  font-size: 13px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  /* let the window be wider than the text column */
  width: min(900px, calc(100vw - 2rem));
  margin-left: calc(50% - min(450px, 50vw - 1rem));
}

/* Step 1: desktop with one folder */
.desk {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0 1rem;
}
.desk-folder, .file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.folder-svg { width: 96px; height: 77px; padding: 4px; border-radius: 6px; }
.desk-folder .fname { padding: 1px 6px; border-radius: 4px; font-weight: 500; }
.desk-folder.selected .folder-svg { background: rgba(0, 0, 0, 0.08); }
.desk-folder.selected .fname { background: var(--blue); color: #fff; }
.desk-hint { margin: 1.25rem 0 0; color: var(--muted); font-size: 12px; }
.desk-folder:focus-visible, .file:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* Step 2: the window */
.finder {
  display: grid;
  grid-template-columns: 190px 1fr;
  height: 540px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--win);
  color: var(--label);
  box-shadow: 0 0 0 0.5px var(--edge), inset 0 0 0 0.5px rgba(255,255,255,0.12), 0 22px 60px rgba(0,0,0,0.35);
}
.finder[hidden], .desk[hidden] { display: none; }

/* Traffic-light buttons */
.lights { display: flex; gap: 8px; }
.light {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 0; padding: 0;
  box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.25);
}
.light.red { background: #ff5f57; cursor: pointer; }
.light.yellow { background: #febc2e; }
.light.green { background: #28c840; }

/* Sidebar */
.sidebar {
  background: var(--side);
  border-right: 1px solid var(--edge);
  padding: 18px 10px;
  overflow-y: auto;
}
.sidebar .lights { margin: 0 0 22px 8px; }
.side-head {
  margin: 14px 0 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #6e6e73;
}
.side-list { display: block; margin: 0; }
.side-list a, .side-tags li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--label);
  text-decoration: none;
  font-weight: 400;
}
.side-list a:hover { background: rgba(255,255,255,0.05); }
.side-list a.current { background: rgba(255,255,255,0.1); font-weight: 400; }
.side-list svg {
  width: 17px; height: 17px;
  fill: none; stroke: var(--blue); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.side-tags { list-style: none; margin: 0; padding: 0; }
.side-tags i { width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 3px; }

/* Right-hand pane */
.pane { display: flex; flex-direction: column; min-width: 0; }
.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  padding: 0 14px;
  background: var(--bar);
}
.tb-btn {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border: 0; border-radius: 6px;
  background: none;
  cursor: default;
}
.tb-btn:hover { background: rgba(255,255,255,0.07); }
.tb-btn.off:hover { background: none; }
.tb-btn svg, .tb-icons svg {
  width: 18px; height: 18px;
  fill: none; stroke: var(--label2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.tb-btn.off svg { stroke: #545458; }
.tb-title { margin-left: 8px; font-size: 14px; font-weight: 700; color: var(--label); }
.tb-icons { margin-left: auto; display: flex; gap: 18px; }

.tabbar {
  height: 28px;
  display: grid; place-items: center;
  background: #333336;
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  font-size: 12px;
  font-weight: 500;
}

/* The photo icons */
.files {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, 112px);
  grid-auto-rows: max-content;
  gap: 18px 10px;
  padding: 20px 18px;
  overflow-y: auto;
  align-content: start;
}
.file { color: var(--label); }
.thumb {
  display: grid; place-items: center;
  width: 76px; height: 76px;
  padding: 4px;
  border-radius: 5px;
}
.thumb img {
  max-width: 64px; max-height: 64px;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
  pointer-events: none;
}
.file .fname {
  max-width: 108px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}
.file.selected .thumb { background: rgba(255,255,255,0.1); }
.file.selected .fname { background: var(--blue); color: #fff; }

/* Path bar + status bar along the bottom */
.pathbar {
  display: flex; align-items: center; gap: 5px;
  height: 26px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--label2);
}
.pathbar b { font-weight: 400; margin: 0 2px; }
.mini-folder { width: 15px; height: 12px; }
.statusbar {
  height: 24px;
  display: grid; place-items: center;
  background: var(--bar);
  border-top: 1px solid var(--edge);
  font-size: 11px;
  color: var(--label2);
}

/* Step 3: the photo preview window */
.preview {
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--win, #1e1e1e);
  max-width: min(90vw, 760px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  box-shadow: 0 0 0 0.5px #000, inset 0 0 0 0.5px rgba(255,255,255,0.12), 0 30px 80px rgba(0,0,0,0.5);
}
.preview::backdrop { background: rgba(0, 0, 0, 0.35); }
.preview-bar {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 38px;
  background: #2c2c2e;
  border-bottom: 1px solid #000;
  color: #ebebf0;
  font-size: 13px;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
}
.preview-bar .lights { position: absolute; left: 14px; display: flex; gap: 8px; }
.preview-img { display: block; max-width: 100%; max-height: 75vh; margin: 0 auto; }

/* Phones: hide the sidebar so the photos have room */
@media (max-width: 600px) {
  .finder { grid-template-columns: 1fr; height: 460px; }
  .sidebar { display: none; }
  .toolbar { padding-left: 10px; }
  .toolbar::before { content: ""; width: 52px; height: 12px; margin-right: 4px;
    background: radial-gradient(circle 6px at 6px 6px, #ff5f57 98%, transparent) 0 0 / 20px 12px no-repeat,
                radial-gradient(circle 6px at 6px 6px, #febc2e 98%, transparent) 20px 0 / 20px 12px no-repeat,
                radial-gradient(circle 6px at 6px 6px, #28c840 98%, transparent) 40px 0 / 20px 12px no-repeat; }
  .tb-icons { display: none; }
  .files { grid-template-columns: repeat(auto-fill, 96px); justify-content: center; }
}

/* ---------- SAFETYISMS (writing + work) ---------- */
h3 {
  font-size: 1rem;
  font-family: var(--body-font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 2rem 0 0.75rem;
}

.entry { margin-bottom: 1.25rem; }
.entry p { margin: 0.2rem 0 0; }
.entry-title { font-weight: bold; }
.entry-date {
  font-family: var(--body-font);
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 0.5rem;
}
.work-list li { margin-bottom: 0.4rem; }

/* A single post page */
.post .entry-date { margin: 0 0 2rem; display: block; }
.post h2 { margin-top: 2rem; }

/* ---------- NAVIGATION ---------- */
/* Your name at the top links home, but looks like a heading, not a link */
.site-name { color: inherit; text-decoration: none; }

/* The menu link for the page you're on is bold and not underlined */
nav a.current { font-weight: bold; text-decoration: none; color: var(--text); }

/* ---------- LONG TEXT (the About page) ---------- */
/* Keeps lines to about 65 characters, which is comfortable to read,
   and puts a clear gap between paragraphs. */
.prose {
  max-width: 34em;
}

.prose p {
  margin: 0 0 1.25em;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Links inside paragraphs: underline sits a little below the letters so it's easy to read */
.prose a {
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

/* ---------- EXPAND MARKERS (click a phrase to reveal more text) ---------- */
.expand {
  margin: 0 0 1.25em;
}

/* The clickable words */
.expand summary {
  display: inline;
  cursor: pointer;
  list-style: none;              /* hide the default triangle */
  color: var(--accent);
  border-bottom: 1px dashed var(--accent);  /* dashed = "click to open", different from a link */
}
.expand summary::-webkit-details-marker { display: none; }
.expand summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The hidden text, shown instantly below when clicked */
.expand-body {
  margin-top: 1.25em;
}
