/* Omar Soto - portfolio styles
   Plain CSS, no build step. Variables drive both themes. */

:root {
  --bg: #f6f7f9;
  --bg-elevated: #ffffff;
  --text: #12161c;
  --text-dim: #565f6b;
  --border: #e3e6eb;
  --accent: #0d9488;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --max-width: 880px;
}

[data-theme="dark"] {
  --bg: #0b0f14;
  --bg-elevated: #121822;
  --text: #e7eaf0;
  --text-dim: #93a0b0;
  --border: #223040;
  --accent: #2dd4bf;
}

* { box-sizing: border-box; }

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

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

/* Scroll reveal - applied only via JS (progressive enhancement), and
   only when the visitor hasn't asked to reduce motion. Content is
   fully visible by default with no JS or no support at all. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.05rem;
}

section p {
  color: var(--text-dim);
}

section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
  /* Clears the sticky header so an anchor jump doesn't tuck the
     heading underneath it. Keep in sync with the header's rendered height. */
  scroll-margin-top: 88px;
}

section:last-of-type {
  border-bottom: none;
}

#top {
  scroll-margin-top: 0;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.site-header nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-right: auto;
  font-size: 0.9rem;
}

.site-header nav a {
  text-decoration: none;
  color: var(--text-dim);
}

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

.controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}

.controls button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#theme-toggle .icon-sun,
#theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] #theme-toggle .icon-moon { display: block; }
[data-theme="dark"] #theme-toggle .icon-sun { display: block; }

/* Hero */

.hero {
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
}

.kicker {
  font-family: var(--font-mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin: 0 0 0.8rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin-bottom: 0.9rem;
}

.hero .lead {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--text-dim);
  margin: 0 0 0.9rem;
}

.hero .location {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

/* Timeline / experience */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

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

.period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.company {
  margin: 0.1rem 0 0.8rem;
  font-size: 0.9rem;
  color: var(--accent);
}

.section-intro {
  max-width: 60ch;
  margin: -0.5rem 0 2.2rem;
  font-size: 0.95rem;
}

/* Work entries, grouped under each role - a plain numbered list,
   not a card grid. Hairlines match the section dividers elsewhere. */

.work-list {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.work-entry {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.work-entry:last-child {
  border-bottom: none;
}

.work-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-top: 0.15rem;
}

.work-entry-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.work-entry-head h4 {
  margin: 0;
  font-size: 1rem;
}

.work-domain {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.work-entry p {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  max-width: 58ch;
}

.work-entry p:last-child {
  margin-bottom: 0;
}

.work-stack {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Tag chips - used for tech stacks and skill lists */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

/* Skills */

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

.skill-cat h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* Background - education, recognition, languages as a compact
   fact list rather than another row of cards. */

.facts {
  margin: 0;
  border-top: 1px solid var(--border);
}

.facts > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.facts dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.facts dd {
  margin: 0;
  color: var(--text);
}

.recognition-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

@media (max-width: 560px) {
  .facts > div {
    grid-template-columns: 1fr;
  }
}

/* Footer */

footer {
  padding: 2.5rem 0 3rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text);
}

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

footer .copyright {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .site-header nav {
    order: 3;
    width: 100%;
    gap: 0.9rem;
  }
  .site-header .wrap {
    flex-wrap: wrap;
  }
  footer .copyright {
    margin-left: 0;
    width: 100%;
  }
}
