/* Editorial Minimal — abadeanlou.github.io */

:root {
  --bg: #faf8f5;
  --card: #ffffff;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --accent: #8a6d3b;
  --border: #e8e2d9;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Verdana, Geneva, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #201d19;
  --card: #2a2622;
  --ink: #e8e2d9;
  --muted: #a89f92;
  --faint: #7d766c;
  --accent: #c9a05e;
  --border: #3a352e;
  color-scheme: dark;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  transition: background-color 0.3s, color 0.3s;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 4rem;
  padding: 0 2rem;
}

/* ---------- Sidebar ---------- */

.sidebar-inner {
  position: sticky;
  top: 0;
  padding: 4rem 0;
  max-height: 100vh;
  overflow-y: auto;
}

.theme-switch {
  display: inline-flex;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 0.68rem;
}

.theme-switch button {
  font: inherit;
  border: none;
  background: transparent;
  color: var(--faint);
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.theme-switch button.on {
  background: var(--accent);
  color: var(--bg);
}

h1 {
  font-size: 2.2rem;
  font-weight: normal;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.tagline {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.tagline-sub {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.location {
  font-size: 0.9rem;
  color: var(--faint);
  margin-top: 1rem;
}

.site-nav {
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-link {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--faint);
  padding-left: 0;
  border-left: 2px solid transparent;
  transition: color 0.2s, padding-left 0.2s, border-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  padding-left: 0.6rem;
  border-left: 2px solid var(--accent);
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.social a {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

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

.languages {
  font-size: 0.82rem;
  color: var(--faint);
  margin-top: 1.5rem;
  font-style: italic;
}

/* ---------- Content ---------- */

.content {
  padding: 4rem 0;
}

section {
  margin-bottom: 4.5rem;
}

h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: normal;
}

#about p + p {
  margin-top: 1rem;
}

/* Experience */

.job {
  margin-bottom: 2.5rem;
}

.job-meta,
.pub-meta,
.edu-meta,
.project-org {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.25rem 0 0.75rem;
}

.dates {
  color: var(--accent);
  white-space: nowrap;
}

.job ul {
  list-style: none;
}

.job li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.job li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Projects */

.project-grid {
  display: grid;
  gap: 1.25rem;
}

.project {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
}

.project p {
  font-size: 0.95rem;
}

.tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags span,
.skill-group dd span {
  font-family: var(--sans);
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.15rem 0.65rem;
  background: var(--bg);
}

.project-org a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

/* Publications */

.publication {
  margin-bottom: 2rem;
}

.publication h3 a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

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

.publication > p:last-child {
  font-size: 0.95rem;
}

/* Skills */

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.skill-group dt {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.skill-group dd {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Education & honors */

.edu {
  margin-bottom: 1.5rem;
}

.honors {
  list-style: none;
  margin-top: 2rem;
  border-top: 1px dashed var(--border);
  padding-top: 1.5rem;
}

.honors li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.honors li::before {
  content: "★";
  position: absolute;
  left: 0;
  font-size: 0.7rem;
  top: 0.35rem;
  color: var(--accent);
}

/* Certifications */

.certs {
  list-style: none;
}

.certs li {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.certs a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

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

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--faint);
}

/* ---------- Mobile ---------- */

@media (max-width: 820px) {
  .page {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 1.25rem;
  }

  .sidebar-inner {
    position: static;
    max-height: none;
    padding: 3rem 0 0;
  }

  .site-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    margin: 1.5rem 0;
  }

  .nav-link:hover,
  .nav-link.active {
    padding-left: 0;
    border-left: none;
  }

  .content {
    padding: 2.5rem 0;
  }

  section {
    margin-bottom: 3rem;
  }
}

/* ---------- Print ---------- */

@media print {
  :root,
  [data-theme="dark"] {
    --bg: #ffffff;
    --card: #ffffff;
    --ink: #000000;
    --muted: #333333;
    --faint: #555555;
    --accent: #000000;
    --border: #bbbbbb;
  }

  body {
    background: #ffffff;
    font-size: 11pt;
    line-height: 1.5;
  }

  .theme-switch,
  .site-nav,
  footer {
    display: none !important;
  }

  .page {
    display: block;
    max-width: 100%;
    padding: 0;
  }

  .sidebar-inner {
    position: static;
    max-height: none;
    padding: 0 0 0.75rem;
    border-bottom: 2px solid #000;
    margin-bottom: 1.25rem;
    overflow: visible;
  }

  h1 {
    font-size: 1.9rem;
  }

  h1 br {
    display: none;
  }

  .content {
    padding: 0;
  }

  section {
    margin-bottom: 1.75rem;
  }

  .job,
  .publication,
  .project,
  .edu,
  .skill-group {
    break-inside: avoid;
  }

  .publication h3 a::after {
    content: " — " attr(href);
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.7rem;
    color: #333;
    border: none;
  }

  .social a::after {
    content: " (" attr(href) ")";
    font-size: 0.7rem;
    color: #555;
  }

  .social {
    gap: 0.5rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .project {
    border: none;
    padding: 0 0 0.5rem;
  }

  .tags span,
  .skill-group dd span {
    border-color: #999;
  }
}
