/* ==========================================================================
   Umer Ali — Cinematic Developer Portfolio Stylesheet
   Hollywood x Bollywood Dark Red & Black Aesthetic
   ========================================================================== */

:root {
  --bg: #080808;
  --bg2: #111111;
  --ac: #b82032;
  --ac-hover: #d12a3f;
  --wh: #f5f5f5;
  --mu: #a0a0a0;
  --ln: rgba(245, 245, 245, 0.1);
  --bar: 12svh;
  --f: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ser: 'Cinzel', 'Trajan Pro', Georgia, 'Times New Roman', serif;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--wh);
  font-family: var(--f);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.05;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  margin-bottom: 2.2rem;
}

h2.sm {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

p {
  margin: 0 0 1rem;
  color: var(--mu);
  max-width: 62ch;
}

section {
  position: relative;
  z-index: 2;
  padding: clamp(5rem, 12vh, 9rem) clamp(1.2rem, 6vw, 6rem);
  min-height: 100vh;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Backdrop & Atmosphere ---------- */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 75% 55%, rgba(184, 32, 50, 0.32), transparent 60%),
    radial-gradient(40vmax 40vmax at 10% 0, rgba(90, 10, 25, 0.35), transparent 70%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#shaft {
  position: fixed;
  inset: -20% -10% auto;
  height: 130%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transform-origin: 50% 0;
  background:
    conic-gradient(from 160deg at 50% 0, transparent 0, rgba(190, 50, 70, 0.3) 20deg, transparent 40deg),
    conic-gradient(from 190deg at 64% 0, transparent 0, rgba(255, 150, 160, 0.15) 7deg, transparent 14deg);
  -webkit-mask-image: linear-gradient(#000, transparent 85%);
  mask-image: linear-gradient(#000, transparent 85%);
}

#gold {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(50vmax 50vmax at 28% 20%, rgba(214, 165, 80, 0.22), transparent 70%);
}

/* ---------- Character ---------- */
.char {
  position: fixed;
  z-index: 1;
  right: 0;
  bottom: 0;
  height: 94vh;
  aspect-ratio: 2 / 3;
  pointer-events: none;
  will-change: transform;
}

.cin,
.flt {
  height: 100%;
  position: relative;
}

.flt {
  animation: fl 6s ease-in-out infinite;
}

@keyframes fl {
  50% {
    transform: translateY(-1.2vh) scale(1.008);
  }
}

.char img {
  height: 100%;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 60px rgba(184, 32, 50, 0.35));
}

#sq {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .flt {
    animation: none;
  }
}

/* ---------- Loader & Cinematic Intro Layer ---------- */
#ld {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: grid;
  place-content: center;
  gap: 1rem;
  text-align: center;
  font-weight: 800;
  font-size: 1.4rem;
}

#ld i {
  display: block;
  height: 2px;
  width: min(260px, 60vw);
  background: var(--ln);
  overflow: hidden;
}

#ld b {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ac);
  transform: scaleX(0);
  transform-origin: left;
}

body.intro {
  overflow: hidden;
}

body.intro main,
body.intro nav,
body.intro footer {
  visibility: hidden;
}

body.intro .glow {
  opacity: 0;
}

#slit {
  position: fixed;
  left: 18vw;
  right: 18vw;
  top: 46%;
  height: 2px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #e23a50 30%, #ff9aa5 50%, #e23a50 70%, transparent);
  box-shadow: 0 0 30px 6px rgba(184, 32, 50, 0.5);
}

#vg {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(0, 0, 0, 0.85) 100%);
}

#sc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55svh;
  z-index: 94;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
}

#bars i {
  position: fixed;
  left: 0;
  right: 0;
  height: var(--bar);
  background: #000;
  z-index: 96;
  pointer-events: none;
}

#bars i:first-child {
  top: 0;
}

#bars i:last-child {
  bottom: 0;
}

#fl {
  position: fixed;
  inset: 0;
  z-index: 98;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 40%, #ffd9de, #b82032 60%, transparent);
}

#ttl {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--bar) + 7svh);
  z-index: 97;
  text-align: center;
  pointer-events: none;
  font-family: var(--ser);
  padding: 0 3vw;
}

#t1 {
  font-size: clamp(2.6rem, 11vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
  margin-right: -0.14em;
  color: #cfcfcf;
  text-shadow: 0 0 30px rgba(184, 32, 50, 0.6), 0 4px 30px #000;
}

#t1 span {
  display: inline-block;
}

#t1 .sp {
  width: 0.35em;
}

#t2 {
  opacity: 0;
  margin: 1.1rem -0.5em 0 0;
  font-size: clamp(0.62rem, 1.7vw, 1.15rem);
  letter-spacing: 0.5em;
  font-weight: 600;
  color: #d6d6d6;
  text-transform: uppercase;
  text-shadow: 0 2px 14px #000;
}

#tl {
  display: block;
  width: min(46vw, 420px);
  height: 1px;
  margin: 1.1rem auto 0;
  transform: scaleX(0);
  background: linear-gradient(90deg, transparent, #b82032, transparent);
}

#flare {
  position: fixed;
  left: 0;
  right: 0;
  top: 46%;
  height: 2px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent, rgba(255, 120, 135, 0.9) 50%, transparent);
}

#chap {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 8px));
  z-index: 50;
  font: 600 0.7rem var(--ser);
  letter-spacing: 0.22em;
  color: var(--mu);
  opacity: 0;
  pointer-events: none;
  text-align: right;
}

#sub {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--bar) + 3svh);
  z-index: 97;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  padding: 0 6vw;
  font: 600 clamp(0.8rem, 2.4vw, 1.25rem) / 1.4 var(--ser);
  letter-spacing: 0.16em;
  color: #f2f2f2;
  text-shadow: 0 2px 18px #000, 0 0 6px #000;
}

#skip {
  display: none;
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 120;
  min-height: 44px;
  padding: 0 1.2rem;
  background: rgba(12, 12, 12, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ddd;
  border-radius: 99px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

#skip:hover {
  background: rgba(184, 32, 50, 0.35);
  border-color: var(--ac);
}

/* ---------- Sound Gate & Audio Controls ---------- */
#gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: grid;
  place-content: center;
  text-align: center;
  font-family: var(--ser);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s, visibility 0.8s;
  padding: 0 1rem;
}

#gate.on {
  opacity: 1;
  visibility: visible;
}

#gate p {
  margin: 0 auto;
  color: #8d8d8d;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  max-width: none;
  text-transform: uppercase;
}

#ent {
  margin: 1.8rem auto;
  background: none;
  color: #f5f5f5;
  border: 1px solid rgba(184, 32, 50, 0.85);
  padding: 1.05rem 2.2rem;
  min-height: 48px;
  font: 600 clamp(0.8rem, 2.6vw, 1.05rem) var(--ser);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(184, 32, 50, 0.25), inset 0 0 30px rgba(184, 32, 50, 0.15);
  transition: background 0.3s, transform 0.2s;
}

#ent:hover {
  background: rgba(184, 32, 50, 0.28);
  transform: translateY(-2px);
}

#au {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 120;
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.9rem 0.2rem 0.2rem;
  border-radius: 99px;
  background: rgba(17, 17, 17, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--ln);
}

#au.on {
  display: flex;
}

#aub {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--ac);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

#aub:hover {
  background: var(--ac-hover);
}

.eq {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 16px;
}

.eq i {
  width: 3px;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  animation: eq 1s ease-in-out infinite;
}

.eq i:nth-child(2) {
  animation-delay: -0.4s;
}

.eq i:nth-child(3) {
  animation-delay: -0.7s;
}

@keyframes eq {
  0%,
  100% {
    height: 30%;
  }
  50% {
    height: 100%;
  }
}

#au.off .eq i {
  animation: none;
  height: 30%;
}

#auv {
  width: 84px;
  height: 44px;
  accent-color: #b82032;
  background: transparent;
  cursor: pointer;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .eq i {
    animation: none;
  }
}

/* ---------- Navigation ---------- */
nav {
  position: fixed;
  z-index: 50;
  top: max(14px, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem;
  border-radius: 99px;
  background: rgba(17, 17, 17, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--ln);
}

.lk {
  display: flex;
  gap: 0.2rem;
}

nav a {
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 99px;
  color: var(--mu);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

nav a:hover,
nav a.on {
  color: var(--wh);
  background: var(--ac);
}

#mb {
  display: none;
  background: none;
  border: 0;
  color: var(--wh);
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
}

.hero-t {
  max-width: min(720px, 58vw);
}

.hero-t h1 {
  font-size: clamp(2.8rem, 8.4vw, 7.2rem);
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  line-height: 0.96;
}

.hero-t h1 span {
  display: block;
}

.sub {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--wh);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.loc {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--mu);
  margin: 0.8rem 0 2rem;
  font-weight: 600;
}

.loc::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 12px var(--ac);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 99px;
  border: 1px solid var(--ac);
  background: var(--ac);
  color: #fff;
  margin: 0 0.6rem 0.6rem 0;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn.g {
  background: transparent;
  border-color: rgba(245, 245, 245, 0.3);
}

.btn:hover {
  transform: translateY(-3px);
  background: var(--ac-hover);
  box-shadow: 0 10px 24px rgba(184, 32, 50, 0.3);
}

.btn.g:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

/* ---------- Cards & Shared Typography ---------- */
.card {
  background: rgba(17, 17, 17, 0.8);
  border: 1px solid var(--ln);
  border-radius: 14px;
  padding: 1.25rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card small {
  color: var(--ac);
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.card b {
  font-weight: 600;
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.8rem;
  border-radius: 99px;
  background: rgba(184, 32, 50, 0.18);
  color: #ff8a98;
  border: 1px solid rgba(184, 32, 50, 0.5);
}

ul.l {
  padding: 0;
  margin: 1rem 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1.5rem;
}

ul.l li {
  color: var(--mu);
  padding-left: 1.15rem;
  position: relative;
}

ul.l li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ac);
}

.ch,
.w {
  display: inline-block;
}

.w {
  white-space: nowrap;
}

/* ---------- About ---------- */
.half {
  max-width: min(640px, 55%);
}

.info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 2rem;
  max-width: 780px;
}

/* ---------- Skills ---------- */
.sk {
  margin-bottom: 2.5rem;
}

.sk h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--wh);
}

.sk h3 em {
  font-style: normal;
  color: var(--mu);
  font-weight: 400;
  margin-left: 0.6rem;
  font-size: 0.9rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip {
  font-size: clamp(1.15rem, 2.8vw, 1.9rem);
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  letter-spacing: -0.01em;
  background: rgba(12, 12, 12, 0.78);
  border: 1px solid var(--ln);
  font-weight: 600;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.chip:hover {
  transform: translateY(-6px) rotate(-1.5deg);
  border-color: var(--ac);
  box-shadow: 0 12px 30px rgba(184, 32, 50, 0.3);
}

.sk.d .chip {
  border-color: rgba(184, 32, 50, 0.6);
}

.fl {
  position: absolute;
  font-weight: 800;
  color: rgba(184, 32, 50, 0.35);
  font-size: clamp(1.6rem, 4vw, 3rem);
  pointer-events: none;
}

/* ---------- Experience ---------- */
#experience .wrap {
  position: relative;
  padding-left: 2rem;
}

.xp {
  max-width: 860px;
  padding: 2rem;
}

.xp h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0.45rem 0 0.5rem;
}

.xp .sub {
  font-size: 1.05rem;
}

.rail {
  position: absolute;
  left: 0;
  top: 7rem;
  bottom: 1rem;
  width: 2px;
  background: var(--ln);
}

.rail b {
  position: absolute;
  inset: 0;
  background: var(--ac);
  transform-origin: top;
  transform: scaleY(0);
  box-shadow: 0 0 14px var(--ac);
}

/* ---------- Projects ---------- */
#projects .wrap {
  padding-left: 38%;
}

.pj {
  margin-bottom: 1.8rem;
  padding: 0;
  overflow: hidden;
  perspective: 900px;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.pj:hover {
  transform: translateY(-8px) rotateX(2deg);
  border-color: var(--ac);
  box-shadow: 0 24px 60px rgba(184, 32, 50, 0.25);
}

.cv {
  height: clamp(180px, 32vh, 300px);
  display: grid;
  place-items: center;
  font: 800 clamp(3.4rem, 13vw, 8rem) / 1 var(--ser);
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #2a0810, #080808 70%), var(--bg2);
  border-bottom: 1px solid var(--ln);
  position: relative;
  overflow: hidden;
}

.cv::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  right: -70px;
  top: -110px;
  background: radial-gradient(circle, rgba(184, 32, 50, 0.5), transparent 70%);
}

.cvt {
  display: block;
  position: relative;
  z-index: 1;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.8);
}

.pb {
  padding: 1.65rem;
}

.pb h3 {
  font-size: 1.55rem;
  margin: 0.65rem 0;
}

.pb .split-note {
  font-size: 0.92rem;
  color: #cfcfcf;
  background: rgba(184, 32, 50, 0.08);
  border-left: 3px solid var(--ac);
  padding: 0.6rem 0.9rem;
  border-radius: 0 8px 8px 0;
  margin: 0.9rem 0;
}

.pb ul.l {
  grid-template-columns: 1fr 1fr;
  font-size: 0.92rem;
}

.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.9rem 0 1.2rem;
}

.tech span {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  border: 1px solid var(--ln);
  color: var(--wh);
  background: rgba(255, 255, 255, 0.03);
}

.pb a.btn {
  padding: 0.62rem 1.25rem;
  font-size: 0.9rem;
}

/* ---------- Education & Journey ---------- */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1180px;
  margin: 0 auto;
}

.edu-card {
  padding: 1.65rem;
}

.edu-card h3 {
  font-size: 1.5rem;
  margin: 0.65rem 0 0.35rem;
}

.edu-card .sub {
  font-size: 1rem;
}

.edu-card ul.l {
  grid-template-columns: 1fr;
}

.tl {
  position: relative;
  padding-left: 2rem;
  margin: 0;
}

.tl::before,
.tl .pr {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--ln);
}

.tl .pr {
  background: var(--ac);
  transform-origin: top;
  transform: scaleY(0);
}

.tl ul {
  padding: 0;
  margin: 0;
}

.tl li {
  list-style: none;
  position: relative;
  margin-bottom: 1.3rem;
  color: var(--mu);
}

.tl li::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.35em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--ac);
}

/* ---------- Services ---------- */
#services {
  min-height: auto;
}

#services h2 {
  max-width: 1180px;
  margin: 0 auto 2rem;
}

.sv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.95rem;
  max-width: 1180px;
  margin: 0 auto;
}

.sv .card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: border-color 0.25s, transform 0.25s;
}

.sv .card:hover {
  border-color: rgba(184, 32, 50, 0.55);
  transform: translateY(-4px);
}

.sv .card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.sv .card p {
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Contact & Footer ---------- */
#contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#contact h2 {
  font-size: clamp(2.4rem, 7vw, 6rem);
  max-width: 12ch;
}

.contact-lead {
  font-size: 1.15rem;
  color: var(--wh);
}

.end {
  margin: clamp(3rem, 10vh, 6rem) 0 1rem;
  font: 800 clamp(2rem, 9vw, 6rem) / 1 var(--ser);
  letter-spacing: 0.14em;
  color: #ddd;
  text-shadow: 0 0 40px rgba(184, 32, 50, 0.5);
}

.end span {
  display: block;
  margin-top: 1rem;
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  letter-spacing: 0.3em;
  font-weight: 600;
  color: var(--mu);
  text-shadow: none;
}

footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  color: var(--mu);
  font-size: 0.85rem;
}

/* ---------- Responsive Layouts ---------- */
@media (max-width: 1000px) {
  .half {
    max-width: 60%;
  }
  .two {
    grid-template-columns: 1fr;
  }
  #projects .wrap {
    padding-left: 30%;
  }
}

@media (max-width: 800px), (max-aspect-ratio: 1/1) and (max-width: 1100px) {
  #mb {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
  nav {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 22px;
    width: calc(100% - 24px);
    max-width: 420px;
  }
  nav .lk {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 0.35rem;
  }
  nav.open .lk {
    display: flex;
  }
  nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }
  .char {
    height: 60svh;
    right: -10vw;
    bottom: -5svh;
  }
  .hero-t {
    max-width: 100%;
  }
  #home {
    justify-content: flex-start;
    padding-top: 6.5rem;
  }
  #home::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(8, 8, 8, 0.85), rgba(8, 8, 8, 0.55) 55%, transparent 82%);
  }
  .hero-t h1 {
    font-size: clamp(2.3rem, 11.5vw, 4.4rem);
  }
  .hero-t p {
    max-width: 62%;
  }
  .half {
    max-width: 100%;
  }
  .info {
    grid-template-columns: 1fr;
  }
  #projects .wrap {
    padding-left: 0;
  }
  ul.l,
  .pb ul.l {
    grid-template-columns: 1fr;
  }
  section {
    min-height: auto;
  }
  #chap {
    max-width: 44vw;
  }
  .btn {
    min-height: 44px;
    line-height: 1.4;
  }
  .chip {
    font-size: clamp(1.05rem, 4.8vw, 1.55rem);
  }
}

@media (max-width: 600px) {
  :root {
    --bar: 7svh;
  }
  #t2 {
    letter-spacing: 0.22em;
    margin-right: -0.22em;
    font-size: 2.9vw;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  :root {
    --bar: 9svh;
  }
  #t1 {
    font-size: min(11vw, 17vh);
  }
  #ttl {
    bottom: calc(var(--bar) + 3svh);
  }
  #t2 {
    margin-top: 0.5rem;
  }
  #home {
    padding-top: 4.5rem;
    justify-content: center;
  }
  .hero-t h1 {
    font-size: clamp(1.8rem, 10vh, 3.4rem);
    margin-bottom: 0.6rem;
  }
  .hero-t h1 span {
    display: inline;
    margin-right: 0.28em;
  }
  .loc {
    margin: 0.3rem 0 0.8rem;
  }
  .char {
    height: 86svh;
  }
  section {
    padding-top: 4.5rem;
  }
  #contact h2 {
    font-size: clamp(2rem, 9vh, 4rem);
  }
}
