/* Premium one-page portfolio theme */
:root {
  --bg: #05060a;
  --bg-soft: #080b14;
  --bg-panel: rgba(15, 23, 42, 0.68);
  --panel-strong: rgba(15, 23, 42, 0.86);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f8fafc;
  --muted: #b8c1d6;
  --soft: #7f8ba7;
  --purple: #8b5cf6;
  --blue: #38bdf8;
  --gold: #facc15;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --radius-sm: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(56, 189, 248, 0.16), transparent 28rem),
    radial-gradient(circle at 78% 0%, rgba(250, 204, 21, 0.09), transparent 25rem),
    linear-gradient(145deg, #05060a 0%, #080b14 52%, #0f172a 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

/* Abstract pitch-deck glow shapes */
.site-orbit,
.noise-layer {
  position: fixed;
  pointer-events: none;
  z-index: -2;
}

.site-orbit {
  border-radius: 999px;
  filter: blur(26px);
  opacity: 0.7;
}

.site-orbit-one {
  width: 460px;
  height: 190px;
  top: 72px;
  right: -120px;
  background: conic-gradient(from 80deg, rgba(139, 92, 246, 0.55), rgba(56, 189, 248, 0.45), rgba(250, 204, 21, 0.32), rgba(139, 92, 246, 0.55));
  transform: rotate(-20deg);
  animation: orbitFloat 13s ease-in-out infinite;
}

.site-orbit-two {
  width: 380px;
  height: 220px;
  bottom: 18%;
  left: -160px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45), rgba(139, 92, 246, 0.22), transparent 68%);
  animation: orbitFloat 16s ease-in-out infinite reverse;
}

.noise-layer {
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

/* Header / navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.86), rgba(5, 6, 10, 0.52));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: grid;
  min-width: fit-content;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0;
}

.brand-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.nav-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Shared components */
.section {
  position: relative;
  padding: 108px 0;
}

.section-band {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(56, 189, 248, 0.035), rgba(255, 255, 255, 0.015));
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-label,
.eyebrow,
.panel-kicker,
.timeline-year {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 8vw, 6.9rem);
  line-height: 0.93;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  line-height: 1.2;
  letter-spacing: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.btn-primary {
  color: #020617;
  background: linear-gradient(135deg, var(--blue), #c4b5fd 48%, var(--gold));
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.18);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn-gold {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.34);
  color: #fde68a;
}

.btn-small {
  min-height: 42px;
  padding-inline: 16px;
  font-size: 0.9rem;
}

.glass-panel,
.value-card,
.skill-card,
.project-card,
.education-card,
.service-card,
.contact-form,
.dashboard-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    var(--bg-panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

/* Hero */
.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: center;
  padding-top: 86px;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(54vw, 720px);
  height: min(32vw, 360px);
  top: 18%;
  right: 5%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 48% 52% 56% 44%;
  background: conic-gradient(from 30deg, transparent, rgba(56, 189, 248, 0.3), rgba(250, 204, 21, 0.24), rgba(139, 92, 246, 0.36), transparent);
  filter: blur(2px);
  opacity: 0.68;
  transform: rotate(-11deg);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  align-items: center;
  gap: 44px;
}

.hero-visual {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 680px;
  isolation: isolate;
}

.hero-lead {
  max-width: 760px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.rotator-line {
  color: var(--soft);
  font-weight: 700;
}

#roleRotator {
  color: var(--blue);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 30px;
}

.badge-row span,
.pill-list span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: #e5eefc;
  background: rgba(255, 255, 255, 0.055);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.portrait-stage {
  position: relative;
  min-height: 540px;
  display: grid;
  align-items: end;
  justify-items: center;
  transform-style: preserve-3d;
  transition: transform 0.28s ease;
}

.portrait-stage::before {
  content: "";
  position: absolute;
  inset: 12% 4% 3%;
  border-radius: 999px 999px 34px 34px;
  background:
    radial-gradient(circle at 52% 24%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(145deg, rgba(56, 189, 248, 0.18), rgba(139, 92, 246, 0.13), rgba(250, 204, 21, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 34px 100px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  z-index: -2;
}

.portrait-aura {
  position: absolute;
  width: min(115%, 560px);
  aspect-ratio: 1;
  bottom: -4%;
  left: 50%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 56% 38%, rgba(56, 189, 248, 0.2), transparent 28%),
    conic-gradient(from 140deg, rgba(139, 92, 246, 0.42), rgba(56, 189, 248, 0.34), rgba(250, 204, 21, 0.25), rgba(139, 92, 246, 0.42));
  filter: blur(30px);
  opacity: 0.72;
  transform: translateX(-50%);
  animation: auraPulse 6s ease-in-out infinite;
  z-index: -3;
}

.hero-portrait {
  width: min(92%, 480px);
  max-height: 620px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 30px 44px rgba(0, 0, 0, 0.46));
  mask-image: linear-gradient(to bottom, black 78%, rgba(0, 0, 0, 0.92) 90%, transparent 100%);
  animation: portraitFloat 7s ease-in-out infinite;
}

.portrait-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(8, 11, 20, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(15px);
  font-size: 0.9rem;
  font-weight: 800;
}

.portrait-chip i {
  color: var(--gold);
}

.chip-top {
  top: 17%;
  left: 3%;
}

.chip-bottom {
  right: 1%;
  bottom: 24%;
}

.dashboard-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 30px;
  width: min(92%, 440px);
  margin: -132px 0 0 auto;
  z-index: 2;
  transform: translateZ(28px);
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.dashboard-glow {
  position: absolute;
  width: 260px;
  height: 130px;
  top: -30px;
  right: -70px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.42), rgba(139, 92, 246, 0.26), transparent 70%);
  filter: blur(10px);
}

.profile-panel {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding-bottom: 24px;
}

.profile-image-wrap {
  position: relative;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(139, 92, 246, 0.24), rgba(250, 204, 21, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-image.is-hidden {
  display: none;
}

.profile-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
}

.profile-fallback.is-hidden {
  display: none;
}

.profile-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.profile-panel p {
  margin-bottom: 5px;
  font-size: 0.94rem;
}

.mini-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-grid div {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
}

.mini-grid strong {
  display: block;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.1;
}

.mini-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.signal-strip {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.5fr 0.6fr;
  gap: 8px;
  margin-top: 20px;
}

.signal-strip span {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--gold));
  background-size: 220% 100%;
  animation: signalFlow 3.2s linear infinite;
}

/* About and skills */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: 24px;
  align-items: start;
}

.about-text {
  border-radius: var(--radius);
  padding: 30px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.value-grid,
.skill-grid,
.education-grid,
.service-grid {
  display: grid;
  gap: 18px;
}

.value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.value-card,
.skill-card,
.project-card,
.education-card,
.service-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.value-card:hover,
.skill-card:hover,
.project-card:hover,
.education-card:hover,
.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.35);
}

.value-card i,
.card-heading i,
.education-card i,
.service-card i,
.project-top i {
  color: var(--blue);
  font-size: 1.35rem;
}

.value-card h3,
.skill-card h3,
.project-card h3,
.education-card h3 {
  margin: 14px 0 9px;
}

.skill-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.card-heading h3 {
  margin: 0;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 80px;
  top: -32px;
  right: -64px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.24), transparent 72%);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-index {
  color: rgba(255, 255, 255, 0.28);
  font-weight: 900;
  font-size: 2.5rem;
  line-height: 1;
}

.project-card ul {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--muted);
}

.project-card li {
  margin-bottom: 7px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: auto;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

.text-link.muted {
  color: #fde68a;
}

/* Timeline, education and services */
.timeline {
  position: relative;
  max-width: 860px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 2px;
  background: linear-gradient(var(--blue), var(--purple), var(--gold));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.timeline-item > div {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 7px solid #0b1020;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.36), 0 0 30px rgba(250, 204, 21, 0.3);
}

.timeline-item h3 {
  margin: 8px 0 8px;
}

.timeline-item p {
  margin-bottom: 0;
}

.education-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.education-card span {
  display: inline-flex;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.service-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.service-card {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 14px;
}

.service-card span {
  font-weight: 800;
  line-height: 1.25;
}

/* Contact */
.contact-section {
  overflow: hidden;
}

.contact-section::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 260px;
  right: -170px;
  top: 18%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2), rgba(250, 204, 21, 0.12), transparent 74%);
  filter: blur(8px);
}

.contact-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.72fr);
  gap: 34px;
  align-items: start;
}

.contact-copy h2 {
  max-width: 620px;
}

.contact-copy > p {
  max-width: 630px;
  font-size: 1.08rem;
}

.contact-cards {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.contact-cards a,
.contact-cards span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  overflow-wrap: anywhere;
}

.contact-cards i {
  color: var(--gold);
}

.contact-form {
  border-radius: var(--radius);
  padding: 26px;
}

.contact-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 16px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  resize: vertical;
  color: var(--text);
  background: rgba(2, 6, 23, 0.52);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.contact-form .btn {
  width: 100%;
}

.form-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: #bbf7d0;
  font-weight: 700;
}

/* Footer and floating button */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 6, 10, 0.8);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Scroll reveal states */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes orbitFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-20deg) scale(1);
  }

  50% {
    transform: translate3d(22px, -18px, 0) rotate(-14deg) scale(1.04);
  }
}

@keyframes auraPulse {
  0%,
  100% {
    opacity: 0.52;
    transform: translateX(-50%) scale(0.96);
  }

  50% {
    opacity: 0.84;
    transform: translateX(-50%) scale(1.04);
  }
}

@keyframes portraitFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes signalFlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 220% 50%;
  }
}

@media (max-width: 1120px) {
  .nav-panel {
    gap: 10px;
  }

  .nav-link {
    padding-inline: 10px;
  }

  .hero-grid,
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: auto;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
  }

  .dashboard-card {
    margin: -116px auto 0;
  }

  .project-grid,
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .nav-panel {
    position: fixed;
    inset: 78px 16px auto;
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(5, 6, 10, 0.96);
    box-shadow: var(--shadow);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links {
    display: grid;
    gap: 6px;
  }

  .nav-link,
  .nav-panel .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding-top: 72px;
  }

  .portrait-stage {
    min-height: 500px;
  }

  .value-grid,
  .skill-grid,
  .education-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .navbar {
    width: min(100% - 28px, var(--container));
  }

  .section {
    padding: 78px 0;
  }

  h1 {
    font-size: clamp(2.9rem, 16vw, 4.8rem);
  }

  .hero-actions,
  .hero-actions .btn {
    width: 100%;
  }

  .profile-panel {
    grid-template-columns: 1fr;
  }

  .portrait-stage {
    min-height: 430px;
  }

  .portrait-chip {
    font-size: 0.78rem;
    min-height: 38px;
    padding-inline: 12px;
  }

  .chip-top {
    top: 13%;
    left: 0;
  }

  .chip-bottom {
    right: 0;
    bottom: 28%;
  }

  .dashboard-card {
    width: 100%;
    margin-top: -68px;
  }

  .profile-image-wrap {
    width: 104px;
  }

  .mini-grid,
  .project-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
