/* ---------------------------------------------------------
   rahmedovdamir.ru — minimal hand-built stylesheet
--------------------------------------------------------- */

:root {
  --bg: #212529;
  --fg: #f5f2ea;
  --muted: #b6ac9a;
  --faint: #7d7566;
  --accent: #e8964a;
  --accent2: #6fb3a3;
  --border: rgba(245, 242, 234, 0.12);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 38em;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--fg);
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

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

/* ---------- header / nav ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-bottom: 1.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--fg);
}

.logo:hover {
  color: var(--fg);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
}

.site-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover {
  color: var(--fg);
}

.site-nav a.is-active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

/* ---------- main ---------- */

main {
  flex: 1;
  text-align: left;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: 1.9rem;
}

h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
  color: var(--fg);
}

.muted {
  color: var(--muted);
}

.lede {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 34em;
}

.tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent2);
}

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

/* ---------- footer ---------- */

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer a {
  color: var(--faint);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---------- home: journal ---------- */

.journal {
  list-style: none;
  margin: 0;
  padding: 0;
}

.journal li {
  display: flex;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.journal li:last-child {
  border-bottom: none;
}

.journal time {
  flex: none;
  width: 6.5em;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent2);
  padding-top: 0.15rem;
}

.journal span {
  color: var(--fg);
}

/* ---------- links page ---------- */

.linklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.linklist li {
  border-bottom: 1px solid var(--border);
}

.linklist li:last-child {
  border-bottom: none;
}

.linklist a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.1rem;
  text-decoration: none;
  color: var(--fg);
}

.linklist a:hover {
  color: var(--accent);
}

.linklist a:hover .arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.linklist .label {
  font-size: 1.02rem;
}

.linklist .label small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.linklist .url {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--faint);
  white-space: nowrap;
}

.arrow {
  transition: transform 0.15s ease;
  color: var(--faint);
}

/* ---------- goals page ---------- */

.year-block {
  margin-bottom: 2.25rem;
}

.year-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.year-heading .status {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent2);
  text-transform: lowercase;
}

.goal-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.goal-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.4rem 0;
}

.goal-list input[type="checkbox"] {
  margin-top: 0.35rem;
  accent-color: var(--accent);
}

.goal-list label {
  color: var(--fg);
}

.goal-list input:checked + label {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--faint);
}

.placeholder {
  color: var(--faint);
  font-style: italic;
  font-size: 0.95rem;
  border: 1px dashed var(--border);
  padding: 0.85rem 1rem;
  border-radius: 2px;
}

/* ---------- resume page ---------- */

.resume-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.resume-head .role {
  color: var(--muted);
  margin: 0.15rem 0 0;
}

.download-link {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  white-space: nowrap;
}

.download-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-line {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.contact-line a {
  color: var(--muted);
}

.contact-line a:hover {
  color: var(--accent);
}

section.resume-section {
  margin-bottom: 1.75rem;
}

.skill-row {
  margin-bottom: 0.6rem;
}

.skill-row .label {
  color: var(--muted);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.15rem;
}

.project {
  margin-bottom: 1.25rem;
}

.project h3 {
  margin-bottom: 0.25rem;
}

.project .stack {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  display: block;
  margin-bottom: 0.4rem;
}

.plain-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.plain-list li {
  margin-bottom: 0.35rem;
}

/* ---------- mobile ---------- */

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 1.75rem 1.1rem 2.25rem;
  }

  .site-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
  }

  .site-nav {
    gap: 0.9rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.15rem;
    margin-top: 2rem;
  }

  .resume-head {
    gap: 0.6rem;
  }

  .contact-line {
    line-height: 1.7;
  }

  .journal li {
    flex-direction: column;
    gap: 0.15rem;
  }

  .journal time {
    width: auto;
  }
}

@media (max-width: 480px) {
  .linklist a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .linklist .url {
    white-space: normal;
    word-break: break-word;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.35rem;
  }
}
