/* ---------- Theme Tokens ---------- */
:root{
  --bg: #f3f6fb;

  --text: #0f172a;
  --title: #334155;
  --muted: #64748b;

  --accent: #6f8fb0;
  --accent-hover: #5c7ea3;

  --surface: rgba(255,255,255,0.55);
  --border: #e6edf7;
  --divider: rgba(100, 116, 139, 0.18);

  --panel: rgba(30, 41, 59, 0.88);
  --panel-border: rgba(111,143,176,0.35);
  --panel-field: rgba(255,255,255,0.12);

  --success-bg: rgba(34, 197, 94, 0.16);
  --success-text: #dcfce7;
  --success-border: rgba(34, 197, 94, 0.4);

  --error-bg: rgba(239, 68, 68, 0.16);
  --error-text: #fee2e2;
  --error-border: rgba(239, 68, 68, 0.38);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 78% 22%, rgba(111,143,176,0.16), transparent 62%),
    radial-gradient(900px 380px at 18% 55%, rgba(111,143,176,0.10), transparent 60%),
    var(--bg);
  line-height: 1.6;
}

a{ color: inherit; text-decoration: none; }

button,
input,
select,
textarea{
  font: inherit;
}

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

/* ---------- Helpers ---------- */
.gradient-text{
  background: linear-gradient(90deg, var(--title), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ---------- Theme Toggle ---------- */
.theme-toggle{
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(230,237,247,0.9);
  background: rgba(255,255,255,0.55);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.theme-toggle:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.75);
}

/* ---------- Dark Theme ---------- */
body.theme-dark{
  --bg: #0b1220;
  --text: #e7edf7;
  --title: #dbe6f5;
  --muted: rgba(231,237,247,0.78);

  --surface: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.10);
  --divider: rgba(231,237,247,0.16);

  background:
    radial-gradient(1200px 520px at 78% 22%, rgba(111,143,176,0.18), transparent 62%),
    radial-gradient(900px 380px at 18% 55%, rgba(111,143,176,0.14), transparent 60%),
    var(--bg);
}

body.theme-dark .site-header{
  background: rgba(11, 18, 32, 0.82);
  border-bottom: 1px solid var(--border);
}

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 246, 251, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 16px 0;
}

.nav-brand{
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--title);
  letter-spacing: 0.2px;
}

.nav-links{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 42px;
  padding: 0;
  margin: 0;
}

.nav-links a{
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  transition: color 150ms ease;
}

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

/* ---------- Hero ---------- */
.hero{
  padding: 72px 0 44px;
}

.hero-left{
  max-width: 880px;
}

.hero-hello{
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 2px;
  text-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.hero-name{
  font-size: clamp(2.6rem, 4.8vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.08;
  margin: 6px 0 0;
  text-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

.hero-role{
  margin: 18px 0 0;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  font-weight: 700;
  text-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

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

.meta-item{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  box-shadow:
    0 6px 18px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.meta-item:hover{
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.12),
    0 4px 10px rgba(15, 23, 42, 0.06);
}

.meta-item svg{
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-subtitle{
  margin: 16px 0 0;
  max-width: 70ch;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-highlights{
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-highlights span{
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 14px;
  background:  var(--surface);
  border: 1px solid var(--border);
  color:  var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow:
    0 6px 18px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.04);
}

.hero-actions{
  margin-top: 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.btn-primary{
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 14px 32px rgba(111,143,176,0.20);
}

.btn-primary:hover{
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary.skills-btn{
  background:
    radial-gradient(140px 90px at 30% 20%, rgba(111,143,176,0.18), transparent 60%),
    rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(111,143,176,0.35);
  color: rgba(235,243,255,0.96);
  border-radius: 16px;
  font-weight: 800;
  box-shadow:
    0 18px 45px rgba(15,23,42,0.30),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.btn-primary.skills-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(111,143,176,0.55);
}

.btn-outline{
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(230,237,247,0.9);
  color: var(--title);
  box-shadow: 0 10px 28px rgba(15,23,42,0.08);
}

.btn-outline:hover{
  background: rgba(111,143,176,0.10);
  border-color: rgba(111,143,176,0.35);
  transform: translateY(-1px);
}

.hero-divider{
  margin-top: 34px;
  height: 1px;
  background: var(--border);
}

/* ---------- Sections ---------- */
main{
  padding: 0 0 70px;
}

.section{
  padding: 56px 0;
  position: relative;
}

.section::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--divider), transparent);
}

.section-title{
  margin: 0 0 12px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.section-text{
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.tagline{
  margin: 16px 0 0;
  font-weight: 600;
  color: var(--muted);
}

.tagline strong{
  color: var(--accent);
  font-weight: 800;
}

/* ---------- Approach Section ---------- */
.approach-grid{
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.approach-card{
  text-align: center;
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow:
    0 14px 32px rgba(15,23,42,0.07),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.approach-card:hover{
  transform: translateY(-4px);
  border-color: rgba(111,143,176,0.35);
  box-shadow:
    0 20px 45px rgba(15,23,42,0.12),
    inset 0 1px 0 rgba(255,255,255,0.45);
}

.approach-icon{
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: rgba(111,143,176,0.12);
  border: 1px solid rgba(111,143,176,0.28);
  transition: transform 140ms ease, background 140ms ease;
}

.approach-icon svg{
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.approach-card:hover .approach-icon{
  transform: translateY(-2px);
  background: rgba(111,143,176,0.18);
}

.approach-card h3{
  margin: 0 0 8px;
  color: var(--title);
  font-size: 1.05rem;
  font-weight: 900;
}

.approach-card p{
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.65;
}

/* ---------- Skills ---------- */
.skills-panel{
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  max-width: 1000px;
}

.skills-column{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.skills-group-title{
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.skills-grid{
  display: flex;
  flex-direction: column; /* THIS makes cards vertical */
  align-items: center;
  gap: 12px;
}

.skill-card{
  width: 120px;
  height: 82px;
  background:
    radial-gradient(100px 70px at 30% 20%, rgba(111,143,176,0.18), transparent 60%),
    rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(111,143,176,0.28);
  border-radius: 16px;
  padding: 12px 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  color: #eaf2ff;
  text-align: center;

  box-shadow:
    0 12px 28px rgba(15,23,42,0.20),
    inset 0 1px 0 rgba(255,255,255,0.06);

  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.skill-card:hover{
  transform: translateY(-2px);
  border-color: rgba(111,143,176,0.48);
  box-shadow:
    0 16px 34px rgba(15,23,42,0.26),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.skill-icon{
  font-size: 30px;
  line-height: 1;
  color: inherit;
}

.skill-card span,
.skill-label{
  color: inherit;
  font-weight: 800;
  font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 760px){
  .skills-panel{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px){
  .skills-panel{
    grid-template-columns: 1fr;
  }
}
/* ---------- Projects ---------- */
.projects{
  border-top: 1px solid rgba(230,237,247,0.45);
}

.projects-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.projects-subtitle{
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.project-filter-wrap{
  margin-bottom: 22px;
  display: grid;
  gap: 10px;
}

.project-filter-label{
  font-weight: 700;
  color: var(--title);
}

.project-search{
  width: 100%;
  max-width: 440px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.project-search:focus{
  border-color: rgba(111,143,176,0.6);
  box-shadow: 0 0 0 4px rgba(111,143,176,0.14);
}

.project-search-feedback{
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

#sort-projects{
  appearance: none;
  cursor: pointer;
}

.projects-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.project-card{
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(140px 90px at 30% 20%, rgba(111,143,176,0.16), transparent 60%),
    rgba(39, 52, 73, 0.96);
  border: 1px solid rgba(111,143,176,0.32);
  box-shadow:
    0 18px 45px rgba(15,23,42,0.24),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover{
  transform: translateY(-4px);
  box-shadow:
    0 24px 60px rgba(15,23,42,0.32),
    inset 0 1px 0 rgba(255,255,255,0.08);
  border-color: rgba(111,143,176,0.5);
}

.project-card.is-hidden{
  display: none;
}

.project-media.project-media--image{
  position: relative;
  height: 135px;
  overflow: hidden;
  border-bottom: 1px solid rgba(111,143,176,0.18);
  background: rgba(20, 28, 42, 0.45);
}

.project-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.project-media.project-media--image::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15,23,42,0.12),
    rgba(15,23,42,0.42)
  );
}

.project-body{
  position: relative;
  z-index: 1;
  padding: 16px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-kicker{
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.74rem;
  color: rgba(159,189,215,0.92);
}

.project-name{
  margin: 0;
  font-weight: 900;
  font-size: 1.25rem;
  color: rgba(238,243,250,0.98);
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.project-sub{
  display: none;
}

.project-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.pill{
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
  color: rgba(234,242,255,0.9);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(111,143,176,0.24);
}

.project-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.pbtn{
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  border-radius: 14px;
  font-weight: 800;
  color: rgba(235,243,255,0.96);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(111,143,176,0.34);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.pbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
  border-color: rgba(111,143,176,0.48);
}

.iconbtn{
  width: 52px;
  min-width: 52px;
  height: 42px;
  padding: 0;
  border-radius: 14px;

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

  border: 1px solid rgba(111,143,176,0.34);
  background: rgba(255,255,255,0.08);
  color: rgba(235,243,255,0.95);

  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.iconbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
  border-color: rgba(111,143,176,0.48);
}

.iconbtn svg{
  width: 24px;
  height: 24px;
}

.projects-empty-state{
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(111,143,176,0.45);
  background: rgba(111,143,176,0.08);
  color: var(--title);
  font-weight: 700;
}


/* ---------- GitHub API Section ---------- */
#github-api .projects-grid{
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* force full row */
  gap: 16px;
  max-width: 100%;
}

/* ---------- Small Dark GitHub Cards ---------- */
#github-projects .project-card{
  flex: 0 0 245px;
  min-height: auto;
  border-radius: 20px;
  padding: 0;

  background:
    radial-gradient(110px 75px at 25% 15%, rgba(111,143,176,0.16), transparent 60%),
    rgba(39, 52, 73, 0.96);

  border: 1px solid rgba(111,143,176,0.28);
  box-shadow:
    0 12px 28px rgba(15,23,42,0.22),
    inset 0 1px 0 rgba(255,255,255,0.05);

  /*transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;*/
  transform: scale(0.95);
}

#github-projects .project-card:hover{
  transform: translateY(-2px);
  border-color: rgba(111,143,176,0.45);
  box-shadow:
    0 16px 34px rgba(15,23,42,0.28),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ---------- Body ---------- */
#github-projects .project-body{
  padding: 14px 16px;
  gap: 8px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ---------- Top Label ---------- */
#github-projects .project-kicker{
  margin: 0;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(159,189,215,0.95);
}

/* ---------- Title ---------- */
#github-projects .project-name{
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: rgba(238,243,250,0.98);
  line-height: 1.25;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Description ---------- */
#github-projects .project-sub{
  margin: 0;
  color: rgba(234,242,255,0.72);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Tags ---------- */
#github-projects .project-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

#github-projects .pill{
  padding: 4px 8px;
  font-size: 0.68rem;
  color: #eaf2ff;
  background: rgba(111,143,176,0.14);
  border: 1px solid rgba(111,143,176,0.22);
  border-radius: 999px;
}

/* ---------- Button ---------- */
#github-projects .project-actions{
  margin-top: auto;
}

#github-projects .pbtn{
  width: 100%;
  height: 42px;
  border-radius: 14px;

  font-size: 0.84rem;
  font-weight: 900;
  color: rgba(235,243,255,0.96);

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(111,143,176,0.34);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);

  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

#github-projects .pbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
  border-color: rgba(111,143,176,0.48);
}

/* ---------- Mobile ---------- */
@media (max-width: 900px){
  #github-api .projects-grid{
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }
}
/* ---------- Contact ---------- */
.contact-panel{
  margin: 18px auto 0;
  max-width: 860px;
  border-radius: 28px;
  padding: 28px 26px 22px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(111, 143, 176, 0.10) inset;
}

.contact-form-dark{
  display: grid;
  gap: 18px;
}

.c-label{
  display: grid;
  gap: 10px;
}

.c-label-text{
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(199, 220, 245, 0.95);
  font-size: 0.95rem;
}

.contact-form-dark input,
.contact-form-dark textarea{
  width: 100%;
  border-radius: 16px;
  padding: 16px 16px;
  border: 1px solid rgba(111,143,176,0.28);
  background: var(--panel-field);
  color: rgba(255,255,255,0.90);
  font-family: inherit;
  font-weight: 600;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.contact-form-dark input::placeholder,
.contact-form-dark textarea::placeholder{
  color: rgba(255,255,255,0.45);
}

.contact-form-dark input:focus,
.contact-form-dark textarea:focus{
  background: rgba(255,255,255,0.16);
  border-color: rgba(111,143,176,0.55);
  box-shadow: 0 0 0 4px rgba(111,143,176,0.18);
}

.contact-form-dark input.input-error,
.contact-form-dark textarea.input-error{
  border-color: rgba(239, 68, 68, 0.8);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.c-submit{
  margin-top: 6px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(111,143,176,0.55);
  background: rgba(255,255,255,0.16);
  color: rgba(210,225,245,0.95);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 14px 34px rgba(15,23,42,0.30), inset 0 1px 0 rgba(255,255,255,0.06);
}

.c-submit:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(111,143,176,0.42);
}

.form-status{
  margin: 0;
  padding: 0;
  font-weight: 700;
  border-radius: 14px;
}

.form-status.success,
.form-status.error{
  padding: 14px 16px;
}

.form-status.success{
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.form-status.error{
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.contact-accounts{
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.account-pill{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(111, 143, 176, 0.35);
  color: rgba(235, 243, 255, 0.95);
  font-weight: 800;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.account-pill:hover{
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- Project Modal ---------- */
.project-modal[hidden]{
  display: none;
}

.project-modal{
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.project-modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}

.project-modal__dialog{
  position: relative;
  width: min(920px, 92%);
  max-height: 88vh;
  overflow-y: auto;
  margin: 4vh auto;
  border-radius: 28px;
  padding: 28px 26px 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(230, 237, 247, 0.9);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

body.theme-dark .project-modal__dialog{
  background: rgba(11, 18, 32, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
}

.project-modal__close{
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.7);
  color: var(--title);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

body.theme-dark .project-modal__close{
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.project-modal__content{
  display: grid;
  gap: 18px;
}

.project-modal__eyebrow{
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(111,143,176,0.95);
}

.project-modal__title{
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.15;
  color: var(--title);
}

.project-modal__summary{
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.7;
}

.project-modal__meta{
  display: grid;
  gap: 18px;
}

.project-modal__block{
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(230,237,247,0.9);
}

body.theme-dark .project-modal__block{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}

.project-modal__block h4{
  margin: 0 0 10px;
  color: var(--title);
  font-size: 1rem;
}

.project-modal__block p,
.project-modal__block li{
  color: var(--muted);
  font-weight: 600;
  line-height: 1.7;
}

.project-modal__block ul{
  margin: 0;
  padding-left: 20px;
}

.project-modal__tags{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-modal__tags .pill{
  margin: 0;
  color: #5b6f8c;
  background: rgba(111,143,176,0.10);
  border: 1px solid rgba(111,143,176,0.28);
}

body.theme-dark .project-modal__tags .pill{
  color: rgba(234,242,255,0.92);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(111,143,176,0.25);
}

body.modal-open{
  overflow: hidden;
}

/* ---------- Back to Top ---------- */
.back-to-top{
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: none;
  z-index: 1000;
}

.back-to-top:hover{
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.back-to-top.show{
  display: block;
}

/* ---------- Animations ---------- */
.reveal-on-scroll{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms cubic-bezier(.22,.61,.36,1),
              transform 650ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible{
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: translateY(0); }
}

.reveal{
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 700ms cubic-bezier(.22,.61,.36,1) forwards;
}

.reveal.delay-1{ animation-delay: 80ms; }
.reveal.delay-2{ animation-delay: 160ms; }
.reveal.delay-3{ animation-delay: 240ms; }
.reveal.delay-4{ animation-delay: 320ms; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal-on-scroll{ opacity: 1; transform: none; transition: none; }
  .reveal{ animation: none; opacity: 1; transform: none; }
}

/* ---------- Dark Mode Inputs ---------- */
body.theme-dark .project-search,
body.theme-dark #sort-projects{
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

body.theme-dark .project-search::placeholder{
  color: rgba(231, 237, 247, 0.55);
}

body.theme-dark .project-search:focus,
body.theme-dark #sort-projects:focus{
  border-color: rgba(111, 143, 176, 0.65);
  box-shadow: 0 0 0 4px rgba(111, 143, 176, 0.18);
}

/* ---------- Contact Title ---------- */
#contact .section-title{
  width: 100%;
  text-align: center;
  display: block;
}

/* ---------- Hero Lines ---------- */
.hero-hello,
.hero-name{
  display: block;
}

.hero-name{
  margin-top: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px){
  .skills-grid{
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 980px){
  .projects-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #github-api .projects-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px){
  .hero{
    padding: 56px 0 36px;
  }

  .nav{
    gap: 24px;
  }

  .nav-links{
    gap: 22px;
    overflow-x: auto;
  }
}

@media (max-width: 640px){
  .projects-grid{
    grid-template-columns: 1fr;
  }

  .contact-panel{
    padding: 22px 18px;
  }

  .project-search{
    max-width: 100%;
  }

  #github-api .projects-grid{
    grid-template-columns: 1fr;
  }

  #github-projects .project-card{
    min-height: 0;
  }

  .project-modal__dialog{
    width: 94%;
    padding: 22px 16px 18px;
  }

  .skills-group{
    margin-top: 32px;
  }

  .skill-card{
    min-height: 120px;
  }

  .skill-icon{
    font-size: 40px;
  }
}