/* Sawad-inspired portfolio for Rahil Goyal */
:root {
  --bg: #151312;
  --bg-elev: #1c1917;
  --white: #ffffff;
  --ink: #111111;
  --muted: #999999;
  --muted-2: #6a6b6e;
  --line: rgba(182, 180, 189, 0.18);
  --coral: #f46c38;
  --coral-deep: #ff2600;
  --lime: #c5ff41;
  --lime-ink: #102000;
  --radius: 16px;
  --radius-lg: 22px;
  --font: "Poppins", system-ui, sans-serif;
  --profile-w: 340px;
  --gap: 48px;
  --max: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, a, .feature, .project, .tool { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--lime);
  color: var(--lime-ink);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--coral), var(--lime));
  pointer-events: none;
}

/* floating nav pill */
.float-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.float-nav__item {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #cfcfcf;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.float-nav__item svg { width: 18px; height: 18px; }

.float-nav__item:hover,
.float-nav__item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.float-nav__item.is-active {
  background: var(--white);
  color: var(--ink);
}

/* shell: sticky profile + main */
.shell {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 96px 0 48px;
  display: grid;
  gap: var(--gap);
}

@media (min-width: 980px) {
  .shell {
    grid-template-columns: var(--profile-w) minmax(0, 1fr);
    align-items: start;
  }
}

/* PROFILE CARD */
.profile {
  position: relative;
}

@media (min-width: 980px) {
  .profile {
    position: sticky;
    top: 96px;
    height: fit-content;
  }
}

.profile__card {
  position: relative;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.profile__arc {
  position: absolute;
  inset: 8px auto auto 8px;
  width: 190px;
  height: 100px;
  border: 2px dashed var(--coral);
  border-right: 0;
  border-bottom: 0;
  border-radius: 24px 0 0 0;
  opacity: 0.9;
  pointer-events: none;
}

.profile__photo-wrap {
  padding: 28px 28px 0;
}

.profile__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
  background: #ddd;
}

.profile__body {
  padding: 22px 28px 28px;
  text-align: center;
}

.profile__name {
  margin: 0 0 10px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.profile__tagline {
  margin: 0 auto 18px;
  max-width: 28ch;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.profile__social {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.profile__social a {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f3f3f3;
  color: #222;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.profile__social a:hover {
  transform: translateY(-2px);
  background: #ebebeb;
}

.profile__social svg { width: 18px; height: 18px; }

/* MAIN */
.main {
  min-width: 0;
  padding-bottom: 40px;
}

.block {
  padding: 28px 0 56px;
  border-bottom: 1px solid transparent;
}

.block + .block {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 56px;
}

/* MEGA TITLES like Sawad */
.mega {
  margin: 0 0 22px;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-transform: uppercase;
}

.mega__solid {
  display: block;
  color: var(--white);
}

.mega__ghost {
  display: block;
  color: rgba(255, 255, 255, 0.18);
}

.lead {
  max-width: 38rem;
  margin: 0 0 34px;
  color: #cfcfcf;
  font-size: 1.05rem;
  text-wrap: pretty;
}

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat__num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

/* feature cards */
.feature-row {
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .feature-row {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.feature {
  position: relative;
  display: block;
  min-height: 210px;
  padding: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}

.feature:hover { transform: translateY(-4px); }

.feature--coral {
  background: linear-gradient(145deg, #ff7a45 0%, var(--coral) 45%, #e45720 100%);
  color: #fff;
}

.feature--lime {
  background: linear-gradient(145deg, #d8ff6a 0%, var(--lime) 50%, #a8e020 100%);
  color: var(--lime-ink);
}

.feature__kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.75;
  margin-bottom: 18px;
}

.feature__title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.feature__text {
  margin: 0;
  max-width: 30ch;
  font-size: 0.92rem;
  opacity: 0.9;
  text-wrap: pretty;
}

.feature__arrow {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.12);
  font-size: 1rem;
}

/* projects */
.project-list {
  display: grid;
  gap: 16px;
}

.project {
  display: grid;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.project:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

@media (min-width: 700px) {
  .project {
    grid-template-columns: 0.95fr 1.05fr;
    min-height: 220px;
  }
}

.project h3 a {
  color: inherit;
  text-decoration: none;
}

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

.project__link {
  display: inline-flex;
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--coral);
  transition: color 0.2s var(--ease);
}

.project__link:hover {
  color: var(--lime);
}

.project__media {
  min-height: 180px;
  background: #111;
  display: block;
  overflow: hidden;
}

.project__media img,
.project__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
  transition: filter 0.4s var(--ease), transform 0.5s var(--ease);
}

.project:hover .project__media img,
.project:hover .project__media video {
  filter: brightness(1.08) saturate(1.05);
  transform: scale(1.03);
}

.project__media--video {
  position: relative;
}

.project__body {
  padding: 22px 22px 24px;
  display: grid;
  align-content: center;
}

.project__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.project__meta span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
}

.project h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.project p {
  margin: 0;
  color: #bdbdbd;
  text-wrap: pretty;
}

/* experience */
.exp-list {
  display: grid;
  gap: 12px;
}

.exp {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.exp:hover {
  border-color: rgba(244, 108, 56, 0.35);
  background: rgba(255, 255, 255, 0.035);
}

@media (min-width: 760px) {
  .exp {
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
  }
}

.exp h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.exp__role {
  margin: 0 0 10px;
  color: var(--lime);
  font-weight: 600;
  font-size: 0.95rem;
}

.exp__copy {
  margin: 0;
  color: #bdbdbd;
  text-wrap: pretty;
}

.exp__date {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

/* tools */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 720px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tool {
  padding: 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tool:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.tool__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 14px;
}

.tool__dot--lime { background: var(--lime); box-shadow: 0 0 14px rgba(197, 255, 65, 0.45); }
.tool__dot--coral { background: var(--coral); box-shadow: 0 0 14px rgba(244, 108, 56, 0.45); }

.tool h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.tool p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* contact */
.contact-panel {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(197, 255, 65, 0.08), transparent 60%),
    radial-gradient(420px 200px at 0% 100%, rgba(244, 108, 56, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.02);
}

.contact-panel__text {
  margin: 0 0 18px;
  color: #cfcfcf;
  max-width: 42ch;
  text-wrap: pretty;
}

.contact-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease), background 0.2s var(--ease);
}

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

.btn--lime {
  background: var(--lime);
  color: var(--lime-ink);
}

.btn--coral {
  background: var(--coral);
  color: #fff;
  border: 0;
}

.btn--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--white);
}

.contact-form {
  display: grid;
  gap: 12px;
}

@media (min-width: 700px) {
  .contact-form {
    grid-template-columns: 1fr 1fr;
  }
  .contact-form .full { grid-column: 1 / -1; }
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  font: inherit;
  padding: 0.85rem 0.95rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #777;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(197, 255, 65, 0.45);
}

/* footer */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ddd;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
}

.home-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .home-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.home-card {
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.home-card h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.home-card p {
  margin: 0;
  color: #bdbdbd;
  font-size: 0.92rem;
  text-wrap: pretty;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 28px 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* reveals: visible by default; JS may animate entrance without locking hidden */
[data-reveal] {
  opacity: 1;
  transform: none;
}

@media (max-width: 979px) {
  .profile { margin-bottom: 8px; }
  .profile__card { max-width: 420px; margin-inline: auto; }
  .float-nav { top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
