
:root {
  --color-bg: #ffffff;
  --color-text: #2c2c2c;
  --color-muted: #cbcbcb;
  --color-soft: #f4f4f4;
  --color-accent: #2c2c2c;
  --font-display: "Montserrat", Futura, "Trebuchet MS", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --shadow:
    0 9px 21px rgba(0, 0, 0, 0.1),
    0 38px 38px rgba(0, 0, 0, 0.09),
    0 85px 51px rgba(0, 0, 0, 0.05);
  --radius: 1rem;
  --padding: 1rem;
  --max-width: 720px;
  --wide-width: 1100px;
  --header-height: 4.5rem;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0 0 1.1rem;
  max-width: 40rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0;
}

h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 1rem;
}

h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

a,
button {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.2s ease;
}

a {
  color: var(--color-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #000000;
}

.label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
}

.muted {
  color: var(--color-muted);
}

.card {
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.section {
  padding: 4rem var(--padding);
}

.section-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chip {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--color-soft);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.5;
  max-width: 36rem;
}

p.intro-text {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 38rem;
}

a.nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

a.nav-link:hover,
a.nav-link.is-active {
  border-bottom-color: var(--color-text);
}

h2.section-title {
  margin-bottom: 1.25rem;
}

nav a {
  color: var(--color-text);
}

.card p {
  margin-bottom: 0.75rem;
}

footer a {
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

footer a:hover {
  color: #000000;
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border: none;
  border-radius: 999px;
  background: var(--color-text);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.btn:hover {
  transform: scale(1.04);
  color: #ffffff;
  background: #000000;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-muted);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--color-soft);
  color: var(--color-text);
  border-color: var(--color-text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(44, 44, 44, 0.06);
}

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 1rem var(--padding);
  min-height: var(--header-height);
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.35rem;
  min-height: calc(100svh - var(--header-height));
  padding: 3rem var(--padding) 4.5rem;
}

.hero #page-name,
.hero h1 {
  font-size: clamp(2.8rem, 9.5vw, 5.25rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  max-width: 12ch;
  margin: 0;
}

.hero-portrait {
  width: min(42vw, 180px);
  height: min(42vw, 180px);
  margin: 0.25rem 0 0.35rem;
  flex-shrink: 0;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 1.15rem;
  display: block;
  background: #ffffff;
  box-shadow: var(--shadow);
  transform: rotate(-2.5deg);
}

.hero-role {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-muted);
  max-width: 16ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: flex-start;
}

.two-col > * {
  flex: 1 1 280px;
}

.tech-logo {
  width: 42px;
  height: 42px;
  display: inline-block;
  border-radius: 0.55rem;
  flex: 0 0 auto;
  vertical-align: middle;
}



.stack-table {
  width: 100%;
  max-width: 920px;
  border-collapse: collapse;
  background: #141414;
  color: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: var(--font-body);
}

.stack-table th,
.stack-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  text-align: left;
}

.stack-table tr:last-child th,
.stack-table tr:last-child td {
  border-bottom: none;
}

.stack-table th {
  width: 32%;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: transparent;
  text-transform: none;
}

.stack-table td {
  display: table-cell;
}

.stack-table .tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.gallery-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 2.5rem 0.5rem 2.75rem;
  margin: 0 -0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery-scroll::-webkit-scrollbar {
  height: 6px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
  background: var(--color-muted);
  border-radius: 99px;
}

.gallery-item {
  flex: 0 0 auto;
  width: min(70vw, 260px);
  scroll-snap-align: start;
  border-radius: var(--radius);
  background: var(--color-soft);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: visible;
  transform-origin: center center;
  overflow: hidden;
}

.gallery-item.has-media {
  padding: 0;
  min-height: 0;
  justify-content: flex-end;
  background: #ffffff;
}

.gallery-item.has-media img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center;
  background: #fafafa;
  display: block;
  padding: 0.5rem;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.gallery-item .gallery-caption {
  padding: 0.85rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #ffffff;
  border-radius: 0 0 var(--radius) var(--radius);
  position: relative;
  z-index: 2;
}

.gallery-item.has-media:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-caption {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.gallery-item strong {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-item span {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: #666666;
}

.product-frame {
  background: #f7f7f7;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-frame img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  object-fit: contain;
}

.product-pair {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-pair .product-frame {
  padding: 1rem;
}

.flip-box {
  perspective: 1000px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  cursor: pointer;
}

.flip-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  transition: transform 0.7s ease;
  transform-style: preserve-3d;
}

.flip-box:hover .flip-inner,
.flip-box:focus-within .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.flip-front {
  background: var(--color-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-front img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flip-back {
  background: var(--color-text);
  color: #ffffff;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.flip-back p {
  color: #ffffff;
  margin: 0;
  max-width: none;
  font-size: 0.95rem;
  line-height: 1.5;
}

.flip-back a {
  color: #ffffff;
}

.flip-back a:hover {
  color: #cbcbcb;
}

.quote-block {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
}

.quote-block blockquote {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.quote-block cite {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.875rem;
  color: #666666;
}

.site-footer {
  background: var(--color-soft);
  padding: 4rem var(--padding) 3rem;
  text-align: center;
  margin-top: 2rem;
}

.site-footer .footer-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 10vw, 5rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #888888;
}

.page-hero {
  padding: 4rem var(--padding) 2rem;
  text-align: center;
}

.page-hero p {
  margin-left: auto;
  margin-right: auto;
}

.prose {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding) 3rem;
}

.prose h2 {
  margin-top: 2.5rem;
}

.parallax {
  background-image: url("assets/images/khan-khokhi.jpg");
  min-height: 52vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.parallax::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(44, 44, 44, 0.35);
}

.parallax-caption {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-align: center;
  padding: 1rem;
}

.parallax-caption h1 {
  color: #ffffff;
  font-size: clamp(2rem, 7vw, 4rem);
}

.loader-screen {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: loader-hide 0.6s ease 1.1s forwards;
  pointer-events: none;
}

.loader-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-text);
  animation: loader-pulse 0.7s ease infinite alternate;
}

@keyframes loader-pulse {
  from {
    transform: scale(0.7);
    opacity: 0.4;
  }
  to {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes loader-hide {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.skill-meter {
  margin-bottom: 0.85rem;
}

.skill-meter .label {
  display: block;
  margin-bottom: 0.35rem;
}

.skill-track {
  height: 6px;
  background: var(--color-soft);
  border-radius: 99px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--color-text);
  border-radius: 99px;
  width: 0;
  animation: fill-bar 1.2s ease forwards 0.3s;
}

@keyframes fill-bar {
  to {
    width: var(--level, 70%);
  }
}

table.facts {
  width: 100%;
  max-width: 40rem;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin: 1rem 0 1.5rem;
}

table.facts th,
table.facts td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(44, 44, 44, 0.1);
  vertical-align: top;
}

table.facts th {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: 34%;
  color: #666666;
  font-weight: 600;
}

.center {
  text-align: center;
}

.center p {
  margin-left: auto;
  margin-right: auto;
}

.mb-0 {
  margin-bottom: 0;
}

@media only screen and (max-width: 768px) {
  .parallax {
    background-attachment: scroll;
    min-height: 40vh;
  }

  .section {
    padding: 3rem var(--padding);
  }

  .nav-bar {
    align-items: flex-start;
  }
}

@media only screen and (min-width: 900px) {
  .hero {
    gap: 2.25rem;
  }
}
