/* THEME */
:root{
  --bg:#020716;
  --bg2:#01040d;

  --text:#eaf2ff;
  --muted:#9fb3d7;

  --surface: rgba(255,255,255,.06);
  --surface2: rgba(255,255,255,.10);

  --accent:#6dadf5;    
  --accent2:#cdf8fc;   

  --shadow: 0 18px 55px rgba(0,0,0,.45);
}
/* Dark mode*/
html[data-theme="dark"] .wrap,
html[data-theme="dark"] .modal{
  --text: #ffffff;
  --muted: #ffffff;
}

html[data-theme="light"]{
  --bg:#f6f9ff;
  --bg2:#ffffff;

  --text:#0b1220;
  --muted:#4a6482;

  --surface: rgba(11,18,32,.05);
  --surface2: rgba(11,18,32,.10);

  --accent:#1d9bf0;   
  --accent2:#81c8d6; 

  --shadow: 0 16px 45px rgba(2,6,23,.10);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  overflow-x:hidden;

  background:
    radial-gradient(1200px 800px at 15% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(900px 700px at 85% 15%, color-mix(in srgb, var(--accent2) 14%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 60%, var(--bg) 130%);
}

.bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.9;
}

/* LAYOUT */
.wrap{ max-width:1200px; margin:0 auto; padding: 26px 18px 70px; }
.section{ margin-top:54px; }
.muted{ color:var(--muted); }
.small{ font-size:13px; }

/* NAV (sticky + hide on scroll down) */
.nav{
  position: sticky;
  top:0;
  z-index:1000;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg2) 75%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--surface2) 35%, transparent);
  transition: transform .22s ease;
}
.nav.navHidden{ transform: translateY(-110%); }

.navInner{
  max-width:1200px;
  margin:0 auto;
  width:100%;
  padding:12px 18px;
  display:flex;
  align-items:center;
  gap:12px;
}

.brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:inherit;
}
.brandMark{
  width:38px; height:38px;
  display:grid; place-items:center;
  border-radius:14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, transparent), color-mix(in srgb, var(--accent2) 65%, transparent));
  color: #050a18;
  font-weight:1000;
  letter-spacing:.02em;
}

.navCenter{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  flex-wrap:nowrap;
  white-space:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.navCenter::-webkit-scrollbar{ display:none; }
.navCenter{ scrollbar-width:none; }

.navLink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  background: var(--surface);
  color:var(--muted);
  font-weight:900;
  font-size:14px;
  text-decoration:none;
}
.navLink:hover{ color:var(--text); background: var(--surface2); }

.themeBtn{
  border:0;
  background: var(--surface);
  color:inherit;
  width:42px; height:42px;
  border-radius:14px;
  cursor:pointer;
  font-size:18px;
}
.themeBtn:hover{ background: var(--surface2); }

/* HERO */
.hero{ padding-top: 24px; }
.kicker{
  margin:0 0 14px;
  letter-spacing:.22em;
  font-weight:900;
  font-size:12px;
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}
h1{
  margin:0 0 12px;
  font-size: clamp(30px, 3.5vw, 54px); /* smaller */
  line-height:1.08;
  letter-spacing:-.02em;
}

.lead{
  margin: 0 0 18px;
  max-width: 72ch;
  color: var(--muted);
  font-size: 18px;
  line-height:1.7;
}

.bullets{
  list-style:none;
  padding:0;
  margin: 0 0 22px;
  display:grid;
  gap:10px;
  max-width: 72ch;
}
.bullets li{
  display:flex;
  align-items:flex-start;
  gap:12px;
  font-size: 18px;
  line-height:1.6;
}
.dot{
  width:10px; height:10px;
  margin-top: 10px;
  border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.cta{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }

.btn, .btnPrimary, .btnGhost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:900;
  border-radius:16px;
  padding:12px 16px;
}

.btn{
  background: var(--surface);
  color: var(--text);
}
.btn:hover{ background: var(--surface2); }

.btnPrimary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#050a18;
  border:0;
}
.btnPrimary:hover{ opacity:.95; }

.btnGhost{
  border:0;
  background: transparent;
  color: var(--muted);
  cursor:pointer;
  padding:10px 12px;
  border-radius:14px;
}
.btnGhost:hover{ background: var(--surface); color: var(--text); }

/* icon buttons */
.iconBtn{
  width:52px; height:52px;
  padding:0;
  border-radius:16px;
  background: var(--surface);
  display:grid;
  place-items:center;
  text-decoration:none;
  color: var(--text);
}
.iconBtn:hover{ background: var(--surface2); }
.icon{
  width:26px; height:26px;
  display:block;
  fill: currentColor;
}

/* SECTION HEAD */
.sectionHead{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  flex-wrap:wrap;
}
.sectionActions{ display:flex; gap:10px; }

/* FILTERS */
.filters{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.filter{
  border:0;
  background: var(--surface);
  color: var(--muted);
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
}
.filter:hover{ background: var(--surface2); color: var(--text); }
.filter.active{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#050a18;
}

/* PROJECT CARDS GRID */
.grid{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:40px;
}

.project{
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-radius: 22px;
  padding: 14px;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform .18s ease, background-color .18s ease;
  position:relative;
}
.project:hover{
  transform: translateY(-4px);
  background: color-mix(in srgb, var(--surface2) 80%, transparent);
}

.thumb{
  width:100%;
  height: clamp(180px, 22vw, 280px);  /* not too small, not too huge */
  border-radius:18px;
  overflow:hidden;
  background:
    radial-gradient(600px 220px at 20% 20%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%),
    radial-gradient(600px 220px at 80% 30%, color-mix(in srgb, var(--accent2) 18%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 60%, transparent);
}

.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  opacity:.95;
}

.pTopRow{
  margin: 12px 0 6px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.pTitle{
  color: inherit;
  text-decoration: none;
  display: inline-block;
  font-weight: 700;
}

/* Only titles with titleLink=true get hover underline */
.pTitleLink{
  color: inherit;
  display: inline-block;
  cursor: pointer;
  text-decoration: underline !important;   /* always */
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.pTitleLink:hover,
.pTitleLink:focus-visible{
  text-decoration-thickness: 4px;
}

.pDesc{ margin: 0 0 10px; color: var(--muted); line-height:1.6; }

.tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.tag{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background: color-mix(in srgb, var(--surface2) 60%, transparent);
  color: color-mix(in srgb, var(--text) 75%, var(--muted));
  font-weight:850;
}

/* only GitHub link now */

.githubIconLink{
  width:40px;
  height:40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: var(--surface);
  color: var(--text);
  text-decoration:none;
  flex: 0 0 auto;
}
.githubIconLink:hover{ background: var(--surface2); }

.githubIconLink .icon{ width:22px; height:22px; }

/* highlight jump */
.project.flash{
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 3px;
}

/* CONTACT */
.contact{
  margin-top:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* FOOTER */
.footer{ margin-top:46px; text-align:center; }

.page{
  flex:1;
  padding: 18px;
}
.spine{
  width:18px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--surface2) 80%, transparent),
    color-mix(in srgb, var(--surface) 65%, transparent));
}
.pageInner{
  height:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.pageCard{
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border-radius: 16px;
  padding: 12px;
  cursor:pointer;
  transition: transform .14s ease, background-color .14s ease;
}
.pageCard:hover{
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--surface2) 80%, transparent);
}
.pageCardTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.pageCardTitle{
  font-weight:950;
}
.pageCardTags{
  font-size:12px;
  color: var(--muted);
  font-weight:900;
  white-space:nowrap;
}
.pageCardDesc{
  margin-top:6px;
  color: var(--muted);
  font-size:13px;
  line-height:1.55;
}
/* About paragraph: align edges */
#about p{
  width: 100%;
  max-width: 100%;
  line-height: 1.75;
  font-size: clamp(16px, 1.1vw, 18px);

  text-align: justify;          
  text-justify: inter-word;
  hyphens: auto;                
}


/* RESPONSIVE */
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
  .contact{ flex-direction:column; align-items:flex-start; }
  .book{ flex-direction:column; }
  .spine{ height:14px; width:100%; }
}
@media (max-width: 420px){
  .navInner{ gap:10px; }
  .navLink{ padding:8px 10px; font-size:13px; }
  .themeBtn{ width:40px; height:40px; border-radius:14px; }
}





