:root{
  --bg: #f4f1ed;
  --bg2:#efeae4;
  --text:#2b2b2b;
  --muted:#6b6b6b;
  --card:#f7f3ef;
  --border: rgba(0,0,0,.10);
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --radius: 18px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--text);
  background:var(--bg);
}

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

.container{
  width:min(1100px, calc(100% - 48px));
  margin-inline:auto;
}

.header{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(244,241,237,.75);
  border-bottom:1px solid var(--border);
}

.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
}

.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit}
.brand__logo{height:46px; width:auto}

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

.nav a{
  text-decoration:none;
  color:var(--text);
  font-size:14px;
  letter-spacing:.2px;
}
.nav a:hover{opacity:.75}

.nav__toggle{
  display:none;
  border:1px solid var(--border);
  background:transparent;
  border-radius:12px;
  padding:8px 10px;
  font-size:18px;
}

.hero{
  padding:42px 0 10px;
}

.hero__grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:28px;
  align-items:center;
}

.hero__content h1{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-weight:500;
  line-height:1.04;
  font-size:clamp(34px, 4vw, 54px);
  margin:0 0 14px;
}

.hero__content p{
  margin:0 0 20px;
  color:var(--muted);
  max-width:52ch;
  line-height:1.6;
}

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

.hero__media{
  border-radius: 22px;
  overflow:hidden;
  box-shadow: var(--shadow);
  border:1px solid var(--border);
  background:var(--bg2);
  min-height:260px;
}

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

.section{
  padding:52px 0;
}

.section--muted{
  background:var(--bg2);
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}

h2{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-weight:500;
  margin:0 0 20px;
  font-size:clamp(26px, 3vw, 40px);
}

.center{text-align:center}
.mt-24{margin-top:24px}

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

.about__text p{color:var(--muted); line-height:1.7; margin:0 0 12px}

.about__media{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
.about__media img{
  border-radius: 18px;
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  object-fit:cover;
  background:var(--bg);
}

.cards{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}

.card{
  background: rgba(255,255,255,.35);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:18px 16px;
  box-shadow: var(--shadow);
}

.card h3{
  margin:10px 0 8px;
  font-size:16px;
  letter-spacing:.2px;
}

.card p{
  margin:0;
  color:var(--muted);
  line-height:1.55;
  font-size:14px;
}

.icon{
  width:40px; height:40px;
  border:1px solid var(--border);
  border-radius:14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.35);
}

.projects{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
  margin-top:18px;
}

.project{
  position:relative;
  border-radius: 18px;
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration:none;
  color:inherit;
  background:var(--bg2);
}

.project img{
  width:100%;
  height:220px;
  object-fit:cover;
  filter: saturate(1.03);
  transform: scale(1.01);
  transition: transform .25s ease;
}
.project:hover img{transform: scale(1.06)}

.project__meta{
  position:absolute;
  left:0; right:0; bottom:0;
  padding:14px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0));
  color:white;
}

.project__title{font-weight:600; font-size:14px}
.project__sub{font-size:12px; opacity:.92; margin-top:4px}

.contact__grid{
  display:grid;
  grid-template-columns: .95fr 1.05fr;
  gap:24px;
  align-items:start;
}

.contact__list{
  list-style:none;
  padding:0;
  margin:14px 0 0;
  color:var(--muted);
}
.contact__list li{margin:8px 0}
.contact__list a{color:inherit}

.form{
  background: rgba(255,255,255,.35);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}

label{display:block; font-size:13px; color:var(--muted); margin-bottom:12px}
input, textarea{
  width:100%;
  margin-top:6px;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.55);
  outline:none;
  font:inherit;
  color:var(--text);
}
input:focus, textarea:focus{border-color: rgba(0,0,0,.22)}

.form__hint{margin:12px 0 0; color:var(--muted); font-size:12px; line-height:1.45}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius: 16px;
  border:1px solid rgba(0,0,0,.22);
  background: #2e2e2e;
  color:white;
  text-decoration:none;
  font-size:14px;
  letter-spacing:.2px;
  cursor:pointer;
  transition: transform .05s ease, opacity .15s ease;
}

.btn:hover{opacity:.92}
.btn:active{transform: translateY(1px)}

.btn--ghost{
  background: transparent;
  color: var(--text);
  border:1px solid rgba(0,0,0,.18);
}

.btn--sm{padding:9px 12px; border-radius:14px; font-size:13px}

.footer{
  padding:22px 0;
  border-top:1px solid var(--border);
  background: rgba(244,241,237,.6);
}
.footer__inner{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
}
.footer__links{display:flex; gap:14px}
.footer__links a{color:inherit; text-decoration:none}
.footer__links a:hover{opacity:.8}

@media (max-width: 980px){
  .cards{grid-template-columns: repeat(2, 1fr)}
  .projects{grid-template-columns: repeat(2, 1fr)}
  .hero__grid{grid-template-columns: 1fr}
  .hero__media{order:-1}
  .about__grid{grid-template-columns: 1fr}
  .contact__grid{grid-template-columns: 1fr}
}

@media (max-width: 720px){
  .nav{display:none; position:absolute; right:24px; top:70px; flex-direction:column; align-items:stretch;
       background: rgba(244,241,237,.95); border:1px solid var(--border); border-radius: 18px;
       padding:12px; width:min(260px, calc(100% - 48px)); box-shadow: var(--shadow); }
  .nav a{padding:10px 10px; border-radius:14px}
  .nav a:hover{background: rgba(255,255,255,.35)}
  .nav__toggle{display:inline-flex}
  .brand__logo{height:42px}
}


/* --- pages --- */
.page-title{font-family: ui-serif, Georgia, "Times New Roman", Times, serif;font-weight:500;font-size: clamp(34px, 4vw, 54px);margin: 6px 0 10px;}
.page-sub{color: var(--muted); margin: 0 0 20px; line-height:1.6}
.filterbar{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin: 12px 0 22px;}
.pill{border:1px solid rgba(0,0,0,.16);background: rgba(255,255,255,.35);color: var(--text);border-radius: 14px;padding: 10px 14px;font-size: 14px;cursor:pointer;}
.pill.is-active{background: #2e2e2e;color: #fff;border-color: rgba(0,0,0,.22);}
.projects--3{grid-template-columns: repeat(3, 1fr)}
@media (max-width: 980px){ .projects--3{grid-template-columns: repeat(2, 1fr)} }
@media (max-width: 560px){ .projects--3{grid-template-columns: 1fr} }
.ui-preview{margin-top: 26px;border:1px solid var(--border);background: rgba(255,255,255,.30);border-radius: var(--radius);overflow:hidden;box-shadow: var(--shadow);}
.ui-preview__title{padding: 12px 14px;font-size: 13px;color: var(--muted);border-bottom: 1px solid var(--border);}

/* project detail */
.project-hero{padding: 26px 0 8px;}
.breadcrumb{color: var(--muted);font-size: 13px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom: 12px;}
.breadcrumb a{color: inherit; text-decoration:none}
.breadcrumb a:hover{opacity:.8}
.project-hero__grid{display:grid;grid-template-columns: .85fr 1.15fr;gap: 18px;align-items:end;}
.project-hero__text h1{font-family: ui-serif, Georgia, "Times New Roman", Times, serif;font-weight:500;font-size: clamp(34px, 4vw, 56px);margin: 0 0 8px;}
.muted{color: var(--muted)}
.project-hero__img{border-radius: 22px;overflow:hidden;border:1px solid var(--border);box-shadow: var(--shadow);background: var(--bg2);min-height: 240px;}
.project-hero__img img{width:100%;height: 320px;object-fit: cover;}
.project-body{display:grid;grid-template-columns: 1.1fr .9fr;gap: 18px;align-items:start;}
.project-article h2{margin-top: 0}
.thumbs{display:grid;grid-template-columns: repeat(4, 1fr);gap: 12px;margin: 16px 0 18px;}
.thumbs img{border-radius: 16px;border:1px solid var(--border);box-shadow: var(--shadow);aspect-ratio: 4 / 3;object-fit: cover;background: var(--bg);}
.project-aside{position:sticky; top: 92px}
.aside-card{background: rgba(255,255,255,.35);border:1px solid var(--border);border-radius: var(--radius);padding: 16px;box-shadow: var(--shadow);margin-bottom: 14px;}
.aside-card h3{margin: 0 0 10px; font-size: 16px}
.kv{display:flex; flex-direction:column; gap:10px}
.kv__row{display:flex; justify-content:space-between; gap:10px; font-size: 13px; color: var(--muted)}
.kv__row strong{color: var(--text); font-weight: 600}
.mini-projects{display:flex; flex-direction:column; gap:10px}
.mini-projects a{display:grid;grid-template-columns: 68px 1fr;gap: 10px;align-items:center;text-decoration:none;color: inherit;padding: 8px;border-radius: 16px;border:1px solid rgba(0,0,0,.06);background: rgba(255,255,255,.22);}
.mini-projects a:hover{background: rgba(255,255,255,.30)}
.mini-projects img{width:68px; height:56px; object-fit:cover;border-radius: 12px;border:1px solid var(--border);}
.mp__t{font-weight:600; font-size: 13px}
.mp__s{font-size: 12px; margin-top: 2px}
@media (max-width: 980px){
  .project-hero__grid{grid-template-columns: 1fr}
  .project-body{grid-template-columns: 1fr}
  .project-aside{position:static}
  .thumbs{grid-template-columns: repeat(2, 1fr)}
  .project-hero__img img{height: 280px}
}#projectDesc, #projectProcess{
  white-space: pre-line;
}
/* --- GALLERY LIGHTBOX --- */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.lightbox.is-open{
  display: flex;
}

.lightbox__img{
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  background: #fff;
}

.lightbox__close{
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

