:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #171717;
  --text: #f5f5f5;
  --muted: #a1a1aa;
  --line: #27272a;
  --accent: #7c3aed;
  --accent-2: #a78bfa;
  --max: 1080px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: auto;
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(10, 10, 10, .82);
  backdrop-filter: blur(14px);
}

.nav-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.logo span {
  color: var(--accent-2);
}

.links {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

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

.nav-cta {
  font-size: 13px;
  padding: 7px 14px;
}

.hero {
  display: flex;
  align-items: center;
  padding: 32px 0 60px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
  width: 100%;
}

.hero-image-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.hero-image-wrap::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.28) 0%, rgba(124, 58, 237, 0) 70%);
  filter: blur(32px);
  z-index: 0;
  pointer-events: none;
}

.hero-avatar {
  position: relative;
  z-index: 1;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(167, 139, 250, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 40px rgba(124, 58, 237, 0.25);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-avatar:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(167, 139, 250, 0.75);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.75), 0 0 55px rgba(124, 58, 237, 0.4);
}

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

h1 {
  max-width: 850px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.06em;
}

h1 span {
  color: var(--accent-2);
}

.hero p {
  max-width: 650px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 18px;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border-radius: 9px;
  border: 1px solid var(--line);
  font-size: 14px;
  transition: .2s ease;
}

.btn.primary {
  background: var(--text);
  color: #080808;
  border-color: var(--text);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: #52525b;
}

section {
  padding: 95px 0;
  border-top: 1px solid var(--line);
}

.section-label {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -.05em;
  line-height: 1.05;
  margin-bottom: 38px;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
}

.about-copy {
  color: var(--muted);
  max-width: 650px;
}

.about-copy p+p {
  margin-top: 18px;
}

.about-more {
  display: none;
}

.about-more.visible {
  display: block;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.read-more-icon {
  transition: transform .25s ease;
}

.read-more-btn:hover .read-more-icon {
  transform: translateY(2px);
}

.read-more-icon.rotate {
  transform: translateY(-1px);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

#stackGrid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  width: auto;
  margin-left: 0;
  overflow: visible;
  padding: 4px 0 10px;
  mask-image: none;
}

.tag {
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  color: #d4d4d8;
  font-size: 13px;
}

.stack-item {
  min-width: 132px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #171717, #111111);
  border-radius: 10px;
  color: #e4e4e7;
  font-size: 13px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.stack-item:hover {
  transform: translateY(-3px);
  border-color: var(--brand-color);
  background: color-mix(in srgb, var(--brand-color) 12%, #111111);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand-color) 20%, transparent);
}

.stack-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 22px;
}

.stack-icon-brand {
  display: none;
}

.stack-item:hover .stack-icon-default {
  display: none;
}

.stack-item:hover .stack-icon-brand {
  display: block;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 4px 0 10px;
}

.project {
  padding: 24px;
  width: auto;
  min-height: 250px;
  flex: initial;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: .2s ease;
}

.featured-project {
  min-height: 250px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .13), rgba(17, 17, 17, .96) 48%);
  border-color: rgba(167, 139, 250, .35);
}

.project:hover {
  transform: translateY(-4px);
  border-color: #3f3f46;
}

.project.project-clickable {
  cursor: pointer;
  position: relative;
  border-color: rgba(167, 139, 250, 0.25);
  background: linear-gradient(180deg, rgba(23, 23, 23, 0.9) 0%, rgba(17, 17, 17, 0.95) 100%);
}

.project.project-clickable:hover {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 25px rgba(124, 58, 237, 0.15);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-badge-view {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-number {
  color: var(--muted);
  font-size: 12px;
}

.project-link {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project-link svg {
  transition: transform 0.2s ease;
}

.project-link:hover svg {
  transform: translate(1px, -1px);
}

.project-link:hover {
  color: var(--text);
  border-color: #52525b;
  background: var(--surface-2);
}

.project h3 {
  font-size: 20px;
  margin: 16px 0 8px;
  letter-spacing: -.03em;
  line-height: 1.25;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-card-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.project h3 a {
  color: inherit;
  transition: color 0.2s ease;
}

.project h3 a:hover {
  color: var(--accent-2);
}

.project p {
  color: var(--muted);
  font-size: 14px;
}

.project-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.project-footer-row .project-tech {
  margin-top: 0;
}

.project-expand-hint {
  font-size: 12px;
  color: var(--accent-2);
  white-space: nowrap;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s ease;
}

.project-expand-hint svg {
  transition: transform 0.2s ease;
}

.project.project-clickable:hover .project-expand-hint {
  opacity: 1;
}

.project.project-clickable:hover .project-expand-hint svg {
  transform: translate(2px, 2px);
}

.project-tech {
  margin-top: 22px;
  color: var(--accent-2);
  font-size: 12px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.principle {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.principle h3 {
  margin-bottom: 8px;
}

.principle p {
  color: var(--muted);
  font-size: 14px;
}

.contact {
  text-align: center;
  padding: 110px 0;
}

.contact h2 {
  margin-bottom: 16px;
}

.contact p {
  color: var(--muted);
  margin-bottom: 28px;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(124, 58, 237, 0.2);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(10px);
  z-index: 5;
}

.modal-tag {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-header h3 {
  font-size: 26px;
  letter-spacing: -0.04em;
}

.modal-close {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
  border-color: #71717a;
  transform: rotate(90deg);
}

.modal-body {
  padding: 26px 28px 32px;
}

.modal-description {
  color: #d4d4d8;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
}

/* Gallery inside modal */
.modal-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.gallery-item {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.gallery-caption {
  background: rgba(17, 17, 17, 0.85);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item.main-preview img {
  max-height: 290px;
  object-position: top center;
}

.gallery-item.author-preview img {
  max-height: 290px;
  object-fit: contain;
  background: #080808;
  padding: 12px;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.empty-gallery {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-gallery code {
  color: var(--accent-2);
}

/* Dedicated project detail page */
.project-detail-page {
  min-height: 100vh;
  background: radial-gradient(circle at 80% 0%, rgba(124, 58, 237, .12), transparent 34%), var(--bg);
}

.nav-back {
  font-size: 13px;
}

.project-detail {
  padding: 90px 0 110px;
}

.project-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding-bottom: 54px;
}

.project-detail-header h1 {
  max-width: 760px;
  margin-bottom: 20px;
}

.project-title-line {
  display: flex;
  align-items: center;
  gap: 20px;
}

.project-app-icon {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
}

.project-detail-header p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.project-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.project-detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
  gap: 20px;
  align-items: start;
}

.project-detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-detail-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.project-detail-gallery figure:first-child {
  grid-column: 1 / -1;
}

.project-detail-gallery img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  object-position: top center;
}

.project-detail-gallery figcaption {
  padding: 11px 14px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.project-detail-sidebar {
  display: grid;
  gap: 16px;
}

.project-detail-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.project-detail-card p {
  color: var(--muted);
  font-size: 14px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-not-found {
  padding: 80px 0;
}

@media (max-width: 760px) {
  .project-detail {
    padding: 54px 0 70px;
  }

  .project-detail-header,
  .project-detail-content {
    display: block;
  }

  .project-detail-header p {
    font-size: 16px;
  }

  .project-title-line {
    align-items: flex-start;
    gap: 14px;
  }

  .project-app-icon {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 14px;
  }

  .project-detail-actions {
    margin-top: 24px;
  }

  .project-detail-gallery {
    grid-template-columns: 1fr;
  }

  .project-detail-gallery figure:first-child {
    grid-column: auto;
  }

  .project-detail-sidebar {
    margin-top: 16px;
  }
}

.modal-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.feature-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.feature-item h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feature-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-footer-actions {
  display: flex;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #09090b;
  padding: 56px 0 36px;
}

.footer-bento {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.bento-card {
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.8) 0%, rgba(18, 18, 20, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.bento-card:hover {
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 24px rgba(124, 58, 237, 0.12);
}

.bento-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.bento-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.bento-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 3px 9px;
  border-radius: 999px;
}

.bento-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulse 2s infinite;
}

.bento-profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bento-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(167, 139, 250, 0.45);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
  flex-shrink: 0;
}

.bento-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.bento-role {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.bento-profile-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bento-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #e4e4e7;
}

.india-flag-icon {
  width: 15px;
  height: auto;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.bento-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bento-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
  font-size: 13px;
  transition: all 0.2s ease;
}

.bento-link-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bento-link-left svg {
  color: var(--muted);
  transition: color 0.2s ease;
}

.bento-link:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(167, 139, 250, 0.35);
  color: var(--text);
}

.bento-link:hover .bento-link-left svg {
  color: var(--accent-2);
}

.bento-arrow-icon {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.bento-link:hover .bento-arrow-icon {
  color: var(--accent-2);
  transform: translate(2px, -2px);
}

.bento-action-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bento-action-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.bento-chat-btn {
  width: 100%;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
}

.bento-chat-btn .btn-arrow-svg {
  transition: transform 0.2s ease;
}

.bento-chat-btn:hover .btn-arrow-svg {
  transform: translateX(3px);
}

.bento-top-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bento-top-btn .top-arrow-svg {
  transition: transform 0.2s ease;
}

.bento-top-btn:hover {
  color: var(--text);
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.bento-top-btn:hover .top-arrow-svg {
  transform: translateY(-2px);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #71717a;
}

.footer-status-tag {
  color: var(--muted);
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .container {
    width: min(calc(100% - 32px), var(--max));
  }
  .hero-content {
    gap: 40px;
  }
  .hero-avatar {
    width: 270px;
    height: 270px;
  }
  .hero-image-wrap::before {
    width: 300px;
    height: 300px;
  }
  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav-inner {
    position: relative;
  }

  .menu-toggle {
    display: block;
    order: -2;
  }

  .logo {
    margin-right: auto;
    margin-left: 12px;
  }

  .links {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(17, 17, 17, .98);
    box-shadow: 0 18px 35px rgba(0, 0, 0, .45);
  }

  .links.open {
    display: flex;
  }

  .links a {
    padding: 12px;
    border-radius: 8px;
  }

  .links a:hover {
    background: var(--surface-2);
  }

  .menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .hero {
    min-height: auto;
    padding: 36px 0 50px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: left;
  }

  .hero-image-wrap {
    order: -1;
    justify-content: center;
    margin-bottom: 8px;
  }

  .hero-avatar {
    width: 170px;
    height: 170px;
    border-width: 2.5px;
  }

  .hero-image-wrap::before {
    width: 190px;
    height: 190px;
  }

  .eyebrow {
    font-size: 12px;
    padding: 5px 11px;
    margin-bottom: 16px;
  }

  h1 {
    font-size: clamp(34px, 8.5vw, 44px);
    line-height: 1.08;
    letter-spacing: -.05em;
  }

  .hero p {
    font-size: 16px;
    line-height: 1.55;
    margin: 18px 0 24px;
  }

  .buttons {
    gap: 10px;
  }

  .about,
  .principles {
    grid-template-columns: 1fr;
  }

  .projects {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 4px 0 10px;
    margin-left: 0;
    margin-right: 0;
  }

  .projects::-webkit-scrollbar {
    display: none;
  }

  .stack {
    gap: 10px;
  }

  #stackGrid {
    gap: 10px;
  }

  .stack-item {
    min-width: 0;
    flex: 1 1 calc(50% - 10px);
    padding: 11px 10px;
    gap: 8px;
    font-size: 12px;
  }

  .stack-item img {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .stack-item:nth-child(19) {
    flex-basis: 100%;
  }

  section {
    padding: 56px 0;
  }

  h2 {
    font-size: clamp(26px, 7vw, 36px);
    margin-bottom: 24px;
  }

  .about {
    gap: 20px;
  }

  .project {
    min-height: auto;
    padding: 22px;
    width: 100%;
    flex: initial;
    scroll-snap-align: unset;
  }

  .featured-project {
    grid-column: auto;
    min-height: auto;
  }

  .project.reveal-left {
    transform: translateX(-36px);
  }

  .project.reveal-right {
    transform: translateX(36px);
  }

  .project-card-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 10px;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
  }

  .modal-features-grid {
    grid-template-columns: 1fr;
  }

  .project-footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-bento {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-header,
  .modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .modal-header h3 {
    font-size: 22px;
    padding-right: 8px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(calc(100% - 28px), var(--max));
  }
  .hero-avatar {
    width: 150px;
    height: 150px;
  }
  .hero-image-wrap::before {
    width: 170px;
    height: 170px;
  }
  .buttons .btn {
    width: 100%;
  }
}
