/* Editorial design system */
:root {
  --ink: #171714;
  --ink-soft: #3f3f39;
  --muted: #73736b;
  --paper: #f8f7f3;
  --surface: #ffffff;
  --surface-soft: #efeee8;
  --line: #deddd5;
  --accent: #df5d43;
  --accent-dark: #b9432d;
  --accent-soft: #f7ded7;

  --gojo-space-cadet: var(--ink);
  --gojo-blue-magenta-violet: var(--accent);
  --gojo-lavender-purple: var(--muted);
  --gojo-anti-flash-white: var(--paper);
  --gojo-light-blue: var(--accent-soft);
  --gojo-dark-blue: var(--ink);

  --bs-primary: var(--accent);
  --bs-primary-rgb: 223, 93, 67;
  --bs-secondary: #77776f;
  --bs-secondary-rgb: 119, 119, 111;
  --bs-dark: var(--ink);
  --bs-light: var(--paper);
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-link-color: var(--ink);
  --bs-link-hover-color: var(--accent-dark);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 6%, rgba(223, 93, 67, 0.08), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

a {
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.container {
  max-width: 1160px;
}

.page-shell {
  min-height: 65vh;
  padding-top: 2rem;
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  margin: 0;
  padding: 0.9rem 0;
  background: rgba(248, 247, 243, 0.88);
  border-bottom: 1px solid rgba(222, 221, 213, 0.82);
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark:hover {
  color: var(--ink);
}

.brand-mark em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.brand-symbol {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
}

.navbar-nav {
  gap: 0.25rem;
}

.navbar .nav-link {
  position: relative;
  padding: 0.55rem 0.85rem !important;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.navbar .nav-link::after {
  position: absolute;
  right: 0.85rem;
  bottom: 0.35rem;
  left: 0.85rem;
  height: 1px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus-visible {
  color: var(--ink);
}

.navbar .nav-link:hover::after,
.navbar .nav-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.navbar-toggler {
  z-index: 1050;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0.55rem;
  box-shadow: none !important;
}

.navbar-toggler-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.navbar-collapse {
  z-index: 1040;
}

/* Homepage hero */
.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
  min-height: 560px;
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

.eyebrow {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 2.5rem;
  height: 1px;
  background: var(--accent);
}

.intro-copy h1 {
  max-width: 780px;
  margin-bottom: 1.6rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro-copy h1 i {
  position: relative;
  color: var(--accent);
  font-weight: 600;
}

.intro-copy p {
  max-width: 630px;
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  line-height: 1.8;
}

.intro-actions {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.text-link {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

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

.intro-portrait {
  position: relative;
  justify-self: center;
}

.profile-circle {
  position: relative;
  z-index: 1;
  width: clamp(210px, 25vw, 300px);
  height: clamp(210px, 25vw, 300px);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 8px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 25px 70px rgba(23, 23, 20, 0.16);
}

.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-ring {
  position: absolute;
  inset: -25px -20px 20px 25px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transform: rotate(10deg);
}

.intro-stamp {
  position: absolute;
  z-index: 2;
  right: -1rem;
  bottom: 1rem;
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-family: "DM Mono", monospace;
  font-size: 0.61rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.content-divider {
  scroll-margin-top: 6rem;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-divider strong {
  color: var(--ink);
  font-weight: 500;
}

.content-divider .line {
  height: 1px;
  background: var(--line);
}

.section-heading {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3rem);
}

/* Portfolio */
.portfolio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: end;
  min-height: 600px;
  padding: clamp(4rem, 9vw, 8rem) 0;
}

.portfolio-hero-copy h1 {
  max-width: 820px;
  margin-bottom: 1.6rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(3.2rem, 6.7vw, 6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
}

.portfolio-hero-copy h1 i {
  color: var(--accent);
  font-weight: 600;
}

.portfolio-hero-copy > p {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.85;
}

.portfolio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.portfolio-actions .btn-outline-primary {
  padding: 0.8rem 1.15rem;
}

.portfolio-status {
  padding: 1.5rem;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.status-label {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 1.4rem;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-label span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #39a768;
  box-shadow: 0 0 0 4px rgba(57, 167, 104, 0.13);
}

.portfolio-status dl,
.portfolio-status dd {
  margin: 0;
}

.portfolio-status dl > div {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.portfolio-status dt {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
}

.portfolio-status dd {
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 700;
}

.expertise-section,
.projects-section {
  padding: 2rem 0 5rem;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.expertise-item {
  position: relative;
  min-height: 350px;
  padding: 2rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.34);
  transition: background-color 180ms ease;
}

.expertise-item:last-child {
  border-right: 0;
}

.expertise-item:hover {
  background: var(--surface);
}

.expertise-item > span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
}

.expertise-item > i {
  display: block;
  margin: 3rem 0 2rem;
  color: var(--accent);
  font-size: 1.8rem;
}

.expertise-item h2 {
  max-width: 260px;
  margin-bottom: 1rem;
  font-family: "Playfair Display", serif;
  font-size: 1.65rem;
}

.expertise-item p {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.expertise-item small {
  position: absolute;
  right: 2rem;
  bottom: 1.75rem;
  left: 2rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.projects-section {
  scroll-margin-top: 5rem;
}

.portfolio-projects {
  border-top: 1px solid var(--ink);
}

.portfolio-project {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--line);
}

.portfolio-project:nth-child(even) .project-visual {
  order: 2;
}

.project-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
}

.project-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, transparent 55%, rgba(23, 23, 20, 0.22));
  content: "";
  pointer-events: none;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0, 1);
}

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

.project-index {
  position: absolute;
  z-index: 1;
  right: 1rem;
  bottom: 0.75rem;
  color: var(--surface);
  font-family: "Playfair Display", serif;
  font-size: 2rem;
}

.project-kicker {
  margin-bottom: 0.8rem;
  color: var(--accent-dark);
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-copy h2 {
  margin-bottom: 1.1rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.project-copy p {
  max-width: 520px;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.portfolio-empty {
  padding: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  text-align: center;
}

.portfolio-empty > span {
  color: var(--accent-dark);
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-empty h2 {
  max-width: 680px;
  margin: 1rem auto;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.portfolio-empty p {
  max-width: 580px;
  margin: 0 auto 1.75rem;
  color: var(--ink-soft);
}

.portfolio-contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 8vw, 7rem);
  margin: 2rem 0 1rem;
  padding: clamp(3rem, 7vw, 5rem);
  background: var(--ink);
  color: var(--paper);
}

.portfolio-contact .eyebrow,
.portfolio-contact p {
  color: #c5c4bb;
}

.portfolio-contact h2 {
  max-width: 570px;
  color: var(--paper);
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.02;
}

.portfolio-contact p {
  margin-bottom: 2rem;
}

.portfolio-contact .btn-primary {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

/* Cards and content */
.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.card-body {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.card-header {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.card-header h5 {
  font-family: "DM Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-card {
  position: relative;
  margin-bottom: 1rem;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.post-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--accent);
  content: "";
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 180ms ease;
}

.post-card:hover {
  border-color: #c9c7bd;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(23, 23, 20, 0.06);
}

.post-card:hover::before {
  transform: scaleY(1);
}

.post-title {
  margin-bottom: 0.65rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.22;
}

.post-title a {
  color: var(--ink);
}

.post-title a:hover {
  color: var(--accent-dark);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.card-text {
  color: var(--ink-soft);
}

.category-badge {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.28rem 0.55rem;
  border-radius: 99px;
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
  font-size: 0.65rem;
  font-weight: 600;
}

.category-badge a {
  color: var(--ink) !important;
}

.list-unstyled a {
  padding: 0.35rem 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.list-unstyled a:hover {
  color: var(--accent-dark);
}

.badge.rounded-pill {
  background: var(--surface-soft) !important;
  color: var(--muted);
}

/* Buttons and forms */
.btn {
  border-radius: 0;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.btn-primary,
.btn-outline-primary:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn-primary {
  padding: 0.8rem 1.15rem;
  box-shadow: 4px 4px 0 var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-outline-primary {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline-secondary {
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-outline-secondary:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.form-control,
.form-select {
  border-color: var(--line);
  border-radius: 0;
  background: var(--surface);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(223, 93, 67, 0.12);
}

/* Article typography */
.post-content {
  margin-bottom: 2rem;
}

.article-content {
  color: #292925;
  font-size: 1.04rem;
  line-height: 1.85;
}

.article-content > p:first-of-type {
  font-size: 1.16rem;
}

.article-content h2,
.article-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-family: "Playfair Display", serif;
}

.article-content img,
.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
}

.article-content blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.5rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
}

.article-content pre {
  margin: 1.5rem 0;
  border: 1px solid #2b2b2b;
  border-radius: 0;
}

.article-content code:not(pre code) {
  padding: 0.12rem 0.3rem;
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.article-content table {
  width: 100%;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 0.65rem;
  border: 1px solid var(--line);
  text-align: left;
}

.article-content th {
  background: var(--surface-soft);
}

/* Editor */
#editor {
  min-height: 300px;
  margin-bottom: 1rem;
  padding: 1rem;
  overflow-y: auto;
  border: 1px solid var(--line);
}

.editor-toolbar {
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
}

.editor-toolbar .btn {
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Pagination, alerts and footer */
.pagination {
  gap: 0.25rem;
}

.pagination .page-link {
  border-color: var(--line);
  border-radius: 0 !important;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
}

.pagination .page-item.active .page-link {
  border-color: var(--ink);
  background: var(--ink);
}

.alert {
  border-radius: 0;
}

.footer {
  margin-top: 6rem;
  padding: 3.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: #efeee8;
  color: var(--ink-soft);
}

.footer p {
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
}

.footer-brand {
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.footer-brand span,
.footer-note {
  color: var(--muted);
}

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

.mb-lg {
  margin-bottom: 2rem;
}

.mt-lg {
  margin-top: 2rem;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 0.8rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    background: var(--surface);
  }

  .home-intro {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 3rem;
    min-height: auto;
  }

  .intro-stamp {
    right: -0.25rem;
  }

  .portfolio-hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
    gap: 3rem;
    min-height: auto;
  }

  .expertise-item {
    min-height: 380px;
    padding: 1.5rem;
  }

  .expertise-item small {
    right: 1.5rem;
    left: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .container {
    padding-right: 1.15rem;
    padding-left: 1.15rem;
  }

  .page-shell {
    padding-top: 1rem;
  }

  .home-intro {
    grid-template-columns: 1fr;
    padding: 4rem 0 5rem;
  }

  .intro-copy h1 {
    font-size: clamp(3.15rem, 15vw, 4.8rem);
  }

  .intro-portrait {
    justify-self: start;
    margin-left: 1rem;
  }

  .intro-portrait .profile-circle {
    width: 190px;
    height: 190px;
  }

  .intro-portrait .portrait-ring {
    inset: -18px -14px 14px 18px;
  }

  .intro-stamp {
    right: -1.5rem;
    bottom: 0.75rem;
  }

  .intro-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.25rem;
  }

  .content-divider {
    grid-template-columns: auto 1fr auto;
  }

  .content-divider strong {
    display: none;
  }

  .section-heading {
    font-size: 2rem;
  }

  .card-body {
    padding: 1.25rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .footer {
    margin-top: 4rem;
  }

  .portfolio-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 4rem 0 5rem;
  }

  .portfolio-hero-copy h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .portfolio-status {
    max-width: 430px;
  }

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

  .expertise-item {
    min-height: 310px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .expertise-item:last-child {
    border-bottom: 0;
  }

  .portfolio-project,
  .portfolio-contact {
    grid-template-columns: 1fr;
  }

  .portfolio-project:nth-child(even) .project-visual {
    order: initial;
  }

  .project-copy h2 {
    font-size: 2.2rem;
  }

  .portfolio-contact {
    margin-right: -1.15rem;
    margin-left: -1.15rem;
    padding: 3rem 1.15rem;
  }
}

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

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