:root{
  --bg-1:#070709;
  --bg-2:#0f1113;
  --muted:#9aa0a6;
  --accent:#b36b6b;
  --glass: rgba(255,255,255,0.03);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; 
  font-family:Helvetica Neue,Arial,sans-serif; /*Segoe UI,Roboto,Helvetica,Arial,sans-serif;*/
  background: linear-gradient(180deg,var(--bg-1),var(--bg-2));
  color:#e6e6e6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
.container{max-width:1100px;margin:0 auto;padding:0.25rem}
.site-layout{display:grid;grid-template-columns:240px 1fr;min-height:100vh}
.sidebar{background:linear-gradient(180deg,rgba(0,0,0,0.45),transparent);border-right:0px solid rgba(255,255,255,0.03);}
.sidebar-inner{display:flex;flex-direction:column;gap:1.25rem;padding:2.25rem 1.25rem}
.side-nav{display:flex;flex-direction:column;margin-top:0.75rem}
.side-nav a{color:var(--muted);text-decoration:none;padding:0.45rem 0;border-radius:4px}
.side-nav a.active{color:#fff}
.main-content{padding-bottom:0rem}
.main-content{padding-right:0rem}
/* Bio page layout */
.main-content h1{padding-top:7.5rem;margin-bottom:1.25rem}
.bio-layout{display:flex;gap:36px;align-items:center}
.portrait{flex:0 0 420px}
.portrait img{width:100%;height:auto;object-fit:cover;border-radius:8px;display:block}
.bio-text{flex:1;display:flex;flex-direction:column;justify-content:center}
.bio-text p{text-align:center;color:var(--muted);line-height:1.6;margin:0 0 1rem}

@media (max-width:900px){
  .bio-layout{display:block}
  .portrait{width:100%;flex:auto;margin-bottom:18px}
  .portrait img{height:auto}
  .bio-text p{text-align:center}
}
.site-header{backdrop-filter:blur(6px);border-bottom:1px solid rgba(255,255,255,0.03);position:sticky;top:0;background:linear-gradient(180deg,rgba(0,0,0,0.35),transparent)}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:0.75rem 0}
.brand{color:#fff;font-weight:600;text-decoration:none;font-size:3.05rem}
.main-nav a{color:var(--muted);text-decoration:none;margin-left:1.15rem;padding:0.4rem 0.6rem;border-radius:3px}
.main-nav a:hover{color:#fff;background:var(--glass)}
.main-nav a.active{color:#fff;border:1px solid rgba(255,255,255,0.04);background:linear-gradient(180deg,rgba(255,255,255,0.02),transparent)}
.hero{padding:0rem 0 2rem}
.name{font-size:clamp(2rem,6vw,4rem);margin:0 0 0.25rem}
.subtitle{color:var(--muted);font-size:1.15rem;margin:0}
.section-title{margin:0 0 1rem;color:var(--muted)}
.gallery{padding:2rem 0 2rem}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}
.tile{position:relative;overflow:hidden;border-radius:8px;margin:0;background:#0b0d0f;aspect-ratio:1/1}
.tile img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .6s cubic-bezier(.2,.8,.2,1),filter .4s}
.tile:hover img{transform:scale(1.06);filter:brightness(0.85) saturate(0.9)}
.site-footer{border-top:1px solid rgba(255,255,255,0.03);padding:1.25rem 0;color:var(--muted)}

/* Contact form */
.contact-page h1{margin-top:0}
.contact-form{max-width:640px;display:flex;flex-direction:column;gap:0.75rem}
.contact-form label{display:flex;flex-direction:column;color:var(--muted);font-size:0.95rem}
.contact-form input,.contact-form textarea{background:transparent;border:1px solid rgba(255,255,255,0.06);padding:0.6rem;border-radius:6px;color:#e9e9e9}
.contact-form button{margin-top:0.25rem;padding:0.6rem 1rem;border-radius:6px;border:0;background:var(--accent);color:#111;font-weight:600;cursor:pointer}

@media (max-width:640px){
  .header-inner{padding:0.5rem}
  .main-nav a{margin-left:0.5rem}
  .tiles{gap:10px}
  .site-layout{grid-template-columns:1fr}
  .sidebar{border-right:none;border-bottom:1px solid rgba(255,255,255,0.03)}
  .sidebar-inner{flex-direction:row;align-items:center;justify-content:space-between;padding:0.75rem 1rem}
  .side-nav{display:flex;gap:0.5rem}
  .side-nav a{padding:0.35rem 0.5rem}
}

/* Reduce horizontal padding for the main content and gallery to give tiles more room */
.main-content .container{max-width:1400px;padding-left:0.6rem;padding-right:0.6rem}
.gallery.container{padding-left:0.5rem;padding-right:0.5rem}

@media (min-width:1400px){
  .tiles{grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:24px}
}

/* Project sub-navigation */
.project-subnav {
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.08);
  margin: 0.1rem 0 0.25rem;
}
.project-subnav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0;
  font-size: 0.9rem;
}
.project-subnav a:hover { color: #fff; }
.project-subnav a.active { color: #fff; }

/* Projects page layout */

.projects-layout {
  display: grid;
  grid-template-columns: 35% 65%;   /* left image, right text */
  grid-template-rows: 55vh auto;    /* row 1 = 55% viewport height, row 2 = auto for credits */
  gap: 2rem;
  align-items: start;
  padding: 2rem 0;
}

/* Image container fills its column */
.project-image-container,
.project-text {
  height: 100%; /* fill the 55vh row */
}

/* Swiper container with fixed aspect ratio */
.swiper {
  width: 100%;
  height: 100%;       /* fill the 55vh row */
  max-height: 100%;   /* prevent overflow */
  aspect-ratio: auto; /* we can let it stretch to fit row height */
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* show full image */
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-text {
  grid-column: 2;
  grid-row: 1;
}

.project-text-credits {
  grid-column: 1 / -1;
  grid-row: 2;
}
.project-credits-inner {
  column-count: 3;
  column-gap: 2rem;
  text-align: center;
}
.project-credits-inner h2 {
  column-span: all;
  margin-bottom: 1rem;
  text-align: center;
}
.credit {
  break-inside: avoid;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .project-credits-inner { column-count: 2; }
}
@media (max-width: 540px) {
  .project-credits-inner { column-count: 1; }
}

@media (max-width: 768px) {
  .projects-layout {
    grid-template-columns: 1fr;  /* stack slideshow + text */
    grid-template-rows: auto auto auto; /* row height adjusts */
  }

  .project-image-container,
  .project-text {
    height: auto; /* natural height on mobile */
  }

  .swiper {
    aspect-ratio: 4/3;
    height: auto;
  }
}
