:root {
  --black: #171c1c;
  --beige: #d4c6b9;
  --green: #7a8b69;
  --grey: #706d66;
  --night: #121616;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--beige);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

img { max-width: 100%; }

a { color: inherit; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--beige);
  color: var(--black);
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus { top: 16px; }

.nav {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  padding: 1.25rem 1.5rem 0;
}

.navbar {
  position: relative;
  height: 4.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(23, 28, 28, 0.55);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    180px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.05) 46%,
    transparent 72%
  );
}

.navbar.is-hot::before { opacity: 1; }

.navbar > * { position: relative; z-index: 1; }

.wordmark {
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

nav a {
  display: inline-block;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav a:hover, nav a:focus-visible, .wordmark:hover, .wordmark:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0 1rem;
  border-radius: 8px;
  background: var(--beige);
  color: var(--black);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill:hover, .pill:focus-visible { background: #efe6dc; }

.resume-menu { position: relative; }

.resume-menu > .pill {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.caret {
  width: 0.7rem;
  height: 0.7rem;
  margin-left: 0.45rem;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.resume-menu:hover .caret,
.resume-menu:focus-within .caret { transform: rotate(180deg); }

.ripple {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%) scale(0);
  animation: dock-ripple 0.65s ease-out forwards;
  pointer-events: none;
}

@keyframes dock-ripple {
  to { transform: translate(-50%, -50%) scale(22); opacity: 0; }
}

.resume-pop {
  display: flex;
  position: absolute;
  top: calc(100% - 10px);
  right: 0;
  z-index: 1;
  min-width: 12.75rem;
  padding: 1.15rem 0.35rem 0.35rem;
  flex-direction: column;
  gap: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(18, 22, 22, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform-origin: top right;
  clip-path: inset(0 0 100% 42% round 12px);
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
  transition:
    clip-path 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.48s;
}

.resume-menu:hover .resume-pop,
.resume-menu:focus-within .resume-pop {
  clip-path: inset(0 round 12px);
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.resume-pop a {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  color: var(--beige);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 220ms ease-out, transform 220ms ease-out, background 0.25s ease;
}

.resume-menu:hover .resume-pop a,
.resume-menu:focus-within .resume-pop a {
  opacity: 1;
  transform: scale(1);
  transition: opacity 300ms ease-out 80ms, transform 300ms ease-out 80ms, background 0.25s ease;
}

.resume-menu:hover .resume-pop a:nth-child(2),
.resume-menu:focus-within .resume-pop a:nth-child(2) {
  transition-delay: 140ms, 140ms, 0s;
}

.resume-pop a:hover,
.resume-pop a:focus-visible { background: rgba(255, 255, 255, 0.06); }

.hero { padding: 0 1.5rem; }

.frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.hero-frame {
  height: calc(100svh - 1.5rem);
  margin-top: 0.75rem;
}

.fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-frame .fill { object-position: 72% 36%; }

.shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 22, 22, 0.15) 10%, rgba(18, 22, 22, 0.78) 100%),
    linear-gradient(90deg, rgba(18, 22, 22, 0.55), transparent 55%);
}

.hero-title, .chapter-copy {
  position: relative;
  z-index: 1;
}

.hero-title {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 55%;
  display: flex;
  align-items: flex-end;
  padding: 0 0 5rem 4rem;
}

h1, h2 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

h1 { font-size: clamp(3.4rem, 7vw, 6.4rem); }

h1 em, h2 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  color: var(--beige);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 1.6rem;
  margin: 0.45rem auto 0;
  background: var(--grey);
}

.inset-slot {
  position: absolute;
  z-index: 1;
  right: 1.5rem;
  bottom: 5.5rem;
  width: min(240px, 34vw);
  min-height: 300px;
  margin: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px dashed var(--beige);
  border-radius: 12px;
  background: rgba(18, 22, 22, 0.45);
}

.inset-slot p { margin: 0 0 0.4rem; font-size: 1rem; }
.inset-slot code { font-size: 0.85rem; }

.statement {
  padding: 8rem 12vw 4rem;
}

.statement p {
  margin: 0;
  max-width: 18ch;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.12;
  font-weight: 400;
}

.intro {
  padding: 6rem 8vw;
}

.intro h2 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
}

.intro p {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  font-size: 1.35rem;
}

.minor {
  color: #b7aea4;
  font-size: 1rem;
}

.chapter { padding: 0.75rem 1.5rem; }

.chapter .frame {
  height: calc(100svh - 3rem);
  display: flex;
  align-items: flex-end;
}

.chapter-copy {
  width: min(640px, 100%);
  padding: 0 2.5rem 2.5rem;
}

.chapter h2 { font-size: clamp(2.8rem, 6vw, 4.5rem); }

.chapter p { margin: 0.8rem 0 0; font-size: 1.15rem; }

.num {
  margin: 0 0 0.4rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.pills li {
  border: 1px solid var(--beige);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.chapter a { color: var(--beige); }

.steps {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem;
  max-width: 40rem;
}

.steps li { font-size: 1.25rem; }
.steps span {
  display: inline-block;
  min-width: 2.2rem;
  color: var(--green);
}

.cta { padding: 0.75rem 1.5rem 1.5rem; }

.cta-frame {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--night);
  border: 1px solid var(--grey);
}

.cta h2 { font-size: clamp(3rem, 7vw, 5.5rem); }
.cta p { margin: 1rem 0 1.4rem; font-size: 1.25rem; }

footer {
  background: var(--black);
  padding: 4rem 8vw 3rem;
  border-top: 1px solid #2a3030;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.footer-line {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.label {
  margin: 0 0 0.6rem;
  color: var(--grey);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-grid a {
  display: block;
  margin: 0.25rem 0;
  text-decoration: none;
}

.footer-grid a:hover, .footer-grid a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 800px) {
  .navbar { height: auto; flex-wrap: wrap; padding: 0.8rem; }
  nav { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap; }
  .hero-title { height: auto; padding: 0 1.25rem 5.5rem; }
  .inset-slot {
    position: static;
    width: auto;
    min-height: 0;
    margin: 1rem 1.5rem 0;
  }
  .statement { padding: 4.5rem 1.5rem 2rem; }
  .intro { padding: 3.5rem 1.5rem; }
  .chapter-copy { padding: 0 1.25rem 1.5rem; }
  .footer-top, .footer-grid { display: block; }
  .footer-top .pill { margin-top: 1rem; }
}

.kicker {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.text-link { color: var(--beige); }

.pill.ghost {
  background: transparent;
  color: var(--beige);
  border: 1px solid var(--beige);
}

.pill.ghost:hover, .pill.ghost:focus-visible { background: var(--beige); color: var(--black); }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.profile {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
  align-items: center;
  padding: 6rem 8vw;
}

.portrait-card { margin: 0; max-width: 420px; }
.portrait-card img {
  display: block;
  width: 100%;
  max-height: 640px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 12px;
}

.profile h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 0.6rem;
}

.role-line { margin: 0; font-size: 1.15rem; }
.cgpa { margin: 0.8rem 0 1rem; font-weight: 500; }
.profile-copy p { max-width: 40rem; }

.film {
  display: grid;
  grid-template-columns: 0.82fr 1.4fr 0.82fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0 1.5rem 4rem;
}

.film figure {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  height: 78vh;
}

.film figure:nth-child(2) { height: 52vh; }

.film img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.photo-stand { object-position: center 22%; }
.photo-wings { object-position: center 46%; }
.photo-hill { object-position: center 68%; }

.film figure:hover img { transform: scale(1.05); }

.fact-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.certificate {
  margin: 2.5rem 0 0;
  max-width: 640px;
}

.certificate img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}

.certificate figcaption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: #b7aea4;
}

.certificate a { color: var(--beige); }

.fact-columns ul { margin: 0; padding-left: 1.1rem; }
.fact-columns li { margin: 0.35rem 0; }

.page-intro {
  padding: 8rem 8vw 2rem;
}

.page-intro h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  max-width: 12ch;
}

.page-intro p { max-width: 36rem; font-size: 1.2rem; }

.projects-page { padding-bottom: 3rem; }

.project {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  margin: 1rem 1.5rem 2.5rem;
  padding: 1rem;
  border: 1px solid #2c3333;
  border-radius: 12px;
  background: var(--night);
}

.project.flip { direction: rtl; }
.project.flip > * { direction: ltr; }

.project figure {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  min-height: 320px;
}

.project img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top;
  transition: transform 0.8s ease;
}

.project:hover img { transform: scale(1.04); }

.project h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0.2rem 0 0.8rem; }

.detail { margin: 0.8rem 0 0; padding-left: 1.1rem; }
.detail li { margin: 0.35rem 0; }

.rise {
  display: inline-block;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.rise-late { animation-delay: 0.18s; }

.drift { animation: drift 18s ease-in-out infinite alternate; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

.scroll-cue::after { animation: line 1.6s ease-in-out infinite; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@keyframes drift {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

@keyframes line {
  0% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

@media (max-width: 800px) {
  .profile, .fact-columns, .project, .project.flip, .film { grid-template-columns: 1fr; }
  .project.flip { direction: ltr; }
  .film figure, .film figure:nth-child(2), .project img { height: 62vh; }
  .hero-frame .fill { object-position: center 32%; }
  .page-intro { padding: 7rem 1.5rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .drift, .scroll-cue::after, .reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
  .navbar::before,
  .caret,
  .ripple,
  .resume-pop,
  .resume-pop a {
    animation: none;
    transition: none;
    filter: none;
  }
}
