:root {
  --bg: #080808;
  --surface: #101010;
  --surface-2: #151515;
  --text: #f5f2ea;
  --muted: #aaa69d;
  --gold: #d6b44b;
  --gold-light: #f0d875;
  --line: rgba(255,255,255,.1);
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.narrow { max-width: 780px; }
.site-header { position: fixed; top: 0; z-index: 50; width: 100%; background: rgba(8,8,8,.82); border-bottom: 1px solid transparent; backdrop-filter: blur(18px); transition: .25s; }
.site-header.scrolled { border-color: var(--line); }
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; font-size: .86rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.brand img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; }
.main-nav { display: flex; align-items: center; gap: 30px; font-size: .92rem; color: #d3d0c9; }
.main-nav a:hover { color: var(--gold-light); }
.nav-cta { border: 1px solid rgba(214,180,75,.5); padding: 9px 17px; border-radius: 999px; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; }
.menu-toggle span { display: block; width: 25px; height: 2px; background: var(--text); margin: 5px; }
.hero { min-height: 92vh; display: flex; align-items: center; padding: 150px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 70px; align-items: center; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .19em; font-size: .73rem; font-weight: 700; margin: 0 0 18px; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-family: "Playfair Display", serif; font-size: clamp(3.3rem, 7vw, 6.3rem); line-height: .98; letter-spacing: -.045em; margin-bottom: 30px; }
h1 span { color: var(--gold-light); }
.hero-text { max-width: 650px; color: var(--muted); font-size: 1.12rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 38px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: .9rem; border: 1px solid transparent; cursor: pointer; transition: transform .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--gold); color: #0b0b0b; }
.button.primary:hover { background: var(--gold-light); }
.button.secondary { border-color: var(--line); background: rgba(255,255,255,.025); }
.button.secondary:hover { border-color: rgba(214,180,75,.55); }
.hero-visual { position: relative; min-height: 480px; display: grid; place-items: center; }
.glow { position: absolute; width: 430px; height: 430px; border-radius: 50%; background: radial-gradient(circle, rgba(214,180,75,.19), transparent 65%); filter: blur(10px); }
.interface-card { position: relative; width: min(420px, 92%); min-height: 305px; padding: 26px; background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); border: 1px solid rgba(255,255,255,.13); border-radius: 24px; box-shadow: 0 30px 70px rgba(0,0,0,.45); backdrop-filter: blur(15px); transform: rotate(-3deg); }
.card-top { display: flex; gap: 7px; border-bottom: 1px solid var(--line); padding-bottom: 19px; }
.card-top span { width: 8px; height: 8px; border-radius: 50%; background: #555; }
.mini-label { color: var(--gold); font-size: .68rem; letter-spacing: .18em; margin-top: 36px; }
.visual-title { font-size: 2.25rem; line-height: 1.05; font-weight: 700; margin-top: 17px; }
.visual-lines { margin-top: 42px; display: grid; gap: 11px; }
.visual-lines i { height: 5px; border-radius: 5px; background: linear-gradient(90deg, var(--gold), rgba(214,180,75,.05)); }
.visual-lines i:nth-child(2) { width: 72%; }
.visual-lines i:nth-child(3) { width: 44%; }
.floating-card { position: absolute; padding: 13px 16px; border: 1px solid var(--line); background: rgba(16,16,16,.9); border-radius: 12px; font-size: .7rem; letter-spacing: .12em; box-shadow: 0 20px 40px rgba(0,0,0,.3); }
.floating-card b { color: var(--gold); margin-left: 10px; }
.chatbot-card { right: 0; top: 100px; }
.website-card { left: 0; bottom: 90px; }
.section { padding: 110px 0; }
.section-heading { max-width: 680px; margin-bottom: 45px; }
.section-heading h2, .project-panel h2, .contact h2, .about h2 { font-family: "Playfair Display", serif; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 18px; }
.section-heading > p:last-child, .project-panel p, .about-copy, .contact-copy > p { color: var(--muted); }
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.service-card { padding: 34px; min-height: 255px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(150deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); transition: transform .2s, border-color .2s; }
.service-card:hover { transform: translateY(-4px); border-color: rgba(214,180,75,.35); }
.service-number { color: var(--gold); font-size: .73rem; letter-spacing: .15em; }
.service-card h3 { font-size: 1.45rem; margin: 55px 0 12px; }
.service-card p { color: var(--muted); margin-bottom: 0; max-width: 470px; }
.project-preview { padding-top: 30px; }
.project-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 60px; border: 1px solid rgba(214,180,75,.28); border-radius: 24px; background: radial-gradient(circle at 95% 10%, rgba(214,180,75,.15), transparent 30%), var(--surface); }
.project-panel > div { max-width: 720px; }
.about { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; }
.about-copy { font-size: 1.1rem; max-width: 650px; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; }
.email-link { display: inline-block; color: var(--gold-light); margin-top: 20px; font-weight: 600; }
.contact-form { display: grid; gap: 20px; padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.contact-form label { display: grid; gap: 8px; font-size: .82rem; font-weight: 600; color: #d4d1ca; }
input, textarea { width: 100%; background: #0b0b0b; border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: var(--text); font: inherit; outline: none; }
input:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; }
.form-note { font-size: .75rem; color: #777; margin: -6px 0 0; }
.site-footer { padding: 36px 0; border-top: 1px solid var(--line); color: #85827c; font-size: .8rem; }
.footer-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 25px; }
.footer-brand { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.footer-links { display: flex; gap: 22px; }
.footer-wrap p { text-align: right; margin: 0; }
.page-hero { padding: 180px 0 85px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: 20px; }
.page-hero p:last-child { color: var(--muted); font-size: 1.1rem; }
.project-grid { display: grid; gap: 24px; }
.project-card { display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.project-image { min-height: 410px; }
.project-placeholder { position: relative; padding: 30px; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(214,180,75,.22), transparent 45%), #0c0c0c; display: flex; align-items: flex-end; }
.project-placeholder > span { color: rgba(255,255,255,.45); font-size: .72rem; letter-spacing: .2em; }
.placeholder-ui { position: absolute; width: 70%; height: 58%; left: 15%; top: 17%; border: 1px solid rgba(255,255,255,.17); border-radius: 16px; transform: perspective(700px) rotateY(-8deg) rotateX(4deg); background: rgba(255,255,255,.035); padding: 35px; }
.placeholder-ui i { display: block; height: 8px; margin-bottom: 20px; background: linear-gradient(90deg, var(--gold), transparent); }
.placeholder-ui i:nth-child(2) { width: 75%; }
.placeholder-ui i:nth-child(3) { width: 48%; }
.project-content { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.project-status { color: var(--gold); font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; }
.project-content h2 { font-family: "Playfair Display", serif; font-size: 2.2rem; margin: 18px 0; }
.project-content p { color: var(--muted); }
.text-link { color: var(--gold-light); font-weight: 700; margin-top: 12px; }
.text-link.muted { color: #777; }
.empty-project { grid-template-columns: 1fr; min-height: 320px; }
.empty-project .project-content { max-width: 720px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 130px; }
  .hero-visual { min-height: 410px; }
  .about-grid, .contact-grid { gap: 35px; }
  .project-panel { align-items: flex-start; flex-direction: column; padding: 40px; }
  .project-card { grid-template-columns: 1fr; }
  .footer-wrap { grid-template-columns: 1fr; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-wrap p { text-align: center; }
}
@media (max-width: 700px) {
  .container { width: min(100% - 28px, var(--max)); }
  .brand span { display: none; }
  .menu-toggle { display: block; }
  .main-nav { position: absolute; top: 78px; left: 14px; right: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: #0d0d0d; flex-direction: column; align-items: stretch; gap: 15px; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .2s; }
  .main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-cta { text-align: center; }
  h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .services-grid { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .hero-visual { min-height: 360px; }
  .chatbot-card { right: -5px; top: 65px; }
  .website-card { left: -5px; bottom: 58px; }
  .project-panel, .contact-form, .project-content { padding: 28px; }
  .project-image { min-height: 310px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Featured STASI project */
.project-photo {
  position: relative;
  min-height: 410px;
  padding: 38px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(214,180,75,.12), transparent 55%), #0c0c0c;
}
.project-photo img {
  width: 100%;
  max-height: 355px;
  object-fit: contain;
  filter: drop-shadow(0 24px 35px rgba(0,0,0,.42));
}
.project-number {
  position: absolute;
  left: 30px;
  bottom: 24px;
  color: rgba(255,255,255,.45);
  font-size: .72rem;
  letter-spacing: .2em;
}
.project-content h2 { margin-bottom: 6px; }
.project-subtitle {
  margin: 0 0 20px;
  color: #d8d4cb;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .08em;
}
.featured-project {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 58px;
  padding: 48px;
}
.featured-project-image {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 26px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(214,180,75,.13), transparent 58%), #0b0b0b;
  border: 1px solid var(--line);
}
.featured-project-image img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 20px 32px rgba(0,0,0,.45));
}
.featured-project-copy { max-width: 500px; }
.featured-project-copy h2 { margin-bottom: 6px; }
.featured-project-copy h3 {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: #d7d3ca;
}
.featured-project-copy .button { margin-top: 18px; }
@media (max-width: 900px) {
  .featured-project { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 700px) {
  .featured-project { padding: 24px; }
  .featured-project-image { min-height: 250px; padding: 14px; }
  .project-photo { min-height: 300px; padding: 24px 18px 50px; }
}

/* Playable application project */
.project-card-link { color: inherit; transition: transform .25s, border-color .25s, box-shadow .25s; }
.project-card-link:hover { transform: translateY(-5px); border-color: rgba(214,180,75,.46); box-shadow: 0 28px 60px rgba(0,0,0,.32); }
.project-card-link .project-photo img { transition: transform .35s ease; }
.project-card-link:hover .project-photo img { transform: scale(1.025); }
.project-hover-label { position: absolute; right: 26px; bottom: 22px; padding: 8px 12px; border: 1px solid rgba(214,180,75,.42); border-radius: 999px; color: var(--gold-light); background: rgba(8,8,8,.82); font-size: .64rem; font-weight: 700; letter-spacing: .14em; opacity: 0; transform: translateY(7px); transition: .25s; }
.project-card-link:hover .project-hover-label { opacity: 1; transform: translateY(0); }
.live-status { display: inline-flex; align-items: center; gap: 9px; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(214,180,75,.09); }
.application-page { background: #070807; }
.app-project-main { padding-top: 78px; }
.app-project-hero { padding: 86px 0 55px; }
.back-link { display: inline-block; margin-bottom: 40px; color: var(--muted); font-size: .84rem; }
.back-link:hover { color: var(--gold-light); }
.app-heading { display: grid; grid-template-columns: 1fr auto; gap: 70px; align-items: end; }
.app-heading h1 { font-size: clamp(3rem, 7.2vw, 6.4rem); margin-bottom: 20px; }
.app-lead { max-width: 760px; color: var(--muted); font-size: 1.12rem; }
.app-meta { display: grid; gap: 12px; min-width: 210px; padding-bottom: 12px; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; }
.app-meta span { display: flex; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.app-meta b { color: var(--text); font-weight: 600; }
.app-stage-section { padding: 10px 0 40px; }
.runtime-shell { overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; background: #050705; box-shadow: 0 35px 90px rgba(0,0,0,.42); }
.runtime-bar, .runtime-footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px; background: #121512; color: #a9ada6; font-family: "IBM Plex Mono", monospace; font-size: .7rem; letter-spacing: .08em; }
.runtime-bar { border-bottom: 1px solid rgba(255,255,255,.07); }
.runtime-footer { min-height: 48px; border-top: 1px solid rgba(255,255,255,.07); font-size: .65rem; }
.runtime-status { display: flex; align-items: center; gap: 12px; }
.runtime-status i { width: 8px; height: 8px; border-radius: 50%; background: #7f887e; }
.runtime-shell.is-running .runtime-status i { background: var(--gold); box-shadow: 0 0 12px rgba(214,180,75,.5); }
.runtime-actions { display: flex; gap: 9px; }
.runtime-button { min-height: 34px; padding: 0 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: #151815; color: #b6bab4; font: inherit; cursor: pointer; }
.runtime-button:hover:not(:disabled) { color: var(--gold-light); border-color: rgba(214,180,75,.4); }
.runtime-button:disabled { opacity: .38; cursor: not-allowed; }
.runtime-screen { position: relative; aspect-ratio: 16 / 10; min-height: 540px; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(214,180,75,.08), transparent 38%), #020402; }
.launch-screen, .boot-screen { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.launch-screen img { width: min(420px, 58vw); max-height: 330px; object-fit: contain; margin-bottom: 23px; filter: drop-shadow(0 28px 35px rgba(0,0,0,.55)); }
.launch-kicker { margin: 0 0 9px; color: var(--gold); font-family: "IBM Plex Mono", monospace; font-size: .7rem; letter-spacing: .18em; }
.launch-screen h2 { margin: 0 0 6px; font-family: "Playfair Display", serif; font-size: clamp(2.2rem, 5vw, 4.2rem); }
.launch-screen > p:not(.launch-kicker) { color: var(--muted); }
.launch-button { margin: 14px 0 12px; }
.launch-screen small { color: #777d76; }
.boot-screen { background: radial-gradient(circle, rgba(214,180,75,.1), transparent 42%), #020402; font-family: "IBM Plex Mono", monospace; }
.boot-inner { width: min(520px, 80%); }
.boot-brand { color: var(--gold); font-weight: 600; letter-spacing: .18em; }
.boot-screen #bootMessage { margin: 25px 0; color: #d4d7d1; font-size: .86rem; letter-spacing: .06em; }
.boot-track { height: 9px; border: 1px solid #697069; padding: 1px; }
.boot-track span { display: block; width: 0; height: 100%; background: var(--gold); transition: width .28s linear; }
.boot-build { margin-top: 13px; color: #70766f; font-size: .7rem; letter-spacing: .15em; }
#emulatorFrame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; pointer-events: none; background: #050505; transition: opacity .45s ease; }
.runtime-shell.is-running #emulatorFrame { opacity: 1; pointer-events: auto; }
.runtime-shell.is-running .launch-screen, .runtime-shell.is-running .boot-screen { display: none; }
.runtime-shell:fullscreen { border-radius: 0; border: 0; background: #050505; }
.runtime-shell:fullscreen .runtime-screen { height: calc(100vh - 106px); min-height: 0; aspect-ratio: auto; }
.app-details-section { padding-top: 80px; }
.app-details-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 90px; }
.app-copy h2, .notes-heading h2 { font-family: "Playfair Display", serif; font-size: clamp(2.3rem, 4vw, 4rem); line-height: 1.08; letter-spacing: -.035em; }
.app-copy p:not(.eyebrow), .notes-heading p:last-child { color: var(--muted); font-size: 1.03rem; }
.feature-list { padding: 32px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); }
.feature-list ul { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; align-items: center; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); color: #d4d1ca; }
.feature-list li:last-child { border-bottom: 0; }
.feature-list li span { color: var(--gold); font-family: "IBM Plex Mono", monospace; font-size: .72rem; }
.project-notes-section { border-top: 1px solid var(--line); }
.notes-heading { max-width: 760px; margin-bottom: 42px; }
.notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.note-card { min-height: 260px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(150deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); }
.note-card > span { color: var(--gold); text-transform: uppercase; font-size: .68rem; font-weight: 700; letter-spacing: .15em; }
.note-card h3 { margin: 56px 0 12px; font-size: 1.3rem; }
.note-card p { color: var(--muted); margin-bottom: 0; }
@media (max-width: 900px) {
  .app-heading, .app-details-grid { grid-template-columns: 1fr; gap: 36px; }
  .app-meta { max-width: 330px; }
  .runtime-screen { min-height: 480px; aspect-ratio: 4 / 3; }
  .notes-grid { grid-template-columns: 1fr; }
  .note-card { min-height: 220px; }
}
@media (max-width: 700px) {
  .app-project-hero { padding-top: 55px; }
  .back-link { margin-bottom: 28px; }
  .runtime-bar { align-items: flex-start; padding: 14px; }
  .runtime-status { padding-top: 9px; }
  .runtime-footer { display: none; }
  .runtime-screen { min-height: 610px; aspect-ratio: auto; }
  .runtime-actions { flex-direction: column; }
  .runtime-button { min-height: 30px; }
  .launch-screen img { width: min(330px, 82vw); }
  .feature-list { padding: 24px; }
}

/* Application launcher state fixes */
.launch-screen[hidden],
.boot-screen[hidden] {
  display: none !important;
}
