:root {
  color-scheme: dark;
  --font-sans: 'Inter', 'Segoe UI', sans-serif;
  --font-heading: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --bg: #040214;
  --bg-panel: rgba(20, 17, 44, 0.94);
  --bg-panel-soft: rgba(30, 22, 60, 0.96);
  --surface: rgba(40, 32, 83, 0.94);
  --surface-strong: rgba(48, 34, 97, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f6f6ff;
  --muted: #abaae3;
  --primary: #a07bff;
  --primary-strong: #7a52ff;
  --accent: #6db7ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top right, rgba(114, 87, 255, 0.16), transparent 20%),
    radial-gradient(circle at 20% 10%, rgba(34, 121, 255, 0.18), transparent 18%),
    linear-gradient(180deg, #090816 0%, #040214 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding: 32px;
}

body {
  padding: 32px;
}

/* Keep resume text from showing the browser text cursor or being selected. */
.page-shell :not(input):not(textarea) {
  cursor: default;
  user-select: none;
}

.page-shell a,
.page-shell button {
  cursor: pointer;
}

.page-shell {
  max-width: 1300px;
  margin: 0 auto;
}

header.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 20px;
  margin-bottom: 48px;
  /* background: rgba(255, 255, 255, 0.04); */
  /* border: 1px solid var(--border); */
  /* border-radius: 32px; */
  /* backdrop-filter: blur(18px); */
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.nav-links a,
.small-button,
.cta-button,
.section-button,
.submit-button {
  text-decoration: none;
  color: var(--text);
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.cta-button,
.small-button,
.section-button,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 32px;
  background: #7c6bff;
  color: #ffffff;
  box-shadow: none;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cta-button:hover,
.small-button:hover,
.section-button:hover,
.submit-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
}

.hero-copy {
  padding: 32px;
  /* border-radius: 36px; */
  /* background: var(--bg-panel); */
  /* border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.26); */
}

.eyebrow {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: #c4b8ff;
  text-transform: uppercase;
  background: rgba(140, 110, 255, 0.12);
}

.hero-copy h1 {
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 1.02;
  margin: 24px 0 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-title {
  display: grid;
  grid-template-rows: repeat(3, 1.2em);
  height: 3.6em;
  overflow: clip;
}

.hero-title-line {
  display: flex;
  align-items: baseline;
  gap: 0.22em;
  height: 1.2em;
  min-width: 0;
}

.typing-line {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 1.2em;
  white-space: pre;
}

.typing-letter,
.code-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.75rem) scale(0.95);
}

.typing-letter.bounce,
.code-letter.bounce {
  animation: letter-bounce 0.55s ease forwards;
}

.typing-line-white {
  color: #f2f2ff !important;
}

.typing-line-yellow {
  color: #ffd369;
}

.typing-line-accent {
  color: #8b69ff;
}

.typing-line.typing-active::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  color: #78a7ff;
  animation: typing-cursor 0.8s steps(1) infinite;
}

.typing-line.is-done::after {
  opacity: 0;
}

@keyframes letter-bounce {
  0% {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.88);
  }
  60% {
    opacity: 1;
    transform: translateY(-0.1rem) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes typing-cursor {
  50% {
    opacity: 0;
  }
}

.hero-copy p {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1rem, 1.1vw, 1.05rem);
  margin-bottom: 28px;
}

.hero-copy p b,
.hero-copy p strong {
  color: #ffffff;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tech-badges span {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.feature-cards div {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.03);
}

.feature-cards div strong {
  font-size: 1rem;
  line-height: 1.3;
}

.feature-cards .icon {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(130, 95, 255, 0.18);
  font-size: 1.5rem;
  /* align-content: center; */
}

.hero-visual {
  position: relative;
}

.hero-card {
  position: relative;
  min-height: 720px;
  border-radius: 36px;
  /* background: radial-gradient(circle at center, rgba(109, 93, 255, 0.18), transparent 38%),
    radial-gradient(circle at 80% 20%, rgba(109, 93, 255, 0.1), transparent 26%),
    var(--bg-panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px); */
}

.hero-card-top {
  position: relative;
  padding: 34px 34px 100px;
}

.code-bubble {
  position: absolute;
  top: 24px;
  left: 24px;
  max-width: 260px;
  width: min(260px, 100%);
  padding: 20px;
  border-radius: 24px;
  background: rgba(10, 8, 30, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.code-bubble pre {
  margin: 0;
  color: #9c9cff;
  font-size: 0.95rem;
  line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.hero-image {
  width: min(540px, 100%);
  max-width: 540px;
  margin: 0 0 0 auto;
  position: relative;
  overflow: visible;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 32px;
  object-fit: cover;
  position: relative;
  z-index: 2;
  /* box-shadow: 0 50px 120px rgba(6, 8, 29, 0.42); */
}

.hero-image::before {
  content: '';
  position: absolute;
  top: 120px;
  right: 0px;
  width: 340px;
  height: 340px;
  background: #442c91;
  /* background: rgba(124, 107, 255, 0.28); */
  filter: blur(80px);
  border-radius: 50%;
  z-index: 0;
}

.stats-card {
  position: absolute;
  right: 5px;
  top: 18%;
  transform: translateY(-18%);
  padding: 18px 22px;
  border-radius: 28px;
  background: rgba(10, 8, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  width: auto;
  max-width: 280px;
  min-width: 220px;
  backdrop-filter: blur(22px);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.stats-card strong {
  display: block;
  font-size: 2rem;
}

.stats-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.stats-card .access-countdown {
  margin-top: 10px;
  color: #9ef4bf;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stats-card .stars {
  margin-top: 0px;
  color: #ffd15c;
}

.profile-card {
  /* margin-top: 28px; */
  padding: 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 18px;
}

.profile-info {
  display: flex;
  gap: 16px;
  align-items: center;
}

.profile-photo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #9c8bff, #564cff);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-info strong {
  display: block;
}

.profile-info span {
  color: var(--muted);
}

.profile-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-meta span {
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  margin-top: 80px;
  padding: 40px;
  border-radius: 36px;
  background: var(--bg-panel-soft);
  border: 1px solid var(--border);
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head.section-head-services {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.section-head.section-head-services h2 {
  margin: 0;
  max-width: 100%;
  text-align: left;
}

.section-head h2 {
  margin: 0;
  /* keep heading from overflowing its column on wide screens */
  max-width: 65%;
  text-align: right;
}

@media (max-width: 960px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-head h2 {
    max-width: 100%;
    text-align: left;
    font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  }

  .section-head .small-button {
    align-self: flex-start;
  }
}

/* For skills section specifically, keep heading left on desktop */
.skills-portfolio .section-head h2,
.skills-portfolio .section-copy h2 {
  max-width: 100%;
  text-align: left;
}

.section.experience .section-head,
.section.portfolio .section-head {
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
}

.section-label {
  display: inline-flex;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #7c6bff;
  font-size: 0.75rem;
}

.skills-portfolio .section-copy h2 {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: normal;
  flex-wrap: wrap;
}

.section-title-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(124, 107, 255, 0.18);
  color: #ffffff;
  font-size: 1.25rem;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.service-list article {
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-list article:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 107, 255, 0.38);
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: rgba(124, 107, 255, 0.17);
  color: var(--primary);
  font-size: 1.3rem;
}

.service-list h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.service-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.section h2 {
  margin: 14px 0 18px;
  font-size: clamp(2.2rem, 3vw, 3rem);
}

.section-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 26px 0 28px;
}

.info-grid div {
  display: flex;
  gap: 12px;
  color: var(--text);
}

.info-grid strong {
  min-width: 100px;
  color: var(--muted);
}

.about-visual,
.skills-panel,
.portfolio-image,
.contact-form {
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.about-visual {
  min-height: 420px;
  background: linear-gradient(180deg, rgba(88, 78, 255, 0.24), rgba(18, 7, 45, 0.96));
}

.reverse {
  grid-template-columns: 1fr 1fr;
}

.skills-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 30px;
}

.skill-card {
  min-height: 124px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
  padding: 16px;
  text-align: center;
}

.skill-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.skill-card span {
  font-size: 0.95rem;
}

.experience-stack {
  display: grid;
  gap: 18px;
  position: relative;
  padding-left: 24px;
}

.experience-stack::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, rgba(124, 107, 255, 0.85), rgba(124, 107, 255, 0.15));
}

.experience-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: start;
  position: relative;
}

.experience-item::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7c6bff;
  box-shadow: 0 0 0 6px rgba(124, 107, 255, 0.16);
}

.experience-date {
  font-weight: 700;
  color: var(--text);
  padding-top: 24px;
}

.experience-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.timeline-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(124, 107, 255, 0.16);
  color: #a79dff;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.timeline-cards h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.timeline-cards span {
  color: #8f8ad9;
}

.timeline-cards p {
  margin: 0;
  color: var(--muted);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.portfolio-grid article {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-image {
  min-height: 210px;
  background-size: cover;
  background-position: center;
}

.portfolio-image-1 { background-image: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1200&q=80'); }
.portfolio-image-2 { background-image: url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1200&q=80'); }
.portfolio-image-3 { background-image: url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=1200&q=80'); }
.portfolio-image-4 { background-image: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1200&q=80'); }
.portfolio-image-5 { background-image: url('https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?auto=format&fit=crop&w=1200&q=80'); }
.portfolio-image-6 { background-image: url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=1200&q=80'); }

.portfolio-grid h3,
.portfolio-grid span,
.portfolio-grid a {
  margin: 16px 18px;
}

.portfolio-grid h3 {
  font-size: 1.1rem;
}

.portfolio-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 14px;
}

.portfolio-grid a {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(124, 107, 255, 0.18);
}

.contact-grid {
  grid-template-columns: 1fr 1.1fr;
}

.section.contact {
  background: linear-gradient(180deg, rgba(12, 8, 29, 0.96), rgba(18, 13, 43, 0.92));
  border: 1px solid rgba(124, 107, 255, 0.22);
}

.section.contact .section-label {
  color: #a78bfa;
}

.section.contact h2 {
  color: #ffffff;
}

.section.contact p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-info {
  display: grid;
  gap: 18px;
  margin: 26px 0 34px;
  color: rgba(255, 255, 255, 0.72);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 28px;
  background: rgba(21, 15, 52, 0.88);
  border: 1px solid rgba(124, 107, 255, 0.16);
  box-shadow: 0 16px 35px rgba(4, 5, 21, 0.35);
}

.contact-item-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(124, 107, 255, 0.2);
  color: #ffffff;
  font-size: 1.2rem;
}

.contact-item-copy strong {
  display: block;
  font-weight: 700;
  color: #ffffff;
}

.contact-item-copy span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.contact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.contact-heading h2 {
  margin: 0;
}

.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 0;
}

.social-links a {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(18, 13, 43, 0.98);
  border: 1px solid rgba(124, 107, 255, 0.22);
  color: #ffffff;
  text-decoration: none;
  font-size: 1.2rem;
  box-shadow: 0 16px 35px rgba(7, 8, 30, 0.36);
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  background: rgba(124, 107, 255, 0.22);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 32px;
  border-radius: 32px;
  background: rgba(16, 12, 40, 0.96);
  border: 1px solid rgba(124, 107, 255, 0.18);
}

.field-group {
  display: grid;
  gap: 10px;
}

.field-group label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.field-group input,
.field-group textarea {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(124, 107, 255, 0.16);
  background: rgba(22, 14, 50, 0.95);
  color: #ffffff;
  outline: none;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

.field-group textarea {
  min-height: 160px;
  resize: vertical;
}

@media (max-width: 1180px) {
  .hero-grid,
  .section-grid,
  .timeline,
  .portfolio-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-grid.reverse {
    grid-template-columns: 1fr;
  }
}

.reveal-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
}

section.section {
  margin-top: 80px;
  padding: 50px;
  border-radius: 42px;
  background: rgba(8, 6, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

header.hero-header {
  position: sticky;
  top: 0;
  z-index: 10;
  /* background: rgba(4, 2, 20, 0.92); */
  /* backdrop-filter: blur(20px); */
  transition: transform 0.28s ease, opacity 0.28s ease;
}

header.hero-header.hide-header {
  transform: translateY(-120%);
  opacity: 0;
}

/* Mobile sidebar and responsive nav */
.mobile-menu-button {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.35rem;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  max-width: 80%;
  background: var(--bg-panel-soft);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  transform: translateX(-120%);
  transition: transform 0.28s ease;
  z-index: 60;
  padding: 22px;
  border-right: 1px solid rgba(255,255,255,0.04);
  display: none;
}

.mobile-sidebar.open {
  transform: translateX(0);
}

.mobile-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  display: inline-flex;
  justify-content: flex-end;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.mobile-nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 6px;
}

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 50;
  display: none;
}

.mobile-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.hero,
section.section {
  scroll-margin-top: 120px;
}

.hero-grid {
  align-items: center;
}

.hero-card {
  min-height: 760px;
}

.hero-image {
  min-height: 520px;
}

.stats-card {
  top: 300px;
}

.about-visual,
.skills-panel,
.portfolio-image,
.contact-form {
  border-radius: 36px;
}

section.section h2 {
  font-size: clamp(2.2rem, 3vw, 3.6rem);
}

.service-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portfolio-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 1180px) {
  .hero-grid,
  .section-grid,
  .timeline,
  .portfolio-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-grid.reverse {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: auto;
  }

  .hero-image {
    min-height: 420px;
  }

  .about-visual,
  .skills-panel,
  .contact-form {
    padding: 24px;
  }
}

@media (max-width: 960px) {
  .hero-copy {
    padding: 28px;
  }

  .hero-card-top {
    padding: 28px 24px 80px;
  }

  .hero-copy h1 {
    font-size: clamp(2.6rem, 8vw, 3.6rem);
  }

  .feature-cards {
    gap: 14px;
  }
}

@media (max-width: 760px) {
  body {
    padding: 18px;
  }

  header.hero-header {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }

  .nav-links {
    display: none;
  }

  .cta-button {
    display: none;
  }
  .mobile-sidebar { display: block; }
  .mobile-backdrop { display: block; }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .cta-button,
  .small-button,
  .section-button,
  .submit-button {
    width: 100%;
  }

  .hero-grid,
  .section-grid,
  .portfolio-grid {
    gap: 24px;
  }

  .hero-card {
    padding: 24px;
  }

  .hero-image {
    border-radius: 28px;
  }

  .hero-image img {
    border-radius: 28px;
  }

  .stats-card {
    position: relative;
    right: -163px;
    top: 0;
    transform: none;
    width: 100%;
    max-width: none;
    margin-top: 24px;
  }

  .about-visual {
    min-height: 260px;
  }

  .skills-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-list,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .skills-panel {
    grid-template-columns: 1fr;
  }

  .feature-cards {
    grid-template-columns: 1fr;
  }

  .tech-badges {
    justify-content: center;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 20px;
  }
}

/* Keep the hero artwork layered and proportionate on phones. */
@media (max-width: 760px) {
  .hero-card,
  .hero-card-top { min-height: 0; }

  .hero-card-top { padding: 12px 8px 0; border-radius: 28px; }

  .hero-image { width: 100%; max-width: 540px; min-height: 0; margin: 0 auto; }

  .hero-image,
  .hero-image img { border-radius: 24px; }

  .code-bubble {
    top: 12px;
    left: 12px;
    width: min(54%, 210px);
    padding: 12px;
    border-radius: 18px;
    z-index: 3;
  }

  .code-bubble pre { font-size: clamp(0.62rem, 2.8vw, 0.82rem); }

  .stats-card {
    position: absolute;
    top: 41%;
    right: 8px;
    transform: none;
    width: clamp(170px, 54vw, 240px);
    min-width: 0;
    margin: 0;
    padding: 14px 16px;
    border-radius: 22px;
    z-index: 4;
  }

  .stats-card strong { font-size: clamp(1.5rem, 7vw, 2rem); }

  .stats-card span,
  .stats-card .stars { margin-top: 6px; font-size: clamp(0.76rem, 3.3vw, 0.95rem); }

  .profile-card {
    position: relative;
    z-index: 4;
    margin: -56px 8px 0;
    padding: 16px;
    border-radius: 24px;
    gap: 12px;
  }

  .profile-meta { gap: 8px 14px; }
  .profile-meta span { font-size: clamp(0.76rem, 3.3vw, 0.95rem); }
}

/* Mobile artwork layer order: code behind portrait, profile anchored at the bottom. */
@media (max-width: 760px) {
  .hero-card-top { padding-bottom: 132px; }

  .code-bubble { z-index: 1; }

  .hero-image { z-index: 2; }

  .stats-card { z-index: 3; }

  .profile-card {
    position: absolute;
    right: 8px;
    bottom: 12px;
    left: 8px;
    margin: 0;
    z-index: 4;
  }
}

/* Hire interaction: reveal the skills after the call to action is selected. */
.hire-button {
  width: 100%;
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, #7c6bff, #5e3dff);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.hire-button:hover { transform: translateY(-2px); filter: brightness(1.1); }
.hire-button:disabled { cursor: default; background: rgba(113, 224, 163, 0.2); color: #b8ffd4; }

.skills-panel,
.hero-title-container,
.code-bubble,
.tech-badges,
.hero-copy > p,
.service-list,
.portfolio-grid,
.experience-stack,
.about .info-grid,
.about .section-button,
.contact .contact-info { transition: filter 0.45s ease, opacity 0.45s ease; }

body.hire-locked .hero-title-container,
body.hire-locked .code-bubble,
body.hire-locked .tech-badges,
body.hire-locked .hero-copy > p,
body.hire-locked .service-list,
body.hire-locked .portfolio-grid,
body.hire-locked .experience-stack,
body.hire-locked .about .info-grid,
body.hire-locked .about .section-button,
body.hire-locked .contact .contact-info,
.skills-locked .skills-panel { filter: blur(9px); opacity: 0.46; pointer-events: none; user-select: none; }
.skills-unlocked .skills-panel { filter: none; opacity: 1; }

/* GCash hire flow. The portfolio remains blurred until payment is confirmed. */
body.payment-modal-open { overflow: hidden; }
.payment-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.22s ease, visibility 0s linear 0.22s; }
.payment-modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.payment-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 3, 15, 0.76); backdrop-filter: blur(8px); }
.payment-modal-card { position: relative; width: min(100%, 400px); padding: 32px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 26px; color: #f9f7ff; background: linear-gradient(155deg, #241957, #100c2c); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55); text-align: center; transform: translateY(16px) scale(0.98); transition: transform 0.22s ease; }
.payment-modal.is-open .payment-modal-card { transform: translateY(0) scale(1); }
.payment-modal-close { position: absolute; top: 14px; right: 14px; display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.09); font-size: 1.25rem; }
.payment-modal-brand { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; color: #fff; background: #007dff; font-weight: 800; }
.payment-modal-brand i { font-size: 1.2rem; }
.payment-modal-card h2 { margin: 18px 0 8px; font-size: 1.75rem; }
.payment-modal-card > p { margin: 0; color: #cec8e4; line-height: 1.55; }
.payment-amount { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 0; padding: 12px 14px; border: 1px solid rgba(75, 167, 255, 0.35); border-radius: 12px; background: rgba(0, 125, 255, 0.12); }
.payment-amount span { color: #d9eaff; font-size: 0.82rem; font-weight: 700; }
.payment-amount strong { color: #fff; font-size: 1.3rem; }
.gcash-qr { display: grid; place-items: center; margin: 22px auto 16px; padding: 8px; border: 8px solid #fff; border-radius: 14px; background: #fff; }
.gcash-qr i { font-size: 5rem; color: #007dff; }
.gcash-qr span { font-size: 0.82rem; font-weight: 800; }
.gcash-qr img { display: block; width: min(100%, 220px); max-height: 310px; height: auto; object-fit: contain; }
.gcash-qr canvas, .gcash-qr img { display: block; width: min(100%, 240px) !important; height: auto !important; image-rendering: pixelated; }
.payment-note { margin: 0 0 16px !important; font-size: 0.77rem; }
.payment-error { margin: 0 0 16px !important; padding: 10px 12px; border: 1px solid rgba(255, 125, 125, 0.42); border-radius: 10px; color: #ffd0d0 !important; background: rgba(197, 58, 58, 0.16); font-size: 0.8rem; }
.payment-notice { margin: 16px 0 0 !important; padding: 10px 12px; border: 1px solid rgba(107, 229, 158, 0.35); border-radius: 10px; color: #d1ffe2 !important; background: rgba(50, 154, 95, 0.16); font-size: 0.8rem; }
.access-form { display: grid; gap: 12px; margin-top: 20px; }.access-form input { width: 100%; padding: 13px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; color: #fff; background: rgba(4,3,15,.45); font: inherit; }.access-secondary-form { margin-top: 10px; }.access-secondary-form button { border: 0; color: #bfb4ee; background: transparent; font: inherit; font-size: .82rem; text-decoration: underline; }.access-pending { display: grid; gap: 8px; margin-top: 22px; padding: 20px; border: 1px solid rgba(91, 162, 255, .34); border-radius: 16px; color: #dcecff; background: rgba(45, 101, 202, .15); }.access-pending i { color: #77adff; font-size: 2rem; }.access-pending strong { color: #fff; }.access-pending span { color: #c8d7ee; font-size: .84rem; line-height: 1.45; }.access-rejected { border-color: rgba(255, 114, 114, .4); color: #ffd3d3; background: rgba(181, 47, 47, .14); }.access-rejected i { color: #ff8e8e; }
.payment-confirm-button { width: 100%; padding: 13px 16px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #007dff, #4ba7ff); font: inherit; font-weight: 800; }
.payment-confirm-button:hover { filter: brightness(1.08); }

@media (max-width: 480px) { .payment-modal-card { padding: 28px 20px 22px; } .gcash-qr { min-height: 180px; } }

/* Desktop navigation becomes a left-side rail once the visitor leaves Home. */
.desktop-side-nav { display: none; }

@media (min-width: 761px) {
  .desktop-side-nav {
    position: fixed;
    top: 50%;
    left: clamp(20px, 4vw, 72px);
    z-index: 45;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 9px;
    border: 1px solid rgba(169, 149, 255, 0.24);
    border-radius: 20px;
    background: linear-gradient(155deg, rgba(30, 21, 67, 0.92), rgba(10, 7, 31, 0.9));
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-16px, -50%);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  }

  .desktop-side-nav.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, -50%);
    transition-delay: 0s;
  }

  .desktop-side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 132px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #d2cafa;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }

  .desktop-side-nav a i {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: rgba(139, 108, 255, 0.18);
    color: #b9a4ff;
    font-size: 1.05rem;
  }

  .desktop-side-nav a:hover {
    border-color: rgba(173, 151, 255, 0.35);
    background: rgba(124, 107, 255, 0.18);
    color: #fff;
    transform: translateX(3px);
  }

  .desktop-side-nav a:hover i { background: linear-gradient(135deg, #8869ff, #5c91ff); color: #fff; }
}

/* Centered phone header and animated navigation drawer. */
body.menu-open { overflow: hidden; }

@media (max-width: 760px) {
  header.hero-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 64px;
  }

  header.hero-header .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    text-align: center;
  }

  .mobile-menu-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.25rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }

  .mobile-menu-button:active { transform: scale(0.94); }
  .mobile-menu-button:hover { background: rgba(124, 107, 255, 0.2); border-color: rgba(167, 144, 255, 0.65); }

  .mobile-sidebar {
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    max-width: none;
    min-height: 100dvh;
    display: flex !important;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(160deg, rgba(33, 22, 69, 0.98), rgba(11, 9, 37, 0.99));
    border-right: 1px solid rgba(174, 151, 255, 0.2);
    box-shadow: 20px 0 55px rgba(0, 0, 0, 0.4);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.26, 1), visibility 0s linear 0.32s;
  }

  .mobile-sidebar.open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-sidebar-brand {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #8c6cff, #6147d9);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  .mobile-close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 1.25rem;
  }

  .mobile-nav-links { gap: 10px; margin-top: 28px; }

  .mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateX(-14px);
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  }

  .mobile-sidebar.open .mobile-nav-links a { opacity: 1; transform: translateX(0); }
  .mobile-sidebar.open .mobile-nav-links a:nth-child(1) { transition-delay: 0.08s; }
  .mobile-sidebar.open .mobile-nav-links a:nth-child(2) { transition-delay: 0.12s; }
  .mobile-sidebar.open .mobile-nav-links a:nth-child(3) { transition-delay: 0.16s; }
  .mobile-sidebar.open .mobile-nav-links a:nth-child(4) { transition-delay: 0.2s; }
  .mobile-sidebar.open .mobile-nav-links a:nth-child(5) { transition-delay: 0.24s; }
  .mobile-sidebar.open .mobile-nav-links a:nth-child(6) { transition-delay: 0.28s; }
  .mobile-sidebar.open .mobile-nav-links a:nth-child(7) { transition-delay: 0.32s; }
  .mobile-sidebar.open .mobile-nav-links a:nth-child(8) { transition-delay: 0.36s; }
  .mobile-nav-links a:hover { background: rgba(124, 107, 255, 0.16); border-color: rgba(158, 132, 255, 0.28); }
  .mobile-nav-links a i { color: #a48bff; font-size: 1.2rem; }

  .mobile-backdrop {
    background: rgba(2, 1, 13, 0.62);
    backdrop-filter: blur(3px);
    transition: opacity 0.28s ease;
  }
}

/* Prevent the page from becoming wider than a phone viewport. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.page-shell,
.hero-grid,
.hero-copy,
.hero-visual,
.section {
  min-width: 0;
}

@media (max-width: 760px) {
  header.hero-header {
    width: 100%;
    min-width: 0;
    padding: 16px 0;
  }

  .brand {
    min-width: 0;
    font-size: clamp(0.85rem, 4.8vw, 1.25rem);
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .hero-copy,
  .section {
    width: 100%;
    min-width: 0;
  }

  .feature-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .tech-badges span {
    max-width: 100%;
  }
}

/* Phone timeline and persistent navigation. */
@media (max-width: 760px) {
  header.hero-header,
  header.hero-header.hide-header {
    position: sticky;
    top: 0;
    z-index: 40;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible;
  }

  /* Keep the phone navigation control reachable throughout the page. */
  .mobile-menu-button {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 70;
    grid-column: 1;
    justify-self: start;
  }

  section.experience { padding: 32px 20px; }

  .experience-stack {
    gap: 28px;
    padding-left: 24px;
  }

  .experience-stack::before {
    /* 24px left padding - 15px marker offset + 6px marker radius */
    left: 15px;
    top: 30px;
    bottom: 30px;
  }

  .experience-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
  }

  .experience-item::before { left: -15px; }

  .experience-date {
    padding-top: 0;
    white-space: normal;
  }

  .experience-card {
    min-width: 0;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
  }

  .experience-card > div:last-child { min-width: 0; }

  .experience-card h3,
  .experience-card p { overflow-wrap: anywhere; }

  .experience-card h3 { font-size: 1rem; }

  .timeline-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.2rem;
  }
}

@media (max-width: 420px) {
  .experience-card { flex-direction: column; }
}

/* Draw timeline segments between dots instead of through them. */
@media (max-width: 760px) {
  .experience-stack::before { display: none; }

  .experience-item::before {
    top: 4px;
    z-index: 2;
    box-shadow: 0 0 0 5px #090816;
  }

  .experience-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    bottom: -27px;
    left: -10px;
    width: 2px;
    background: linear-gradient(180deg, #7c6bff, rgba(124, 107, 255, 0.3));
  }
}

/* Desktop timeline: segments meet the outer edge of each date marker. */
@media (min-width: 761px) {
  .experience-stack::before { display: none; }

  .experience-item::before {
    top: 4px;
    z-index: 2;
    box-shadow: 0 0 0 5px #090816;
  }

  .experience-date { padding-top: 0; }

  .experience-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    bottom: -17px;
    left: -10px;
    width: 2px;
    background: linear-gradient(180deg, #7c6bff, rgba(124, 107, 255, 0.3));
  }
}

/* Contact section redesign: same content and controls, updated presentation. */
.section.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(32px, 5vw, 68px);
  background:
    radial-gradient(circle at 8% 8%, rgba(124, 107, 255, 0.24), transparent 28%),
    radial-gradient(circle at 92% 92%, rgba(70, 127, 255, 0.16), transparent 30%),
    linear-gradient(135deg, #100b29 0%, #080718 58%, #0d0a23 100%);
  border: 1px solid rgba(169, 149, 255, 0.25);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.38);
}

.section.contact::before {
  content: '';
  position: absolute;
  inset: 18px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 28px;
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  align-items: end;
  gap: clamp(32px, 5vw, 72px);
}

.section.contact .section-label {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(154, 126, 255, 0.12);
  color: #c7b6ff;
  font-weight: 700;
}

.contact-heading { margin: 20px 0 14px; }

.section.contact h2 {
  max-width: 560px;
  font-size: clamp(2.35rem, 4.3vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.section.contact p {
  max-width: 540px;
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.75;
}

.social-links { gap: 10px; }

.social-links a {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(181, 164, 255, 0.24);
  box-shadow: none;
}

.social-links a:hover {
  color: #fff;
  background: linear-gradient(135deg, #8469ff, #5c8cff);
  transform: translateY(-3px) rotate(-2deg);
}

.contact-info { gap: 12px; margin: 32px 0 0; }

.contact-item {
  position: relative;
  overflow: hidden;
  padding: 16px;
  gap: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.contact-item::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(#9b83ff, #5f96ff);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.contact-item:hover { transform: translateX(5px); background: rgba(141, 112, 255, 0.11); border-color: rgba(175, 153, 255, 0.28); }
.contact-item:hover::after { opacity: 1; }

.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(137, 109, 255, 0.34), rgba(82, 135, 255, 0.2));
  color: #d9d0ff;
}

.contact-item-copy strong { font-size: 0.86rem; letter-spacing: 0.02em; }
.contact-item-copy span { font-size: 0.92rem; overflow-wrap: anywhere; }

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: 28px;
  background: rgba(18, 14, 43, 0.74);
  border: 1px solid rgba(191, 177, 255, 0.18);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.contact-form .field-group:nth-child(3),
.contact-form .field-group:nth-child(4),
.contact-form .submit-button { grid-column: 1 / -1; }

.field-group { gap: 0; }

.field-group input,
.field-group textarea {
  padding: 15px 16px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(3, 2, 15, 0.34);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: #967cff;
  background: rgba(20, 15, 52, 0.78);
  box-shadow: 0 0 0 4px rgba(135, 105, 255, 0.14);
}

.field-group textarea { min-height: 148px; }

.contact-form .submit-button {
  min-height: 54px;
  border-radius: 16px;
  background: linear-gradient(100deg, #7658f8, #8b70ff 55%, #5f9dff);
  box-shadow: 0 14px 28px rgba(96, 77, 235, 0.3);
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .section.contact h2 { max-width: none; }
}

@media (max-width: 560px) {
  .section.contact { padding: 28px 18px; border-radius: 28px; }
  .section.contact::before { inset: 10px; border-radius: 20px; }
  .contact-heading { align-items: flex-start; }
  .contact-form { grid-template-columns: 1fr; padding: 18px; }
  .contact-form .field-group:nth-child(1),
  .contact-form .field-group:nth-child(2) { grid-column: 1 / -1; }
  .social-links a { width: 42px; height: 42px; }
}

/* Dynamic portfolio cards. */
.section.portfolio { background: linear-gradient(145deg, rgba(15, 10, 37, 0.98), rgba(8, 6, 24, 0.96)); border-color: rgba(163, 143, 255, 0.2); }
.section.portfolio .section-head { align-items: flex-start; }
.section.portfolio .section-head h2 { max-width: 760px; text-align: left; }
.portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.project-card { display: flex; min-width: 0; min-height: 100%; flex-direction: column; overflow: hidden; border-radius: 24px; background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18); transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.project-card:hover { transform: translateY(-7px); border-color: rgba(164, 142, 255, 0.48); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3); }
.project-card .portfolio-image { min-height: 245px; border: 0; border-radius: 0; background-color: #1d1741; transition: transform 0.45s ease; }
.project-card:hover .portfolio-image { transform: scale(1.04); }
.project-card-content { display: grid; gap: 10px; padding: 22px 76px 22px 22px; }
.project-card h3 { margin: 0; color: #fff; font-size: 1.2rem; letter-spacing: -0.025em; }
.project-card p { margin: 0; color: rgba(229, 225, 246, 0.72); line-height: 1.65; }
.project-card span { color: #b9a8ff; font-size: 0.87rem; font-weight: 600; }
.project-card > a { position: absolute; right: 20px; bottom: 20px; width: 48px; height: 48px; margin: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg, #795cf7, #5d96ff); box-shadow: 0 12px 24px rgba(89, 69, 214, 0.3); transition: transform 0.2s ease, filter 0.2s ease; }
.project-card > a:hover { transform: translateY(-3px) rotate(4deg); filter: brightness(1.1); }
.portfolio-empty { grid-column: 1 / -1; padding: 54px 24px; border: 1px dashed rgba(174, 155, 255, 0.35); border-radius: 24px; color: var(--muted); text-align: center; }
.portfolio-empty i { color: #aa96ff; font-size: 2rem; }.portfolio-empty h3 { margin: 12px 0 6px; color: #fff; }.portfolio-empty p { max-width: 430px; margin: 0 auto; }
@media (max-width: 760px) { .section.portfolio .section-head { align-items: flex-start; } .portfolio-grid { grid-template-columns: 1fr; } .project-card .portfolio-image { min-height: 210px; } }

/* Skills section redesign. */
.skills-portfolio { background: linear-gradient(145deg, rgba(14, 10, 35, 0.98), rgba(8, 6, 25, 0.96)); border-color: rgba(163, 143, 255, 0.18); }
.skills-portfolio .section-copy { align-self: center; }.skills-portfolio .section-copy h2 { max-width: 650px; font-size: clamp(2.5rem, 4.8vw, 4.5rem); line-height: 1.04; letter-spacing: -0.06em; }.skills-portfolio .section-copy p { max-width: 610px; font-size: 1.04rem; line-height: 1.8; }
.skills-panel { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 22px; border-radius: 28px; background: rgba(15, 11, 37, 0.7); border-color: rgba(178, 158, 255, 0.2); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24); }.skills-group { padding: 18px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 21px; background: rgba(255, 255, 255, 0.025); }.skills-group-support { background: linear-gradient(135deg, rgba(112, 82, 230, 0.12), rgba(58, 112, 214, 0.08)); }.skills-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }.skills-group-head span { color: #fff; font-weight: 800; }.skills-group-head i { margin-right: 7px; color: #a68eff; }.skills-group-head small { color: #a9a2c8; font-size: 0.75rem; }.skills-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }.skill-card { min-height: 105px; gap: 9px; padding: 12px 8px; border: 1px solid transparent; border-radius: 17px; background: rgba(255, 255, 255, 0.055); transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease; }.skill-card:hover { transform: translateY(-4px); background: rgba(133, 105, 255, 0.15); border-color: rgba(173, 151, 255, 0.3); }.skill-card img { width: 42px; height: 42px; }.skill-card span { font-size: 0.8rem; line-height: 1.2; }.support-skill > i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #d4cbff; background: linear-gradient(135deg, rgba(144, 115, 255, 0.34), rgba(76, 142, 255, 0.2)); font-size: 1.35rem; }@media (max-width: 980px) { .skills-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }@media (max-width: 560px) { .skills-panel { padding: 14px; }.skills-group { padding: 14px; }.skills-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.skill-card { min-height: 100px; } }

/* About section redesign. */
.section.about { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 62px); background: linear-gradient(135deg, rgba(13, 10, 34, 0.98), rgba(9, 7, 27, 0.97)); border-color: rgba(165, 145, 255, 0.2); }.section.about::before { content: ''; position: absolute; top: -180px; left: -90px; width: 370px; height: 370px; border-radius: 50%; background: rgba(106, 78, 237, 0.16); filter: blur(35px); pointer-events: none; }.section.about .section-copy { position: relative; z-index: 1; }.section.about .section-copy h2 { max-width: 670px; font-size: clamp(2.5rem, 5vw, 4.8rem); line-height: 1.04; letter-spacing: -0.065em; }.section.about .section-copy > p { max-width: 610px; font-size: 1.05rem; line-height: 1.8; }.info-grid { gap: 12px; margin: 32px 0; }.info-grid div { min-width: 0; display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; background: rgba(255, 255, 255, 0.035); }.info-grid strong { min-width: 0; color: #aa98ff; }.info-grid span { overflow-wrap: anywhere; }.about-visual { position: relative; min-height: 540px; overflow: hidden; border-radius: 30px; background: linear-gradient(155deg, rgba(101, 71, 205, 0.42), rgba(19, 14, 48, 0.92) 48%, rgba(8, 7, 25, 0.98)); border: 1px solid rgba(190, 174, 255, 0.2); box-shadow: 0 28px 65px rgba(0, 0, 0, 0.28); }.about-glow { position: absolute; top: 12%; right: 10%; width: 250px; height: 250px; border-radius: 50%; background: #7a5cff; filter: blur(80px); opacity: 0.46; }.about-photo-frame { position: absolute; inset: 34px 8% 0; z-index: 1; display: flex; justify-content: center; align-items: flex-end; border-radius: 26px 26px 0 0; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent); }.about-photo-frame img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 22px 24px rgba(0, 0, 0, 0.3)); }.about-experience { position: absolute; top: 30px; left: 24px; z-index: 2; display: grid; gap: 2px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 17px; background: rgba(9, 7, 27, 0.62); backdrop-filter: blur(14px); }.about-experience strong { font-size: 1.25rem; }.about-experience span { color: #c6bfdf; font-size: 0.76rem; }.about-availability { position: absolute; right: 22px; bottom: 22px; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: 999px; color: #e6e2f5; background: rgba(9, 7, 27, 0.74); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(12px); font-size: 0.8rem; }.about-availability i { color: #76efb0; font-size: 1.1rem; }@media (max-width: 760px) { .section.about { padding: 30px 20px; }.about-visual { min-height: 430px; }.about-photo-frame { inset: 26px 4% 0; }.about-experience { top: 16px; left: 16px; }.about-availability { right: 14px; bottom: 14px; }.info-grid div { grid-template-columns: 82px 1fr; } }

/* Decorative foliage reveal for the About section. */
.about-foliage { position: absolute; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; }.about-foliage::before,.about-foliage::after { content: ''; position: absolute; bottom: -6%; width: 52%; height: 52%; opacity: 0.98; background: radial-gradient(ellipse 28% 46% at 12% 82%, #7a503b 0 30%, transparent 32%), radial-gradient(ellipse 25% 45% at 31% 65%, #a26242 0 30%, transparent 32%), radial-gradient(ellipse 31% 54% at 55% 84%, #5d7148 0 29%, transparent 31%), radial-gradient(ellipse 29% 51% at 76% 58%, #b16d48 0 30%, transparent 32%), radial-gradient(ellipse 25% 44% at 95% 84%, #456044 0 29%, transparent 31%); filter: drop-shadow(0 -5px 12px rgba(0, 0, 0, 0.25)); transition: transform 1.1s cubic-bezier(.2,.8,.2,1), opacity .75s ease; }.about-foliage::before { left: -4%; transform: translateX(0) rotate(-3deg); }.about-foliage::after { right: -4%; transform: translateX(0) scaleX(-1) rotate(-3deg); }.section.about.is-visible .about-foliage::before { transform: translateX(-112%) rotate(-8deg); opacity: 0; }.section.about.is-visible .about-foliage::after { transform: translateX(112%) scaleX(-1) rotate(-8deg); opacity: 0; }.section.about .section-grid { position: relative; z-index: 1; }@media (prefers-reduced-motion: reduce) { .about-foliage::before,.about-foliage::after { transition: none; }.section.about.is-visible .about-foliage::before,.section.about.is-visible .about-foliage::after { opacity: 0; } }@media (max-width: 760px) { .about-foliage::before,.about-foliage::after { width: 75%; height: 36%; } }

/* Clean, responsive portrait treatment. */
.about-visual { display: grid; place-items: end center; isolation: isolate; background: linear-gradient(145deg, #2b216b 0%, #17113f 46%, #090718 100%); }.about-visual::before { content: ''; position: absolute; inset: 18px; z-index: -1; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 23px; background: linear-gradient(125deg, rgba(255, 255, 255, 0.08), transparent 35%); }.about-visual::after { content: ''; position: absolute; bottom: -18%; left: 50%; z-index: -1; width: 88%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(153, 124, 255, 0.55), rgba(91, 69, 203, 0.16) 48%, transparent 70%); transform: translateX(-50%); filter: blur(6px); }.about-photo-frame { inset: 20px 7% 0; border-radius: 0; background: transparent; }.about-photo-frame img { width: min(100%, 440px); height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 28px 24px rgba(0, 0, 0, 0.4)); }.about-availability { right: 18px; bottom: 18px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25); }@media (max-width: 760px) { .about-visual { min-height: 410px; }.about-photo-frame { inset: 18px 4% 0; }.about-photo-frame img { width: min(100%, 330px); }.about-availability { right: 12px; bottom: 12px; font-size: 0.72rem; } }

/* Hero profile card typography. */
.profile-info strong { font-size: clamp(1.1rem, 2.1vw, 1.4rem); line-height: 1.25; }.profile-info span { margin-top: 3px; font-size: clamp(0.94rem, 1.7vw, 1.08rem); }.profile-meta span { font-size: clamp(0.88rem, 1.6vw, 1rem); }@media (max-width: 560px) { .profile-card { padding: 18px; }.profile-info strong { font-size: 1.08rem; }.profile-info span { font-size: 0.92rem; } }
