:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #111827;
  --surface-raised: #172033;
  --purple: #a855f7;
  --purple-light: #c084fc;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --line: rgba(192, 132, 252, .19);
  --content: 1120px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--purple-light); outline-offset: 4px; }
.skip-link { position: absolute; left: -9999px; top: 1rem; z-index: 20; padding: .7rem 1rem; background: var(--purple); color: #000; }
.skip-link:focus { left: 1rem; }
.site-header { width: min(var(--content), calc(100% - 3rem)); min-height: 88px; margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 1.4rem; font-weight: 850; letter-spacing: -.08em; text-decoration: none; }
.wordmark span { color: var(--purple-light); }
.main-nav { display: flex; gap: clamp(1.2rem, 4vw, 3rem); align-items: center; }
.main-nav a, .text-link { color: var(--muted); font-size: .9rem; text-decoration: none; transition: color .2s ease; }
.main-nav a:hover, .text-link:hover { color: var(--purple-light); }
.main-nav .nav-contact { color: var(--text); }
main { width: min(var(--content), calc(100% - 3rem)); margin: 0 auto; }
.hero { min-height: 620px; padding: clamp(4rem, 9vw, 8rem) 0; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(2rem, 7vw, 6rem); }
.hero-copy { max-width: 680px; }
.eyebrow { margin: 0 0 1.25rem; color: var(--purple-light); font-size: .75rem; font-weight: 700; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase; }
.status-dot { display: inline-block; width: .48rem; height: .48rem; margin-right: .45rem; border-radius: 50%; background: var(--purple-light); box-shadow: 0 0 16px var(--purple); vertical-align: .04rem; }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .page-intro h1 { max-width: 760px; margin-bottom: 1.5rem; font-size: clamp(3rem, 7vw, 6.2rem); line-height: .99; letter-spacing: -.07em; font-weight: 760; }
.hero h1 em, .page-intro h1 em { color: var(--purple-light); font-style: normal; }
.hero-intro { max-width: 570px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin: 2rem 0 2.6rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .8rem; padding: .75rem 1.2rem; border: 1px solid transparent; border-radius: 4px; font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--purple); color: #09030f; }
.button-primary:hover { background: var(--purple-light); }
.text-link { display: inline-flex; gap: .6rem; align-items: center; }
.hero-note { color: #717b8f; font-size: .82rem; letter-spacing: .04em; }
.hero-portrait { position: relative; width: min(100%, 350px); aspect-ratio: 1; justify-self: end; display: grid; place-items: center; }
.hero-portrait::before { content: ""; position: absolute; inset: 8%; border: 1px solid var(--line); border-radius: 50%; }
.hero-portrait::after { content: ""; position: absolute; width: 13px; height: 13px; top: 14%; right: 16%; border-radius: 50%; background: var(--purple-light); box-shadow: 0 0 24px var(--purple); }
.portrait-orbit { position: absolute; inset: 0; border: 1px solid transparent; border-top-color: var(--purple); border-radius: 50%; transform: rotate(-28deg); }
.hero-portrait img { position: relative; width: 72%; height: 72%; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; filter: saturate(.78); }
.content-section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 2rem; }
.section-heading h2, .contact-copy h2 { margin-bottom: 0; font-size: clamp(2rem, 4.5vw, 3.6rem); line-height: 1.08; letter-spacing: -.055em; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.skill-list { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.skill-list li, .tech-list span { padding: .48rem .78rem; border: 1px solid var(--line); border-radius: 2px; color: #d8c9e8; font-size: .8rem; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.project-card { min-height: 280px; padding: 1.5rem; display: flex; flex-direction: column; border: 1px solid var(--line); background: linear-gradient(150deg, var(--surface), #090d16 76%); }
.project-card:hover { border-color: rgba(192, 132, 252, .58); }
.card-index { margin-bottom: 1rem; color: var(--purple-light); font-size: .68rem; font-weight: 700; letter-spacing: .15em; }
.project-card h2, .project-card h3 { margin-bottom: .8rem; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.035em; }
.project-card > p:not(.card-index) { color: var(--muted); font-size: .92rem; }
.tech-list { display: flex; flex-wrap: wrap; gap: .45rem; margin: .4rem 0 1.4rem; }
.tech-list span { padding: .25rem .5rem; font-size: .7rem; }
.card-link { display: inline-flex; gap: .6rem; align-items: center; margin-top: auto; color: var(--purple-light); font-size: .85rem; font-weight: 650; text-decoration: none; }
.empty-note { padding: 1.2rem 1.4rem; border-left: 2px solid var(--purple); background: var(--surface); color: var(--muted); }
.contact-section { margin: 2rem 0 5rem; padding: clamp(1.5rem, 5vw, 4rem); display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 7vw, 6rem); border: 1px solid var(--line); background: var(--surface); }
.contact-copy h2 { margin-bottom: 1rem; }
.contact-copy > p:last-child, .contact-unavailable { color: var(--muted); }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: grid; gap: .4rem; }
.form-field-wide { grid-column: 1 / -1; }
.form-field label { color: #d8c9e8; font-size: .8rem; }
.form-field input, .form-field textarea { width: 100%; padding: .8rem .9rem; border: 1px solid #344056; border-radius: 2px; background: #080c14; color: var(--text); font: inherit; font-size: .9rem; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #687286; }
.form-field textarea { min-height: 140px; resize: vertical; }
.contact-form .button { justify-self: start; }
.field-error { margin: 0; color: #fca5a5; font-size: .8rem; }
.hp-wrap, .hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.messages { margin-top: 1rem; }
.message { padding: .9rem 1rem; border: 1px solid var(--line); background: var(--surface); }
.message-success { border-color: #22c55e; }
.message-error { border-color: #ef4444; }
.page-intro { padding: clamp(4rem, 10vw, 8rem) 0 3rem; }
.page-intro h1 { font-size: clamp(3rem, 7vw, 5.7rem); }
.page-intro > p:last-child { color: var(--muted); }
.project-list-section { min-height: 35vh; }
.project-detail { max-width: 850px; margin: 0 auto; padding: 4rem 0 7rem; }
.back-link { display: inline-block; margin-bottom: 3rem; color: var(--muted); font-size: .9rem; text-decoration: none; }
.back-link:hover { color: var(--purple-light); }
.detail-header { padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.detail-header h1 { margin-bottom: 1.5rem; font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; letter-spacing: -.06em; }
.detail-image { width: 100%; max-height: 480px; margin: 2rem 0; object-fit: cover; border: 1px solid var(--line); }
.detail-description { padding: 2rem 0; color: #d1d5db; font-size: 1.05rem; }
.detail-description h2 { color: var(--purple-light); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer { width: min(var(--content), calc(100% - 3rem)); margin: auto; padding: 1.5rem 0 2rem; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); color: #768094; font-size: .78rem; }

@media (max-width: 760px) {
  .site-header { min-height: 72px; width: min(var(--content), calc(100% - 2rem)); }
  main { width: min(var(--content), calc(100% - 2rem)); }
  .hero { min-height: auto; padding: 4rem 0 3rem; grid-template-columns: 1fr; gap: 2.5rem; }
  .hero h1, .page-intro h1 { font-size: clamp(2.8rem, 13vw, 5rem); }
  .hero-portrait { width: min(75vw, 300px); justify-self: center; grid-row: 1; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 230px; }
  .contact-section { grid-template-columns: 1fr; margin-bottom: 3rem; }
  .section-heading-row { align-items: start; flex-direction: column; gap: 1rem; }
  .site-footer { width: min(var(--content), calc(100% - 2rem)); flex-direction: column; }
}
@media (max-width: 480px) {
  .main-nav { gap: .85rem; }
  .main-nav a { font-size: .78rem; }
  .contact-form { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
