:root {
  --ink: #171715;
  --paper: #f3efe7;
  --paper-2: #ebe4d8;
  --accent: #a37d50;
  --muted: #716d65;
  --white: #fff;
  --line: rgba(23, 23, 21, .16);
  --sidebar-width: 280px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
::selection { background: var(--accent); color: var(--white); }

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity .7s ease, visibility .7s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-mark {
  border: 1px solid rgba(255,255,255,.35);
  color: var(--white);
  padding: 22px;
  font-family: "Playfair Display", serif;
  font-size: 28px;
  letter-spacing: 2px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 40px 34px 30px;
  background: var(--ink);
  color: var(--white);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.35);
  font-family: "Playfair Display", serif;
  font-weight: 700;
}
.brand-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.main-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  color: rgba(255,255,255,.5);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color .3s ease, transform .3s ease;
}
.nav-link span {
  font-size: 10px;
  color: var(--accent);
}
.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .35s var(--ease);
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  transform: translateX(4px);
}
.nav-link.active::after { width: 36px; }
.sidebar-footer { color: rgba(255,255,255,.45); font-size: 11px; }
.socials { display: flex; gap: 10px; margin-bottom: 18px; }
.socials a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.15);
  transition: .3s ease;
}
.socials a:hover { background: var(--accent); border-color: var(--accent); color: white; }

.mobile-toggle { display: none; }
.site-main {
  position: relative;
  width: calc(100vw - var(--sidebar-width));
  height: 100vh;
  margin-left: var(--sidebar-width);
  overflow: hidden;
}
.panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(40px) scale(.99);
  transition: opacity .55s ease, transform .7s var(--ease), visibility .55s;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.panel.active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.panel::-webkit-scrollbar { width: 5px; }
.panel::-webkit-scrollbar-thumb { background: var(--accent); }

.hero-grid {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.hero-content {
  width: 100%;
  max-width: 1100px;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin: 0;
  padding: 70px 7vw;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2 {
  font-family: "Playfair Display", serif;
  line-height: .98;
}
h1 {
  max-width: 820px;
  margin-bottom: 30px;
  font-size: clamp(58px, 6.5vw, 110px);
  letter-spacing: -4px;
}
h1 em { color: var(--accent); font-weight: 600; }
.hero-content > p {
  max-width: 620px;
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}
.hero-actions { display: flex; align-items: center; gap: 30px; }
.btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  transition: .3s ease;
}
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--ink); color: white; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5px;
  font-weight: 600;
}
.text-link i { transition: transform .3s ease; }
.text-link:hover i { transform: translateX(5px); }
.hero-meta {
  display: grid;
  max-width: 700px;
  grid-template-columns: 1fr 1.7fr;
  gap: 30px;
  margin-top: 85px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; gap: 5px; }
.hero-meta strong { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.hero-meta span { color: var(--muted); font-size: 14px; }

.section-shell {
  width: min(1180px, calc(100% - 10vw));
  min-height: 100vh;
  margin: 0 auto;
  padding: 10vh 0;
}
.section-header {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 34px;
  align-items: start;
  margin-bottom: 75px;
}
.section-number {
  padding-top: 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 2px;
}
.section-header .eyebrow { margin-bottom: 20px; }
.section-header h2 {
  max-width: 850px;
  margin-bottom: 0;
  font-size: clamp(48px, 6vw, 90px);
  letter-spacing: -3px;
}
.about-layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 9vw;
  margin-left: 104px;
}
.lead { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.45; }
.about-copy > p:not(.lead), .contact-intro > p {
  color: var(--muted);
  line-height: 1.8;
}
.about-copy .btn { margin-top: 20px; }
.personal-info { border-top: 1px solid var(--line); }
.personal-info div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.personal-info span { color: var(--muted); font-size: 13px; }
.personal-info strong { font-size: 14px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 90px 0 0 104px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.stats-grid article {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid strong {
  margin-bottom: 8px;
  color: var(--accent);
  font-family: "Playfair Display", serif;
  font-size: 36px;
}
.stats-grid span { color: var(--muted); font-size: 13px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-left: 104px;
}
.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.project-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  background: var(--paper-2);
  transition: transform .5s var(--ease), filter .5s ease;
}
.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: var(--paper-2);
}
.project-card:hover .project-visual { transform: scale(.985); filter: saturate(1.05); }
.project-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 0;
}
.project-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.project-category {
  margin-top: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.project-info h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 25px;
}
.project-title-link {
  display: inline-block;
  color: inherit;
}
.project-open {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 45px; height: 45px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: .3s;
}
.project-open:hover { background: var(--ink); color: white; }

.services-list { margin-left: 104px; border-top: 1px solid var(--line); }
.services-list article {
  display: grid;
  grid-template-columns: 70px 1fr 55px;
  gap: 28px;
  align-items: center;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  transition: padding .35s var(--ease), background .35s ease;
}
.services-list article:hover { padding-left: 22px; background: rgba(163,125,80,.06); }
.service-index { color: var(--accent); font-size: 12px; }
.services-list h3 { margin-bottom: 9px; font-family: "Playfair Display", serif; font-size: 30px; }
.services-list p { max-width: 700px; margin-bottom: 0; color: var(--muted); line-height: 1.7; }
.services-list i { color: var(--accent); font-size: 25px; }

.tabs { margin-left: 104px; }
.tab-buttons { display: flex; gap: 30px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.tab-btn {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0 0 17px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tab-btn::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: .3s;
}
.tab-btn.active { color: var(--ink); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .5s var(--ease); }
.timeline-item {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item h3 { margin-bottom: 5px; font-family: "Playfair Display", serif; font-size: 28px; }
.timeline-item h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.timeline-item p { max-width: 720px; color: var(--muted); line-height: 1.7; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 13px; }
.skills-grid span { padding: 13px 18px; border: 1px solid var(--line); background: rgba(255,255,255,.3); }

.contact-layout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 9vw;
  margin-left: 104px;
}
.contact-details { margin-top: 50px; border-top: 1px solid var(--line); }
.contact-details a, .contact-details div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-details span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.contact-form { display: grid; gap: 22px; }
.contact-form label { display: grid; gap: 9px; }
.contact-form label > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  background: transparent;
  padding: 13px 0;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { border-color: var(--accent); }
.contact-form .btn { justify-self: start; }

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: .35s ease;
}
.project-modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); }
.modal-card {
  position: absolute;
  top: 50%; left: 50%;
  width: min(620px, calc(100% - 40px));
  padding: 55px;
  background: var(--paper);
  transform: translate(-50%, -45%);
  transition: .45s var(--ease);
}
.project-modal.open .modal-card { transform: translate(-50%, -50%); }
.modal-card h2 { font-size: clamp(38px, 5vw, 64px); }
.modal-card p { color: var(--muted); line-height: 1.8; }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(20px);} to {opacity:1;transform:none;} }

@media (max-width: 1100px) {
  :root { --sidebar-width: 230px; }
  .sidebar { padding: 32px 25px; }
  .hero-grid { grid-template-columns: .9fr 1.1fr; }
  .hero-content { padding: 8vh 5vw; }
  h1 { letter-spacing: -2px; }
  .section-shell { width: calc(100% - 7vw); }
  .section-header, .about-layout, .stats-grid, .project-grid, .services-list, .tabs, .contact-layout { margin-left: 0; }
}

@media (max-width: 820px) {
  body { overflow: auto; }
  .mobile-toggle {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 300;
    display: grid;
    width: 48px; height: 48px;
    place-content: center;
    gap: 7px;
    border: 0;
    background: var(--ink);
  }
  .mobile-toggle span { width: 22px; height: 1px; background: white; transition: .3s; }
  .mobile-toggle.open span:first-child { transform: translateY(4px) rotate(45deg); }
  .mobile-toggle.open span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .sidebar {
    width: min(340px, 86vw);
    transform: translateX(-100%);
    transition: transform .45s var(--ease);
  }
  .sidebar.open { transform: translateX(0); }
  .site-main { width: 100%; height: auto; margin-left: 0; overflow: visible; }
  .panel { position: relative; display: none; min-height: 100vh; overflow: visible; }
  .panel.active { display: block; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image-wrap { min-height: 66vh; padding: 50px 8vw 0; }
  .hero-image { height: 60vh; }
  .hero-frame { left: 4vw; top: 70px; height: 54vh; }
  .hero-content { min-height: auto; padding: 65px 8vw 90px; }
  h1 { font-size: clamp(48px, 14vw, 76px); }
  .hero-meta { margin-top: 55px; }
  .section-shell { width: calc(100% - 16vw); padding: 90px 0; }
  .section-header { grid-template-columns: 35px 1fr; gap: 15px; margin-bottom: 55px; }
  .section-header h2 { font-size: clamp(42px, 12vw, 68px); letter-spacing: -2px; }
  .about-layout, .contact-layout { grid-template-columns: 1fr; gap: 60px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-meta { grid-template-columns: 1fr; }
  .section-shell { width: calc(100% - 40px); }
  .section-header { grid-template-columns: 1fr; }
  .section-number { padding: 0; }
  .about-layout, .stats-grid, .project-grid, .services-list, .tabs, .contact-layout { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .services-list article { grid-template-columns: 38px 1fr; }
  .services-list article > i { display: none; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; }
  .tab-buttons { gap: 16px; overflow-x: auto; }
  .modal-card { padding: 45px 25px 30px; }
}
