:root{
  /* Base */
  --bg:#0b0f0d;
  --panel:#0f1512;
  --border: rgba(46,229,157,0.18);

  /* Text */
  --header-title:#D7FFE9;
  --nav:#8EF6C7;
  --nav-hover:#2EE59D;

  --text:#CFE7DD;
  --secondary:#9BB8AE;
  --muted:#6F8E83;

  /* Cards */
  --card-title:#E6FFF4;
  --card-desc:#A7C2B8;
  --card-meta:#7E9A90;

  /* Accent */
  --accent:#2EE59D;
  --accent-text:#07110E;
  --outline: rgba(46,229,157,0.35);

  /* Micro red (optional) */
  --danger:#E83B3B;

  /* Header layer */
  --header-bg: rgba(5,10,9,0.72);
  --header-blur: 10px;

  /* Radius */
  --r-12: 12px;
  --r-16: 16px;
  --r-18: 18px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:system-ui, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: var(--bg);
}

a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.92; }

.container{
  width:min(1100px, 92%);
  margin:0 auto;
}

.header{
  position: sticky;
  top: 12px;
  z-index: 50;

  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:14px 16px;
  margin: 12px auto 0;

  background: var(--header-bg);
  backdrop-filter: blur(var(--header-blur));
  -webkit-backdrop-filter: blur(var(--header-blur));

  border: 1px solid rgba(46,229,157,0.14);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-18);
}

.logo{
  width:40px;
  height:40px;
  border:1px solid rgba(46,229,157,0.22);
  display:grid;
  place-items:center;
  border-radius: var(--r-12);

  color: var(--header-title);
  background: rgba(15,21,18,.35);
  font-weight: 800;
  letter-spacing: .6px;
}

.nav{
  display:flex;
  gap:16px;
}

.nav a{
  color: var(--nav);
  font-weight: 700;
  letter-spacing: .2px;
}

.nav a:hover{
  color: var(--nav-hover);
}

.hero{
  padding: 70px 0 40px;
}

.hero h1{
  font-size: 52px;
  margin: 0 0 10px;
  color: var(--header-title);
  letter-spacing: .3px;
}

.subtitle{
  color: var(--secondary);
  margin: 0 0 22px;
  font-size: 18px;
}

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

.btn{
  display:inline-block;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid rgba(46,229,157,0.18);
  background: rgba(15,21,18,.55);
  color: var(--header-title);
  transition: transform .15s ease, filter .15s ease, background .15s ease, border-color .15s ease;
}

.btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn.primary{
  background: var(--accent);
  color: var(--accent-text);
  border-color: rgba(46,229,157,0.35);
}

.btn.primary:hover{
  filter: brightness(1.08);
}

.btn.outline{
  background: transparent;
  border: 1px solid var(--outline);
  color: var(--nav);
}

.btn.outline:hover{
  border-color: rgba(46,229,157,0.55);
  color: var(--nav-hover);
}

.section{
  margin: 42px 0;
  padding: 22px;
  border: 1px solid rgba(46,229,157,0.12);
  border-radius: var(--r-18);
  background: rgba(15,21,18,.55);
}

.section h2{
  margin: 0 0 10px;
  color: var(--header-title);
  letter-spacing: .2px;
}

.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-hint{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.section p{
  color: var(--text);
  line-height: 1.7;
}

.chips{
  list-style:none;
  padding:0;
  margin:14px 0 0;

  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.chips li{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(46,229,157,0.16);
  color: var(--secondary);
  background: rgba(11,15,13,.35);
}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
}

.card{
  padding:16px;
  border-radius: var(--r-16);
  border:1px solid rgba(46,229,157,0.14);
  background: rgba(11,15,13,.55);
  transition: transform .15s ease, border-color .15s ease, filter .15s ease;
}

.card:hover{
  transform: translateY(-2px);
  border-color: rgba(46,229,157,0.28);
  filter: brightness(1.03);
}

.card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}

.card h3{
  margin:0;
  color: var(--card-title);
}

.tag{
  font-size: 12px;
  color: var(--card-meta);
  border: 1px solid rgba(46,229,157,0.14);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15,21,18,.35);
  white-space: nowrap;
}

.card p{
  margin:0 0 12px;
  color: var(--card-desc);
  line-height: 1.65;
}

.links{
  display:flex;
  gap:12px;
}

.links a{
  color: var(--accent);
  font-weight: 800;
}

.links a:hover{
  filter: brightness(1.12);
}

.inline-link{
  color: var(--accent);
  font-weight: 800;
}

.inline-link:hover{
  filter: brightness(1.12);
}

.footer{
  padding: 26px 0 36px;
  color: var(--muted);
}

@media (max-width: 520px){
  .hero h1{ font-size: 40px; }
  .header{ padding: 12px 12px; }
  .nav{ gap: 12px; }
}

/* ===== Clickable project cards ===== */
.card-link{ display:block; }
.card-link:hover{ opacity: 1; }
.fake-link{ color: var(--accent); font-weight: 800; }

/* ===== Project pages ===== */
.project-hero h1{
  margin:0 0 8px;
  color: var(--header-title);
  font-size: 44px;
}

.project-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.pill{
  font-size: 12px;
  color: var(--card-meta);
  border: 1px solid rgba(46,229,157,0.14);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15,21,18,.35);
}

.project-links{
  margin-top: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.gallery{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  margin-top: 14px;
}

.gimg{
  width:100%;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(46,229,157,0.14);
  cursor: zoom-in;
  background: rgba(11,15,13,.35);
}

.bullets{
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.8;
}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  color: var(--nav);
}

.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 999;
  background: rgba(5,10,9,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox.open{
  display: grid;
}

.lightbox img{
  width: min(1000px, 92vw);
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(46,229,157,0.18);
}

.lightbox-close{
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(46,229,157,0.18);
  background: rgba(15,21,18,.65);
  color: var(--header-title);
  font-size: 24px;
  cursor: pointer;
}

/* ===== Full-site background image layer ===== */
.has-bg{
  position: relative;
}

.has-bg::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;

  background-image: url("../assets/img/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  opacity: .55;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
}

.has-bg::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    radial-gradient(1200px 700px at 12% 0%, rgba(46,229,157,.18), transparent 55%),
    radial-gradient(900px 600px at 90% 18%, rgba(232,59,59,.08), transparent 50%),
    linear-gradient(180deg, rgba(5,10,9,.78) 0%, rgba(5,10,9,.72) 50%, rgba(5,10,9,.82) 100%);
}


/* ===== Project pages: structured case study + upgraded gallery ===== */

.muted{ color: var(--muted); }

.h3{
  margin: 0 0 10px;
  color: var(--header-title);
  font-size: 14px;
  letter-spacing: .2px;
  text-transform: uppercase;
}

.two-col{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.pill-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.gallery2{
  margin-top: 14px;
}

.gallery-main{
  display:grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items:center;
}

.gbtn{
  width:44px;
  height:44px;
  border-radius: 14px;
  border: 1px solid rgba(46,229,157,0.18);
  background: rgba(15,21,18,.55);
  color: var(--header-title);
  font-size: 22px;
  cursor: pointer;
}

.gbtn:hover{ filter: brightness(1.08); }

.gmain{
  width: 100%;
  height: min(520px, 56vh);
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(46,229,157,0.14);
  cursor: zoom-in;
  background: rgba(11,15,13,.35);
}

.gallery-thumbs{
  display:flex;
  gap:10px;
  margin-top: 12px;
  overflow:auto;
  padding-bottom: 4px;
}

.thumb{
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(46,229,157,0.14);
  opacity: .72;
  cursor: pointer;
  flex: 0 0 auto;
  background: rgba(11,15,13,.35);
}

.thumb.active{
  opacity: 1;
  border-color: rgba(46,229,157,0.38);
}

.timeline{
  display:grid;
  gap: 12px;
}

.titem{
  border: 1px solid rgba(46,229,157,0.14);
  background: rgba(11,15,13,.45);
  border-radius: 16px;
  padding: 14px;
}

.titem .tlabel{
  color: var(--card-title);
  font-weight: 800;
  margin: 0 0 6px;
}

.titem .tdetail{
  color: var(--card-desc);
  margin: 0;
  line-height: 1.65;
}

@media (max-width: 820px){
  .two-col{ grid-template-columns: 1fr; }
  .gmain{ height: min(420px, 52vh); }
}


.hero-blurb{
  margin: 0 0 22px;
  color: var(--text);
  max-width: 72ch;
  line-height: 1.7;
}

.hero-head{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom: 14px;
}

.avatar{
  width: 220px;
  height: 220px;
  border-radius: 20px;
  object-fit: cover;

  border: 1px solid rgba(46,229,157,0.22);
  background: rgba(15,21,18,.35);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

@media (max-width: 520px){
  .avatar{ width:90px; height:90px; border-radius:18px; }
}
