/* ===========================
   Sleek Robotics Portfolio UI
   Black (primary), White (secondary), Purple (accent)
   =========================== */

:root {
  --bg: #07070a;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.10);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.70);
  --faint: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #8b5cf6; /* purple */
  --accent2: #a78bfa;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

  --radius: 18px;
  --radius-sm: 14px;

  --container: 1120px;
  --pad: 20px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 700px at 20% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
              radial-gradient(900px 500px at 80% 20%, rgba(167, 139, 250, 0.10), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent2); }

.container {
  width: min(var(--container), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
}

.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;
}

.bg-glow {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(800px 500px at 30% 10%, rgba(139, 92, 246, 0.14), transparent 55%),
    radial-gradient(700px 400px at 75% 35%, rgba(167, 139, 250, 0.10), transparent 60%);
  filter: blur(40px);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

/* Header / Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(7, 7, 10, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 14px; height: 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), rgba(255, 255, 255, 0.20));
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}
.brand-text { font-weight: 650; letter-spacing: 0.2px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
}
.nav-links a:hover { color: var(--text); }

.pill {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: var(--text) !important;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.nav-toggle-lines {
  display: inline-block;
  width: 18px; height: 12px;
  background:
    linear-gradient(var(--text), var(--text)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) 0 100% / 100% 2px no-repeat;
  opacity: 0.9;
}

/* Sections */
.section { padding: 64px 0; }
.section-head {
  margin-bottom: 18px;
  display: grid;
  gap: 8px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.2px;
}
.section-head p { margin: 0; color: var(--muted); }

/* About */
.about {
  padding: 54px 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}
.kicker {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}
.headline {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.6px;
}
.accent { color: var(--accent2); }
.subhead { margin: 0 0 18px; color: var(--muted); max-width: 68ch; }

/* Allow projects intro line to use full container width */
#projects .section-head .subhead {
  max-width: none;
}

.about-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
}


/* Cards / Buttons */
.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

.card__title{ 
    margin: 0 0 10px; 
    font-size: 18px; 
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { border-color: rgba(167, 139, 250, 0.35); background: rgba(255, 255, 255, 0.08); }
.btn.primary {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.20);
}
.btn.primary:hover { background: rgba(139, 92, 246, 0.28); }
.btn.ghost { background: transparent; }
.btn.small { padding: 10px 12px; border-radius: 12px; font-weight: 620; }

.muted { color: var(--muted); }
.tiny { font-size: 12.5px; color: var(--faint); }

.card__row{ display:flex; justify-content:right; margin-top: 12px; }

/* Project card expand / shrink (same style as Quick Highlights links) */
.project-expand-btn,
.project-shrink-btn {
  background: none;
  border: none;
  padding: 6px;
  font: inherit;
  color: var(--accent2);
  cursor: pointer;
  font-size: 14px;
  margin-left: auto;
}
.project-expand-btn:hover,
.project-shrink-btn:hover { color: var(--text); text-decoration: underline; }

.project-expanded-actions { margin-top: 18px; }

.project-expanded {
  display: block;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.35s ease;
}
.project-expanded {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.35s ease;
}

.project.is-expanded .project-expanded {
  opacity: 1;
}
.project-expanded-inner h4 { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.project-expanded-inner p { margin: 0 0 12px; color: var(--muted); }
.project-expanded-inner ul { margin: 0 0 24px; color: var(--muted); }
.project-expanded-inner .actions.project-expanded-actions { margin-top: 16px; }

.video-image-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.video-image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  min-width: 0;
}

.video-image-item img,
.video-image-item video {
  max-width: 100%;
  width: 100%;
  height: auto;
}

.skills-tab {
  padding-top: 15px;
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.skills-tab p { margin: 0 0 0; font-size: 14px; color: var(--muted); }

.footnote {
  margin-top: 15px;
}
.footnote p { margin: 0 0 0; font-size: 12px; color: var(--muted); }

/* Expanded state: card takes full grid width, others collapse */
.projects-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.projects-grid .project {
  transition: grid-column 0.35s ease, opacity 0.35s ease, max-height 0.4s ease;
  min-width: 0;
}
.projects-grid .project.is-expanded {
  grid-column: 1 / -1;
}
.projects-grid:has(.project.is-expanded) .project:not(.is-expanded) {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  min-height: 0;
  border: none;
  visibility: hidden;
}

/* Make non-expanded project cards equal height per row and pin expand row to bottom */
.projects-grid .project:not(.is-expanded) .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.projects-grid .project:not(.is-expanded) .card__row {
  margin-top: auto;
}

.filters{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

/* Profile Card */
.profile-card { position: sticky; top: 88px; }
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.avatar {
  width: 46px; height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(255, 255, 255, 0.12));
  display: grid;
  place-items: center;
  font-weight: 800;
}
.profile-meta h2 { margin: 0; font-size: 16px; }
.profile-meta p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.mini {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  padding: 12px;
}
.mini-title { margin: 0; font-size: 12px; color: var(--faint); }
.mini-value { margin: 4px 0 0; font-size: 13px; color: var(--text); }

.profile-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.link {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}
.link:hover { color: var(--text); border-color: rgba(167, 139, 250, 0.35); }

/* Grids */
.grid { display: grid; gap: 14px; }
.skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.about-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: 1.2fr 0.8fr; }

.project-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.project-top h3 {
  margin: 0;
  font-size: 18px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: var(--text);
}

.bullets{ margin: 0; padding-left: 18px; color: var(--muted); }
.bullets li{ margin: 8px 0; }
.actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Callout */
.callout {
  margin-top: 18px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(255, 255, 255, 0.04));
  border-radius: var(--radius);
  padding-left: 18px;
  padding-right: 18px;
  padding-top: 7px;
  padding-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.callout-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto; /* pushes buttons to the right */
}

/* Chips */
.chips {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  border-radius: 999px;
}

/* Stack (e.g. experience cards) */
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Timeline cards */
.timeline-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 102px;
}
.timeline-head-row .muted { flex-shrink: 0; }
.timeline-head h3 { margin: 0; }
.timeline-head p { margin: 3px 0 0; }

/* Contact form */
.contact-form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; }
label span { font-size: 13px; color: var(--muted); }
input, textarea {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  padding: 12px 12px;
  color: var(--text);
  outline: none;
}
input:focus, textarea:focus {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
  margin: 14px 0;
}

/* Footer */
.footer { 
  padding: 28px 0 42px; 
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
   font-size: 11px;
}

/* Responsive */
@media (max-width: 980px) {
  .about { grid-template-columns: 1fr; }
  .profile-card { position: relative; top: auto; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 44px 0; }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .projects-grid { gap: 12px; }

  .project-top h3 { font-size: 16px; }
  .project-expanded-inner h4 { font-size: 14px; }

  .btn {
    padding: 11px 12px;
    font-size: 13px;
  }
  .btn.small { padding: 9px 10px; border-radius: 12px; }
  .actions { gap: 8px; }

  .tag { font-size: 10.5px; padding: 4px 7px; }

  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    right: calc((100% - min(var(--container), calc(100% - (var(--pad) * 2)))) / 2);
    top: 58px;
    background: rgba(7, 7, 10, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
    gap: 10px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 10px; border-radius: 12px; }
  .nav-links a:hover { background: rgba(255, 255, 255, 0.06); }

  .video-image-container {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
}