/* gorusys.dev — terminal-docs, clean editorial, dark default */

:root {
  --bg: #1a1a1a;
  --fg: #e0e0e0;
  --muted: #888;
  --border: #333;
  --accent: #7eb8da;
  --accent-hover: #9cd0f0;
  --link: #7eb8da;
  --link-visited: #b8a0d0;
  --code-bg: #252525;
  --focus-ring: #7eb8da;
}

[data-theme="light"] {
  --bg: #f5f5f0;
  --fg: #222;
  --muted: #555;
  --border: #ccc;
  --accent: #2a6fa5;
  --accent-hover: #1a5a8a;
  --link: #2a6fa5;
  --link-visited: #5a3a85;
  --code-bg: #e8e8e0;
  --focus-ring: #2a6fa5;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", "Fira Code", "Consolas", monospace;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  margin: 0;
  padding: 1rem;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  top: -2.5rem;
  left: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--accent);
  color: var(--bg);
  z-index: 100;
  text-decoration: none;
  border: 1px solid var(--border);
}
.skip-link:focus {
  top: 0.5rem;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.content {
  max-width: 900px;
  margin: 0 auto;
}

/* Header */
.site-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.site-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.02em;
}

.tagline {
  margin: 0 0 0.75rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.main-nav {
  font-size: 0.85rem;
}

.main-nav a {
  color: var(--link);
  text-decoration: none;
}

.main-nav a:hover {
  text-decoration: underline;
}

.main-nav a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.nav-sep {
  color: var(--muted);
  margin: 0 0.35rem;
}

.theme-toggle {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--code-bg);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  border-radius: 2px;
}

.theme-toggle:hover {
  background: var(--border);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Sections */
.section {
  margin-bottom: 2.5rem;
}

.section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
}

.section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: var(--muted);
}

.section p,
.timeline-list {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
}

.section-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.section code {
  background: var(--code-bg);
  padding: 0.1rem 0.3rem;
  font-size: 0.85em;
  border: 1px solid var(--border);
}

/* Timeline */
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-list li {
  margin-bottom: 0.6rem;
  padding-left: 0;
}

.timeline-list li::before {
  content: "— ";
  color: var(--muted);
}

/* Projects */
.projects-container {
  margin-top: 0.5rem;
}

.project-phase {
  margin-bottom: 1.5rem;
}

.project-phase h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem 0;
  color: var(--muted);
}

.project-card {
  margin-bottom: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.project-card:last-child {
  border-bottom: none;
}

.project-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.project-name a {
  color: var(--link);
  text-decoration: none;
}

.project-name a:hover {
  text-decoration: underline;
}

.project-name a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.project-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.2rem 0 0.25rem 0;
}

.project-summary {
  font-size: 0.85rem;
  margin: 0.25rem 0 0.35rem 0;
}

.project-tags {
  font-size: 0.75rem;
  color: var(--muted);
}

.project-tags span {
  margin-right: 0.5rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  font-size: 0.9rem;
}

.skill-cat p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

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

/* Contact */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 0.4rem;
}

.contact-list a {
  color: var(--link);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

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

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0.25rem 0;
}

.footer-tagline {
  font-style: italic;
}

/* Links global */
a {
  color: var(--link);
}

a:visited {
  color: var(--link-visited);
}

/* Print */
@media print {
  body {
    background: #fff;
    color: #111;
    padding: 0.5rem;
  }

  .skip-link,
  .theme-toggle,
  .main-nav {
    display: none !important;
  }

  .site-header {
    border-bottom-color: #333;
  }

  .content {
    max-width: 100%;
  }

  .section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: #111;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #444;
  }

  .project-phase,
  .project-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .skills-grid {
    gap: 0.5rem 1rem;
  }
}
