/* =============================================================================
   site.css — dark theme for simonhansedasi.github.io
   Colors from the original minimal-mistakes dark skin
   ============================================================================= */

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables */
:root {
  --bg:            #252a34;
  --bg-alt:        #1d2130;
  --bg-code:       #1a1e2a;
  --text:          #eaeaea;
  --text-muted:    #9aa0aa;
  --accent:        #8cd2d5;
  --accent-hover:  #a8dfe2;
  --border:        #3a3f4e;
  --sidebar-width: 280px;
  --nav-height:    60px;
  --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --mono:          "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --max-width:     1180px;
}

/* Base */
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  color: var(--text);
}
h1 { font-size: 1.9em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; }
h4 { font-size: 1.05em; }

p {
  margin-bottom: 1em;
}

ul, ol {
  margin-bottom: 1em;
  padding-left: 1.8em;
}
li { margin-bottom: 0.3em; }

strong { font-weight: 600; }
em     { font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.5em 1em;
  margin: 1.5em 0;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-radius: 0 4px 4px 0;
}

/* Code */
code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-code);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.1em 1.3em;
  overflow-x: auto;
  margin-bottom: 1.4em;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875em;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4em;
  font-size: 0.95em;
}
th, td {
  padding: 0.5em 0.75em;
  border: 1px solid var(--border);
  text-align: left;
}
th {
  background: var(--bg-alt);
  font-weight: 600;
}
tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

/* =============================================================================
   Masthead / Navigation
   ============================================================================= */

.masthead {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 200;
}

.masthead-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5em;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 1.15em;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.4em;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.95em;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  text-decoration: none;
}

/* =============================================================================
   Page layout: sidebar + content
   ============================================================================= */

.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5em 1.5em 3em;
  display: flex;
  gap: 2.5em;
  align-items: flex-start;
}

/* =============================================================================
   Sidebar / Author profile
   ============================================================================= */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-height) + 1.5em);
}

.author-profile {
  text-align: center;
  padding: 1em 0;
}

.author-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--border);
  object-fit: cover;
  margin: 0 auto 0.9em;
  display: block;
}

.author-name {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5em;
}

.author-bio {
  font-size: 0.875em;
  color: var(--text-muted);
  margin-bottom: 0.75em;
  line-height: 1.55;
}

.author-location {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-bottom: 1em;
}
.author-location i {
  margin-right: 0.3em;
  color: var(--accent);
  font-size: 0.9em;
}

.author-links {
  display: flex;
  justify-content: center;
  gap: 1.1em;
}
.author-links a {
  color: var(--text-muted);
  font-size: 1.25em;
  transition: color 0.15s ease;
}
.author-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* =============================================================================
   Main content
   ============================================================================= */

.page-content {
  flex: 1;
  min-width: 0;
}

.page-title {
  font-size: 1.8em;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4em;
  margin-top: 0;
  margin-bottom: 1.2em;
}

/* Archive / collection index lists */
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive-list li {
  padding: 0.6em 0;
  border-bottom: 1px solid var(--border);
}
.archive-list li:last-child {
  border-bottom: none;
}
.archive-list a {
  font-size: 1.05em;
  font-weight: 500;
}

/* =============================================================================
   Art page
   ============================================================================= */

.random-haiku,
.random-image {
  margin-bottom: 1.5em;
}

.random-haiku h2,
.random-image h2 {
  margin-top: 0;
  color: var(--accent);
}

#haiku-container,
#image-container {
  margin-top: 1em;
}

#image-container img {
  border-radius: 4px;
  border: 1px solid var(--border);
  max-width: 100%;
}

/* =============================================================================
   CV / content sections
   ============================================================================= */

.page-body h2 {
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3em;
}

/* =============================================================================
   Footer
   ============================================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5em;
  color: var(--text-muted);
  font-size: 0.875em;
}

/* =============================================================================
   Syntax highlighting (rouge)
   ============================================================================= */

.highlight { background: var(--bg-code); border-radius: 5px; }
.highlight .c,  .highlight .cm, .highlight .c1 { color: #6a7a8a; font-style: italic; } /* comments */
.highlight .k,  .highlight .kd, .highlight .kn { color: #cc99cd; font-weight: bold;  } /* keywords */
.highlight .s,  .highlight .s1, .highlight .s2 { color: #7ec699; }                     /* strings */
.highlight .n,  .highlight .nx              { color: var(--text); }                     /* names */
.highlight .nb                              { color: #79b6f2; }                         /* builtins */
.highlight .nf, .highlight .fm             { color: #f08d49; }                         /* functions */
.highlight .o,  .highlight .ow             { color: var(--text-muted); }               /* operators */
.highlight .mi, .highlight .mf             { color: #f08d49; }                         /* numbers */
.highlight .p                              { color: var(--text-muted); }               /* punctuation */

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 768px) {
  .page-wrapper {
    flex-direction: column;
    gap: 1.5em;
    padding: 1.5em 1em 2em;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .author-profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.1em;
    padding: 0;
  }

  .author-avatar {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    margin: 0;
  }

  .author-links {
    justify-content: flex-start;
  }

  .site-nav {
    gap: 0.9em;
  }

  .page-title {
    font-size: 1.5em;
  }
}

@media (max-width: 480px) {
  .masthead-inner {
    flex-direction: column;
    height: auto;
    padding: 0.75em 1em;
    gap: 0.5em;
  }

  .masthead {
    height: auto;
    position: static;
  }

  :root {
    --nav-height: 0px;
  }
}
