/* ---------------------------------------------------------
   Usneek Singh, personal site
   --------------------------------------------------------- */

:root {
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --bg-alt: #f1ece3;
  --text: #221f1d;
  --text-muted: #6b6259;
  --text-faint: #948b80;
  --border: #e6ddd0;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --maxw: 860px;

  --c-primary: #3454a3;
  --c-about: #3454a3;
  --c-experience: #0d7d78;
  --c-publications: #b8590f;
  --c-projects: #6b3fa0;
  --c-awards: #a3781f;
  --c-volunteering: #a13d6b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--c-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a:hover { border-bottom-color: currentColor; }

img { max-width: 100%; }

.page {
  display: flex;
  align-items: flex-start;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 46px;
}

/* ---------------- Sidebar ---------------- */

.sidebar {
  flex: 0 0 250px;
  width: 250px;
  padding-top: 64px;
}

.sidebar-inner { position: sticky; top: 36px; }

.profilepic {
  width: 148px;
  height: 148px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 50%;
  display: block;
  box-shadow: 0 6px 20px rgba(34, 31, 29, 0.12);
}

.name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 18px 0 2px;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
  line-height: 1.5;
}

.btn-resume {
  display: inline-block;
  background: var(--c-primary);
  color: #fff;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  border: none;
  margin-bottom: 22px;
}

.btn-resume:hover { background: #274280; color: #fff; border-bottom-color: transparent; }

.contact-list { list-style: none; margin: 0; padding: 0; font-size: 0.87rem; }

.contact-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.contact-list a { color: var(--text-muted); word-break: break-word; }
.contact-list a:hover { color: var(--c-primary); }

.contact-list svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  stroke: var(--text-faint);
}

/* ---------------- Main content ---------------- */

.content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 64px 0 60px;
  max-width: var(--maxw);
}

/* ---- Tabs ---- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
}

.tab svg { width: 15px; height: 15px; stroke: currentColor; opacity: 0.75; }

.tab:hover { color: var(--text); border-bottom-color: transparent; }

.tab.active { color: var(--tab-color, var(--c-primary)); border-bottom-color: var(--tab-color, var(--c-primary)); }

.tab-about { --tab-color: var(--c-about); }
.tab-experience { --tab-color: var(--c-experience); }
.tab-publications { --tab-color: var(--c-publications); }
.tab-projects { --tab-color: var(--c-projects); }
.tab-awards { --tab-color: var(--c-awards); }
.tab-volunteering { --tab-color: var(--c-volunteering); }

/* ---- Panels ---- */

.panel { animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.panel-heading {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 20px;
}

.about-body p { margin: 0 0 16px; }
.about-body a { color: var(--c-about); }

/* ---- Experience timeline ---- */

.timeline {
  border-left: 2px solid var(--border);
  margin-left: 4px;
  padding-left: 26px;
}

.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-experience);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
}

.role-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
}

.role-title { font-weight: 600; font-size: 1.02rem; }
.role-org { color: var(--c-experience); font-weight: 500; }
.role-dates { color: var(--text-faint); font-size: 0.82rem; white-space: nowrap; }
.role-sub { color: var(--text-muted); font-size: 0.86rem; margin: 1px 0 8px; }
.timeline-item ul { margin: 6px 0 0; padding-left: 18px; color: var(--text); }
.timeline-item li {
  margin-bottom: 4px;
  font-size: 0.94rem;
  text-wrap: pretty;
}

/* ---- Publications ---- */

.paper-entry {
  border-left: 2px solid var(--border);
  padding: 2px 0 2px 16px;
  margin-bottom: 18px;
  transition: border-color 0.15s ease;
}

.paper-entry:hover { border-left-color: var(--c-publications); }

.papertitle { font-weight: 600; font-size: 0.98rem; display: block; margin-bottom: 2px; }
.paper-authors { font-size: 0.87rem; color: var(--text-muted); display: block; margin-bottom: 3px; }
.thisauthor { color: var(--text); font-weight: 600; }
.paper-venue { font-size: 0.82rem; color: var(--text-faint); }

.venue-badge {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--c-publications);
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  font-style: normal;
  margin-right: 8px;
}

.paper-link { font-size: 0.82rem; font-weight: 600; color: var(--c-publications); }

/* ---- Projects ---- */

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--c-projects);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.project-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.project-link { font-size: 0.8rem; font-weight: 600; white-space: nowrap; color: var(--c-projects); }
.project-desc { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---- Awards / Volunteering ---- */

.simple-list { margin: 0; padding: 0; list-style: none; }

.simple-item {
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 3px solid var(--panel-color, var(--c-awards));
}

.simple-item:last-child { margin-bottom: 0; }
.simple-title { font-weight: 600; font-size: 0.96rem; }
.simple-org { font-style: italic; color: var(--text-faint); font-size: 0.84rem; display: block; margin: 1px 0 3px; }
.simple-desc { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

#panel-awards { --panel-color: var(--c-awards); }
#panel-volunteering { --panel-color: var(--c-volunteering); }

.fun-line {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.93rem;
  color: var(--text-muted);
}

.fun-line strong { color: var(--c-volunteering); }

/* ---- Journey strip ---- */

.journey-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 40px 0 16px;
}

.journey-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  margin: 0 -4px;
}

.journey-track {
  position: relative;
  display: inline-flex;
  gap: 22px;
  padding: 4px 4px 0;
}

.journey-line {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 75px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.journey-item {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 104px;
  flex: 0 0 auto;
}

.journey-logo {
  width: 100%;
  height: 54px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  margin-bottom: 12px;
}

.journey-logo img { max-height: 100%; max-width: 100%; object-fit: contain; }

.journey-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-experience);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--border);
  margin: 0 auto 10px;
}

.journey-name { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); line-height: 1.25; }
.journey-years { font-size: 0.66rem; color: var(--text-faint); }

/* ---- Footer ---- */

.site-footer { margin-top: 40px; font-size: 0.75rem; color: var(--text-faint); }

/* ---------------- Responsive ---------------- */

@media (max-width: 820px) {
  .page { flex-direction: column; gap: 0; padding: 0 20px; }
  .sidebar { width: 100%; padding-top: 36px; }

  .sidebar-inner {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
  }

  .profilepic { width: 80px; height: 80px; }
  .name { margin: 0; font-size: 1.3rem; }
  .tagline { margin: 0; flex-basis: 100%; }
  .btn-resume { margin: 4px 0 0; }

  .contact-list { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 2px; }

  .content { padding: 28px 0 40px; max-width: 100%; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab { flex: 0 0 auto; }
}

@media (max-width: 480px) {
  .role-row { flex-direction: column; }
}
