/*
Theme Name: Frederico Portfolio
Author: Frederico Eusebio
Description: A green technical portfolio and work-journal theme for IT professionals.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: frederico-portfolio
*/

:root {
  --ink: #eaf8f1;
  --muted: #94b3a5;
  --paper: #071d17;
  --paper-deep: #04120e;
  --panel: #0b2a21;
  --panel-soft: #10382c;
  --line: rgba(183, 255, 214, 0.16);
  --accent: #73f0a7;
  --accent-strong: #21c96f;
  --accent-dark: #062718;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --radius: 1.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 12%, rgba(33, 201, 111, 0.14), transparent 28rem),
    var(--paper);
  font: 400 1rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.23;
  background-image:
    linear-gradient(rgba(115, 240, 167, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 240, 167, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: var(--accent-dark);
  background: var(--accent);
  border-radius: 0.5rem;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell,
.site-header {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0.7rem 0.9rem;
  margin-top: 1rem;
  background: rgba(7, 29, 23, 0.86);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 0.8rem;
  align-items: center;
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 2.65rem;
  height: 2.65rem;
  overflow: hidden;
  color: var(--accent-dark);
  background: var(--accent);
  border-radius: 0.7rem;
}

.brand-mark span {
  display: grid;
  place-items: center;
  font: 700 0.88rem/1 var(--display);
}

.brand-mark span:first-child {
  color: var(--accent);
  background: var(--accent-dark);
  margin: 0.22rem 0 0.22rem 0.22rem;
  border-radius: 0.45rem 0 0 0.45rem;
}

.brand-name {
  letter-spacing: -0.02em;
}

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

.site-nav a {
  padding: 0.65rem 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.6rem;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--panel-soft);
  outline: none;
}

.menu-button {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.menu-button span:not(.sr-only) {
  display: block;
  width: 1.1rem;
  height: 1px;
  margin: 0.32rem auto;
  background: var(--ink);
  transition: transform 180ms ease;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 0.7fr);
  gap: clamp(2.5rem, 8vw, 7rem);
  align-items: end;
  min-height: calc(100svh - 7rem);
  padding-block: clamp(5rem, 12vh, 9rem);
}

.eyebrow,
.skill-code,
.data-label,
.journal-tag,
.profile-index {
  margin: 0;
  color: var(--accent);
  font: 600 0.78rem/1.4 var(--display);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.65rem;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0.28rem rgba(115, 240, 167, 0.12);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin: 1.5rem 0 1.6rem;
  font: 600 clamp(3.6rem, 8.6vw, 7.7rem)/0.92 var(--display);
  letter-spacing: -0.075em;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-intro {
  max-width: 41rem;
  color: #bfd4ca;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  align-items: center;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.2rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button-primary {
  color: var(--accent-dark);
  background: var(--accent);
  box-shadow: 0 10px 32px rgba(33, 201, 111, 0.16);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(33, 201, 111, 0.23);
}

.button:focus-visible,
.text-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.text-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration-color: rgba(115, 240, 167, 0.4);
  text-underline-offset: 0.35rem;
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  background: linear-gradient(145deg, rgba(16, 56, 44, 0.96), rgba(9, 37, 29, 0.96));
  border: 1px solid rgba(115, 240, 167, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.24);
}

.profile-card::after {
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 12rem;
  height: 12rem;
  content: "";
  border: 1px solid rgba(115, 240, 167, 0.19);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(115, 240, 167, 0.03), 0 0 0 4rem rgba(115, 240, 167, 0.02);
}

.profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 4rem;
}

.profile-monogram {
  display: grid;
  place-items: center;
  width: 7rem;
  height: 7rem;
  color: var(--accent-dark);
  background: var(--accent);
  border-radius: 1.6rem;
  font: 700 2.25rem/1 var(--display);
  letter-spacing: -0.08em;
  transform: rotate(-4deg);
}

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

.profile-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.profile-grid > div {
  padding: 1rem;
  background: rgba(7, 29, 23, 0.82);
}

.data-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.profile-grid strong {
  font-size: 0.95rem;
}

.about,
.skills,
.projects,
.journal {
  padding-block: clamp(5rem, 11vw, 9rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.section-number {
  color: var(--accent);
  font: 600 0.76rem/1 var(--display);
}

.section-heading h2 {
  margin: 0;
  font: 600 clamp(2rem, 4.5vw, 4rem)/1 var(--display);
  letter-spacing: -0.055em;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
  gap: clamp(2rem, 8vw, 8rem);
}

.statement {
  margin: 0;
  font: 500 clamp(1.7rem, 3.4vw, 3.1rem)/1.22 var(--display);
  letter-spacing: -0.045em;
}

.about-copy {
  color: var(--muted);
  font-size: 1.05rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.skill-card {
  min-height: 20rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms ease, transform 180ms ease;
}

.skill-card:hover {
  border-color: rgba(115, 240, 167, 0.42);
  transform: translateY(-3px);
}

.skill-card h3 {
  margin: 4.8rem 0 0.8rem;
  font: 600 clamp(1.4rem, 2vw, 1.85rem)/1.1 var(--display);
  letter-spacing: -0.035em;
}

.skill-card p {
  max-width: 34rem;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.tag-list li {
  padding: 0.4rem 0.65rem;
  color: #b8d0c4;
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 99rem;
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-card {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr) 4rem;
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
  padding: 2.3rem 0;
  border-bottom: 1px solid var(--line);
}

.project-meta {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  text-transform: uppercase;
}

.project-card h3,
.journal-entry h3 {
  margin-bottom: 0.65rem;
  font: 600 clamp(1.35rem, 2.4vw, 2rem)/1.18 var(--display);
  letter-spacing: -0.04em;
}

.project-card p,
.journal-entry p {
  max-width: 48rem;
  margin-bottom: 0;
  color: var(--muted);
}

.project-mark {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  color: var(--accent);
  border: 1px solid rgba(115, 240, 167, 0.25);
  border-radius: 50%;
  font: 600 0.9rem/1 var(--display);
}

.journal {
  display: grid;
  grid-template-columns: minmax(15rem, 0.58fr) minmax(0, 1.42fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.journal-heading {
  align-self: start;
  position: sticky;
  top: 8rem;
}

.journal-heading .section-heading {
  margin-bottom: 1.5rem;
}

.journal-heading > p {
  max-width: 25rem;
  color: var(--muted);
}

.journal-list {
  border-top: 1px solid var(--line);
}

.journal-entry {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) 2rem;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.journal-entry time,
.entry-number {
  color: var(--muted);
  font: 500 0.76rem/1.4 var(--display);
  letter-spacing: 0.08em;
}

.journal-tag {
  display: block;
  margin-bottom: 0.8rem;
}

.entry-number {
  text-align: right;
}

.closing {
  display: grid;
  justify-items: center;
  padding-block: clamp(7rem, 15vw, 12rem);
  text-align: center;
  border-top: 1px solid var(--line);
}

.closing h2 {
  margin: 1rem 0 1.5rem;
  font: 600 clamp(2.7rem, 7vw, 6rem)/0.98 var(--display);
  letter-spacing: -0.065em;
}

.closing > p:not(.eyebrow) {
  max-width: 35rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.closing .button {
  margin-top: 1.5rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 2rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

.footer-brand .brand-mark {
  width: 2.25rem;
  height: 2.25rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 800px) {
  .section-shell,
  .site-header {
    width: min(100% - 1.4rem, 42rem);
  }

  .brand-name {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .menu-button[aria-expanded="true"] span:not(.sr-only):nth-of-type(2) {
    transform: translateY(3px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:not(.sr-only):nth-of-type(3) {
    transform: translateY(-3px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    padding: 0.6rem;
    background: #0a261e;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 5.5rem;
  }

  .profile-card {
    max-width: 32rem;
  }

  .about-layout,
  .journal {
    grid-template-columns: 1fr;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: auto;
  }

  .skill-card h3 {
    margin-top: 3.5rem;
  }

  .journal-heading {
    position: static;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(3.25rem, 16vw, 4.6rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .text-link {
    padding: 0.55rem 0;
    text-align: center;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr 3.5rem;
    gap: 1rem;
  }

  .project-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 0.6rem;
  }

  .project-meta span + span::before {
    margin-right: 0.6rem;
    content: "·";
  }

  .project-mark {
    width: 3.5rem;
    height: 3.5rem;
  }

  .journal-entry {
    grid-template-columns: 1fr auto;
  }

  .journal-entry time {
    grid-column: 1;
  }

  .journal-entry > div {
    grid-column: 1 / -1;
  }

  .entry-number {
    grid-column: 2;
    grid-row: 1;
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .site-footer p:nth-of-type(1) {
    order: 3;
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* WordPress integration */
body.admin-bar .site-header {
  top: calc(1rem + 32px);
}

.custom-logo-wrap,
.custom-logo-link {
  display: inline-flex;
}

.custom-logo {
  width: 2.65rem;
  height: 2.65rem;
  object-fit: cover;
  border-radius: 0.7rem;
}

.site-nav-list {
  display: flex;
  gap: 0.3rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav-list a {
  display: block;
  padding: 0.65rem 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.6rem;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav-list a:hover,
.site-nav-list a:focus-visible,
.site-nav-list .current-menu-item > a {
  color: var(--ink);
  background: var(--panel-soft);
  outline: none;
}

.project-card h2 {
  margin-bottom: 0.65rem;
  font: 600 clamp(1.35rem, 2.4vw, 2rem)/1.18 var(--display);
  letter-spacing: -0.04em;
}

.project-card h2 a,
.project-card h3 a,
.journal-entry h3 a,
.post-card h2 a {
  text-decoration: none;
}

.project-card h2 a:hover,
.project-card h3 a:hover,
.journal-entry h3 a:hover,
.post-card h2 a:hover {
  color: var(--accent);
}

.archive-link {
  display: inline-block;
  margin-top: 1rem;
}

.content-shell {
  min-height: calc(100svh - 12rem);
  padding-block: clamp(5rem, 10vw, 8rem);
}

.archive-header,
.single-header {
  max-width: 58rem;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.archive-header h1,
.single-header h1,
.not-found h1 {
  max-width: 13ch;
  margin: 1.25rem 0 1.5rem;
  font: 600 clamp(3rem, 8vw, 7rem)/0.94 var(--display);
  letter-spacing: -0.07em;
}

.archive-header > p:last-child,
.single-deck,
.not-found > p:not(.eyebrow) {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--accent);
  font: 600 0.75rem/1.4 var(--display);
  letter-spacing: 0.08em;
}

.post-card h2 {
  margin: 4rem 0 0.8rem;
  font: 600 clamp(1.5rem, 2.5vw, 2.1rem)/1.12 var(--display);
  letter-spacing: -0.045em;
}

.post-card p {
  color: var(--muted);
}

.post-card > .text-link {
  margin-top: auto;
  align-self: flex-start;
}

.navigation.pagination {
  margin-top: 3rem;
}

.nav-links {
  display: flex;
  gap: 0.6rem;
}

.page-numbers {
  display: grid;
  min-width: 2.7rem;
  min-height: 2.7rem;
  padding: 0.55rem;
  place-items: center;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.page-numbers.current,
.page-numbers:hover {
  color: var(--accent-dark);
  background: var(--accent);
}

.single-entry {
  max-width: 58rem;
  margin-inline: auto;
}

.featured-image {
  margin: 0 0 3rem;
}

.featured-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.entry-content {
  color: #cee0d7;
  font-size: 1.08rem;
}

.entry-content > * {
  max-width: 46rem;
  margin-inline: auto;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2.5rem;
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.035em;
}

.entry-content h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.entry-content a {
  color: var(--accent);
}

.entry-content pre,
.entry-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.entry-content code {
  padding: 0.15rem 0.35rem;
  color: var(--accent);
  background: var(--panel);
  border-radius: 0.3rem;
}

.entry-content pre {
  max-width: 100%;
  padding: 1.25rem;
  overflow-x: auto;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.entry-content pre code {
  padding: 0;
  background: transparent;
}

.entry-content blockquote {
  padding: 0.25rem 0 0.25rem 1.4rem;
  color: var(--ink);
  border-left: 3px solid var(--accent);
}

.single-footer {
  max-width: 46rem;
  padding-top: 3rem;
  margin: 3rem auto 0;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 2rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.not-found {
  display: grid;
  justify-items: start;
  max-width: 52rem;
  padding-block: clamp(3rem, 8vw, 8rem);
}

.not-found .button {
  margin-top: 1rem;
}

.alignwide {
  max-width: 68rem;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.wp-caption,
.gallery-caption {
  color: var(--muted);
  font-size: 0.9rem;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  display: block;
  width: auto;
  height: auto;
  padding: 1rem;
  clip: auto;
  color: var(--accent-dark);
  background: var(--accent);
}

@media (max-width: 800px) {
  .site-nav-list {
    flex-direction: column;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  body.admin-bar .site-header {
    top: calc(0.5rem + 46px);
  }
}
