:root {
  --paper: #f7f3eb;
  --surface: #fffdf9;
  --ink: #172520;
  --muted: #64736d;
  --line: #d9dfd9;
  --accent: #d65f3a;
  --accent-dark: #a84326;
  --deep: #18362e;
  --sage: #dfe8df;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(25, 54, 46, 0.1);
  --shell: min(1120px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 16px;
}

.section-shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid rgba(24, 54, 46, 0.11);
  background: rgba(247, 243, 235, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--deep);
  color: white;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
}

.desktop-nav {
  display: none;
  gap: 26px;
  font-size: 0.84rem;
  font-weight: 700;
}

.desktop-nav a,
.site-footer a {
  text-decoration: none;
}

.desktop-nav a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.language-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.language-active {
  color: var(--accent-dark);
}

.header-contact,
.header-linkedin {
  display: none;
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.header-linkedin {
  text-decoration: none;
}

.hero {
  display: grid;
  gap: 34px;
  padding-block: 48px 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

h1 {
  max-width: 790px;
  margin-bottom: 20px;
  font-size: clamp(2.55rem, 10vw, 5.8rem);
  font-weight: 500;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.05rem, 7.5vw, 4.2rem);
  font-weight: 500;
}

.hero-intro,
.section-heading > p:last-child,
.profile-copy > p,
.contact-grid p {
  color: var(--muted);
  font-size: 1rem;
}

.hero-intro {
  max-width: 660px;
  margin-bottom: 27px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: var(--accent);
  color: white;
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--deep);
}

.hero-proof {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.proof-label {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.proof-grid strong {
  display: block;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

.proof-grid span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.focus-strip {
  padding-block: 24px;
  background: var(--deep);
  color: white;
}

.focus-grid {
  display: grid;
  gap: 14px;
}

.focus-grid p {
  margin: 0;
  color: var(--sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.2;
}

.focus-grid ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.focus-grid li {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: white;
  font-size: 0.7rem;
}

.projects {
  padding-block: 42px 76px;
}

.signal-section {
  display: grid;
  gap: 24px;
  align-items: center;
  padding-block: 58px 28px;
}

.signal-orbit {
  position: relative;
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(214, 95, 58, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.88), rgba(223, 232, 223, 0.82));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.signal-orbit::before,
.signal-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(24, 54, 46, 0.13);
  border-radius: 50%;
}

.signal-orbit::before {
  width: 72%;
  height: 58%;
}

.signal-orbit::after {
  width: 44%;
  height: 34%;
}

.signal-orbit span {
  position: absolute;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(24, 54, 46, 0.12);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.9);
  color: var(--deep);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 32px rgba(24, 54, 46, 0.11);
  will-change: transform, opacity;
}

.signal-copy {
  max-width: 640px;
}

.signal-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 7vw, 3.8rem);
}

.signal-copy p:last-child {
  color: var(--muted);
}

.method-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.method-list p {
  display: flex;
  gap: 12px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.method-list strong {
  color: var(--accent-dark);
  font-family: Georgia, "Times New Roman", serif;
}

.method-list span {
  color: var(--deep);
  font-weight: 800;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-heading.compact {
  margin-bottom: 24px;
}

.project-list {
  display: grid;
  gap: 18px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 190px;
  padding: 0;
  border: 0;
  background: var(--sage);
  color: inherit;
  cursor: zoom-in;
  overflow: hidden;
}

.project-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 220ms ease;
}

.project-visual:hover img {
  transform: scale(1.03);
}

.project-visual.image-failed::after {
  content: attr(data-title);
  max-width: 80%;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1.05;
  text-align: center;
}

.project-index {
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--deep);
  color: white;
  font-size: 0.74rem;
  font-weight: 800;
}

.project-content {
  padding: 22px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card h3 {
  margin-bottom: 17px;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.story-grid {
  display: grid;
  gap: 13px;
}

.story-grid div {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.story-grid strong {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-grid p {
  margin: 0;
  font-size: 0.9rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tech-list li {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--sage);
  color: var(--deep);
  font-size: 0.72rem;
  font-weight: 700;
}

.project-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.project-link::after {
  content: "↗";
  margin-left: 6px;
}

.project-link:hover {
  color: var(--deep);
  text-decoration: underline;
}

.profile-section {
  padding-block: 68px;
  background: var(--sage);
}

.profile-grid {
  display: grid;
  gap: 18px;
}

.profile-copy > p {
  max-width: 660px;
}

.profile-facts {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.profile-facts p {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(24, 54, 46, 0.2);
}

.profile-facts span,
.profile-facts strong {
  display: block;
}

.profile-facts span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-facts strong {
  margin-top: 3px;
  color: var(--deep);
  font-size: 0.94rem;
}

.skills {
  padding-block: 72px;
}

.skill-grid {
  display: grid;
  gap: 12px;
}

.skill-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.skill-grid span {
  color: var(--accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}

.skill-grid h3 {
  margin: 9px 0 5px;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

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

.contact-section {
  padding-block: 58px;
  background: var(--deep);
  color: white;
}

.contact-grid {
  display: grid;
  gap: 8px 24px;
}

.contact-grid h2 {
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 8vw, 3.8rem);
}

.contact-grid p {
  color: var(--sage);
}

.button-light {
  max-width: 100%;
  overflow: hidden;
  background: white;
  color: var(--deep);
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-linkedin {
  margin-top: 10px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-block: 20px;
  color: var(--muted);
  font-size: 0.76rem;
}

.site-footer p {
  margin: 0;
}

.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease, box-shadow 520ms ease;
}

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

.project-card.reveal-item.is-visible {
  box-shadow: 0 16px 44px rgba(24, 54, 46, 0.08);
}

.modal-open {
  overflow: hidden;
}

.image-modal[hidden] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 24, 20, 0.78);
}

.image-modal-panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(86vh, 760px);
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.image-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.image-modal-header h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
}

.image-modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--deep);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.image-modal img {
  display: block;
  width: 100%;
  max-height: calc(86vh - 62px);
  object-fit: contain;
  background: var(--sage);
}

@media (min-width: 700px) {
  :root {
    --shell: min(1120px, calc(100% - 64px));
  }

  .desktop-nav,
  .header-contact,
  .header-linkedin {
    display: flex;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 270px;
    align-items: end;
    padding-block: 72px 58px;
  }

  .proof-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .proof-grid span {
    font-size: 0.76rem;
  }

  .focus-grid,
  .signal-section,
  .profile-grid,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .focus-grid {
    align-items: center;
  }

  .project-card {
    display: grid;
    grid-template-columns: minmax(250px, 36%) 1fr;
  }

  .project-visual img {
    min-height: 100%;
  }

  .project-content {
    padding: 28px;
  }

  .story-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (min-width: 980px) {
  .skill-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .skill-grid article {
    grid-column: span 2;
  }

  .skill-grid article:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .skill-grid article:nth-child(5) {
    grid-column: span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
