:root{
  --bg: #0b0d10;
  --bg-2: #0f141b;
  --text: #e8edf2;
  --muted: #9fb0c3;
  --accent: #5b9cff;
  --accent-2: #7bdc8b;
  --ring: rgba(91,156,255,0.35);
  --panel: #12161b;
  --border: #1f2a3a;
  --shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* Reset-ish */
*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);

  /* Dramatic full-height background (no patchy edges) */
  background:
    radial-gradient(120% 85% at 15% -10%, #16243a 0%, transparent 70%),
    radial-gradient(120% 95% at 100% 0%, #1a2a44 0%, transparent 70%),
    radial-gradient(140% 80% at -10% 100%, #132033 0%, transparent 65%),
    linear-gradient(to bottom, var(--bg) 0%, var(--bg-2) 100%);
  background-repeat: no-repeat;
}

.container{ width: min(1100px, 92%); margin: 0 auto; }
.row{ display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.site-header{
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,13,16,0.65);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1d2631;
  margin: 5px;
  height: 90px;
  display: flex;
}
.brand{ display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 800; }
.brand-mark{ font-size: 1.4rem; }
.brand-text{ letter-spacing: .5px; }

.topnav .btn{ margin-left: .25rem; }

.hero{ padding: 48px 0 22px; }
h1{ font-size: clamp(28px, 3.6vw, 44px); margin: 0 0 8px; }
.lead{ color: var(--muted); max-width: 60ch; }

.filters{ margin-top: 18px; gap: .6rem; display:flex; }
.input{
  border: 1px solid #243244;
  background: #0e131a;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
}
.input:focus{ border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

.btn{
  border: 1px solid #294161;
  background: #122033;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  line-height: 1;
  margin: 2px;
}
.btn:hover{ border-color: var(--accent); }
.btn.ghost{ background: transparent; }
.btn.small{ padding: 8px 12px; border-radius: 10px; }

/* Coffee button */
.btn.coffee{
  border-color: #34563a;
  background: #1a2a1e;
}
.btn.coffee::before{ content: "☕"; font-size: 1rem; }
.btn.coffee:hover{ border-color: #48b56a; }

/* Projects grid/cards */
.projects{ padding: 20px 0 50px; }
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card{
  background: linear-gradient(180deg, #121721 0%, #0f141c );
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
}
.card h3{ margin: 0; font-size: 18px; }
.card p{ margin: 0; color: var(--muted); }
.tags{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag{
  font-size: 12px; color: #cdd9e6;
  background: #0f1a27;
  border: 1px solid var(--border);
  padding: 4px 8px; border-radius: 999px;
}
.card .row{ gap: .5rem; flex-wrap: wrap; }
.card .btn{ flex: 1; text-align: center; min-width: 90px; }

/* Preview panel */
.preview{ padding: 12px 0 24px; }
.preview-shell{
  background: #0f141b;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.preview-bar{
  padding: 10px;
  background: #101724;
  border-bottom: 1px solid #203046;
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
}
.preview-title{ font-weight: 700; }
.preview-actions{ display: flex; gap: .5rem; }
#previewFrame{
  width: 100%;
  height: min(78vh, 900px);
  border: 0;
  background: #0a0f14;
}

/* Sections */
.about, .contact{ padding: 36px 0; }
.about h2, .contact h2{ margin-top: 0; }

/* Contact layout & readability */
.contact .contact-row{
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.contact .email{
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.contact .email:hover{ text-decoration: underline; }

/* Footer */
.site-footer{
  border-top: 1px solid #1d2631;
  padding: 18px 0;
  color: var(--muted);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
}
.foot-links a{ color: var(--muted); text-decoration: none; margin-left: 10px; }

/* Light theme */
.light{
  --bg: #f6f8fb;
  --bg-2: #eef3fb;
  --text: #111419;
  --muted: #4d5a69;
  --accent: #2b6cff;
  --accent-2: #17a36f;
  --panel: #ffffff;
  --border: #e2e8f5;
  --shadow: 0 10px 26px rgba(0,0,0,0.08);
}
.light body{
  background:
    radial-gradient(120% 85% at 15% -10%, #dfe8ff 0%, transparent 70%),
    radial-gradient(120% 95% at 100% 0%, #e6f0ff 0%, transparent 70%),
    radial-gradient(140% 80% at -10% 100%, #f2f7ff 0%, transparent 65%),
    linear-gradient(to bottom, var(--bg) 0%, var(--bg-2) 100%);
}
.light .site-header{ background: rgba(255,255,255,0.7); }
.light .card{ background: #ffffff; border-color: var(--border); }
.light .input{ background: #fff; border-color: #d7e0ee; color: #111419; }
.light .btn{ background: #f4f7fb; border-color: #d7e0ee; color: #111419; }
.light .btn.ghost{ background: transparent; }
.light .tag{ background: #eef3fb; border-color: #d7e0ee; color: #1b2b42; }
.light .preview-shell{ background: #ffffff; border-color: var(--border); }
.light .preview-bar{ background: #f7f9fc; border-color: #e1e9f6; }
.light .btn.coffee{ background: #eaf6eb; border-color: #9bd2a8; color: #113; }
