/* ==========================================================================
   Masud Parvas — Portfolio
   ========================================================================== */

:root {
  --bg: #202033;
  --bg2: #25263a;
  --bg3: #2b2c44;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --accent: #ef6268;
  --accent-soft: rgba(239, 98, 104, .14);
  --text: #ffffff;
  --text2: #b8b9c8;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -18px rgba(8, 8, 20, .7);
  --header-h: 78px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --font: "Poppins", "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 6px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.container { width: min(1180px, 100% - 48px); margin-inline: auto; }
.accent { color: var(--accent); }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic--fill { fill: currentColor; stroke: none; }

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

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; transition: top .2s;
}
.skip-link:focus { top: 14px; }

.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100;
  display: flex; align-items: center;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), height .35s var(--ease);
  animation: fadeIn .8s var(--ease) both;
}
.header.is-scrolled {
  --header-h: 68px;
  background: rgba(32, 32, 51, .94);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -20px rgba(0, 0, 0, .8);
  height: 68px;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo {
  font-weight: 700; font-size: 25px; letter-spacing: -.3px; line-height: 1; display: inline-flex; align-items: baseline;
}
.logo__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 0 3px; transform: translateY(-1px); transition: transform .4s var(--ease); }
.logo:hover .logo__dot { transform: translateY(-1px) scale(1.7); }

.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__list a {
  position: relative; display: block; padding: 8px 14px; font-size: 15px; font-weight: 500; color: #e9e9f2;
  transition: color .25s;
}
.nav__list a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease);
}
.nav__list a:hover, .nav__list a.is-active { color: #fff; }
.nav__list a:hover::after, .nav__list a.is-active::after { transform: scaleX(1); }

.burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: transparent;
  position: relative; z-index: 110;
}
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease), opacity .2s, top .35s var(--ease); }
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 28px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 28px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 2px solid var(--accent);
  overflow: hidden; isolation: isolate; transition: transform .3s var(--ease), box-shadow .3s var(--ease), color .3s, background .3s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: translateY(101%); transition: transform .4s var(--ease);
}
.btn--outline { background: transparent; color: #fff; }
.btn--outline:hover::before { transform: translateY(0); }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid::before { background: #fff; }
.btn--solid:hover { color: var(--accent); }
.btn--solid:hover::before { transform: translateY(0); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(239, 98, 104, .8); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .ic { transition: transform .35s var(--ease); }
.btn:hover .ic { transform: translateX(4px); }
.btn--block { width: 100%; }

/* ---------- Social ---------- */
.social-row { display: flex; flex-wrap: wrap; gap: 12px; }
.social-row:empty { display: none; }
.social {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--accent); display: grid; place-items: center;
  color: #fff; transition: transform .3s var(--ease), background .3s, color .3s;
}
.social .ic { width: 18px; height: 18px; }
.social:hover { background: var(--accent); transform: translateY(-4px) rotate(8deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 30px) 0 0; overflow: hidden; }
.hero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; align-items: end; gap: 24px; width: min(1180px, 100% - 48px); margin-inline: auto; }
.hero__content { align-self: center; padding-bottom: 64px; }
.hero__eyebrow { display: flex; align-items: center; gap: 14px; margin: 26px 0 14px; font-size: 14px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text2); font-weight: 500; }
.hero__line { width: 38px; height: 2px; background: var(--accent); display: block; }
.hero__title { font-size: clamp(2.2rem, 4.6vw, 3.7rem); line-height: 1.38; font-weight: 700; }
.hero__roles { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; font-size: clamp(1.1rem, 1.8vw, 1.4rem); color: #e8e8f2; }
.hero__roles-swap { color: var(--accent); font-weight: 600; display: inline-block; min-width: 4ch; transition: opacity .35s, transform .35s var(--ease); }
.hero__roles-swap.is-out { opacity: 0; transform: translateY(10px); }
.hero__roles-swap::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 6px; background: var(--accent); vertical-align: -3px; animation: blink 1s steps(1) infinite; }
.hero__desc { margin-top: 18px; max-width: 560px; color: var(--text2); font-size: 16.5px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }

.hero__watermark {
  position: absolute; left: 22%; top: 50%; z-index: 0; transform: translate3d(var(--wx, 0), calc(-30% + var(--wy, 0px)), 0);
  font-family: "Dancing Script", cursive; font-weight: 600; font-size: clamp(9rem, 22vw, 20rem); line-height: 1;
  color: rgba(255, 255, 255, .035); white-space: nowrap; pointer-events: none; user-select: none;
  animation: fadeIn 2s .4s both; transition: transform .6s var(--ease);
}
.hero__orb { position: absolute; border-radius: 50%; border: 1.5px solid var(--accent); opacity: .35; pointer-events: none; }
.hero__orb--1 { width: 16px; height: 16px; left: 8%; top: 24%; animation: floaty 7s ease-in-out infinite; }
.hero__orb--2 { width: 10px; height: 10px; right: 8%; top: 20%; background: var(--accent); opacity: .5; animation: floaty 9s 1s ease-in-out infinite; }

.hero__visual { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 560px; }
.portrait { position: relative; width: min(100%, 470px); animation: floatY 7s ease-in-out infinite; }
.portrait__disc { position: absolute; left: 50%; bottom: 8%; width: 94%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: var(--bg2); border: 1px solid var(--line); }
.portrait__ring { position: absolute; left: 50%; bottom: 3%; width: 106%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 1.5px dashed rgba(239, 98, 104, .5); animation: spin 50s linear infinite; }
.portrait__ring--2 { width: 120%; bottom: -3%; border-style: solid; border-color: rgba(255, 255, 255, .06); animation-direction: reverse; animation-duration: 80s; }
.portrait__img {
  position: relative; width: 100%; height: auto; max-height: 640px; object-fit: contain; object-position: bottom center; margin-inline: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35));
}

.chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--bg3); border: 1px solid var(--line-strong); font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow);
}
.chip .ic { width: 16px; height: 16px; color: var(--accent); }
.chip--a { left: 0; bottom: 34%; }
.chip--b { right: 0; top: 24%; }

.scroll-hint { position: absolute; z-index: 3; left: 50%; bottom: 18px; width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 20px; transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; border-radius: 4px; background: var(--accent); transform: translateX(-50%); animation: scrollDot 1.8s ease-in-out infinite; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg2); padding: 15px 0; }
.marquee__track { display: flex; width: max-content; gap: 44px; animation: marquee 38s linear infinite; }
.marquee__item { display: inline-flex; align-items: center; gap: 44px; font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text2); white-space: nowrap; }
.marquee__item::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section--alt { background: var(--bg2); }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.sec-head--left { text-align: left; margin: 0 0 30px; }
.eyebrow { display: inline-block; margin-bottom: 8px; font-size: 13px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; color: var(--accent); }
.sec-head h2 { font-size: clamp(1.75rem, 3.3vw, 2.6rem); line-height: 1.4; font-weight: 700; }
.sec-sub { margin-top: 12px; color: var(--text2); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal--left { transform: translateX(-40px); }
.reveal--right { transform: translateX(40px); }
.reveal--zoom { transform: scale(.94); }
.reveal.in { opacity: 1; transform: none; }
.rise { opacity: 0; animation: rise .9s var(--ease) var(--d, 0s) both; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: 72px; align-items: center; }
.about__media { position: relative; max-width: 420px; margin-inline: auto; width: 100%; }
.about__frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 26px; background: var(--bg2); border: 1px solid var(--line-strong); overflow: hidden;
  box-shadow: var(--shadow);
}
.section--alt .about__frame { background: var(--bg); }
.about__frame::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; left: 50%; bottom: -18%; transform: translateX(-50%); border-radius: 50%; background: var(--accent-soft); }
.about__frame img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 112%; max-width: none; height: 108%; object-fit: cover; object-position: top center; transition: transform .8s var(--ease); }
.about__media:hover .about__frame img { transform: translateX(-50%) scale(1.04); }
.about__media::before { content: ""; position: absolute; inset: 22px -20px -20px 22px; border: 2px solid var(--accent); border-radius: 26px; z-index: -1; opacity: .55; transition: inset .5s var(--ease); }
.about__media:hover::before { inset: 14px -12px -12px 14px; }
.about__badge {
  position: absolute; right: -14px; bottom: 28px; display: grid; gap: 2px; padding: 14px 20px; border-radius: var(--radius-sm);
  background: var(--accent); box-shadow: var(--shadow); line-height: 1.4; animation: floatY 6s ease-in-out infinite;
}
.about__badge strong { font-size: 17px; }
.about__badge span { font-size: 12.5px; opacity: .92; }
.about__body { display: grid; gap: 16px; color: var(--text2); }
.about__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.about__tags li { padding: 7px 16px; border-radius: 999px; font-size: 14px; border: 1px solid var(--line-strong); color: #e8e8f2; transition: background .3s, border-color .3s, transform .3s var(--ease); }
.about__tags li:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-3px); }

/* ---------- Cards (shared) ---------- */
.card {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg2); overflow: hidden;
  transition: transform .45s var(--ease), border-color .35s, box-shadow .45s var(--ease);
}
.section--alt .card { background: var(--bg); }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(239, 98, 104, .1), transparent 60%);
}
.card:hover { transform: translateY(-8px); border-color: rgba(239, 98, 104, .55); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

/* ---------- Services ---------- */
.cards--services { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.cards--services .card { grid-column: span 2; padding: 34px 30px; }
.cards--services .card:nth-child(4) { grid-column: 2 / span 2; }
.cards--services .card:nth-child(5) { grid-column: 4 / span 2; }
.icon-box { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 22px; transition: transform .5s var(--ease), background .3s, color .3s; }
.icon-box .ic { width: 28px; height: 28px; }
.card:hover .icon-box { background: var(--accent); color: #fff; transform: rotate(-8deg) scale(1.08); }
.card h3 { font-size: 1.18rem; line-height: 1.5; margin-bottom: 10px; font-weight: 600; }
.card p { color: var(--text2); font-size: 15.5px; }
.card__num { position: absolute; right: 24px; top: 14px; font-size: 46px; font-weight: 700; line-height: 1; color: rgba(255, 255, 255, .05); transition: color .4s; }
.card:hover .card__num { color: rgba(239, 98, 104, .25); }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.skills .card { padding: 32px; }
.skills__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.skills__head .icon-box { margin: 0; width: 50px; height: 50px; border-radius: 14px; }
.skills__head h3 { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px; font-size: 14.5px; line-height: 1.5;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: #e8e8f2;
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.tag:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(6, 1fr); gap: 26px; }
.project { display: flex; flex-direction: column; grid-column: span 2; }
.project:nth-child(4) { grid-column: 2 / span 2; }
.project:nth-child(5) { grid-column: 4 / span 2; }
.project__cover {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg3); border-bottom: 1px solid var(--line);
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.4px); background-size: 18px 18px;
}
.project__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project:hover .project__cover img { transform: scale(1.06); }
.project__mono {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(2.8rem, 5vw, 3.8rem); font-weight: 700; letter-spacing: 1px;
  color: transparent; -webkit-text-stroke: 1.5px rgba(239, 98, 104, .7); transition: transform .6s var(--ease), -webkit-text-stroke-color .3s;
}
.project:hover .project__mono { transform: scale(1.1); -webkit-text-stroke-color: var(--accent); }
.project__ico { position: absolute; left: 18px; bottom: 16px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.project__cat { position: absolute; left: 16px; top: 16px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(32, 32, 51, .85); border: 1px solid var(--line-strong); }
.project__body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 26px; }
.status { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-bottom: 12px; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; border: 1px solid var(--line-strong); color: var(--text2); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8d8ea3; }
.status--live { color: #7ee2a8; border-color: rgba(126, 226, 168, .35); }
.status--live::before { background: #7ee2a8; animation: pulse 2s infinite; }
.status--wip { color: #ffc978; border-color: rgba(255, 201, 120, .35); }
.status--wip::before { background: #ffc978; }
.project__body h3 { font-size: 1.2rem; }
.project__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project__more {
  margin-top: auto; padding-top: 18px; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0;
  font-weight: 600; font-size: 14.5px; color: var(--accent); padding-inline: 0;
}
.project__more .ic { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.project__more:hover .ic { transform: translateX(6px); }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 860px; margin: 0 auto; padding-left: 38px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, var(--accent), rgba(239, 98, 104, .05)); transform-origin: top; transform: scaleY(0); transition: transform 1.6s var(--ease); }
.timeline.in::before { transform: scaleY(1); }
.timeline__item { position: relative; padding: 0 0 34px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: -38px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); transition: background .3s, transform .3s var(--ease); }
.timeline__dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .4s var(--ease); }
.timeline__item.in .timeline__dot::after { transform: scale(1); }
.timeline__card { padding: 24px 28px; }
.timeline__card h3 { margin-bottom: 6px; }
.timeline__period { display: inline-block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .5px; }

/* ---------- Highlights ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.highlight { display: flex; gap: 18px; align-items: flex-start; padding: 26px; }
.highlight .icon-box { margin: 0; flex: none; width: 50px; height: 50px; border-radius: 14px; }
.highlight p { color: #e8e8f2; font-size: 15.5px; }
.highlight__num { display: inline-block; margin-bottom: 4px; font-size: 1.5rem; font-weight: 700; color: var(--accent); line-height: 1.3; }

/* ---------- Blog ---------- */
.blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.post__meta { font-size: 13px; color: var(--accent); font-weight: 500; }
.blog__empty { max-width: 640px; margin: 0 auto; text-align: center; padding: 44px 32px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
.blog__empty h3 { margin: 14px 0 6px; font-size: 1.25rem; }
.blog__empty p { color: var(--text2); }
.blog__empty .icon-box { margin: 0 auto; animation: floatY 5s ease-in-out infinite; }
.blog__cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: .95fr 1.05fr; gap: 64px; align-items: start; }
.contact__list { display: grid; gap: 14px; margin-bottom: 28px; }
.contact__item { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); transition: transform .35s var(--ease), border-color .3s; }
a.contact__item:hover { transform: translateX(8px); border-color: var(--accent); }
.contact__item .icon-box { margin: 0; width: 46px; height: 46px; border-radius: 12px; }
.contact__item .icon-box .ic { width: 22px; height: 22px; }
.contact__item small { display: block; color: var(--text2); font-size: 12.5px; line-height: 1.4; }
.contact__item strong { font-weight: 600; font-size: 16px; }

.form { padding: 36px; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--bg); box-shadow: var(--shadow); display: grid; gap: 18px; }
.form__title { font-size: 1.35rem; font-weight: 700; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: #e8e8f2; }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--bg2); color: #fff;
  font: inherit; font-size: 16px; line-height: 1.6; transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: #8d8ea3; }
.field input:hover, .field textarea:hover { border-color: rgba(255, 255, 255, .3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.has-error input, .field.has-error textarea { border-color: #ff7a80; }
.field__err { min-height: 0; font-size: 13px; color: #ff9aa0; }
.field__err:empty { display: none; }

.btn__spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.is-loading { pointer-events: none; opacity: .9; }
.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading .btn__icon { display: none; }
.btn.is-loading:hover { color: #fff; }
.btn.is-loading::before { display: none; }

.form__status { font-size: 15px; line-height: 1.7; }
.form__status:empty { display: none; }
.form__status > div { padding: 14px 18px; border-radius: 12px; border: 1px solid; animation: rise .5s var(--ease) both; }
.form__status .is-ok { color: #7ee2a8; border-color: rgba(126, 226, 168, .4); background: rgba(126, 226, 168, .08); }
.form__status .is-bad { color: #ffb4b8; border-color: rgba(255, 122, 128, .45); background: rgba(255, 122, 128, .08); }
.form__status a { text-decoration: underline; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 28px; background: var(--bg); }
.footer__top { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 40px; align-items: start; }
.footer__brand { display: grid; gap: 14px; justify-items: start; }
.footer__brand p { color: var(--text2); }
.footer__nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 36px; justify-content: start; }
.footer__nav a { color: var(--text2); transition: color .25s, padding-left .3s var(--ease); }
.footer__nav a:hover { color: #fff; padding-left: 6px; }
.footer__contact { display: grid; gap: 4px; }
.footer__label { font-size: 12.5px; color: var(--text2); letter-spacing: 1.5px; text-transform: uppercase; }
.footer__contact a { font-size: 18px; font-weight: 600; transition: color .25s; }
.footer__contact a:hover { color: var(--accent); }
.footer__bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text2); font-size: 14.5px; }

/* ---------- To top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: #fff;
  display: grid; place-items: center; box-shadow: 0 12px 24px -10px rgba(239, 98, 104, .8);
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(.8); transition: opacity .3s, transform .4s var(--ease), visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-4px); }

/* ---------- Modal ---------- */
.modal { padding: 0; border: 0; background: transparent; color: var(--text); max-width: min(680px, calc(100% - 32px)); width: 100%; max-height: calc(100dvh - 32px); margin: auto; overflow: visible; }
.modal::backdrop { background: rgba(10, 10, 22, .78); }
.modal[open] { animation: modalIn .45s var(--ease) both; }
.modal[open]::backdrop { animation: fadeIn .35s both; }
.modal__box { position: relative; border-radius: 24px; background: var(--bg2); border: 1px solid var(--line-strong); overflow: hidden; max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal__close { position: absolute; right: 14px; top: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(32, 32, 51, .85); display: grid; place-items: center; transition: transform .3s var(--ease), background .3s; }
.modal__close:hover { background: var(--accent); transform: rotate(90deg); }
.modal .project__cover { border-radius: 0; }
.modal__content { padding: 28px 32px 34px; }
.modal__content h3 { font-size: 1.6rem; line-height: 1.4; margin-bottom: 10px; }
.modal__content p { color: var(--text2); }
.modal__label { margin: 22px 0 10px; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text2); font-weight: 600; }
.modal__actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
body.is-locked { overflow: hidden; }

.noscript { position: fixed; inset: auto 0 0 0; z-index: 300; margin: 0; padding: 12px 16px; text-align: center; background: var(--accent); }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floaty { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(10px, -22px); } }
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes scrollDot { 0% { transform: translate(-50%, 0); opacity: 1; } 70% { transform: translate(-50%, 16px); opacity: 0; } 100% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(126, 226, 168, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(126, 226, 168, 0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
.btn__spinner { animation-name: spinPlain; }
@keyframes spinPlain { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
  .project, .project:nth-child(4), .project:nth-child(5) { grid-column: auto; }
  .project:nth-child(5) { grid-column: 1 / -1; max-width: calc(50% - 13px); justify-self: center; width: 100%; }
  .highlights, .blog__grid { grid-template-columns: repeat(2, 1fr); }
  .about { gap: 48px; }
  .contact { gap: 40px; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .section { padding: 84px 0; }

  .burger { display: block; }
  .nav {
    position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; z-index: 105; padding: calc(var(--header-h) + 24px) 28px 32px; background: var(--bg); overflow-y: auto;
    display: flex; align-items: flex-start; clip-path: circle(0 at calc(100% - 46px) 34px); visibility: hidden;
    transition: clip-path .6s var(--ease), visibility .6s;
  }
  .nav.is-open { clip-path: circle(150% at calc(100% - 46px) 34px); visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; width: 100%; gap: 2px; }
  .nav__list li { opacity: 0; transform: translateX(30px); transition: opacity .4s, transform .5s var(--ease); }
  .nav.is-open .nav__list li { opacity: 1; transform: none; }
  .nav.is-open .nav__list li:nth-child(1) { transition-delay: .15s; }
  .nav.is-open .nav__list li:nth-child(2) { transition-delay: .2s; }
  .nav.is-open .nav__list li:nth-child(3) { transition-delay: .25s; }
  .nav.is-open .nav__list li:nth-child(4) { transition-delay: .3s; }
  .nav.is-open .nav__list li:nth-child(5) { transition-delay: .35s; }
  .nav.is-open .nav__list li:nth-child(6) { transition-delay: .4s; }
  .nav.is-open .nav__list li:nth-child(7) { transition-delay: .45s; }
  .nav__list a { font-size: 22px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav__list a::after { display: none; }
  .nav__list a.is-active { color: var(--accent); }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 18px); }
  .hero__grid { grid-template-columns: 1fr; gap: 0; }
  .hero__content { padding-bottom: 24px; }
  .hero__visual { min-height: 0; margin-top: 8px; padding: 0 8%; }
  .portrait { width: min(88%, 400px); }
  .portrait__img { max-height: 520px; }
  .hero__watermark { left: 4%; top: 36%; font-size: 8rem; }
  .scroll-hint { display: none; }
  .chip--a { left: 2%; }
  .chip--b { right: 2%; }

  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 340px; }
  .cards--services { grid-template-columns: repeat(2, 1fr); }
  .cards--services .card, .cards--services .card:nth-child(4), .cards--services .card:nth-child(5) { grid-column: auto; }
  .cards--services .card:nth-child(5) { grid-column: 1 / -1; }
  .skills { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container, .hero__grid { width: calc(100% - 36px); }
  .section { padding: 70px 0; }
  .sec-head { margin-bottom: 38px; }
  .projects, .highlights, .blog__grid, .cards--services { grid-template-columns: 1fr; }
  .cards--services .card:nth-child(5) { grid-column: auto; }
  .project:nth-child(5) { grid-column: auto; max-width: none; }
  .hero__title { font-size: 2.05rem; }
  .hero__cta .btn { flex: 1 1 100%; }
  .chip { font-size: 12px; padding: 7px 12px; }
  .chip--a { bottom: 30%; }
  .chip--b { top: 14%; }
  .form { padding: 24px 20px; }
  .modal__content { padding: 24px 22px 28px; }
  .timeline { padding-left: 32px; }
  .timeline__dot { left: -32px; }
  .timeline__card { padding: 20px; }
  .about__badge { right: 8px; }
  .about__media::before { inset: 16px -10px -14px 16px; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: repeat(2, 1fr); }
}

@media (hover: none) {
  .card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal, .rise { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}
