@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:          #0f0e0c;
  --bg-raise:    #1a1916;
  --bg-card:     #1e1d1a;
  --text:        #e4d9c4;
  --text-muted:  #6a6050;
  --text-dim:    #4a4438;
  --gold:        #c9a84c;
  --gold-bright: #dfc070;
  --border:      #252318;
  --border-dim:  #1c1b16;
  --code-bg:     #181714;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ────────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 100vh;
  max-width: 1060px;
  margin: 0 auto;
}

.sidebar {
  padding: 2.5rem 1.5rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

main {
  padding: 2.5rem 3rem 4rem;
  min-width: 0;
}

/* ── Sidebar: site title ───────────────────────── */

header { margin-bottom: 2rem; }

a.site-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: block;
}

a.site-title:hover { color: var(--gold-bright); }

/* ── Sidebar: nav ──────────────────────────────── */

nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  padding: 0.25rem 0;
  transition: color 0.1s;
}

nav a::before {
  content: '> ';
  color: var(--text-dim);
}

nav a:hover { color: var(--text); }
nav a:hover::before { color: var(--gold); }

/* ── Sidebar: footer ───────────────────────────── */

footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  margin-bottom: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  transition: color 0.1s;
}

footer a:hover { color: var(--gold); }
footer p { margin: 0.6rem 0 0; font-size: 0.72rem; }

/* ── Typography ────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

h1 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-top: 0; color: var(--gold); }
h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); }
h3 { font-size: 1rem; color: var(--text); }

p { margin: 0.85rem 0; }

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

a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold) 35%, transparent);
  text-underline-offset: 3px;
}

a:hover { color: var(--gold-bright); }

/* ── Experience entries ────────────────────────── */

.entry {
  margin: 1.5rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.15s;
}

.entry:hover { border-color: var(--gold); }

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.entry-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.entry-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.entry-org {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.entry ul {
  margin: 0;
  padding-left: 1.2rem;
}

.entry li {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0.25rem 0;
  line-height: 1.5;
}

/* ── Entry extras ──────────────────────────────── */

.entry-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.entry-desc {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0.4rem 0 0;
  line-height: 1.6;
}

/* ── Button ────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 0.45em 1em;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  border-radius: 3px;
  letter-spacing: 0.04em;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ── Competitions list ─────────────────────────── */

.comp-list {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comp-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.88rem;
}

.comp-name { color: var(--text); }

.comp-place {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comp-place.gold { color: var(--gold); }

.comp-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ── Skills ────────────────────────────────────── */

.skills {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.88rem;
}

.skill-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--gold);
  margin-right: 0.6rem;
}

/* ── Intro (index) ─────────────────────────────── */

.intro {
  display: flex;
  gap: 1.8rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.portrait {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Currently (index) ─────────────────────────── */

.currently {
  position: relative;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.currently-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.8rem;
}

.currently p { margin: 0.5rem 0; font-size: 0.9rem; }
.currently p:first-of-type { margin-top: 0; }

/* ── Competition / project tags ────────────────── */

.tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 0.15em 0.55em;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--gold);
  margin-right: 0.3rem;
}

/* ── Lists ─────────────────────────────────────── */

ul, ol { padding-left: 1.4rem; }
li { margin: 0.3rem 0; }

/* ── Blockquote ────────────────────────────────── */

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
  color: var(--text-muted);
  font-style: italic;
}

/* ── Code ──────────────────────────────────────── */

code, pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: var(--code-bg);
  border-radius: 3px;
}

code { padding: 0.1em 0.4em; }

pre {
  padding: 1rem 1.2rem;
  overflow-x: auto;
  border-left: 2px solid var(--gold);
  border-radius: 0;
}

pre code { background: none; padding: 0; }

/* ── Blog post article header ──────────────────── */

article > header {
  border-right: none;
  padding: 0;
  position: static;
  height: auto;
  margin-bottom: 1.5rem;
}

article > header p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0.2rem 0 0;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Mobile ────────────────────────────────────── */

@media (max-width: 640px) {
  .layout { grid-template-columns: 1fr; }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 1.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  header { margin-bottom: 0; }

  nav {
    flex-direction: row;
    flex: none;
    gap: 0.75rem;
  }

  nav a::before { content: ''; }

  footer {
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  footer a { display: inline; margin: 0; }
  footer p { width: 100%; margin-top: 0.25rem; }

  main { padding: 1.5rem; }

  .intro { flex-direction: column; gap: 1rem; }
  .portrait { width: 100px; height: 100px; }
  .comp-row { grid-template-columns: 1fr; gap: 0.2rem; }
}
