/* ============================================================
   ANISH MAKA — PORTFOLIO STYLESHEET
   Plain hand-written CSS. No framework, no build step.
   Structure: tokens → reset → layout shell → components → pages
              → responsive → print
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root{
  --bg:#15171b;
  --bg-soft:#1b1e23;
  --surface:#1e2228;
  --surface-2:#242931;
  --border:#2b3038;
  --text:#ece9e2;
  --text-muted:#9b968f;
  --text-faint:#6b6660;

  --gold:#d8a14c;
  --gold-strong:#e8b568;
  --gold-soft:rgba(216,161,76,.12);
  --teal:#5e8c8a;
  --teal-soft:rgba(94,140,138,.14);
  --danger:#e08070;
  --danger-soft:rgba(224,128,112,.12);

  --radius-sm:6px;
  --radius:12px;
  --radius-lg:20px;

  --font-display:'Fraunces', Georgia, serif;
  --font-body:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:'IBM Plex Mono', 'SF Mono', monospace;

  --sidebar-w:280px;
  --sidebar-w-collapsed:84px;

  --ease:cubic-bezier(.22,.61,.36,1);
}

[data-theme='light']{
  --bg:#f7f5f0;
  --bg-soft:#f0eee7;
  --surface:#ffffff;
  --surface-2:#f3f1ea;
  --border:#e3ded2;
  --text:#1b1e23;
  --text-muted:#6c665d;
  --text-faint:#948d82;
  --gold:#b9783a;
  --gold-strong:#a3692f;
  --gold-soft:rgba(185,120,58,.10);
  --teal:#3f6e6c;
  --teal-soft:rgba(63,110,108,.10);
}

/* ---------- 2. Reset ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{ margin:0; }
img,svg{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; }
h1,h2,h3,p,dl,dd,figure{ margin:0; }
input,textarea{ font:inherit; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
}

body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  transition:background-color .25s var(--ease), color .25s var(--ease);
}

::selection{ background:var(--gold-soft); color:var(--gold-strong); }

:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
  border-radius:4px;
}

.skip-link{
  position:absolute; left:-999px; top:0;
  background:var(--gold); color:var(--bg);
  padding:.6rem 1rem; border-radius:0 0 var(--radius-sm) 0;
  font-weight:600; z-index:300;
}
.skip-link:focus{ left:0; }

code{ font-family:var(--font-mono); font-size:.85em; }

/* ---------- 3. Layout shell ---------- */
.shell{ display:flex; min-height:100vh; }

.sidebar{
  position:fixed; inset:0 auto 0 0;
  width:var(--sidebar-w);
  background:var(--bg);
  border-right:1px solid var(--border);
  display:flex; flex-direction:column;
  z-index:40;
  transition:width .25s var(--ease), transform .25s var(--ease);
  transform:translateX(-100%);
}
.sidebar.is-collapsed{ width:var(--sidebar-w-collapsed); }
.sidebar.is-mobile-open{ transform:translateX(0); }
@media (min-width:860px){
  .sidebar{ transform:translateX(0); }
}

.sidebar-collapse-btn{
  display:none;
  position:absolute; right:-13px; top:32px;
  width:26px; height:26px; border-radius:50%;
  background:var(--surface-2); border:1px solid var(--border);
  align-items:center; justify-content:center;
  color:var(--text-muted);
  transition:color .2s var(--ease), transform .25s var(--ease);
}
.sidebar-collapse-btn:hover{ color:var(--gold); }
.sidebar.is-collapsed .sidebar-collapse-btn svg{ transform:rotate(180deg); }
@media (min-width:860px){
  .sidebar-collapse-btn{ display:flex; }
}

.sidebar-mobile-close{
  display:none;
  align-self:flex-end;
  margin:.75rem .75rem 0;
  color:var(--text-muted);
  font-size:1.4rem;
  line-height:1;
}
@media (max-width:859px){
  .sidebar-mobile-close{ display:block; }
}

.sidebar-brand{
  padding:1.75rem 1.5rem 1.5rem;
  text-align:center;
  border-bottom:1px solid var(--border);
}
.sidebar-avatar{
  width:76px; height:76px; margin:0 auto;
  border-radius:18px;
  background:linear-gradient(155deg, var(--gold), #a3692f);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:600; font-size:1.5rem;
  color:var(--bg);
  position:relative;
}
.sidebar-avatar::after{
  content:''; position:absolute; right:-5px; bottom:-5px;
  width:15px; height:15px; border-radius:50%;
  background:var(--teal); border:2px solid var(--bg);
}
.sidebar-name{
  font-family:var(--font-display); font-weight:600; font-size:1.15rem;
  color:var(--text); margin-top:.9rem;
}
.sidebar-name .accent{ color:var(--gold); }
.sidebar-role{
  font-family:var(--font-mono); font-size:.75rem; color:var(--text-muted);
  margin-top:.3rem;
}
.sidebar-role::after{
  content:'_'; margin-left:2px; color:var(--gold);
  animation:cursor-blink 1.1s steps(1) infinite;
}
@keyframes cursor-blink{ 50%{ opacity:0; } }
.sidebar.is-collapsed .sidebar-name,
.sidebar.is-collapsed .sidebar-role,
.sidebar.is-collapsed .nav-label,
.sidebar.is-collapsed .util-label{ display:none; }
.sidebar.is-collapsed .sidebar-brand{ padding:1.75rem .5rem 1.5rem; }

.sidebar-nav{ flex:1; overflow-y:auto; padding:1rem .75rem; }
.sidebar-nav::-webkit-scrollbar{ width:6px; }
.sidebar-nav::-webkit-scrollbar-thumb{ background:var(--border); border-radius:999px; }
.nav-list{ display:flex; flex-direction:column; gap:.25rem; }
.nav-link{
  display:flex; align-items:center; gap:.85rem;
  padding:.65rem .9rem; border-radius:10px;
  font-size:.92rem; color:var(--text-muted);
  transition:background-color .2s var(--ease), color .2s var(--ease);
  white-space:nowrap;
}
.nav-link svg{ flex-shrink:0; }
.nav-link:hover{ background:var(--surface-2); color:var(--text); }
.nav-link.is-active{ background:var(--gold); color:var(--bg); font-weight:600; }

.sidebar-utils{
  display:flex; align-items:center; justify-content:space-around;
  padding:.85rem; border-top:1px solid var(--border);
}
.util-btn{
  display:flex; flex-direction:column; align-items:center; gap:.3rem;
  width:48px; padding:.4rem 0;
  color:var(--text-muted); border-radius:10px;
  transition:color .2s var(--ease), background-color .2s var(--ease);
}
.util-btn:hover{ color:var(--gold); background:var(--surface-2); }
.util-label{ font-size:.62rem; font-family:var(--font-mono); }
.icon-sun{ display:none; }
[data-theme='light'] .icon-moon{ display:none; }
[data-theme='light'] .icon-sun{ display:block; }

.mobile-overlay{
  display:none; position:fixed; inset:0; background:rgba(0,0,0,.5);
  z-index:35;
}
.mobile-overlay.is-visible{ display:block; }

.mobile-topbar{
  display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:20;
  background:color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
  padding:.85rem 1.1rem;
}
@media (min-width:860px){ .mobile-topbar{ display:none; } }
.mobile-topbar-title{ font-family:var(--font-mono); font-size:.75rem; color:var(--gold); text-transform:uppercase; letter-spacing:.05em; }
.mobile-menu-btn{ color:var(--text-muted); }

.main{
  flex:1; min-width:0;
  margin-left:0;
  transition:margin-left .25s var(--ease);
}
@media (min-width:860px){
  .main{ margin-left:var(--sidebar-w); }
  body[data-sidebar='collapsed'] .main{ margin-left:var(--sidebar-w-collapsed); }
}

.content{
  max-width:880px; margin:0 auto;
  padding:clamp(2.5rem,6vw,5rem) clamp(1.25rem,4vw,3rem);
}

.site-footer{
  max-width:880px; margin:0 auto;
  padding:1.5rem clamp(1.25rem,4vw,3rem) 2.5rem;
  display:flex; flex-wrap:wrap; gap:.5rem; justify-content:space-between;
  border-top:1px solid var(--border);
  color:var(--text-faint); font-size:.82rem;
}
.site-footer a:hover{ color:var(--gold); }

/* ---------- 4. Typography & section header ---------- */
.eyebrow{
  font-family:var(--font-mono); font-size:.8rem; text-transform:uppercase;
  letter-spacing:.07em; color:var(--gold); margin-bottom:.75rem;
  display:flex; align-items:center; gap:.5rem;
}
h1.page-title{
  font-family:var(--font-display); font-weight:600;
  font-size:clamp(1.9rem,4.2vw,2.7rem); line-height:1.1; color:var(--text);
}
.page-lede{ color:var(--text-muted); margin-top:1rem; max-width:42ch; }

/* ---------- 5. Buttons & form fields ---------- */
.btn{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.7rem 1.35rem; border-radius:999px;
  font-weight:600; font-size:.92rem;
  border:1px solid transparent;
  transition:transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover{ transform:translateY(-2px); }
.btn-primary{ background:var(--gold); color:var(--bg); }
.btn-primary:hover{ background:var(--gold-strong); }
.btn-ghost{ background:transparent; border-color:var(--border); color:var(--text); }
.btn-ghost:hover{ border-color:var(--gold); color:var(--gold); }
.btn[disabled]{ opacity:.6; cursor:default; transform:none; }

.field{ margin-bottom:1.1rem; }
.field label{
  display:block; font-family:var(--font-mono); font-size:.72rem;
  text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted);
  margin-bottom:.4rem;
}
.field input, .field textarea{
  width:100%; background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:.65rem .9rem; color:var(--text);
  font-size:.95rem; transition:border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus{ border-color:var(--gold); outline:none; }
.honeypot-field{ position:absolute; left:-9999px; top:-9999px; }

/* ---------- 6. Quick facts (About page) ---------- */
.quick-facts{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.75rem; max-width:640px; margin-top:2.25rem;
}
.quick-fact{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:.85rem 1rem;
}
.quick-fact dt{ font-family:var(--font-mono); font-size:.68rem; text-transform:uppercase; color:var(--text-faint); }
.quick-fact dd{ margin-top:.3rem; font-weight:600; font-size:.9rem; }

/* ---------- 7. Pills (Skills) ---------- */
.skills-columns{ display:grid; grid-template-columns:1fr 1fr; gap:2.5rem; max-width:760px; }
.skill-group-title{
  font-family:var(--font-mono); font-size:.78rem; text-transform:uppercase;
  letter-spacing:.05em; color:var(--text-faint); margin-bottom:.85rem;
}
.pill-list{ display:flex; flex-wrap:wrap; gap:.55rem; }
.pill{
  font-size:.85rem; font-weight:500; padding:.45rem .95rem;
  border-radius:999px; border:1px solid var(--border); background:var(--teal-soft);
}
.pill.accent-gold{ background:var(--gold-soft); }

/* ---------- 8. Cards (Portfolio / Achievements) ---------- */
.cards-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; margin-top:2.25rem; }
.card{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:1.6rem;
  display:flex; flex-direction:column;
  opacity:0; transform:translateY(10px);
  animation:card-in .5s var(--ease) forwards;
  transition:border-color .25s var(--ease), transform .25s var(--ease);
}
.card:hover{ border-color:color-mix(in srgb, var(--gold) 55%, var(--border)); transform:translateY(-3px); }
@keyframes card-in{ to{ opacity:1; transform:none; } }

.card-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:.75rem; margin-bottom:.85rem; }
.card-tag{
  font-family:var(--font-mono); font-size:.68rem; text-transform:uppercase;
  letter-spacing:.04em; color:var(--gold); background:var(--gold-soft);
  padding:.3rem .55rem; border-radius:var(--radius-sm); white-space:nowrap;
}
.card-year{ font-family:var(--font-mono); font-size:.75rem; color:var(--text-faint); }
.card h3{ font-family:var(--font-display); font-weight:600; font-size:1.2rem; margin-bottom:.5rem; }
.card p.card-desc{ color:var(--text-muted); font-size:.92rem; flex-grow:1; }
.card-tools{ display:flex; flex-wrap:wrap; gap:.4rem; margin:1rem 0 1.1rem; }
.card-tools li{
  font-family:var(--font-mono); font-size:.68rem; border:1px solid var(--border);
  border-radius:5px; padding:.22rem .45rem; color:var(--text-muted);
}
.card-link{ display:inline-flex; align-items:center; gap:.4rem; font-weight:600; font-size:.87rem; color:var(--text); align-self:flex-start; }
.card-link:hover{ color:var(--gold); }
.card-link svg{ transition:transform .2s var(--ease); }
.card-link:hover svg{ transform:translate(2px,-2px); }
.card-link.is-disabled{ color:var(--text-faint); }
.card-link.is-disabled:hover{ color:var(--text-faint); }

/* ---------- 9. Timeline (Education / Experience) ---------- */
.timeline{ max-width:640px; margin-top:2.25rem; }
.timeline-item{
  position:relative; padding-left:1.75rem; padding-bottom:2rem;
  border-left:1px solid var(--border);
}
.timeline-item:last-child{ border-color:transparent; padding-bottom:0; }
.timeline-item::before{
  content:''; position:absolute; left:-5px; top:.3rem;
  width:11px; height:11px; border-radius:50%; background:var(--gold);
}
.timeline-item.accent-teal::before{ background:var(--teal); }
.timeline-head{ display:flex; flex-wrap:wrap; align-items:baseline; gap:.6rem; }
.timeline-head h3{ font-family:var(--font-display); font-weight:600; font-size:1.1rem; }
.timeline-period{ font-family:var(--font-mono); font-size:.75rem; color:var(--text-faint); }
.timeline-sub{ font-size:.88rem; color:var(--gold); margin-top:.2rem; }
.timeline-desc{ color:var(--text-muted); margin-top:.5rem; max-width:48ch; }
.timeline-highlights{ margin-top:.65rem; display:flex; flex-direction:column; gap:.35rem; }
.timeline-highlights li{ font-size:.88rem; color:var(--text-muted); display:flex; gap:.5rem; }
.timeline-highlights li::before{ content:'—'; color:var(--gold); }

/* ---------- 10. Updates feed ---------- */
.updates-list{ max-width:640px; margin-top:2.25rem; display:flex; flex-direction:column; gap:1rem; }
.update-item{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:1.25rem; }
.update-date{ font-family:var(--font-mono); font-size:.72rem; color:var(--text-faint); }
.update-item h3{ font-family:var(--font-display); font-weight:600; font-size:1.05rem; margin-top:.35rem; }
.update-item p{ color:var(--text-muted); font-size:.9rem; margin-top:.4rem; }

/* ---------- 11. Empty state ---------- */
.empty-state{
  margin-top:2.25rem; border:1px dashed var(--border); border-radius:var(--radius-lg);
  padding:2.5rem; text-align:center; max-width:420px;
}
.empty-state p{ color:var(--text-muted); }
.empty-state p.hint{ font-family:var(--font-mono); font-size:.75rem; color:var(--text-faint); margin-top:.5rem; }

/* ---------- 12. Contact ---------- */
.contact-email{
  font-family:var(--font-display); font-size:clamp(1.2rem,2.6vw,1.6rem);
  border-bottom:2px solid var(--gold); padding-bottom:.15rem; display:inline-block;
}
.contact-email:hover{ color:var(--gold); }
.social-list{ display:flex; gap:1.4rem; margin-top:1.25rem; }
.social-list a{ font-size:.88rem; color:var(--text-muted); border-bottom:1px solid transparent; }
.social-list a:hover{ color:var(--gold); border-color:var(--gold); }
.contact-form{ margin-top:2.25rem; max-width:480px; }
.form-banner{ border-radius:10px; padding:.8rem 1rem; font-size:.88rem; margin-bottom:1.25rem; }
.form-banner.is-success{ background:var(--teal-soft); border:1px solid color-mix(in srgb, var(--teal) 50%, transparent); color:var(--teal); }
.form-banner.is-error{ background:var(--danger-soft); border:1px solid color-mix(in srgb, var(--danger) 50%, transparent); color:var(--danger); }
.form-feedback{ font-size:.85rem; margin-top:.6rem; min-height:1.2em; }
.form-feedback.is-success{ color:var(--teal); }
.form-feedback.is-error{ color:var(--danger); }
.form-feedback.is-pending{ color:var(--text-muted); }

/* ---------- 13. Resume page ---------- */
.resume-note{
  margin-top:.5rem; font-family:var(--font-mono); font-size:.78rem; color:var(--text-faint);
  max-width:46ch;
}

/* ---------- 14. Reveal-on-scroll & back-to-top ---------- */
.reveal{ opacity:0; transform:translateY(14px); transition:opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible{ opacity:1; transform:none; }

.scroll-progress{
  position:fixed; top:0; left:0; height:3px; width:0%;
  background:var(--gold); z-index:50; transition:width .1s linear;
}

.back-to-top{
  position:fixed; right:1.25rem; bottom:1.25rem; z-index:30;
  width:42px; height:42px; border-radius:50%;
  background:var(--surface-2); border:1px solid var(--border); color:var(--text-muted);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transform:translateY(8px);
  transition:opacity .25s var(--ease), transform .25s var(--ease), color .2s var(--ease);
}
.back-to-top.is-visible{ opacity:1; pointer-events:auto; transform:none; }
.back-to-top:hover{ color:var(--gold); }

/* ---------- 15. Responsive ---------- */
@media (max-width:859px){
  .quick-facts{ grid-template-columns:1fr; }
  .skills-columns{ grid-template-columns:1fr; }
  .cards-grid{ grid-template-columns:1fr; }
}

/* ---------- 17. Small utility classes (replace inline styles) ---------- */
.mobile-spacer{ width:22px; }
.bio-block{ margin-top:1.5rem; max-width:62ch; }
.bio-block p{ color:var(--text-muted); }
.bio-block p + p{ margin-top:1rem; }
.bio-block strong{ color:var(--text); }
.cta-row{ margin-top:2.25rem; display:flex; gap:.9rem; flex-wrap:wrap; }
.section-cta{ margin-top:2rem; }
.contact-email-row{ margin-top:1.75rem; }
.not-found{ min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:2rem; }
.eyebrow-center{ justify-content:center; }
.cta-row-center{ justify-content:center; }

/* ---------- 18. Print (Resume page) ---------- */
@media print{
  .sidebar, .mobile-topbar, .mobile-overlay, .back-to-top, .scroll-progress, .site-footer{ display:none !important; }
  .main{ margin-left:0 !important; }
  body{ background:#fff; color:#111; }
}

