:root {
  --bg: #f4efe7;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-border: rgba(25, 30, 52, 0.08);
  --text: #131313;
  --muted: #5b6472;
  --accent: #ff6b2c;
  --accent-strong: #ff3f81;
  --shadow: 0 24px 80px rgba(17, 22, 38, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 118, 76, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(0, 163, 255, 0.22), transparent 22%),
    linear-gradient(135deg, #f7f2ea 0%, #edf3f8 55%, #f7efe8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(19, 19, 19, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 19, 19, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  opacity: 0.45;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  min-height: 100vh;
}

.builder-panel,
.preview-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.builder-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-head h1,
.preview-topbar h2 {
  margin: 8px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.panel-head h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
}

.preview-topbar h2 {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 800;
}

.panel-copy,
.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-section {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(25, 30, 52, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading span {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  font-size: 0.98rem;
}

label {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(25, 30, 52, 0.1);
  background: rgba(252, 252, 252, 0.95);
  color: var(--text);
  outline: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255, 63, 129, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 63, 129, 0.1);
  transform: translateY(-1px);
}

.panel-actions {
  display: flex;
  gap: 12px;
}

.secondary-btn,
.primary-btn {
  padding: 16px 20px;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-btn {
  flex: 1 1 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  box-shadow: 0 18px 35px rgba(255, 87, 87, 0.28);
}

.secondary-btn {
  flex: 1 1 0;
  background: rgba(19, 19, 19, 0.06);
  color: var(--text);
  border: 1px solid rgba(25, 30, 52, 0.08);
}

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

.primary-btn:hover {
  box-shadow: 0 22px 40px rgba(255, 87, 87, 0.34);
}

.preview-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.preview-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.output {
  min-width: 0;
  flex: 1;
}

.portfolio-preview {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  color: white;
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 30px 90px rgba(14, 17, 31, 0.24);
}

.portfolio-preview::before,
.portfolio-preview::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.8;
  pointer-events: none;
}

.portfolio-preview::before {
  width: 280px;
  height: 280px;
  top: -60px;
  right: -80px;
  background: rgba(255, 255, 255, 0.14);
}

.portfolio-preview::after {
  width: 220px;
  height: 220px;
  bottom: -50px;
  left: -40px;
  background: rgba(255, 255, 255, 0.1);
}

.preview-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 22px;
}

.glass-block {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 28px;
}

.hero-badge,
.card-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 5vw, 5.3rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.84);
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.contact-list a,
.contact-list span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.profile-card {
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 18px;
  grid-template-rows: auto auto 1fr auto;
}

.profile-visual {
  position: relative;
  min-height: 280px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.25), transparent 36%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.profile-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  border: 0;
  box-shadow: none;
}

.profile-glow {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-glow span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(9, 11, 23, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.profile-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

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

.mini-proof div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-proof strong {
  display: block;
  font-size: 1.05rem;
}

.mini-proof span {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.72);
}

.stats-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

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

.stat-card,
.stack-card,
.projects-card,
.timeline-card,
.contact-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.76);
}

.content-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: start;
}

.stack-card .chip-row,
.projects-list,
.timeline-list,
.contact-list {
  margin-top: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-row span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
  font-weight: 700;
}

.projects-list,
.timeline-list,
.contact-list {
  display: grid;
  gap: 12px;
}

.project-item,
.timeline-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 1.6;
}

.project-item strong,
.timeline-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.contact-list a,
.contact-list span {
  display: inline-flex;
  width: fit-content;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.cta-row a,
.cta-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  text-decoration: none;
  font-weight: 800;
}

.cta-row button {
  font: inherit;
  cursor: pointer;
}

.social-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.social-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.social-grid a span:last-child {
  opacity: 0.7;
  font-size: 0.86rem;
}

.testimonials-section {
  margin-top: 8px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.testimonial-card {
  padding: 22px;
}

.testimonial-text {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testimonial-author strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.testimonial-author span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.portfolio-preview * {
  animation: riseIn 650ms ease both;
}

.portfolio-preview .stat-card:nth-child(2),
.portfolio-preview .project-item:nth-child(2),
.portfolio-preview .timeline-item:nth-child(2) {
  animation-delay: 80ms;
}

.portfolio-preview .stat-card:nth-child(3),
.portfolio-preview .project-item:nth-child(3),
.portfolio-preview .timeline-item:nth-child(3) {
  animation-delay: 140ms;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .builder-panel {
    order: 2;
  }

  .preview-panel {
    order: 1;
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .content-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-preview {
    padding: 20px;
  }

  .hero-copy,
  .profile-card,
  .stat-card,
  .stack-card,
  .projects-card,
  .timeline-card,
  .contact-card {
    padding: 20px;
  }

  .panel-actions {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 14px;
    gap: 14px;
  }

  .builder-panel,
  .preview-panel {
    border-radius: 24px;
  }

  .builder-panel {
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: 2.7rem;
  }
}
