:root{
  --bg:#0f1724;
  --card:#0b1220;
  --text:#e6eef8;
  --muted:#9fb0c9;
  --accent:#6ee7b7;
  --container:1100px;
  --radius:10px;
}
*{box-sizing:border-box}
body{font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;background:linear-gradient(180deg,#071024 0%,#0b1220 100%);color:var(--text);margin:0;line-height:1.5}
.container{max-width:var(--container);margin:0 auto;padding:24px}
.site-header{background:transparent;padding:14px 0}
.site-header .container{display:flex;align-items:center;justify-content:space-between}
.brand{font-weight:700;color:var(--text);text-decoration:none;font-size:1.1rem}
nav a{color:var(--muted);margin-left:18px;text-decoration:none}
nav a:hover{color:var(--text)}
a{color:white}
.hero{padding:60px 0}
.hero h1{font-size:2rem;margin:0 0 12px}
.lead{color:var(--muted);max-width:60ch}
.btn{display:inline-block;padding:10px 14px;border-radius:8px;background:var(--accent);color:#04202a;text-decoration:none;margin-right:8px;font-weight:600}
.btn.ghost{background:transparent;color:var(--text);border:1px solid rgba(255,255,255,0.06)}
.highlights{padding:20px 0}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.card{background:rgba(255,255,255,0.02);padding:18px;border-radius:var(--radius);display:flex;flex-direction:column;min-height:220px}
.projects-grid{display:grid;grid-template-columns:repeat(3,minmax(300px,1fr));gap:24px;margin-top:18px;width:100%}

/* Projects section: stack each project full-width within the container */
.projects-section > div { display: block; width: 100%; }
.projects-section .card { max-width: 100%; margin-bottom: 28px; }
.projects-section .card:last-child { margin-bottom: 0; }

/* Improve mobile compatibility and header/nav responsiveness */
@media (max-width: 1100px){
  .container{padding:20px}
}
@media (max-width: 780px){
  .site-header .container{flex-wrap:wrap;gap:8px}
  nav{width:100%;order:2}
  nav a{margin-left:12px}
  .hero{padding:32px 0}
  .hero h1{font-size:1.4rem}
  .lead{max-width:100%}
  .projects-section .card{padding:14px}
}
@media (max-width:480px){
  .brand{font-size:1rem}
  .btn{padding:8px 10px}
  .carousel-images{height:180px}
}
.muted{color:var(--muted);font-size:0.95rem}
.site-footer{padding:20px 0;color:var(--muted);text-align:center}
.about .bio-grid{display:grid;grid-template-columns:1fr 260px;gap:24px;align-items:start}
.profile-photo{max-width:calc(var(--container) / 6);border-radius:8px;display:block}
.bio-aside .photo-placeholder{width:100%;height:220px;border-radius:8px;background:linear-gradient(180deg,#0b1b2a,#07121a);display:flex;align-items:center;justify-content:center;color:var(--muted);font-weight:700}
@media (max-width:780px){
  .about .bio-grid{grid-template-columns:1fr}
  nav a{margin-left:10px}
  .hero h1{font-size:1.5rem}
}
.small{padding:8px 10px;border-radius:6px}
.btn.small{font-size:0.9rem}
.contact{padding:30px 0}
/* Carousel styles */
.carousel-gallery { display: flex; align-items: center; justify-content: center; margin: 18px 0; }
.carousel-images { width: 100%; height: 220px; position: relative; overflow: hidden; border-radius: 10px; background: transparent; border: 1px solid rgba(255,255,255,0.04); display: flex; align-items: center; justify-content: center; }

@media (max-width:1100px){
  .projects-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:640px){
  .projects-grid{grid-template-columns:1fr}
}
.carousel-img { position: absolute; left: 0; top: 0; right: 0; bottom: 0; margin: auto; transition: opacity 0.3s; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.18); max-width:100%; max-height:100%; width:auto; height:100%; object-fit:contain; }
.carousel-btn { background: var(--accent); color: #04202a; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 1.5rem; cursor: pointer; margin: 0 12px; font-weight: bold; transition: background 0.2s; }
.carousel-btn:hover { background: #42c9a7; }
