:root{
  --bg: #0b0c10;
  --text: #e9ecf1;
  --muted: rgba(233,236,241,.72);
  --border: rgba(233,236,241,.14);
  --accent: #7c5cff;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --max: 1100px;
}

*{ box-sizing:border-box; }

html, body{ height: 100%; }

body{
  margin:0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;

  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  line-height: 1.5;

  background:
    radial-gradient(1000px 520px at 50% -10%,
      rgba(124,92,255,.20) 0%,
      rgba(124,92,255,.10) 35%,
      transparent 78%
    ),
    radial-gradient(900px 520px at 90% 125%,
      rgba(34,197,94,.12) 0%,
      rgba(34,197,94,.06) 45%,
      transparent 88%
    ),
    var(--bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

main{ flex: 1; }

a{ color: inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.container{
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(11,12,16,.72);
  backdrop-filter: blur(10px);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand{
  display:flex;
  align-items:baseline;
  gap:.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-accent{ color: var(--accent); }

.brand-sub{
  display:none;
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
}
@media (min-width: 760px){
  .brand-sub{ display:inline; }
}

/* Tabs */
.tabs{
  display:flex;
  gap:.25rem;
  border: 1px solid var(--border);
  padding: .25rem;
  border-radius: 999px;
}

.tab{
  font-size:.92rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  color: rgba(233,236,241,.84);
  transition: background .15s ease, color .15s ease;
}
.tab:hover{ background: rgba(233,236,241,.08); }

.tab.is-active{
  background: var(--text);
  color: var(--bg);
}

/* Layout */
.page{ padding: 2.2rem 0 2.6rem; }

.page-head{ margin-bottom: 1.2rem; }
.page-head h1{ margin:0; font-size: 2rem; letter-spacing: -0.03em; }

.muted{ color: var(--muted); }
.text-accent{ color: var(--accent); }

/* Card */
.card{
  border: 1px solid var(--border);
  background: rgba(17,19,26,.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Hero */
.hero{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.2rem;
  padding: 1.4rem;
  align-items:center;
}
@media (max-width: 860px){
  .hero{ grid-template-columns: 1fr; }
}

.hero-text h1{
  margin:.2rem 0 .6rem;
  font-size: 2.4rem;
  letter-spacing:-0.04em;
}

.lead{ font-size: 1.02rem; color: rgba(233,236,241,.86); }

.hero-photo{
  border-radius: calc(var(--radius) - 6px);
  overflow:hidden;
  border: 1px solid var(--border);
}
.hero-photo img{ aspect-ratio: 4/5; object-fit: cover; }

.eyebrow{
  margin:0;
  font-size:.78rem;
  letter-spacing:.08em;
  text-transform: uppercase;
  color: rgba(233,236,241,.62);
}

.meta{ display:flex; flex-wrap:wrap; gap:.5rem; margin: 1rem 0 1.2rem; }

.pill{
  border: 1px solid var(--border);
  padding: .35rem .6rem;
  border-radius: 999px;
  font-size: .85rem;
  color: rgba(233,236,241,.86);
  background: rgba(233,236,241,.05);
}

.actions{ display:flex; gap:.6rem; flex-wrap:wrap; }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.4rem;

  padding: .7rem 1rem;
  border-radius: 999px;
  font-weight: 650;

  border: 1px solid transparent;
  cursor: pointer;

  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}

.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); opacity: .92; }

.btn:focus{ outline: none; }
.btn:focus-visible{ box-shadow: 0 0 0 3px rgba(124,92,255,.35); }

.btn-primary{
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover{ background: rgba(124,92,255,.88); }

.btn-outline{
  background: rgba(233,236,241,.04);
  border-color: rgba(124,92,255,.45);
  color: var(--text);
}
.btn-outline:hover{
  background: rgba(124,92,255,.12);
  border-color: rgba(124,92,255,.65);
}

/* Blog/Projects grid cards */
.cards-grid{
  display:grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px){ .cards-grid{ grid-template-columns: repeat(3, 1fr);} }
@media (max-width: 860px){ .cards-grid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 520px){ .cards-grid{ grid-template-columns: 1fr;} }

.card-link{
  position: relative;
  overflow:hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-link:hover{ transform: translateY(-2px); }

.thumb{
  border-bottom: 1px solid var(--border);
  overflow:hidden;
}
.thumb img{
  width:100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .25s ease;
}
.card-link:hover .thumb img{ transform: scale(1.06); }

.card-body{ padding: 1rem; }
.card-body h3{ margin: .35rem 0 .45rem; letter-spacing:-0.02em; }

.card-corner{
  position:absolute;
  top: .8rem;
  right: .8rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display:grid;
  place-items:center;
  background: rgba(233,236,241,.08);
  border: 1px solid rgba(233,236,241,.12);
  color: rgba(233,236,241,.8);
}

/* Tags */
.tags{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.7rem; }

.tag{
  font-size:.78rem;
  border: 1px solid var(--border);
  background: rgba(233,236,241,.05);
  color: rgba(233,236,241,.82);
  padding: .22rem .5rem;
  border-radius: 999px;
}

.card-actions{ display:flex; gap:.5rem; margin-top: .9rem; flex-wrap:wrap; }

/* Post */
.post{ padding: 1.2rem; }

.post-head h1{
  margin: .25rem 0 .45rem;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.post-cover{
  margin-top: 1rem;
  border-radius: calc(var(--radius) - 8px);
  overflow:hidden;
  border: 1px solid var(--border);
}
.post-cover img{
  width:100%;
  aspect-ratio: 16/7;
  object-fit: cover;
}

.prose{
  /*max-width: 70ch;*/
  margin-top: 1rem;
}
.prose p{ color: rgba(233,236,241,.86); margin: .85rem 0; }

.backlink{
  display:inline-block;
  margin-bottom: .8rem;
  color: rgba(233,236,241,.8);
}
.backlink:hover{ color: var(--text); }

/* Experience (cards reused on experience.html) */
.xp-item{ padding: 1.1rem; }

.xp-top{
  display:flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.xp-company{ margin: 0; letter-spacing: -0.02em; }
.xp-role{ margin: .2rem 0 0; }

.xp-meta{ display:flex; gap: .5rem; flex-wrap: wrap; }

.xp-block{ margin-top: .9rem; }

.xp-list{
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  color: rgba(233,236,241,.86);
}
.xp-list li{ margin: .35rem 0; }

.xp-timeline{
  display: grid;
  gap: 1.5rem;      /* was 1rem */
}

.inline-link{ text-decoration: underline; text-underline-offset: 3px; }
.inline-link:hover{ color: var(--text); }

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 1.4rem 0;
}

.footer-inner{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:center;
  color: rgba(233,236,241,.78);
  font-size: .9rem;
}

.card-eyebrow{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:.6rem;
}

.badge-pill{
  border: 1px solid rgba(124,92,255,.45);
  background: rgba(124,92,255,.10);
  color: rgba(233,236,241,.92);
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 650;
  white-space: nowrap;
}

/* Mobile header layout: brand first, menu second */
@media (max-width: 640px){
  .header-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }

  .tabs{
    width: 100%;
    /* choose ONE of the behaviors below */
  }

  /* Option A (recommended): horizontal scroll if it still doesn't fit */
  .tabs{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .tabs::-webkit-scrollbar{ display: none; } /* Chrome/Safari */

  .tab{ flex: 0 0 auto; } /* keep tabs from shrinking weirdly */

  /* Slightly tighter tabs on mobile */
  .tab{
    font-size: .9rem;
    padding: .4rem .7rem;
  }
}