:root {
  --bg: #090b12;
  --bg-soft: #111622;
  --surface: rgba(15, 19, 31, 0.78);
  --surface-strong: rgba(19, 24, 38, 0.95);
  --text: #f4f7fb;
  --muted: #aeb8ca;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #7dd3fc;
  --accent-2: #8b5cf6;
  --success: #22c55e;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(125, 211, 252, 0.12), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(139, 92, 246, 0.15), transparent 25%),
    linear-gradient(180deg, #06070c 0%, #090b12 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1140px, calc(100% - 1.5rem));
  margin: 0 auto;
}

.page-shell {
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(8, 10, 16, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  width: 72px;
  height: 72px;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.95), rgba(139, 92, 246, 0.95));
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.18);
}

.brand-mark img.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

@media (max-width: 640px) {
  .brand-mark img.brand-logo {
    width: 58px;
    height: 58px;
  }
}

.brand strong {
  display: block;
  font-size: 1.02rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.footer-grid h3 {
  margin-bottom: 0.65rem;
  font-size: 1.02rem;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  margin: 0.32rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-grid a:hover,
.footer-grid a:focus-visible {
  color: var(--text);
  transform: translateX(2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}


.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, #e0f2fe, #7dd3fc 40%, #8b5cf6);
  color: #07111d;
  box-shadow: 0 20px 45px rgba(125, 211, 252, 0.18);
}

.button-secondary {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.section {
  padding: 5.25rem 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-orbit {
  position: absolute;
  inset: auto;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.hero-orbit-a {
  width: 22rem;
  height: 22rem;
  top: -6rem;
  right: -5rem;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.18), transparent 68%);
}

.hero-orbit-b {
  width: 18rem;
  height: 18rem;
  left: -6rem;
  bottom: -4rem;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 68%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.02;
}

h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  max-width: 14ch;
}

h3 {
  font-size: 1.4rem;
}

.hero-text,
.section-heading p,
.content-card p,
.contact-copy,
.project-body p,
.modal p {
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-text {
  max-width: 34rem;
  margin: 1.25rem 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero-stats article,
.glass-card,
.skill-card,
.project-card,
.contact-card,
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-stats article {
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.15rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-panel {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

.panel-top {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.hero-panel h2 {
  margin-bottom: 0.8rem;
}

.panel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.panel-badges span,
.skill-card {
  border-radius: 999px;
  padding: 0.85rem 1rem;
  color: var(--text);
}

.about-grid,
.contact-grid,
.section-heading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.content-card,
.contact-card {
  border-radius: var(--radius-xl);
  padding: 1.6rem;
}

.content-card p + p {
  margin-top: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.skill-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 94px;
  text-align: center;
  font-weight: 700;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.section-heading {
  margin-bottom: 1.6rem;
}

.section-heading p {
  margin: 0;
  max-width: 32rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.reviews-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.review-preview-card {
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.review-preview-card:hover,
.review-preview-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

.review-preview-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.review-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.28), rgba(139, 92, 246, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.review-preview-head strong {
  display: block;
  font-size: 1rem;
}

.review-preview-head span {
  color: var(--muted);
  font-size: 0.84rem;
}

.review-preview-stars {
  color: #f8d66b;
  letter-spacing: 0.18em;
  margin-bottom: 0.75rem;
}

.review-preview-card p {
  color: var(--muted);
  margin: 0;
}

.review-preview-badge {
  width: fit-content;
  margin-top: 1rem;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.82rem;
}

.reviews-preview-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
}

.project-card {
  overflow: hidden;
  border-radius: 28px;
}

.project-visual {
  min-height: 230px;
  display: flex;
  align-items: end;
  padding: 1.4rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.project-media {
  position: relative;
  padding: 0 1.25rem 1.25rem;
}

.project-video,
.project-video-fallback,
.modal-video {
  width: 100%;
  display: block;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #070b12;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-video-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.project-video-name {
  display: inline-flex;
  margin-top: 0.65rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
}

.project-visual span {
  display: inline-flex;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(6, 8, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.project-restaurant {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.1), rgba(8, 10, 16, 0.8)),
    radial-gradient(circle at top, rgba(244, 114, 182, 0.24), transparent 36%),
    url('https://images.unsplash.com/photo-1414235077428-338989a2e8c0?auto=format&fit=crop&w=1200&q=80') center/cover;
}

.project-realestate {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.08), rgba(8, 10, 16, 0.82)),
    radial-gradient(circle at top, rgba(125, 211, 252, 0.18), transparent 40%),
    url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1200&q=80') center/cover;
}

.project-flowsync {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.08), rgba(8, 10, 16, 0.82)),
    radial-gradient(circle at top, rgba(34, 197, 94, 0.18), transparent 40%),
    linear-gradient(135deg, #122238, #1c3b57);
}

.project-novaflow {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.08), rgba(8, 10, 16, 0.82)),
    radial-gradient(circle at top, rgba(139, 92, 246, 0.18), transparent 42%),
    linear-gradient(135deg, #182041, #101828);
}

.project-taskora {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.08), rgba(8, 10, 16, 0.82)),
    radial-gradient(circle at top, rgba(14, 165, 233, 0.2), transparent 42%),
    linear-gradient(135deg, #0f2038, #132d4b);
}

.project-lawfirm {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.08), rgba(8, 10, 16, 0.82)),
    radial-gradient(circle at top, rgba(245, 158, 11, 0.22), transparent 40%),
    linear-gradient(135deg, #1d1b24, #2a2234);
}

.project-fitvalencia {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.06), rgba(8, 10, 16, 0.78)),
    radial-gradient(circle at top, rgba(74, 155, 111, 0.26), transparent 42%),
    url('https://images.unsplash.com/photo-1518611012118-696072aa579a?auto=format&fit=crop&w=1200&q=80') center/cover;
}

.project-landing {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.08), rgba(8, 10, 16, 0.82)),
    radial-gradient(circle at top, rgba(251, 191, 36, 0.18), transparent 42%),
    linear-gradient(135deg, #2a1a13, #101622);
}

.project-body {
  padding: 1.5rem;
}

.project-path {
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
}

.project-label {
  margin: 0 0 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
}

.project-body p:last-of-type {
  margin-bottom: 1.25rem;
}

.contact-card {
  display: grid;
  gap: 1rem;
}

.contact-card {
  padding: 1.8rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.field-group {
  display: grid;
  gap: 0.45rem;
}

.field-group label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.form-control {
  width: 100%;
  min-height: 54px;
  padding: 0.92rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  color: var(--text);
  outline: none;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease, background 0.24s ease;
}

.form-control:hover {
  border-color: rgba(125, 211, 252, 0.35);
}

.form-control:focus {
  border-color: rgba(125, 211, 252, 0.8);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.12);
  transform: translateY(-1px);
}

.form-textarea {
  resize: vertical;
  min-height: 180px;
}

.form-control.is-valid {
  border-color: rgba(34, 197, 94, 0.65);
}

.form-control.is-error {
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.08);
}

.field-error {
  min-height: 1.05rem;
  color: #f87171;
  font-size: 0.82rem;
}

.field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.char-count {
  color: var(--muted);
  font-size: 0.82rem;
}

.form-bottom {
  display: grid;
  gap: 0.85rem;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.84rem;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
  pointer-events: none;
}

.typing-indicator.is-active {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.16), 0 12px 30px rgba(125, 211, 252, 0.08);
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  animation: typingPulse 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.form-submit {
  position: relative;
  overflow: hidden;
}

.form-submit.is-loading {
  pointer-events: none;
  opacity: 0.9;
}

.form-submit.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.45) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: buttonShine 1.1s infinite;
}

.form-submit:not(.is-loading):hover {
  box-shadow: 0 18px 40px rgba(125, 211, 252, 0.22);
}

.form-status {
  min-height: 1.2rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.form-status.is-success { color: #34d399; }
.form-status.is-error { color: #f87171; }

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@keyframes typingPulse {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@keyframes buttonShine {
  100% { transform: translateX(100%); }
}

html.light .form-control {
  border-color: rgba(7, 17, 29, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.5));
}

html.light .typing-indicator {
  background: rgba(7,17,29,0.03);
  border-color: rgba(7,17,29,0.06);
}

html.light .field-error { color: #dc2626; }

html.light .form-status.is-success { color: #059669; }

html.light .form-status.is-error { color: #dc2626; }

html.light .form-control:focus {
  box-shadow: 0 0 0 4px rgba(14,165,233,0.1);
}

.contact-email {
  width: fit-content;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
}

.site-footer {
  padding: 1.6rem 0 2.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 100;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 10, 0.74);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  border-radius: 30px;
  padding: 1.5rem;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.35rem;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.2rem;
}

.modal-meta span {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.88rem;
}

.modal-snapshot {
  min-height: 240px;
  border-radius: 24px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.modal-video {
  min-height: 240px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .hero-grid,
  .about-grid,
  .section-heading,
  .contact-grid,
  .projects-grid,
  .skills-grid,
  .reviews-preview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .section {
    padding: 4.2rem 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-cta {
    display: none;
  }

  .site-nav {
    position: absolute;
    top: 84px;
    left: 1rem;
    right: 1rem;
    display: grid;
    gap: 0;
    padding: 0.5rem;
    border-radius: 22px;
    background: rgba(10, 13, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 0.95rem 1rem;
    border-radius: 14px;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.04);
  }

  .hero-stats,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .reviews-preview-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom,
  .hero-actions,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .modal-panel {
    padding: 1.25rem;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(1140px, calc(100% - 1rem));
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 3.7rem);
  }

  h2 {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .content-card,
  .contact-card,
  .project-body,
  .hero-panel {
    padding: 1.2rem;
  }
}

/* Theme switch (light variants) */
:root.light {
  --bg: #f7fafc;
  --bg-soft: #f1f5f9;
  --surface: rgba(255,255,255,0.86);
  --surface-strong: rgba(255,255,255,0.98);
  --text: #07111d;
  --muted: #475569;
  --line: rgba(7,17,29,0.06);
  --accent: #0ea5e9;
  --accent-2: #7c3aed;
  --shadow: 0 18px 40px rgba(11,20,30,0.06);
}

/* 3D hero canvas container */
.hero-3d {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ensure content stacks above the 3D canvas */
.hero .container { position: relative; z-index: 2; }

/* Light theme adaptations to ensure visible changes */
html.light body {
  background:
    radial-gradient(circle at 10% 10%, rgba(14,165,233,0.06), transparent 24%),
    radial-gradient(circle at 90% 12%, rgba(124,58,237,0.05), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  color: var(--text);
}

html.light .site-header {
  background: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(7,17,29,0.04);
}

html.light .hero-orbit-a { background: radial-gradient(circle, rgba(14,165,233,0.12), transparent 68%); }
html.light .hero-orbit-b { background: radial-gradient(circle, rgba(124,58,237,0.10), transparent 68%); }

html.light .glass-card, html.light .project-card, html.light .contact-card, html.light .modal-panel { background: var(--surface); }

html.light .button-secondary { background: rgba(7,17,29,0.04); color: var(--text); border-color: var(--line); }

/* Social hub */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.social-card {
  display: block;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(.2,.9,.2,1), box-shadow 0.35s ease, background 0.35s ease;
}
.social-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 70px rgba(2,6,23,0.25);
}
.social-card .meta { color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem }

/* Project tilt */
.project-card { will-change: transform; transition: transform 0.25s ease, box-shadow 0.25s ease; }

/* Contact form */
.contact-form {
  display: grid;
  gap: 0.85rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.form-control { padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); }
.form-control::placeholder { color: var(--muted); }
.form-actions { display:flex; gap:0.6rem; align-items:center }
.form-status { font-size: 0.95rem; color: var(--muted) }

/* Utility */
.nav-actions { display:flex; gap:0.6rem; align-items:center }

@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr }
}

