:root {
  --bg-main: #0d1420;
  --bg-deep: #090f18;
  --bg-surface: #131d2b;
  --bg-elevated: #182435;
  --gold: #bd8b3d;
  --gold-light: #d8ad63;
  --gold-dark: #8f6528;
  --text-main: #f4f2ed;
  --text-soft: #c4c5c8;
  --text-muted: #8f96a2;
  --border-soft: rgba(255, 255, 255, 0.09);
  --border-gold: rgba(189, 139, 61, 0.45);
  --surface-soft: rgba(255, 255, 255, 0.025);
  --nav-height: 76px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition-fast: 180ms ease;
  --transition-base: 240ms ease;
}

/* Reset and foundations */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-main);
  background:
    radial-gradient(circle at 88% 4%, rgba(189, 139, 61, 0.08), transparent 27rem),
    radial-gradient(circle at 8% 72%, rgba(41, 57, 78, 0.22), transparent 34rem),
    linear-gradient(155deg, var(--bg-main), var(--bg-deep));
  font-family: "Inter", sans-serif;
  font-synthesis: none;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
}

body.nav-open {
  overflow: hidden;
}

.container {
  width: min(1240px, 92vw);
  margin-inline: auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

/* Header and navigation */
.navbar {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  height: var(--nav-height);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(9, 15, 24, 0.68);
  backdrop-filter: blur(10px);
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

.navbar.scrolled {
  border-color: rgba(189, 139, 61, 0.2);
  background: rgba(9, 15, 24, 0.93);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 2rem;
}

.logo {
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.logo-q {
  color: var(--gold);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  position: relative;
  padding: 0.45rem 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 1px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--gold-light);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-cta {
  padding: 0.48rem 0.8rem;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  background: rgba(189, 139, 61, 0.04);
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover,
.nav-cta:focus-visible,
.nav-cta.active {
  color: var(--bg-deep);
  background: var(--gold-light);
}

.hamburger-btn {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  color: var(--gold-light);
  background: var(--bg-surface);
}

/* Hero */
.hero {
  display: grid;
  align-items: center;
  min-height: clamp(720px, 82svh, 820px);
  padding: calc(var(--nav-height) + 2.25rem) 0 4.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  grid-template-areas:
    "content visual"
    "focus focus";
  align-items: center;
  column-gap: clamp(3rem, 6vw, 6rem);
  row-gap: 2.5rem;
}

.hero-content {
  grid-area: content;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  color: var(--gold-light);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-badge::after {
  width: 42px;
  height: 1px;
  content: "";
  background: var(--gold);
}

.hero h1 {
  max-width: 17ch;
  margin-bottom: 1.2rem;
  color: var(--text-main);
  font-size: clamp(2.55rem, 4.4vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: 650px;
  margin-bottom: 1.8rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  line-height: 1.2;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.btn-primary {
  border: 1px solid var(--gold-light);
  color: var(--bg-deep);
  background: var(--gold-light);
}

.btn-outline {
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  background: var(--surface-soft);
}

.hero-focus-grid {
  grid-area: focus;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.25rem;
}

.hero-focus-card {
  position: relative;
  min-height: 150px;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(19, 29, 43, 0.65);
}

.hero-focus-card::before {
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 0.85rem;
  content: "";
  background: var(--gold);
}

.hero-focus-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.hero-focus-card p {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.hero-visual {
  display: grid;
  grid-area: visual;
  place-items: center;
  min-width: 0;
}

.hero-brand-visual {
  display: grid;
  position: relative;
  isolation: isolate;
  align-items: center;
  justify-content: center;
  justify-items: center;
  width: min(100%, 440px);
  min-height: 370px;
  padding: 1.25rem 1rem;
}

.hero-brand-visual::before {
  position: absolute;
  z-index: -2;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(189, 139, 61, 0.075), rgba(24, 36, 53, 0.04) 52%, transparent 72%);
}

.hero-brand-visual::after {
  position: absolute;
  z-index: -1;
  width: 74%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
  transform: rotate(-20deg);
}

.hero-brand-symbol {
  width: clamp(280px, 24vw, 310px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-disciplines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.35rem;
  color: var(--text-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.035em;
}

.brand-disciplines span[aria-hidden="true"] {
  color: var(--gold-dark);
}

/* Shared sections */
.section {
  padding: clamp(6rem, 8vw, 8rem) 0;
}

.section-header {
  max-width: 760px;
  margin-bottom: clamp(2.2rem, 4vw, 3.5rem);
}

.section-header::before {
  display: block;
  margin-bottom: 0.7rem;
  content: attr(data-label);
  color: var(--gold-light);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.section-header::after {
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 1.1rem;
  content: "";
  background: var(--gold);
}

h2 {
  margin-bottom: 0.8rem;
  color: var(--text-main);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  text-wrap: balance;
}

.section-lead {
  max-width: 68ch;
  color: var(--text-soft);
  font-size: 1.02rem;
}

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

.skill-card,
.game-card,
.app-card,
.contact-card {
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(19, 29, 43, 0.78);
}

.skill-card,
.game-card,
.app-card {
  padding: 1.5rem;
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base),
    transform var(--transition-base);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1.1rem;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  color: var(--gold-light);
  background: rgba(189, 139, 61, 0.055);
}

.skill-card h3,
.game-card h3,
.app-card h3,
.contact-card h3 {
  margin-bottom: 0.65rem;
  color: var(--text-main);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
}

.skill-card p,
.game-card p,
.app-card p,
.contact-text {
  color: var(--text-soft);
  font-size: 0.94rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.tech-pill {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  line-height: 1.45;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.27rem 0.55rem;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 500;
  line-height: 1.45;
}

.badge-green {
  border-color: var(--border-gold);
  color: var(--gold-light);
  background: rgba(189, 139, 61, 0.07);
}

.badge-amber {
  border-color: rgba(189, 139, 61, 0.28);
  color: var(--text-soft);
}

.badge-neutral {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.018);
}

/* Services */
.software-section,
.projects-section {
  padding: clamp(5.5rem, 7vw, 6.5rem) 0;
}

.software-section .section-header,
.projects-section .section-header {
  margin-bottom: 2.4rem;
}

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

.services-grid .skill-card {
  padding: 1.75rem;
}

.services-grid .card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.9rem;
}

.services-grid .tech-stack {
  display: grid;
  margin-top: 0.75rem;
  gap: 0.45rem;
}

.security-grid .tech-stack {
  display: grid;
  gap: 0.55rem;
}

.services-grid .tech-pill,
.security-grid .tech-pill {
  position: relative;
  padding: 0 0 0 1rem;
  border: 0;
  color: var(--text-soft);
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 0.84rem;
}

.services-grid .tech-pill::before,
.security-grid .tech-pill::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 1px;
  content: "";
  background: var(--gold);
}

/* Projects */
.projects-section {
  border-top: 1px solid var(--border-soft);
}

.projects-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.25rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  height: 100%;
  padding: 0;
}

.project-content {
  padding: 1.75rem;
}

.project-content h3 {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.project-card--with-media::after {
  display: none;
}

.project-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(7, 12, 20, 0.82);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.project-media--mobile {
  position: relative;
  background:
    radial-gradient(circle at center, rgba(189, 139, 61, 0.055), transparent 58%),
    rgba(9, 15, 24, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.project-media--mobile img {
  position: absolute;
  inset: 8%;
  width: 84%;
  max-width: none;
  height: 84%;
  object-fit: contain;
  object-position: center;
}

.project-media-link {
  transition: border-color var(--transition-fast);
}

.project-media-link img {
  transition: transform 220ms ease;
}

.project-media-link:hover img,
.project-media-link:focus-visible img {
  transform: scale(1.015);
}

.project-media-link:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: -4px;
}

.project-card::after {
  position: absolute;
  top: 0;
  left: 1.75rem;
  width: 42px;
  height: 2px;
  content: "";
  background: var(--gold);
}

.project-featured {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  min-height: 360px;
  background: linear-gradient(125deg, rgba(24, 36, 53, 0.96), rgba(13, 20, 32, 0.88));
}

.project-featured .project-media {
  height: 100%;
  min-height: 360px;
  aspect-ratio: auto;
  border-right: 1px solid var(--border-soft);
  border-bottom: 0;
}

.project-featured .project-content {
  display: grid;
  align-content: center;
}

.project-card--text-only .project-content {
  padding-block: 1.6rem;
}

.project-card .tech-stack {
  align-items: center;
  margin: 0 0 1rem;
}

.project-card .tech-pill,
.project-card .badge {
  font-size: 0.72rem;
}

.project-card .btn-outline {
  min-height: 40px;
  margin-top: 1.25rem;
  padding: 0.55rem 0.8rem;
  color: var(--gold-light);
  font-size: 0.82rem;
}

/* Security */
#security,
#contact {
  padding: clamp(5.5rem, 7vw, 6.5rem) 0;
}

#skills {
  padding: clamp(5rem, 6vw, 5.5rem) 0 4.75rem;
}

#research {
  padding: 4.75rem 0;
}

#about {
  padding: 4.75rem 0 clamp(5rem, 6vw, 5.5rem);
}

.security-section .section-header,
#skills .section-header,
.research-section .section-header,
.about-section .section-header,
#contact .section-header {
  margin-bottom: 3rem;
}

.security-section {
  border-block: 1px solid var(--border-soft);
  background:
    linear-gradient(90deg, transparent, rgba(189, 139, 61, 0.025), transparent),
    rgba(9, 15, 24, 0.44);
}

.security-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.security-grid .skill-card {
  padding: 1.75rem;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    rgba(19, 29, 43, 0.82);
  background-size: 48px 48px, 48px 48px, auto;
}

.research-note {
  position: relative;
  margin-top: 1.25rem;
  padding: 1.75rem 1.75rem 1.75rem 2rem;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(13, 20, 32, 0.84);
}

.research-note::before {
  display: inline-flex;
  margin-bottom: 0.9rem;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  content: "Ar-Ge";
  color: var(--gold-light);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
}

.research-note::after {
  position: absolute;
  top: 1.75rem;
  left: 0;
  width: 2px;
  height: 42px;
  content: "";
  background: var(--gold-dark);
}

/* Skills and research */
.skills-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 1rem;
}

.skills-grid .skill-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.6rem;
}

#skills .section-lead {
  max-width: 60ch;
}

.skills-grid .skill-card h3 {
  margin-bottom: 0.65rem;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.skills-grid .card-icon {
  margin-bottom: 0.95rem;
}

.skills-grid .skill-card p {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.research-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 1rem;
}

.research-grid .game-card {
  position: relative;
  height: 100%;
  padding: 1.6rem;
  background: rgba(13, 20, 32, 0.5);
}

.research-grid .game-card::before {
  display: block;
  width: 36px;
  height: 2px;
  margin-bottom: 1rem;
  content: "";
  background: var(--gold-dark);
}

.research-grid .tech-stack {
  align-items: center;
  margin: 0 0 0.85rem;
}

/* About */
.about-section {
  border-top: 1px solid var(--border-soft);
}

#about .about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.56fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 0;
  border-block: 1px solid var(--border-soft);
  border-radius: 0;
  background: transparent;
}

.about-brand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: radial-gradient(circle at center, rgba(189, 139, 61, 0.055), transparent 64%), rgba(19, 29, 43, 0.32);
  text-align: center;
}

.about-brand-symbol {
  width: min(180px, 82%);
  height: auto;
  object-fit: contain;
}

.about-wordmark {
  margin-top: 0.75rem;
  color: var(--text-main);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.22em;
}

.about-rule {
  width: 72px;
  height: 2px;
  margin: 1.2rem 0;
  background: var(--gold);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about-tags span {
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.67rem;
}

.about-tags span + span::before {
  margin-right: 0.5rem;
  color: var(--gold-dark);
  content: "/";
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding: 2.25rem 2rem 2.25rem 3rem;
}

.about-copy p {
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-size: 1rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

/* Contact and form */
#contact .contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 4vw, 3rem);
}

.contact-card {
  padding: 1.75rem;
}

.contact-card:first-child {
  border-color: var(--border-soft);
  background: rgba(19, 29, 43, 0.62);
}

.contact-card:last-child {
  padding: 2rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.email-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  background: rgba(9, 15, 24, 0.62);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.email-link i {
  flex: 0 0 auto;
  color: var(--gold-light);
}

.email-link span {
  min-width: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.email-link:hover,
.email-link:focus-visible {
  border-color: var(--border-gold);
  background: rgba(189, 139, 61, 0.06);
}

.contact-form {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field label {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  background: rgba(9, 15, 24, 0.68);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.form-field input {
  min-height: 48px;
  padding: 0 0.85rem;
}

.form-field textarea {
  height: 160px;
  min-height: 150px;
  padding: 0.75rem 0.85rem;
  resize: vertical;
}

.form-field input:hover,
.form-field textarea:hover,
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--border-gold);
  background: rgba(9, 15, 24, 0.9);
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  background: rgba(9, 15, 24, 0.68);
  font-size: 0.9rem;
  line-height: 1.55;
}

.contact-status[hidden] {
  display: none;
}

.contact-status.is-success {
  border-color: rgba(93, 190, 138, 0.52);
  background: rgba(32, 91, 61, 0.2);
}

.contact-status.is-warning {
  border-color: var(--border-gold);
  background: rgba(189, 139, 61, 0.1);
}

.contact-status.is-error {
  border-color: rgba(222, 111, 111, 0.52);
  background: rgba(116, 42, 42, 0.18);
}

.contact-submit:disabled,
.contact-submit.is-loading {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-gold);
  background: rgba(7, 12, 20, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  padding: 3.25rem 0;
}

.footer-title {
  margin-bottom: 0.65rem;
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-text,
.footer-links a {
  color: var(--text-muted);
}

.footer-text {
  max-width: 48ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.32rem;
}

.footer-links a {
  font-size: 0.9rem;
  line-height: 1.45;
  transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold-light);
}

.copyright {
  padding: 1rem 0;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}

/* Motion and interaction */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  .skill-card:hover,
  .game-card:hover,
  .app-card:hover {
    border-color: var(--border-gold);
    background-color: var(--bg-elevated);
    transform: translateY(-3px);
  }

  #about .about-grid:hover,
  .research-note:hover {
    transform: none;
  }

  #about .about-grid:hover {
    border-color: var(--border-soft);
    background-color: transparent;
  }

  .research-note:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background-color: rgba(13, 20, 32, 0.84);
  }

  .research-grid .game-card:hover {
    background-color: rgba(19, 29, 43, 0.66);
    transform: translateY(-2px);
  }

  .btn-primary:hover {
    color: var(--text-main);
    background: var(--gold-dark);
  }

  .btn-outline:hover {
    border-color: var(--border-gold);
    color: var(--gold-light);
    transform: translateY(-2px);
  }

  .tech-pill:hover {
    border-color: var(--border-gold);
    color: var(--text-main);
  }
}

/* Responsive layout */
@media (max-width: 1280px) {
  .container {
    width: min(1160px, 92vw);
  }

  .hero-grid {
    column-gap: 3rem;
  }
}

@media (max-width: 1024px) {
  .hamburger-btn {
    display: grid;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    right: -290px;
    flex-direction: column;
    align-items: flex-start;
    width: min(280px, 86vw);
    height: calc(100dvh - var(--nav-height));
    padding: 1.5rem 1.1rem;
    border-left: 1px solid var(--border-gold);
    background: rgba(9, 15, 24, 0.98);
    box-shadow: -18px 0 38px rgba(0, 0, 0, 0.22);
    transition: right var(--transition-base);
  }

  .nav-menu.is-open {
    right: 0;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 0.65rem 0;
  }

  .nav-cta {
    width: auto;
    padding-inline: 0.8rem;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + 3rem) 0 4.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "focus"
      "visual";
    row-gap: 2rem;
  }

  .hero h1 {
    max-width: 18ch;
  }

  .hero-visual {
    justify-items: center;
  }

  .hero-brand-visual {
    width: min(100%, 560px);
    min-height: 340px;
  }

  .hero-brand-symbol {
    width: min(300px, 68vw);
  }

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

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-featured {
    grid-column: auto;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .project-media {
    height: clamp(260px, 40vw, 360px);
    aspect-ratio: auto;
  }

  .project-featured .project-media {
    height: clamp(260px, 40vw, 360px);
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  #about .about-grid,
  #contact .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-brand-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .about-copy {
    max-width: none;
    padding: 2.25rem;
  }
}

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

  .hero {
    padding-top: calc(var(--nav-height) + 2.75rem);
    padding-bottom: 4.25rem;
  }

  .software-section,
  .projects-section {
    padding: 4.25rem 0;
  }

  #security,
  #skills,
  #research,
  #about,
  #contact {
    padding: 4.25rem 0;
  }

  .hero-focus-grid,
  .services-grid,
  .projects-grid,
  .security-grid,
  .skills-grid,
  .research-grid,
  #contact .contact-grid,
  #about .about-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-focus-grid {
    gap: 0.75rem;
  }

  .hero-focus-card,
  .hero-focus-card + .hero-focus-card {
    min-height: auto;
    padding: 1.25rem;
    border: 1px solid var(--border-soft);
  }

  .project-featured {
    grid-column: auto;
  }

  .project-media {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .project-featured .project-media {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .hero-brand-visual {
    min-height: 300px;
    padding-block: 1.25rem;
  }

  #about .about-grid {
    gap: 0;
  }

  .about-brand-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .about-copy {
    padding: 2rem;
  }

  .footer-grid {
    gap: 1.5rem;
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-height: 72px;
  }

  .container {
    width: min(100% - 1.5rem, 1240px);
  }

  .logo {
    font-size: 1rem;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 11vw, 3rem);
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
  }

  .hero-brand-visual {
    min-height: 270px;
    padding: 0.75rem 0;
  }

  .hero-brand-symbol {
    width: min(220px, 70vw);
  }

  .brand-disciplines {
    gap: 0.45rem;
    font-size: 0.61rem;
  }

  .about-brand-symbol {
    width: min(160px, 70vw);
  }

  .skill-card,
  .game-card,
  .app-card,
  .contact-card,
  .research-note {
    padding: 1.25rem;
  }

  .skills-grid .skill-card {
    padding: 1.25rem;
  }

  .project-card {
    padding: 0;
  }

  .project-content {
    padding: 1.25rem;
  }

  .project-media {
    margin: 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
