/* =========================================================
   ARLEU JÚNIOR — PROFESSIONAL SITE
   Static HTML, CSS and JavaScript.
   ========================================================= */

:root {
  --bg: #050806;
  --bg-soft: #09100d;
  --surface: rgba(13, 24, 19, 0.74);
  --surface-strong: rgba(13, 27, 21, 0.94);
  --surface-light: rgba(24, 43, 34, 0.68);
  --text: #f3f7f4;
  --text-soft: #d4ded8;
  --muted: #98a69e;
  --muted-strong: #b2beb7;
  --accent: #3ecf8e;
  --accent-light: #a7f3d0;
  --accent-dark: #1b6f50;
  --danger: #ffb4a7;
  --border: rgba(167, 243, 208, 0.14);
  --border-strong: rgba(62, 207, 142, 0.34);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius-sm: 0.75rem;
  --radius-md: 1.1rem;
  --radius-lg: 1.6rem;
  --container: 74rem;
  --header-height: 4.75rem;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  color-scheme: dark;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: #041009;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

p:last-child,
ul:last-child {
  margin-bottom: 0;
}

:focus-visible {
  outline: 3px solid rgba(62, 207, 142, 0.68);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  background: var(--accent);
  color: #031009;
  font-weight: 800;
  padding: 0.75rem 1rem;
  transition: transform 160ms ease;
}

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

.page-background {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(5, 8, 6, 0.91), rgba(5, 8, 6, 0.94)),
    url("../img/backgroundinitialpage.jpg") center / cover no-repeat;
}

.page-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(62, 207, 142, 0.12), transparent 34rem),
    radial-gradient(circle at 82% 30%, rgba(27, 111, 80, 0.17), transparent 30rem),
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: auto, auto, 4rem 4rem, 4rem 4rem;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.5) 58%, transparent 100%);
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.narrow-container {
  width: min(calc(100% - 2rem), 65rem);
}

.section {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.section-muted {
  border-block: 1px solid var(--border);
  background: rgba(5, 11, 8, 0.62);
  backdrop-filter: blur(8px);
}

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.section-heading {
  max-width: 48rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-heading h2 {
  max-width: 46rem;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading > p:last-child {
  max-width: 43rem;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.gradient-text {
  background: linear-gradient(100deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--border);
  background: rgba(5, 8, 6, 0.88);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  position: relative;
  z-index: 1002;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.04rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand span {
  color: var(--accent);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.8rem);
}

.site-nav a {
  position: relative;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
  transition: color 150ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.55rem;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  border-radius: 999px;
  background: var(--accent);
  transition: transform 170ms ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav a.is-current {
  color: var(--accent-light);
}

.site-nav a:hover::after,
.site-nav a.is-active::after,
.site-nav a.is-current::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 1002;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.32rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span {
  width: 1.25rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(0.43rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-0.43rem) rotate(-45deg);
}

.hero {
  display: grid;
  min-height: 100svh;
  align-items: center;
  padding-top: calc(var(--header-height) + 3rem);
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
}

.hero-copy {
  max-width: 45rem;
}

.hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 7.7vw, 6.2rem);
  line-height: 0.99;
  letter-spacing: -0.07em;
}

.hero h1 span {
  display: block;
}

.typing-line {
  min-height: 2.1rem;
  margin-bottom: 1.2rem;
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.32rem);
  font-weight: 500;
}

.typing-line::after {
  content: "|";
  display: inline-block;
  margin-left: 0.2rem;
  color: var(--accent);
  animation: blink 780ms steps(1, end) infinite;
}

.hero-summary {
  max-width: 42rem;
  margin-bottom: 1.25rem;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(9, 20, 15, 0.74);
  color: var(--text-soft);
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.58rem 0.85rem;
}

.status-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.5);
  animation: pulse 2.2s infinite;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 0.78rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  padding: 0.78rem 1.12rem;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: #031009;
  box-shadow: 0 12px 30px rgba(62, 207, 142, 0.18);
}

.button-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 18px 38px rgba(62, 207, 142, 0.24);
}

.button-secondary {
  border-color: var(--border-strong);
  background: rgba(62, 207, 142, 0.08);
  color: var(--accent-light);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: rgba(62, 207, 142, 0.14);
}

.button-ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
}

.button-ghost:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.button-small {
  min-height: 2.65rem;
  padding: 0.58rem 0.9rem;
}

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-stack li,
.project-tech span,
.tag-list li {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-strong);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  padding: 0.38rem 0.62rem;
}

.hero-visual {
  position: relative;
  display: grid;
  justify-items: center;
}

.portrait-frame {
  position: relative;
  width: min(100%, 27rem);
  aspect-ratio: 0.84;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 2rem;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.88) contrast(1.02);
  transition: transform 600ms ease, filter 600ms ease;
}

.portrait-frame:hover img {
  transform: scale(1.025);
  filter: saturate(1) contrast(1.03);
}

.floating-card {
  position: absolute;
  z-index: 2;
  min-width: 11.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 1rem;
  background: rgba(7, 16, 12, 0.87);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(15px);
  padding: 0.9rem 1rem;
}

.floating-card-code {
  top: 9%;
  left: -7%;
}

.floating-card-location {
  right: -7%;
  bottom: 10%;
}

.floating-card span,
.floating-card strong,
.floating-card small {
  display: block;
}

.floating-label {
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.floating-card strong {
  font-size: 0.88rem;
}

.floating-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.scroll-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transform: translateX(-50%);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.scroll-hint span:last-child {
  color: var(--accent);
  animation: float 1.8s ease-in-out infinite;
}

.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.about-copy {
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

.about-copy p {
  color: var(--text-soft);
  font-size: clamp(1rem, 1.7vw, 1.08rem);
}

.about-copy strong {
  color: var(--text);
}

.about-image {
  min-height: 34rem;
  margin: 0;
  border-left: 1px solid var(--border);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.principle-card,
.skill-column,
.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}

.principle-card {
  padding: 1.35rem;
}

.card-index {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.principle-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.04rem;
}

.principle-card p {
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.experience-list {
  display: grid;
  gap: 0.85rem;
}

.experience-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}

.experience-item[open] {
  border-color: var(--border-strong);
}

.experience-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1.3rem 1.45rem;
}

.experience-item summary::-webkit-details-marker {
  display: none;
}

.experience-item summary::after {
  content: "+";
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-mono);
  transition: transform 180ms ease, background-color 180ms ease;
}

.experience-item[open] summary::after {
  transform: rotate(45deg);
  background: rgba(62, 207, 142, 0.09);
}

.experience-item summary > span:first-child {
  display: grid;
  gap: 0.2rem;
}

.experience-item summary strong {
  font-size: 1.03rem;
}

.experience-item summary small {
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.experience-period {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

.experience-content {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 0.75fr);
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding: 1.45rem;
}

.experience-content-reverse {
  grid-template-columns: minmax(16rem, 0.75fr) minmax(0, 1.65fr);
}

.experience-content-reverse .experience-text {
  order: 2;
}

.experience-text ul,
.resume-entry ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.experience-text li + li,
.resume-entry li + li {
  margin-top: 0.55rem;
}

.experience-content img {
  width: 100%;
  height: 16rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  object-fit: cover;
}

.evidence-note {
  margin-top: 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(62, 207, 142, 0.06);
  color: var(--muted-strong);
  font-size: 0.85rem;
  padding: 0.85rem 1rem;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.filter-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.62rem 0.85rem;
  transition: all 150ms ease;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--accent);
  background: rgba(62, 207, 142, 0.11);
  color: var(--accent-light);
}

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

.project-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 1.35rem;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.project-card[hidden] {
  display: none;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.project-status {
  border-radius: 999px;
  background: rgba(62, 207, 142, 0.1);
  color: var(--accent-light);
  padding: 0.32rem 0.52rem;
}

.project-status-used {
  background: rgba(167, 243, 208, 0.16);
  color: #d5ffec;
}

.project-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
}

.project-card > p {
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.project-evidence {
  margin: 0 0 1.15rem;
  padding-left: 1.1rem;
  color: var(--text-soft);
  font-size: 0.83rem;
}

.project-evidence li + li {
  margin-top: 0.35rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  margin-bottom: 1rem;
}

.project-tech span {
  font-size: 0.65rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-light);
  font-size: 0.86rem;
  font-weight: 750;
}

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

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

.skill-column {
  padding: 1.4rem;
}

.skill-label {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.11em;
}

.skill-column h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.skill-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-column li {
  position: relative;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.9rem;
  padding: 0.63rem 0 0.63rem 1rem;
}

.skill-column li::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 0;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--accent);
}

.section-agridev {
  border-block: 1px solid var(--border);
  background:
    linear-gradient(120deg, rgba(62, 207, 142, 0.09), transparent 42%),
    rgba(4, 12, 8, 0.72);
}

.agridev-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.85fr);
  align-items: center;
  gap: clamp(2.5rem, 8vw, 7rem);
}

.agridev-copy h2 {
  max-width: 44rem;
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.agridev-copy > p:not(.eyebrow) {
  max-width: 42rem;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.agridev-copy .button {
  margin-top: 1rem;
}

.agridev-points {
  display: grid;
  gap: 0.8rem;
}

.agridev-point {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.2rem;
}

.agridev-point > span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.agridev-point h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.agridev-point p {
  color: var(--muted-strong);
  font-size: 0.86rem;
}

.contact-section {
  padding-top: clamp(4rem, 8vw, 6rem);
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(62, 207, 142, 0.13), transparent 22rem),
    var(--surface-strong);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 3rem);
}

.contact-card h2 {
  max-width: 40rem;
  margin-bottom: 0.6rem;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.08;
}

.contact-card p:last-child {
  max-width: 42rem;
  color: var(--muted-strong);
}

.contact-actions {
  justify-content: flex-end;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(4, 7, 5, 0.76);
  padding: 1.6rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-grid p:last-child {
  justify-self: end;
}

.brand-small {
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  transform: translateY(1rem);
  border: 1px solid var(--border-strong);
  border-radius: 0.75rem;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  opacity: 0;
  pointer-events: none;
  padding: 0.8rem 1rem;
  transition: opacity 160ms ease, transform 160ms ease;
}

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

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

.js .reveal {
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity 500ms ease, transform 500ms ease;
}

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

/* Document pages */

.document-page .page-background {
  background:
    linear-gradient(180deg, rgba(5, 8, 6, 0.93), rgba(5, 8, 6, 0.97)),
    url("../img/backgroundinitialpage.jpg") center / cover no-repeat;
}

.document-main {
  min-height: 100vh;
  padding: calc(var(--header-height) + 3rem) 0 5rem;
}

.document-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.resume-sheet,
.letter-layout {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(8, 15, 11, 0.92);
  box-shadow: var(--shadow);
}

.resume-sheet {
  padding: clamp(1.4rem, 4vw, 3rem);
}

.resume-header {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.8rem;
}

.resume-header img {
  width: 8.5rem;
  aspect-ratio: 1;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
}

.resume-header h1 {
  margin-bottom: 0.2rem;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.resume-title {
  margin-bottom: 0.75rem;
  color: var(--accent-light);
  font-size: 1.05rem;
  font-weight: 600;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

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

.resume-section {
  margin-top: 1.8rem;
}

.resume-section > h2 {
  margin-bottom: 0.9rem;
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resume-section > p {
  color: var(--text-soft);
}

.resume-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 0.7fr);
  gap: clamp(1.5rem, 5vw, 3rem);
}

.resume-entry {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}

.resume-entry:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.resume-entry-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.resume-entry-heading h3 {
  margin-bottom: 0.15rem;
  font-size: 1rem;
}

.resume-entry-heading p {
  margin: 0;
  color: var(--accent-light);
  font-size: 0.82rem;
  font-weight: 600;
}

.resume-entry-heading > span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  white-space: nowrap;
}

.resume-entry ul {
  font-size: 0.85rem;
}

.resume-project {
  border-top: 1px solid var(--border);
  padding: 0.85rem 0;
}

.resume-project:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.resume-project h3 {
  margin-bottom: 0.28rem;
  font-size: 0.95rem;
}

.resume-project p {
  margin-bottom: 0.35rem;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.resume-project span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

.resume-sidebar-section {
  border-top: 1px solid var(--border);
  padding-top: 1.15rem;
}

.resume-sidebar-section:first-child {
  border-top: 0;
  padding-top: 0;
}

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

.compact-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.compact-list li + li {
  margin-top: 0.35rem;
}

.resume-small-entry + .resume-small-entry {
  margin-top: 0.9rem;
}

.resume-small-entry h3 {
  margin-bottom: 0.2rem;
  font-size: 0.88rem;
}

.resume-small-entry p {
  margin-bottom: 0.15rem;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.resume-small-entry span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.letter-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.68fr) minmax(0, 1.5fr);
  overflow: hidden;
}

.letter-profile {
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(62, 207, 142, 0.08), transparent 60%),
    rgba(9, 20, 15, 0.76);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.letter-profile img {
  width: 100%;
  max-height: 27rem;
  margin-bottom: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: center 20%;
}

.letter-profile h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.letter-profile > p:not(.eyebrow) {
  color: var(--muted-strong);
}

.letter-contact {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

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

.letter-paper {
  padding: clamp(1.5rem, 5vw, 3.7rem);
}

.letter-paper > p {
  color: var(--text-soft);
  font-size: 1rem;
}

.letter-note {
  margin-bottom: 2rem;
  border-left: 3px solid var(--accent);
  background: rgba(62, 207, 142, 0.07);
  color: var(--muted-strong);
  font-size: 0.83rem;
  padding: 0.85rem 1rem;
}

.letter-signature {
  margin-top: 2rem;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.44); }
  70% { box-shadow: 0 0 0 0.6rem rgba(62, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.35rem); }
}

@media (max-width: 66rem) {
  .site-nav {
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.78rem;
  }

  .hero-grid {
    gap: 3rem;
  }

  .floating-card-code {
    left: -1rem;
  }

  .floating-card-location {
    right: -1rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 52rem) {
  :root {
    --header-height: 4.25rem;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.25rem;
    transform: translateX(100%);
    background: rgba(4, 9, 6, 0.97);
    backdrop-filter: blur(18px);
    padding: 5.5rem max(1.25rem, calc((100vw - 32rem) / 2));
    transition: transform 220ms ease;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav a {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
  }

  .site-nav a::after {
    bottom: -0.2rem;
  }

  .hero {
    padding-top: calc(var(--header-height) + 3rem);
  }

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

  .hero-copy {
    order: 2;
    text-align: center;
  }

  .hero-visual {
    order: 1;
  }

  .hero-summary {
    margin-inline: auto;
  }

  .availability {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-stack {
    justify-content: center;
  }

  .portrait-frame {
    width: min(74vw, 22rem);
  }

  .floating-card {
    min-width: 9.8rem;
    padding: 0.72rem 0.8rem;
  }

  .floating-card-code {
    left: 0;
  }

  .floating-card-location {
    right: 0;
  }

  .scroll-hint {
    display: none;
  }

  .about-panel {
    grid-template-columns: 1fr;
  }

  .about-image {
    min-height: 29rem;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .principles-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .experience-content,
  .experience-content-reverse {
    grid-template-columns: 1fr;
  }

  .experience-content-reverse .experience-text {
    order: initial;
  }

  .experience-content img {
    height: 20rem;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-grid p:last-child {
    justify-self: auto;
  }

  .resume-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .resume-contact {
    justify-content: center;
  }

  .resume-two-column {
    grid-template-columns: 1fr;
  }

  .letter-layout {
    grid-template-columns: 1fr;
  }

  .letter-profile {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .letter-profile img {
    max-width: 20rem;
  }
}

@media (max-width: 38rem) {
  .container,
  .narrow-container {
    width: min(calc(100% - 1.25rem), var(--container));
  }

  .section {
    padding-block: 4.5rem;
  }

  .hero {
    padding-top: calc(var(--header-height) + 2.5rem);
  }

  .hero h1 {
    font-size: clamp(2.6rem, 15vw, 4.1rem);
  }

  .hero-actions .button,
  .contact-actions .button {
    width: 100%;
  }

  .floating-card {
    display: none;
  }

  .about-image {
    min-height: 23rem;
  }

  .experience-item summary {
    align-items: flex-start;
    padding: 1.1rem;
  }

  .experience-period {
    display: none;
  }

  .experience-content {
    padding: 1.1rem;
  }

  .experience-content img {
    height: 16rem;
  }

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

  .project-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.3rem;
    scrollbar-width: thin;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .document-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-toolbar .button {
    width: 100%;
  }

  .resume-sheet {
    padding: 1.1rem;
  }

  .resume-entry-heading {
    flex-direction: column;
    gap: 0.25rem;
  }
}

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

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

  .typing-line::after {
    display: none;
  }

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

@media print {
  :root {
    color-scheme: light;
  }

  body,
  .document-page {
    background: white !important;
    color: #111 !important;
    font-size: 10.5pt;
  }

  .page-background,
  .site-header,
  .site-footer,
  .document-toolbar,
  .skip-link,
  .toast {
    display: none !important;
  }

  .document-main {
    padding: 0;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  .resume-sheet,
  .letter-layout {
    border: 0;
    border-radius: 0;
    background: white;
    box-shadow: none;
  }

  .resume-sheet {
    padding: 0;
  }

  .resume-header,
  .resume-entry,
  .resume-sidebar-section,
  .letter-profile,
  .letter-note {
    border-color: #d9d9d9;
  }

  .resume-header h1,
  .resume-section h2,
  .resume-entry h3,
  .resume-project h3,
  .letter-profile h1,
  .letter-paper strong {
    color: #111 !important;
  }

  .resume-title,
  .resume-entry-heading p,
  .resume-section > h2,
  .eyebrow {
    color: #176b4a !important;
  }

  .resume-section p,
  .resume-entry li,
  .resume-project p,
  .compact-list,
  .letter-paper > p,
  .letter-profile > p,
  .letter-contact,
  .resume-contact,
  .resume-project span,
  .resume-small-entry p,
  .resume-small-entry span {
    color: #333 !important;
  }

  .tag-list li {
    border-color: #bbb;
    background: #f4f4f4;
    color: #222;
  }

  .resume-two-column {
    grid-template-columns: 1.72fr 0.72fr;
    gap: 1.4rem;
  }

  .letter-layout {
    grid-template-columns: 0.62fr 1.5fr;
  }

  .letter-profile {
    background: #f4f8f6;
  }

  a {
    color: inherit !important;
  }

  @page {
    size: A4;
    margin: 12mm;
  }
}
