:root {
  --paper: #f4f1ea;
  --paper-deep: #e8e3da;
  --ink: #171816;
  --muted: #66665f;
  --line: #cfc8bc;
  --card: #fbfaf6;
  --accent: #6657d9;
  --accent-strong: #4f43b9;
  --dark: #171816;
  --dark-soft: #252620;
  --white: #ffffff;
  --header-bg: rgba(244, 241, 234, 0.92);
  --radius-sm: 8px;
  --radius-md: 14px;
  --shadow: 0 18px 45px rgba(33, 31, 27, 0.10);
  --max: 1240px;
}

body.dark {
  --paper: #141512;
  --paper-deep: #1d1f1a;
  --ink: #f1eee7;
  --muted: #b8b5ad;
  --line: #3b3d36;
  --card: #1c1d19;
  --dark: #eeeae1;
  --dark-soft: #d9d5cc;
  --white: #11120f;
  --header-bg: rgba(20, 21, 18, 0.92);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  transition: background-color .25s ease, color .25s ease;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

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

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

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  transform: translateY(-150%);
}

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

.page-shell {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease;
}

.site-header.scrolled {
  background: var(--header-bg);
  border-color: var(--line);
  backdrop-filter: blur(12px);
}

.nav-shell {
  width: min(var(--max), calc(100% - 48px));
  height: 82px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.brand span {
  display: grid;
  line-height: 1.2;
}

.brand strong {
  font-size: .93rem;
  letter-spacing: .01em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: .69rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 650;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--ink);
  transition: right .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}

.nav-cta {
  padding: 9px 15px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 700;
  transition: background-color .2s ease, color .2s ease;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

.theme-toggle,
.menu-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.theme-symbol {
  font-size: 1.15rem;
  line-height: 1;
}

.menu-button {
  display: none;
  width: 44px;
  height: 40px;
  border-radius: var(--radius-sm);
  padding: 9px 10px;
}

.menu-button > span:not(.sr-only) {
  display: block;
  height: 1px;
  background: currentColor;
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}

.hero {
  min-height: 100vh;
  padding-top: 132px;
  padding-bottom: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
  align-items: center;
  gap: clamp(42px, 7vw, 100px);
}

.kicker {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.kicker > span {
  display: inline-block;
  width: 34px;
  height: 1px;
  margin-right: 9px;
  vertical-align: middle;
  background: currentColor;
}

.kicker.light {
  color: rgba(255, 255, 255, .65);
}

.hero h1 {
  max-width: 900px;
  margin: 20px 0 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5.2vw, 5.35rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero h1 em {
  color: var(--accent);
  font-weight: inherit;
}

.hero-lead {
  max-width: 730px;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.hero-lead strong {
  color: var(--ink);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 750;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

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

.button-dark {
  background: var(--ink);
  color: var(--paper);
}

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

.button-light {
  background: #fff;
  color: #171816;
}

.text-link {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-weight: 700;
}

.hero-meta {
  margin-top: clamp(42px, 7vw, 76px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.hero-meta div {
  min-width: 0;
}

.hero-meta dt {
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-meta dd {
  margin-top: 6px;
  font-size: .88rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.hero-visual {
  position: relative;
  padding-bottom: 52px;
}

.photo-frame {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .55);
  pointer-events: none;
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 35%;
  filter: saturate(.82) contrast(.98);
}

.photo-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  background: rgba(244, 241, 234, .92);
  color: #171816;
  padding: 7px 10px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.availability-card {
  position: absolute;
  right: -18px;
  bottom: 8px;
  width: min(275px, 82%);
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.availability-card p {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.availability-card strong {
  color: var(--ink);
}

.status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: #31a65a;
  box-shadow: 0 0 0 4px rgba(49, 166, 90, .15);
}

.intro-band {
  border-block: 1px solid var(--line);
  background: var(--paper-deep);
  overflow: hidden;
}

.intro-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.intro-row p {
  min-width: max-content;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.section {
  padding-block: clamp(86px, 10vw, 138px);
}

.section-header {
  display: grid;
  grid-template-columns: 74px minmax(0, 760px);
  gap: 24px;
  align-items: start;
  margin-bottom: clamp(42px, 6vw, 74px);
}

.section-number {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.section-header h2 {
  margin-top: 11px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 4.8vw, 4.7rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: clamp(44px, 8vw, 110px);
  align-items: start;
}

.about-story {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.about-story p + p {
  margin-top: 20px;
  color: var(--muted);
}

.dropcap::first-letter {
  float: left;
  margin: 8px 10px 0 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.6rem;
  line-height: .7;
}

.facts-panel {
  border-top: 1px solid var(--ink);
}

.facts-panel div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 16px;
}

.facts-panel span {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.facts-panel strong {
  font-size: .92rem;
  font-weight: 700;
}

.projects-section,
.history-section {
  background: var(--paper-deep);
  border-block: 1px solid var(--line);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: -24px 0 34px 98px;
}

.filter-button {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 750;
}

.filter-button:hover,
.filter-button.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.project-item {
  min-width: 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: opacity .2s ease, transform .2s ease;
}

.project-item.is-hidden {
  display: none;
}

.project-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.22fr .78fr;
}

.project-media {
  overflow: hidden;
  background: #d9d5cc;
}

.project-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), filter .35s ease;
}

.project-item:not(.project-featured) .project-media img {
  aspect-ratio: 16 / 10;
}

.project-item:hover .project-media img {
  transform: scale(1.025);
  filter: saturate(1.05);
}

.project-content {
  padding: clamp(24px, 4vw, 42px);
}

.project-index {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.project-content h3 {
  margin: 12px 0 11px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
}

.project-content > p:not(.project-index) {
  color: var(--muted);
}

.project-points {
  margin-top: 23px;
  display: grid;
  gap: 9px;
}

.project-points li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: .9rem;
}

.project-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 8px;
  height: 1px;
  background: var(--ink);
}

.project-open {
  margin-top: 24px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

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

.skills-list {
  border-top: 1px solid var(--ink);
}

.skill-row {
  min-height: 118px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 70px 1fr 1.35fr 150px;
  align-items: center;
  gap: 24px;
}

.skill-no {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
}

.skill-row h3 {
  font-size: 1.14rem;
}

.skill-row p {
  color: var(--muted);
  font-size: .94rem;
}

.skill-level {
  justify-self: end;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.history-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(38px, 7vw, 92px);
}

.history-group h3 {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.history-group article {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 22px;
}

.history-group time {
  color: var(--accent);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.history-group h4 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.history-group p {
  color: var(--muted);
  font-size: .9rem;
}

.application-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(310px, .78fr);
  gap: 24px;
}

.application-note,
.application-side {
  border: 1px solid var(--line);
  background: var(--card);
}

.application-note {
  padding: clamp(28px, 5vw, 62px);
}

.letter-date {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.application-note h3 {
  margin: 28px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
}

.application-note p:not(.letter-date) {
  max-width: 760px;
  color: var(--muted);
}

.application-note p + p {
  margin-top: 16px;
}

.application-note .signature {
  margin-top: 36px;
  color: var(--ink);
}

.application-side {
  padding: clamp(26px, 4vw, 42px);
  align-self: stretch;
  background: var(--accent);
  color: #fff;
}

.application-side h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  font-weight: 500;
}

.application-side ul {
  margin-top: 24px;
}

.application-side li {
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.32);
}

.application-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.application-side .button-dark {
  background: #fff;
  color: #171816;
}

.application-side .button-outline {
  color: #fff;
  border-color: rgba(255,255,255,.65);
}

.contact-section {
  padding-block: clamp(86px, 10vw, 130px);
  background: #171816;
  color: #fff;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr .82fr;
  gap: clamp(50px, 9vw, 120px);
  align-items: start;
}

.contact-copy h2 {
  max-width: 760px;
  margin: 15px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
}

.contact-copy > p:not(.kicker) {
  max-width: 600px;
  color: rgba(255,255,255,.62);
}

.contact-links {
  margin-top: 38px;
  border-top: 1px solid rgba(255,255,255,.24);
}

.contact-links a {
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,.24);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: .85rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.contact-links span {
  color: rgba(255,255,255,.62);
  text-transform: none;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.contact-form {
  border-top: 1px solid rgba(255,255,255,.28);
}

.form-row {
  padding: 17px 0;
  border-bottom: 1px solid rgba(255,255,255,.28);
}

.form-row label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255,255,255,.62);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 3px 0;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: #fff;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: rgba(255,255,255,.35);
}

.contact-form .button {
  margin-top: 22px;
}

.form-note {
  min-height: 24px;
  margin-top: 12px;
  color: rgba(255,255,255,.72);
  font-size: .84rem;
}

.site-footer {
  background: #171816;
  color: rgba(255,255,255,.52);
  border-top: 1px solid rgba(255,255,255,.15);
}

.footer-row {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: .78rem;
}

.footer-row a {
  color: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 15, .76);
  backdrop-filter: blur(7px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  max-height: min(720px, calc(100vh - 44px));
  overflow: auto;
  padding: clamp(28px, 5vw, 52px);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
  transform: translateY(14px);
  transition: transform .2s ease;
}

.modal.show .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.modal-category {
  color: var(--accent);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.modal-panel h2 {
  margin: 12px 44px 16px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
}

.modal-panel > p:not(.modal-category) {
  color: var(--muted);
}

.modal-panel ul {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.modal-panel li {
  padding: 14px 0 14px 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--muted);
}

.modal-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.65em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .2, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1050px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .82rem; }
  .hero { grid-template-columns: 1fr .72fr; gap: 48px; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta div:last-child { grid-column: 1 / -1; }
  .project-featured { grid-template-columns: 1fr; }
  .skill-row { grid-template-columns: 58px .8fr 1.2fr 128px; gap: 18px; }
}

@media (max-width: 860px) {
  .page-shell,
  .nav-shell { width: min(100% - 32px, var(--max)); }

  .menu-button { display: block; }

  .nav-right {
    position: fixed;
    top: 82px;
    left: 16px;
    right: 16px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }

  .nav-right.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links {
    display: grid;
    gap: 0;
  }

  .nav-links li {
    border-bottom: 1px solid var(--line);
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: .95rem;
  }

  .nav-links a::after { display: none; }
  .nav-cta { text-align: center; }
  .theme-toggle { justify-self: start; }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 126px;
  }

  .hero-visual {
    width: min(520px, 92%);
    margin-inline: auto;
  }

  .intro-row {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .intro-row::-webkit-scrollbar { display: none; }

  .about-layout,
  .application-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .project-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: auto; }

  .skill-row {
    grid-template-columns: 46px 1fr auto;
  }

  .skill-row p {
    grid-column: 2 / -1;
  }

  .skill-level {
    grid-column: 3;
    grid-row: 1;
  }

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

@media (max-width: 620px) {
  body { font-size: 15px; }
  .brand small { display: none; }
  .brand img { width: 39px; height: 39px; }
  .nav-shell { height: 72px; }
  .nav-right { top: 72px; }

  .hero {
    padding-top: 108px;
    padding-bottom: 56px;
  }

  .hero h1 { font-size: clamp(2.75rem, 15vw, 4.3rem); }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-meta div:last-child { grid-column: auto; }
  .availability-card { right: -6px; }

  .section-header {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .section-header h2 { font-size: clamp(2.25rem, 11vw, 3.6rem); }
  .filter-row { margin-left: 0; }

  .facts-panel div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .skill-row {
    min-height: 0;
    grid-template-columns: 38px 1fr;
    gap: 8px 13px;
  }

  .skill-row p,
  .skill-level {
    grid-column: 2;
  }

  .skill-level {
    grid-row: auto;
    justify-self: start;
  }

  .history-group article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-links a {
    flex-direction: column;
    gap: 3px;
  }

  .footer-row {
    padding-block: 20px;
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =====================================
   PROJECT SECTION BARU
   ===================================== */

.projects-compact {
  padding-block: 90px;
  background: var(--paper-deep);
  border-block: 1px solid var(--line);
}

/* Bagian judul project */
.projects-top {
  margin-bottom: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 35px;
}

.projects-heading-small {
  max-width: 650px;
}

.projects-label {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.projects-heading-small h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.projects-heading-small > p:last-child {
  max-width: 600px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

/* Filter */
.project-filter-compact {
  margin: 0;
  justify-content: flex-end;
}

.project-filter-compact .filter-button {
  padding: 9px 15px;
  border-radius: 9px;
  font-size: 0.74rem;
}

/* Grid project */
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Kartu project */
.project-card-new {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.project-card-new:hover {
  transform: translateY(-6px);
  border-color: var(--ink);
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.09);
}

/* Gambar */
.project-media-new {
  position: relative;
  height: 205px;
  overflow: hidden;
  background: #d9d5cc;
}

.project-media-new img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card-new:hover .project-media-new img {
  transform: scale(1.04);
}

/* Label di atas gambar */
.project-category-new {
  position: absolute;
  left: 13px;
  bottom: 13px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(15, 15, 15, 0.82);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

/* Isi kartu */
.project-content-new {
  padding: 20px;
}

.project-number-new {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.project-content-new h3 {
  margin: 12px 0 9px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.project-content-new > p {
  min-height: 70px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

/* Teknologi */
.project-tech-new {
  min-height: 30px;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tech-new span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

/* Tombol detail */
.project-button-new {
  width: 100%;
  margin-top: 18px;
  padding: 13px 0 0;
  border: none;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 800;
  text-align: left;
}

.project-button-new span {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.project-button-new:hover {
  color: var(--accent);
}

.project-button-new:hover span {
  transform: translate(3px, -3px);
}

/* Filter dari JavaScript */
.project-card-new.is-hidden {
  display: none;
}

/* Tablet */
@media (max-width: 1000px) {
  .projects-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-filter-compact {
    justify-content: flex-start;
  }

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

/* HP */
@media (max-width: 650px) {
  .projects-compact {
    padding-block: 75px;
  }

  .projects-heading-small h2 {
    font-size: 2.15rem;
  }

  .project-card-grid {
    grid-template-columns: 1fr;
  }

  .project-media-new {
    height: 225px;
  }

  .project-content-new > p {
    min-height: auto;
  }
}