:root {
  color-scheme: dark;
  --bg: #030204;
  --bg-soft: #0a070d;
  --card: rgba(17, 12, 21, 0.84);
  --card-strong: #140d1a;
  --line: rgba(192, 132, 252, 0.18);
  --text: #faf7fc;
  --muted: #b7aabd;
  --purple: #a855f7;
  --purple-bright: #d946ef;
  --orange: #ff9f1c;
  --orange-deep: #f97316;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(rgba(168, 85, 247, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--purple-bright) 42%, transparent 88%);
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.5);
  pointer-events: none;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}
.ambient-one { width: 460px; height: 460px; top: 40px; right: -160px; background: rgba(168, 85, 247, 0.17); }
.ambient-two { width: 420px; height: 420px; top: 160px; left: -250px; background: rgba(249, 115, 22, 0.12); }

.site-header, main, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.22), rgba(249, 115, 22, 0.07));
  color: #c084fc;
  font-family: Manrope, sans-serif;
  font-weight: 800;
  letter-spacing: -0.06em;
}
.brand-copy { font-family: Manrope, sans-serif; font-weight: 700; font-size: 14px; line-height: 1.1; }
.brand-copy small { display: block; margin-top: 5px; color: var(--muted); font-family: "DM Sans", sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }

nav { display: flex; align-items: center; gap: 30px; }
nav a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
nav a:hover, nav a:focus-visible { color: var(--text); }
.nav-cta { padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); }

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
  gap: 80px;
  align-items: center;
  padding: 82px 0 72px;
}

.eyebrow, .section-kicker, .modal-kicker {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(255, 159, 28, 0.1); }

h1, h2, h3 { font-family: Manrope, sans-serif; }
h1 { margin: 0; max-width: 730px; font-size: clamp(48px, 6.1vw, 78px); line-height: 0.99; letter-spacing: -0.055em; }
h1 span { background: linear-gradient(105deg, #c084fc, var(--purple), var(--purple-bright)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: 18px; line-height: 1.72; }
.hero-lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.button:hover { transform: translateY(-2px); }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.button-primary { background: linear-gradient(120deg, #b45cff, #7c3aed); color: #ffffff; box-shadow: 0 14px 34px rgba(168, 85, 247, 0.24); }
.button-ghost { border-color: var(--line); background: rgba(255, 255, 255, 0.025); color: var(--text); }
.button-ghost:hover { border-color: rgba(255, 159, 28, 0.42); background: rgba(255, 159, 28, 0.06); }

.quick-facts { display: flex; gap: 34px; margin: 38px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); list-style: none; }
.quick-facts li { font-size: 13px; font-weight: 600; }
.quick-facts span { display: block; margin-bottom: 7px; color: var(--orange); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }

.hero-console {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.26);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(24, 13, 31, 0.96), rgba(7, 4, 10, 0.97));
  box-shadow: var(--shadow);
  transform: perspective(1000px) rotateY(-3deg) rotateX(1deg);
}
.hero-console::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(249, 115, 22, 0.07), transparent 38%); pointer-events: none; }
.console-top { height: 52px; display: flex; align-items: center; gap: 7px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.1); }
.console-top > span { width: 9px; height: 9px; border-radius: 50%; background: #f06c6c; }
.console-top > span:nth-child(2) { background: #e8bd62; }
.console-top > span:nth-child(3) { background: #63ca91; }
.console-top p { margin: 0 0 0 9px; color: var(--muted); font: 500 11px "DM Sans", sans-serif; letter-spacing: 0.04em; }
.console-body { padding: 27px 24px 25px; }
.console-body p { display: flex; gap: 18px; margin: 0 0 8px; white-space: nowrap; }
.console-body em { width: 19px; color: #65566d; font: normal 12px monospace; }
.console-body code { color: #cfc3d4; font-size: 13px; line-height: 1.55; }
.console-body b { color: #c084fc; font-weight: 500; }
.console-body i { color: #ffb347; font-style: normal; }
.console-status { display: flex; align-items: center; gap: 10px; padding: 17px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.pulse::before { content: ""; position: absolute; inset: -4px; border: 1px solid var(--orange); border-radius: inherit; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }

.work-section { padding: 90px 0 110px; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 80px; align-items: end; }
.section-heading h2, .contact-section h2 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.09; letter-spacing: -0.045em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }

.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 46px; }
.skill-card { position: relative; min-height: 258px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); transition: transform 0.24s ease, border-color 0.24s ease; }
.skill-card:hover { transform: translateY(-4px); border-color: rgba(168, 85, 247, 0.42); }
.skill-number { display: inline-grid; place-items: center; width: 38px; height: 30px; border-radius: 8px; background: rgba(168, 85, 247, 0.12); color: #c084fc; font: 700 11px Manrope, sans-serif; }
.skill-card h3 { margin: 24px 0 10px; font-size: 20px; letter-spacing: -0.025em; }
.skill-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.skill-tags span, .project-tags span, .modal-stack span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: #dacde0; font-size: 10px; font-weight: 600; }

.projects-wrap { margin-top: 110px; }
.projects-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.projects-toolbar h3 { margin: 0; font-size: 28px; letter-spacing: -0.035em; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.filter { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: 0.2s ease; }
.filter:hover, .filter:focus-visible { border-color: rgba(255, 159, 28, 0.42); color: var(--text); }
.filter.is-active { border-color: rgba(255, 159, 28, 0.4); background: rgba(255, 159, 28, 0.1); color: #ffb347; }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project-card { position: relative; min-height: 315px; overflow: hidden; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(140deg, rgba(22, 13, 28, 0.96), rgba(8, 5, 11, 0.98)); transition: transform 0.24s ease, border-color 0.24s ease, opacity 0.24s ease; }
.project-card:hover { transform: translateY(-4px); border-color: rgba(168, 85, 247, 0.46); }
.project-card::after { content: ""; position: absolute; width: 170px; height: 170px; right: -80px; bottom: -90px; border-radius: 50%; background: var(--project-glow, rgba(168, 85, 247, 0.14)); filter: blur(12px); }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.project-category { color: var(--project-color, var(--purple)); font-size: 11px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.project-index { color: #6e5d76; font: 700 11px Manrope, sans-serif; }
.project-card h4 { max-width: 460px; margin: 42px 0 12px; font: 700 24px/1.16 Manrope, sans-serif; letter-spacing: -0.035em; }
.project-card > p { max-width: 520px; min-height: 69px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.63; }
.project-footer { position: absolute; left: 30px; right: 30px; bottom: 27px; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.details-button { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.025); color: var(--text); cursor: pointer; transition: 0.2s ease; }
.details-button:hover { border-color: var(--project-color, var(--purple)); background: rgba(168, 85, 247, 0.1); }
.details-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.project-card.is-hidden { display: none; }

.contact-section { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; padding: 0 0 110px; }
.resume-card, .contact-card { border-radius: 22px; padding: 48px; }
.resume-card { border: 1px solid var(--line); background: var(--card); }
.resume-card > p:not(.section-kicker) { max-width: 700px; margin: 22px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.resume-columns { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 32px; margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--line); }
.resume-columns h3 { margin: 0 0 9px; font-size: 13px; }
.resume-columns p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.print-button { margin-top: 30px; }

.contact-card { display: flex; flex-direction: column; align-items: flex-start; background: linear-gradient(145deg, #a855f7, #6d28d9); color: #ffffff; box-shadow: 0 20px 55px rgba(168, 85, 247, 0.22); }
.contact-label { display: inline-block; margin-bottom: 28px; padding: 7px 10px; border: 1px solid rgba(255, 179, 71, 0.5); color: #ffe0a3; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.contact-card h2 { font-size: 34px; }
.contact-card p { margin: 20px 0 30px; color: rgba(255, 255, 255, 0.78); font-size: 14px; line-height: 1.7; }
.button-light { background: #08040b; color: white; border-color: rgba(255, 179, 71, 0.32); }
.availability { margin-top: auto; padding-top: 42px; font-size: 11px; font-weight: 700; }
.availability span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--orange); }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 38px; border-top: 1px solid var(--line); color: #7d6e84; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
footer p { margin: 0; }

.project-modal { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 42px; border: 1px solid rgba(168, 85, 247, 0.34); border-radius: 22px; background: #0d0811; color: var(--text); box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72); }
.project-modal::backdrop { background: rgba(2, 1, 3, 0.82); backdrop-filter: blur(8px); }
.modal-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.03); color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.modal-accent { width: 46px; height: 4px; margin-bottom: 25px; border-radius: 5px; background: linear-gradient(90deg, var(--purple), var(--orange)); }
.project-modal h2 { max-width: 600px; margin: 0; font-size: 34px; letter-spacing: -0.04em; }
.modal-summary { margin: 18px 0 30px; color: var(--muted); line-height: 1.7; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-grid > div { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.02); }
.modal-grid h3 { margin: 0 0 8px; color: var(--orange); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.modal-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.modal-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-actions { display: flex; margin-top: 22px; }

:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }

@media (max-width: 900px) {
  .site-header, main, footer { width: min(100% - 36px, 720px); }
  .hero { grid-template-columns: 1fr; gap: 55px; padding-top: 70px; }
  .hero-console { max-width: 580px; transform: none; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .section-heading > p { max-width: 610px; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: auto; }
  .projects-toolbar { align-items: flex-start; flex-direction: column; }
  .filters { justify-content: flex-start; }
  .contact-section { grid-template-columns: 1fr; }
  .contact-card { min-height: 430px; }
}

@media (max-width: 640px) {
  .site-header, main, footer { width: calc(100% - 28px); }
  .site-header { height: 76px; }
  .brand-copy { display: none; }
  nav { gap: 16px; }
  nav a { font-size: 12px; }
  nav a:first-child { display: none; }
  .nav-cta { padding: 9px 12px; }
  .hero { min-height: auto; padding: 60px 0 76px; }
  h1 { font-size: clamp(44px, 13.4vw, 61px); }
  .hero-lead { font-size: 16px; }
  .hero-actions .button { width: 100%; }
  .quick-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
  .quick-facts li:last-child { grid-column: 1 / -1; }
  .hero-console { margin-top: 4px; border-radius: 16px; }
  .console-body { overflow-x: auto; padding-inline: 16px; }
  .console-body code { font-size: 11px; }
  .console-body p { gap: 10px; }
  .console-status { align-items: flex-start; }
  .work-section { padding: 72px 0 80px; }
  .section-heading h2, .contact-section h2 { font-size: 34px; }
  .skill-grid { margin-top: 34px; }
  .skill-card { padding: 24px; }
  .projects-wrap { margin-top: 80px; }
  .projects-toolbar h3 { font-size: 25px; }
  .filters { flex-wrap: nowrap; max-width: calc(100vw - 28px); overflow-x: auto; padding: 2px 0 6px; }
  .filter { flex: 0 0 auto; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 330px; padding: 25px; }
  .project-card h4 { margin-top: 34px; font-size: 22px; }
  .project-footer { left: 25px; right: 25px; bottom: 24px; }
  .resume-card, .contact-card { padding: 30px 24px; border-radius: 18px; }
  .resume-columns { grid-template-columns: 1fr; gap: 20px; }
  .print-button { width: 100%; }
  .contact-card { min-height: 430px; }
  .contact-card h2 { font-size: 31px; }
  footer { flex-direction: column; }
  .project-modal { padding: 32px 20px 22px; }
  .project-modal h2 { padding-right: 32px; font-size: 27px; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  :root { color-scheme: light; }
  body { background: white; color: #111827; }
  .ambient, .site-header, .hero-console, .hero-actions, .work-section, .contact-card, footer, .print-button, .eyebrow { display: none !important; }
  main, .contact-section { width: 100%; margin: 0; padding: 0; display: block; }
  .hero { min-height: auto; display: block; padding: 0 0 28px; }
  .hero-copy { display: block; }
  h1 { color: #111827; font-size: 35px; }
  h1 span { color: #7c3aed; -webkit-text-fill-color: #7c3aed; }
  .hero-lead { color: #374151; font-size: 13px; line-height: 1.55; }
  .quick-facts { color: #111827; border-color: #d1d5db; }
  .quick-facts span { color: #6b7280; }
  .resume-card { padding: 28px 0 0; border: 0; border-top: 1px solid #d1d5db; background: white; color: #111827; }
  .resume-card h2 { font-size: 25px; }
  .resume-card > p:not(.section-kicker), .resume-columns p { color: #374151; }
  .resume-columns { border-color: #d1d5db; }
  .section-kicker { color: #c2410c; }
}
