@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

/* ===== Sky-Glass Light Theme ===== */
:root{
  --bg-top: #E9F4FF;
  --bg-bottom: #CDE9FF;
  --text: #0F2233;
  --muted: #5C6E7F;
  --accent-a: #8c5ab8;
  --accent-b: #6EC1FF;
  --panel: rgba(255,255,255,0.70);
  --panel-solid: #FFFFFF;
  --ring: rgba(81,179,255,0.30);
  --border: rgba(15,34,51,0.06);
  --shadow: 0 12px 28px rgba(15,34,51,0.10), 0 2px 8px rgba(15,34,51,0.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(110,193,255,0.22), transparent 60%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

/* Container */
.container { max-width: 1120px; padding: 24px; margin: 0 auto; }

/* ===== Header ===== */
.site-header{
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
  background: linear-gradient(to bottom, rgba(255,255,255,0.65), rgba(255,255,255,0.35));
  border-bottom: 1px solid var(--border);
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color: var(--text); }
.brand-mark{ width:36px; height:36px; border-radius:10px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); box-shadow: var(--shadow); }
.brand-word{ font-weight:600; letter-spacing:.2px; }

.nav{ display:flex; gap:18px; align-items:center; }
.nav-link{
  position:relative; text-decoration:none; color: var(--muted);
  font-weight:500; font-size:14px;
}
.nav-link:hover{ color: var(--text); }
.nav-link::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:2px;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
.nav-link:hover::after{ transform: scaleX(1); }

/* ===== Hero ===== */
.hero{ padding: 16px 0 0; }
.hero-centered{ min-height: 24vh; display:flex; align-items:flex-start; padding-top: 6vh; }
.hero-title{
  font-weight: 700; font-size: 40px; line-height: 1.15; margin: 0;
  letter-spacing:.3px; text-wrap: balance; color: var(--text);
  display: inline-block;
  padding: 14px 22px;
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
/* Gradient word */
.grad{
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;  /* Chrome/Safari */
  background-clip: text;           /* Others */
  color: transparent;              /* Firefox */
  -webkit-text-fill-color: transparent;
}

/* ===== Content (iframe panel) ===== */
.frame-wrap { margin-top: 12px; }
.content-frame{
  width:100%; height:70vh; border:0; border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ===== Pages inside iframe ===== */
.page{ max-width: 920px; margin: 0 auto; padding: 40px 28px; font-size: 16px; line-height: 1.65; }
.page h1{ font-weight:700; font-size:32px; margin: 0 0 12px; }
.page p.lead{ color: var(--muted); margin-top: 0; }

/* Cards */
.cards{ display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 16px; margin-top: 18px; }
.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3{ margin: 0 0 6px; font-size: 18px; }
.card p{ margin: 0 0 10px; color: var(--muted); }
.card a{ color: var(--text); text-decoration: none; font-weight: 600; }
.card a:hover{ color: var(--accent-b); text-decoration: underline; }

/* Socials */
.socials{ display:flex; gap:18px; align-items:center; justify-content:center; flex-wrap:wrap; margin:18px auto 32px; }
.social{ color: var(--muted); text-decoration:none; font-weight:600; }
.social:hover{ color: var(--text); }

/* Footer */
.site-footer{ border-top: 1px solid var(--border); }
.site-footer p{ text-align:center; color: var(--muted); font-size: 13px; }

@media (max-width: 720px){
  .hero-title{ font-size: 36px; padding: 12px 18px; }
  .content-frame{ height: 64vh; }
}

/* ===== Portfolio: Lightbox Gallery ===== */
.gallery-open { overflow: hidden; }

.lightbox-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* Let CSS/viewport control the viewer size; thumbs (if shown) sit below */
.lightbox{
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: auto;                    /* width/height controlled by viewer below */
  height: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

/* Viewer has an explicit box sized to the viewport: image fits inside with contain */
.viewer{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0f14;
  padding: 12px;
  width: min(92vw, 1000px);
  height: min(78svh, 78vh);       /* fits comfortably in viewport */
}

/* Image always fully visible (no cropping, no upscaling) */
.viewer img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}

.nav-btn{
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15,34,51,0.12);
  color: #0f2233;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  cursor: pointer;
}
.nav-btn:hover{ background: #fff; }
.nav-prev{ left: 12px; }
.nav-next{ right: 12px; }

.close-btn{
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(15,34,51,0.12);
  color: #0f2233;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  cursor: pointer;
  font-weight: 800;
}

.thumbs{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  background: rgba(255,255,255,0.9);
  padding: 10px;
  border-top: 1px solid var(--border);
}
.thumbs img{
  width: 100%; height: 70px; object-fit: cover; border-radius: 8px;
  cursor: pointer; border: 2px solid transparent;
}
.thumbs img.active{ border-color: var(--accent-b); }
