/* Shared presentation for portfolio landing pages and nested articles. */
:root {
  --content-ink: #26352f;
  --content-muted: #637168;
  --content-green: #557a63;
  --content-green-dark: #365643;
  --content-green-soft: #e9f1e9;
  --content-yellow: #f4e7ad;
  --content-yellow-soft: #fff9df;
  --content-grey: #f4f5f2;
  --content-line: #dce3dc;
  --content-white: #fff;
  --content-shadow: 0 10px 28px rgba(45, 67, 55, .08);
}

body { color: var(--content-ink); background: #fbfcf9; font-size: 14px; line-height: 1.68; }
a { color: var(--content-green-dark); }
a:hover { color: #78915f; }

#header {
  width: 248px;
  padding: 0 14px;
  background: #f7f7f1;
  border-right: 1px solid var(--content-line);
  box-shadow: 5px 0 24px rgba(48, 65, 54, .05);
}
#header .profile img { width: 88px; margin: 17px auto 9px; border: 5px solid #e0e8df; }
#header .profile h1 { font-size: 19px; }
#header .profile h1 a, #header .profile h1 a:hover { color: var(--content-ink); }
#header .profile .social-links a {
  width: 31px; height: 31px; padding: 7px 0; font-size: 15px;
  color: var(--content-green-dark); background: #e9eee8;
}
#header .profile .social-links a:hover { color: var(--content-ink); background: var(--content-yellow); }
.nav-menu { padding-top: 17px; }
.nav-menu a, .nav-menu a:focus {
  margin-bottom: 1px; padding: 8px 12px; color: #647068; font-size: 13px; border-radius: 9px;
}
.nav-menu a i, .nav-menu a:focus i { color: #91a197; font-size: 18px; }
.nav-menu a:hover, .nav-menu .active, .nav-menu .active:focus, .nav-menu li:hover > a {
  color: var(--content-green-dark); background: var(--content-green-soft);
}
.nav-menu a:hover i, .nav-menu .active i, .nav-menu .active:focus i, .nav-menu li:hover > a i { color: var(--content-green); }

#main { margin-left: 248px; }
.container, .container-fluid { max-width: 1500px; padding-left: 20px; padding-right: 20px; }
section { padding: 42px 0; }
.section-bg { background: var(--content-grey); }
h1, h2, h3, h4, h5, h6 { color: var(--content-ink); }
h1 { font-size: clamp(28px, 3vw, 42px); }
h2 { font-size: clamp(23px, 2.4vw, 32px); }
h3 { font-size: 19px; }
h4 { font-size: 16px; }
p, li { line-height: 1.68; }

.breadcrumbs {
  padding: 16px 0;
  background: #edf2e8;
  border-bottom: 1px solid var(--content-line);
}
.breadcrumbs h2 { margin: 0; color: var(--content-green-dark); font-size: 20px; }
.breadcrumbs ol { gap: 7px; margin: 0; }
.breadcrumbs .clickable-box, .clickable-box {
  display: inline-flex; padding: 7px 11px; color: var(--content-green-dark);
  background: var(--content-white); border: 1px solid var(--content-line); border-radius: 999px;
  font-size: 12px; box-shadow: none;
}
.breadcrumbs .clickable-box:hover, .clickable-box:hover { color: var(--content-ink); background: var(--content-yellow); }

.section-title { padding-bottom: 20px; }
.section-title h2 { color: var(--content-green-dark); font-size: 27px; margin-bottom: 12px; padding-bottom: 11px; }
.section-title h2::after { width: 42px; height: 2px; background: #c7a942; }
.portfolio-details { padding-top: 32px; }
.portfolio-details .portfolio-info,
.resume-item-wide,
.project-card,
.card {
  border: 1px solid var(--content-line);
  border-radius: 14px;
  box-shadow: var(--content-shadow);
}

/* Compact linked-card grids used throughout category pages. */
.portfolio { display: block; margin: 0; }
.portfolio .portfolio-container { margin-inline: -7px; }
.portfolio .portfolio-item { margin: 0; padding: 7px; text-align: left; flex: initial; max-width: none; }
.portfolio .portfolio-wrap {
  display: grid; grid-template-columns: 70px minmax(0,1fr); align-items: center;
  min-height: 92px; margin: 0; padding: 10px;
  background: var(--content-white); border: 1px solid var(--content-line);
  border-radius: 13px; box-shadow: 0 4px 14px rgba(45,67,55,.05);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.portfolio .portfolio-wrap::before, .portfolio .portfolio-links { display: none; }
.portfolio .portfolio-wrap img,
.portfolio .portfolio-wrap img[style] {
  width: 64px !important; height: 64px !important; object-fit: contain; border-radius: 8px;
}
.portfolio .portfolio-wrap > i { width: 64px; color: var(--content-green); font-size: 38px !important; text-align: center; }
.portfolio .portfolio-wrap:hover { transform: translateY(-2px); border-color: #a9bda9; box-shadow: var(--content-shadow); }
.portfolio a { text-decoration: none; }
.portfolio-title { margin: 0; padding: 0 11px; color: var(--content-ink); font-size: 13px; text-align: left; }
.portfolio #portfolio-flters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
  padding: 6px !important; margin-bottom: 22px; background: var(--content-green-soft) !important;
  border: 1px solid var(--content-line); border-radius: 14px;
}
.portfolio #portfolio-flters li { margin: 0; padding: 8px 11px; color: #5d6962; font-size: 11px; border-radius: 9px; }
.portfolio #portfolio-flters li:hover, .portfolio #portfolio-flters li.filter-active {
  color: var(--content-green-dark); background: var(--content-white);
}

/* Article content */
#main table { width: 100%; margin: 20px 0 30px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--content-line); border-radius: 12px; background: #fff; }
#main th { padding: 10px 12px; color: var(--content-green-dark); background: var(--content-green-soft); font-size: 12px; text-align: left; }
#main td { padding: 9px 12px; border-top: 1px solid var(--content-line); font-size: 13px; vertical-align: top; }
#main tr:nth-child(even) td { background: #fafbf8; }
#main blockquote { margin: 22px 0; padding: 15px 20px; background: var(--content-yellow-soft); border-left: 4px solid #d0b654; border-radius: 0 10px 10px 0; }
#main img { max-width: 100%; height: auto; }
figure { margin: 20px auto; }
figcaption { color: var(--content-muted); font-size: 12px; text-align: center; }
pre { border-color: #d7ded7; border-radius: 10px; font-size: 12px; }

/* Click-controlled shortcut panel, shared with the homepage. */
.right-side-list {
  top: auto; right: 18px; bottom: 70px; z-index: 1000;
  padding: 0; transform: none; background: transparent;
}
.right-side-list .dropdown { display: block; }
.right-side-list .dropbtn {
  padding: 8px 13px; color: var(--content-ink); background: var(--content-yellow);
  border: 1px solid #deca77; border-radius: 999px; box-shadow: var(--content-shadow); font-size: 12px;
}
.right-side-list .dropdown-content {
  position: absolute; right: 0; bottom: calc(100% + 9px); top: auto;
  display: none; width: 220px; max-height: min(66vh,520px); overflow-y: auto;
  margin: 0; background: rgba(255,255,255,.98); border: 1px solid var(--content-line);
  border-radius: 14px; box-shadow: var(--content-shadow);
}
.right-side-list .dropdown-content.is-open { display: block; }
.right-side-list .dropdown:hover .dropdown-content { display: none; }
.right-side-list .dropdown:hover .dropdown-content.is-open { display: block; }
.right-side-list .dropbtn[aria-expanded="true"] { color: #fff; background: var(--content-green-dark); border-color: var(--content-green-dark); }
.right-side-list ul { margin: 0; padding: 7px; list-style: none; }
.right-side-list li { margin: 0; }
.right-side-list a { display: block; padding: 7px 9px; color: var(--content-ink); font-size: 12px; border-radius: 7px; text-decoration: none; }
.right-side-list a:hover { color: var(--content-green-dark); background: var(--content-green-soft); }

#footer { width: 248px; padding: 12px 10px; color: var(--content-ink); background: #e5ece2; }
.back-to-top, .mobile-nav-toggle { background: var(--content-green); }
:focus-visible { outline: 3px solid #c7a942; outline-offset: 3px; }

@media (min-width: 1600px) {
  .container, .container-fluid { max-width: 1580px; }
  .portfolio .portfolio-item { width: 25%; }
}
@media (max-width: 1199px) {
  #main { margin-left: 0; }
  .container, .container-fluid { max-width: 100%; padding-left: 18px; padding-right: 18px; }
  #footer { width: auto; }
}
@media (max-width: 768px) {
  body { font-size: 13px; }
  section { padding: 34px 0; }
  .breadcrumbs .d-flex { align-items: flex-start !important; gap: 12px; flex-direction: column; }
  .breadcrumbs ol { flex-wrap: wrap; padding-left: 0; }
  .right-side-list { right: 12px; bottom: 66px; }
  .right-side-list .dropdown-content { width: min(220px,calc(100vw - 24px)); max-height: min(62vh,440px); }
  #main table { display: block; overflow-x: auto; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Shared shortcut placement: centered on the right edge, panel opens inward. */
.right-side-list {
  top: 50%;
  right: 12px;
  bottom: auto;
  transform: translateY(-50%);
}
.right-side-list .dropdown-content {
  top: 50%;
  right: calc(100% + 9px);
  bottom: auto;
  transform: translateY(-50%);
}
@media (max-width: 768px) {
  .right-side-list { top: 50%; right: 8px; bottom: auto; }
  .right-side-list .dropdown-content {
    top: 50%;
    right: calc(100% + 7px);
    bottom: auto;
    transform: translateY(-50%);
    max-height: min(72vh, 520px);
  }
}
