/* ==========================================================================
   carlosmart.co — custom styles on top of Semantic UI.
   Ported from the original django-cms site (base_profile.html /
   base_page.html inline styles), with all assets served from this repo
   instead of S3.
   ========================================================================== */

/* Self-hosted fonts (latin WOFF2). Body: IBM Plex Sans. Mono: Cascadia Code.
   Montserrat (display) still loads from Google Fonts in base.html. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Cascadia Code"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/cascadia-code-400.woff2") format("woff2"); }
@font-face { font-family: "Cascadia Code"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/cascadia-code-700.woff2") format("woff2"); }

body {
  background-color: #FFFFFF;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
}

h2, h3 {
  font-family: "Montserrat", 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.75rem;
}

code {
  font-family: "Cascadia Code", Menlo, Consolas, Monaco, "Liberation Mono", monospace;
}

p code {
  background: #282a36;
  color: #ececec;
  vertical-align: middle;
  white-space: pre-wrap;
  font-size: 0.8em;
  line-height: 1em;
  border-radius: 4px;
  border: 1px solid #303030;
  padding: 0.2rem 0.3rem 0.1rem;
}

/* Code blocks. Pygments wraps output in .highlight (with the dracula
   background inline); style that container so the rounded corners clip the
   inner <pre> cleanly. Plain <pre> (no highlighting) gets the same treatment. */
.highlight,
pre {
  font-family: "Cascadia Code", Menlo, Consolas, monospace;
  background: #282a36;
  color: #ececec;
  border-radius: 10px;
  padding: 1.25em 1.4em;
  overflow-x: auto;
  margin: 1.6em 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
  line-height: 1.55;
}

.highlight pre {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-size: inherit;
}

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

.ui.footer.segment {
  margin: 5em 0em 0em;
  padding: 5em 0em;
}

.pusher {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.pusher > .ui.footer.segment {
  margin-top: auto;
}

.cms-content {
  padding-bottom: 4em;
}

.hidden.menu {
  display: none;
}

/* masthead + footer share the code-editor background image.
   Evolution: a dark overlay keeps the code texture but makes the name,
   role and nav readable without the old text-shadow hacks. */
.ui.primary.inverted.segment {
  background-image:
    linear-gradient(rgba(20, 22, 26, 0.45), rgba(20, 22, 26, 0.6)),
    url("../img/index-bg.jpg") !important;
  background-position: center center;
}

.masthead--home {
  min-height: 650px;
  display: flex;
  flex-direction: column;
}

/* nav stays at the top; the name/photo row centers in the rest */
.masthead--home .profile-masterhead {
  flex: 1;
  align-items: center;
  justify-content: space-between;
}

.ui.footer.inverted.segment {
  background-image:
    linear-gradient(rgba(20, 22, 26, 0.55), rgba(20, 22, 26, 0.55)),
    url("../img/index-bg.jpg") !important;
  background-position: 20% 20%;
}

.logo {
  margin-left: 10px;
  margin-right: 10px;
  width: 50px;
  height: 50px;
}

hr {
  margin-top: 50px;
  margin-bottom: 50px;
  color: #ccc;
}

.social-links {
  color: #ccc;
}

.social-links:hover {
  color: #fff;
}

.footer-social .item .icon {
  font-size: 2rem;
}

/* contact cards: one icon set (Semantic brand icons), identical
   structure so every card is the same height, whole card clickable */
.contact-card {
  display: block;
  text-align: center;
  padding: 2em 1em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.contact-card i.icon {
  font-size: 3.5em;
  line-height: 1;
  margin: 0;
}

.contact-card__name {
  color: rgba(0, 0, 0, 0.87);
  margin: 0.8em 0 0.2em;
}

.contact-card__handle {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.9em;
  margin: 0;
}

i.icon.brand-linkedin { color: #0A66C2; }
i.icon.brand-github { color: #24292E; }
i.icon.brand-instagram { color: #E4405F; }
i.icon.brand-unsplash { color: #111111; }
i.icon.brand-twitter { color: #1DA1F2; }

/* --------------------------------------------------------------------------
   masthead: big name + circular profile photo + typed text
   -------------------------------------------------------------------------- */

.profile-image {
  max-width: 50%;
}

.profile-masterhead {
  display: flex !important;
  flex-direction: row;
  justify-content: space-around;
}

.featured-name {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(3.25rem, 7vw, 5rem);
  letter-spacing: -4px;
  line-height: 1.05;
  font-weight: 800 !important;
  display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: left;
  margin-bottom: 0.5rem;
}

.featured-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 50%;
}

.featured-role {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}

.featured-actions .ui.button {
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
}

/* inner pages: same masthead, shorter, title only */
.profile-masterhead--page {
  justify-content: left;
  padding: 4rem 0 4rem 0;
}

/* --------------------------------------------------------------------------
   navigation (masthead nav + fixed secondary nav revealed on scroll)
   -------------------------------------------------------------------------- */

.masterhead-nav a,
.secondary-nav a {
  display: flex;
  align-items: center;
  position: relative;
  vertical-align: middle;
  line-height: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
  user-select: none;
  background: none;
  padding: 0.92857143em 1.14285714em;
  text-transform: none;
  font-weight: normal;
  transition: background 0.1s ease, box-shadow 0.1s ease, color 0.1s ease;
}

.masterhead-nav a {
  border-bottom-color: transparent;
  border-bottom-style: solid;
  border-radius: 0em;
  align-self: flex-end;
  margin: 0em 0em -2px;
  padding: 0.85714286em 1.14285714em;
  border-bottom-width: 2px;
  transition: color 0.1s ease;
  color: rgba(255, 255, 255, 0.9) !important;
}

.secondary-nav a {
  color: rgba(0, 0, 0, 0.87);
}

.secondary-nav {
  background: rgba(255, 255, 255, 0.7) !important;
  -webkit-backdrop-filter: saturate(110%) blur(5px);
  backdrop-filter: saturate(110%) blur(5px);
}

/* --------------------------------------------------------------------------
   content
   -------------------------------------------------------------------------- */

.cms-content {
  padding-top: 112px;
}

.cms-content img {
  max-width: 100%;
  margin: auto;
}

.resume {
  font-size: 1.2rem;
}

.section-subtitle {
  color: rgba(0, 0, 0, 0.6);
  font-size: 1.15rem;
  margin: -0.5em 0 2em;
}

.home-section {
  margin-bottom: 5rem;
}

.section-more {
  margin-top: 1.5rem;
  font-family: 'Montserrat', sans-serif;
}

/* evolution: cards lift slightly on hover so "Selected work" reads as
   clickable case studies, not static tiles */
.ui.cards > .card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ui.cards > .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 -2px 0 #f2711c inset;
}

.home-photo-strip .photo-grid-image {
  height: 180px;
}

html {
  scroll-behavior: smooth;
}

.skill-category-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: right;
}

.skills-grid {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   blog post list
   -------------------------------------------------------------------------- */

.post-meta__user {
  color: #333333;
}

.post-description {
  font-size: 1.15rem;
  line-height: 1.7rem;
}

/* post detail meta — aligned with the log aesthetic: byline + mono date,
   then #ref tags matching the timeline exactly. */
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin: 0.5em 0 0.75em;
}

.post-meta__time {
  font-family: var(--log-mono, Menlo, Consolas, monospace);
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.post-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-bottom: 1.25em;
}

.post-title > a {
  color: black;
}

/* draft entries in the timeline (only visible to logged-in staff) */
.log-commit--draft .log-commit__node {
  border-color: var(--log-accent);
  border-style: dashed;
  background: #fff;
}

.log-commit__draft {
  margin-left: 0.5em;
  padding: 0.05em 0.5em;
  border-radius: 3px;
  background: var(--log-accent);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
}

.log-commit--draft .log-commit__title {
  color: var(--log-muted);
}

/* --------------------------------------------------------------------------
   photography
   -------------------------------------------------------------------------- */

.photo-grid-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.photo-caption {
  color: rgba(0, 0, 0, 0.6);
  margin-top: 0.5em;
}

/* --------------------------------------------------------------------------
   app landing pages
   -------------------------------------------------------------------------- */

.app-hero {
  display: flex;
  align-items: center;
  gap: 1.5em;
  margin-bottom: 2em;
}

.app-hero .app-icon {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
}

.app-tagline {
  margin-bottom: 0.3em;
}

.app-platforms {
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 0.8em;
}

.app-card-icon {
  float: right;
  width: 48px;
  height: 48px;
  margin-left: 1em;
}

.screenshots {
  display: flex;
  gap: 1em;
  overflow-x: auto;
  margin: 2em 0;
  padding-bottom: 0.5em;
}

.screenshots img {
  height: 24rem;
  width: auto;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.app-links {
  display: flex;
  gap: 2em;
}

.coming-soon {
  pointer-events: none;
  opacity: 0.75;
}

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

@media only screen and (max-width: 700px) {
  body {
    overflow-x: hidden;
  }

  /* the 5-item pointing menu is wider than a phone: let it wrap and
     bring the Blog button into the flow instead of pushed off-screen */
  .masterhead-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .masterhead-nav .right.item {
    margin-left: 0 !important;
    padding-top: 0.3em;
  }

  /* Phone top bars carry only Carlosmart.co, Portfolio, and Blog — Photography
     and Apps are hidden here (still reachable from the footer) so the bar fits
     on one line instead of wrapping. */
  .nav-hide-mobile {
    display: none !important;
  }

  .secondary-nav .ui.container {
    flex-wrap: nowrap;
    align-items: center;
  }

  /* Tighten nav item spacing so the remaining links sit comfortably. */
  .masterhead-nav a,
  .secondary-nav a {
    padding-left: 0.6em;
    padding-right: 0.6em;
  }

  .profile-masterhead {
    display: flex !important;
    flex-direction: column;
    text-align: center;
    padding-bottom: 2rem;
  }

  .profile-image {
    margin-top: 20px;
    margin: auto;
  }

  .featured-name {
    font-style: normal;
    text-align: center;
    max-width: 100%;
    margin: auto;
  }

  .featured-intro {
    max-width: 100%;
    align-items: center;
  }

  .featured-actions .ui.button {
    margin-right: 0.5rem;
  }

  .home-photo-strip {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 0 !important;
  }

  .home-photo-strip .column {
    width: 100% !important;
    padding: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   accessibility
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 3000;
  background: #fff;
  color: #000;
  padding: 0.8em 1.2em;
}

.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #f2711c;
  outline-offset: 2px;
}
.search-form {
  margin-bottom: 2em;
}

/* --------------------------------------------------------------------------
   bitácora — the blog index rendered as a developer's commit history. A git
   graph runs down the left: a spine with a node per post, years as release
   tags on the line, a HEAD pointer at the newest entry, and tags as #refs.
   The personality is the contrast between monospace machine-metadata (dates,
   refs, HEAD) and the Montserrat post titles.
   -------------------------------------------------------------------------- */

:root {
  --log-ink: #1b1f23;
  --log-muted: #5b6570;
  --log-faint: #98a0a8;
  --log-accent: #f2711c;
  --log-spine: #e2e5e8;
  --log-ref-bg: #f2f4f6;
  --log-ref-fg: #57606a;
  --log-mono: "Cascadia Code", Menlo, Consolas, "SF Mono", monospace;
}

.log {
  position: relative;
  margin: 1.5em 0 3em;
}

/* items carry the left gutter (baked into each item's own padding shorthand
   below) so their nodes share the spine's origin at 0.6em */

/* the continuous spine */
.log::before {
  content: "";
  position: absolute;
  left: 0.6em;
  top: 0.4em;
  bottom: 0.4em;
  width: 2px;
  background: var(--log-spine);
}

/* HEAD → latest: the git pointer at the top of the history */
.log-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1.5em;
  padding-left: 2.75em;
  font-family: var(--log-mono);
  font-size: 0.8rem;
}

.log-head__node {
  position: absolute;
  left: 0.6em;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--log-accent);
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(242, 113, 28, 0.18);
}

.log-head__label {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--log-accent);
}

.log-head__arrow {
  color: var(--log-faint);
}

/* year as a release tag sitting on the spine */
.log-release {
  position: relative;
  margin: 2em 0 1em;
  padding-left: 2.75em;
}

.log-release:first-of-type {
  margin-top: 0;
}

.log-release__node {
  position: absolute;
  left: 0.6em;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--log-ink);
  box-shadow: 0 0 0 4px #fff;
}

.log-release__tag {
  display: inline-block;
  font-family: var(--log-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--log-ink);
  background: var(--log-ref-bg);
  border: 1px solid var(--log-spine);
  border-radius: 999px;
  padding: 0.15em 0.85em;
}

/* a commit */
.log-commit {
  position: relative;
  padding: 0.35em 0 1.35em 2.75em;
}

.log-commit__node {
  position: absolute;
  left: 0.6em;
  top: 0.75em;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--log-spine);
  box-shadow: 0 0 0 4px #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.log-commit:hover .log-commit__node {
  border-color: var(--log-accent);
  background: var(--log-accent);
}

.log-commit__meta {
  font-family: var(--log-mono);
  font-size: 0.78rem;
  color: var(--log-faint);
  margin-bottom: 0.15em;
}

.log-commit__lang {
  margin-left: 0.5em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--log-spine);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.log-commit__title {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--log-ink);
}

.log-commit__title:hover {
  color: var(--log-accent);
  text-decoration: none;
}

.log-commit__desc {
  margin: 0.3em 0 0.5em;
  color: var(--log-muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 42em;
}

.log-commit__refs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.log-ref {
  font-family: var(--log-mono);
  font-size: 0.78rem;
  color: var(--log-ref-fg);
  background: var(--log-ref-bg);
  border-radius: 4px;
  padding: 0.1em 0.5em;
  transition: background 0.12s ease, color 0.12s ease;
}

.log-ref:hover {
  background: rgba(242, 113, 28, 0.12);
  color: var(--log-accent);
  text-decoration: none;
}

/* Non-interactive chip (e.g. portfolio tech-stack tags): same soft look as the
   git-log refs, but not a link, so no pointer or hover recolor. */
.log-ref--static {
  cursor: default;
}

.log-ref--static:hover {
  background: var(--log-ref-bg);
  color: var(--log-ref-fg);
}

.log-ref--active {
  background: var(--log-accent);
  color: #fff;
}

.log-ref--active:hover {
  background: var(--log-accent);
  color: #fff;
}

/* active-tag filter chip in the heading + clear link */
.log-filter-tag {
  font-family: var(--log-mono);
  font-size: 1.2rem;
  color: var(--log-accent);
}

.log-clear {
  font-family: var(--log-mono);
  font-size: 0.85rem;
  margin-left: 0.75em;
  white-space: nowrap;
}

.log-til-heading {
  margin-top: 2.5em;
}

@media only screen and (max-width: 700px) {
  .log {
    padding-left: 2.25em;
  }
  .log-commit__title {
    font-size: 1.08rem;
  }
}

/* maintained packages: compact ledger of ongoing OSS responsibility */
.maintained-heading {
  margin-top: 2.5em;
}

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

.maintained-list li {
  display: flex;
  align-items: baseline;
  gap: 1.5em;
  padding: 0.7em 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

.maintained-name {
  font-family: var(--log-mono);
  font-weight: 700;
  min-width: 15em;
}

.maintained-desc {
  color: rgba(0, 0, 0, 0.6);
  flex: 1;
}

.maintained-links {
  white-space: nowrap;
}

/* Footer section headings are <h2> (so they never skip heading levels — every
   page has the <h1> masthead title), but keep the small footer-label look. */
.footer-heading.ui.header {
  font-size: 1rem;
  margin-top: 0;
}

/* compact commit log used on the home page — same style as /blog/ but no
   HEAD pointer or year release tags, just the most recent commits */
.log--compact {
  margin-top: 1em;
}

.log--compact .log-commit:last-child {
  padding-bottom: 0.35em;
}

/* Home skills: render the individual skills in monospace (a clean code-list
   look); the category titles (Backend, Frontend…) stay in Montserrat.
   The extra .ui.list in the selector is deliberate — it out-specifies
   Semantic's own '.ui.list > .item .header' rule, which otherwise forces Lato. */
.skills-grid .ui.list .item .header {
  font-family: var(--log-mono);
  font-weight: 400;
}

/* Footer copyright in monospace, matching the site's mono accents */
.footer-copy {
  font-family: var(--log-mono);
}
