:root {
  --bg: #f3eadb;
  --bg-strong: #e8dbc4;
  --panel: rgba(255, 249, 239, 0.78);
  --panel-strong: #fffaf1;
  --ink: #221814;
  --muted: #62554a;
  --clay: #8d5e36;
  --clay-deep: #663b19;
  --aqua: #2f726d;
  --line: rgba(102, 59, 25, 0.18);
  --line-strong: rgba(102, 59, 25, 0.34);
  --shadow: 0 22px 58px rgba(88, 57, 28, 0.14);
  --max: 1220px;
  --header: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0 0, rgba(47, 114, 109, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(141, 94, 54, 0.06), transparent 32%),
    linear-gradient(rgba(102, 59, 25, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 59, 25, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 30px 30px, 30px 30px, auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - var(--max)) / 2));
  background: rgba(243, 234, 219, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 18px;
  display: inline-block;
  border: 2px solid var(--clay);
  border-bottom-width: 4px;
  border-top: 0;
  background:
    radial-gradient(circle at 50% 100%, transparent 0 47%, var(--clay) 48% 53%, transparent 54%) 2px 0 / 16px 16px repeat-x;
}

.brand-text { font-size: 0.98rem; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a,
.lang-btn,
.menu-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.menu-toggle:hover { color: var(--ink); }

.lang-btn {
  padding: 8px 10px;
  border-radius: 999px;
}

.lang-btn.active {
  background: var(--ink);
  color: var(--panel-strong);
}

.menu-toggle { display: none; }
.container { width: min(var(--max), calc(100vw - 44px)); margin-inline: auto; }
.section {
  padding: 44px 0;
  border-bottom: 1px solid rgba(102, 59, 25, 0.14);
}

.full-screen {
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--clay-deep);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
  font-weight: 900;
}

h1 {
  margin-bottom: 10px;
  font-family: "Baskervville", Georgia, serif;
  font-size: clamp(2.75rem, 5.6vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 12px;
  font-family: "Baskervville", Georgia, serif;
  font-size: clamp(2rem, 3.3vw, 3.25rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.role {
  margin-bottom: 18px;
  color: var(--aqua);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.84rem;
  font-weight: 900;
}

.tagline,
.section-head p,
.history-card p,
.project-summary,
.project-availability,
.project-details,
.skill-card p,
.certificate-item p,
.contact-section p,
.repo-card p {
  color: var(--muted);
  line-height: 1.65;
}

.tagline {
  max-width: 590px;
  font-size: clamp(1.06rem, 1.45vw, 1.3rem);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--clay);
  text-decoration: none;
  font-weight: 850;
}

.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffaf1;
}

.btn.secondary {
  background: transparent;
  color: var(--clay-deep);
}

.hero-contact {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.87rem;
  font-weight: 800;
}

.hero-contact a {
  text-underline-offset: 4px;
  color: var(--clay-deep);
}

.hero-note {
  margin-top: 22px;
  max-width: 620px;
  padding: 14px 16px;
  border-left: 3px solid var(--aqua);
  background: rgba(255, 250, 241, 0.62);
}

.hero-note span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--clay-deep);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 900;
}

.hero-note p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-photo,
.history-card,
.project-card,
.skill-card,
.credential-panel,
.repo-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-photo {
  margin: 0;
  position: relative;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  display: block;
}

.hero-photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  background: rgba(34, 24, 20, 0.82);
  color: #fffaf1;
  font-size: 0.8rem;
  font-weight: 800;
}

.section-head.compact {
  max-width: 860px;
  margin-bottom: 30px;
}

.history-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.history-card,
.project-card,
.skill-card,
.credential-panel,
.repo-card {
  padding: 22px;
}

.history-step {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--clay);
  font-weight: 900;
  letter-spacing: 0.16em;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.project-shot {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.project-rail {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--clay);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 900;
}

.project-meta {
  margin-bottom: 8px;
  color: var(--aqua);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 900;
}

.project-repo {
  margin-bottom: 12px;
  color: var(--clay-deep);
  font-size: 0.83rem;
  font-weight: 800;
}

.project-summary { margin-bottom: 16px; }
.project-details {
  margin: 0 0 16px;
  padding-left: 18px;
}

.project-details li + li { margin-top: 8px; }

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.stack-tags span,
.repo-language {
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  color: var(--clay-deep);
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 850;
}

.project-availability {
  margin-bottom: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.project-links a,
.inline-link {
  color: var(--ink);
  font-weight: 850;
  text-underline-offset: 5px;
}

.two-column {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 48px;
  align-items: start;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skill-card h3,
.credential-head h3 {
  margin-bottom: 14px;
}

.credentials-wrap {
  display: grid;
  gap: 18px;
}

.credential-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}

.credential-list {
  display: grid;
  gap: 12px;
}

.certificate-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.certificate-item h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.certificate-item p {
  margin-bottom: 4px;
}

.certificate-item span {
  color: var(--clay);
  font-size: 0.85rem;
  font-weight: 800;
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.repo-card {
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease;
}

.repo-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.repo-card h3 {
  margin: 14px 0 10px;
  font-size: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.site-footer {
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 1020px) {
  .hero-grid,
  .two-column,
  .contact-grid,
  .history-grid,
  .project-grid,
  .skills-grid,
  .repo-grid {
    grid-template-columns: 1fr;
  }

  .full-screen {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  :root { --header: 64px; }
  .site-header { padding-inline: 18px; }
  .menu-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    padding: 16px 18px 20px;
    background: rgba(243, 234, 219, 0.98);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
  }
  .site-nav.open { display: flex; }
  .container { width: min(100% - 32px, var(--max)); }
  .footer-inner { flex-direction: column; }
}
