:root {
  color-scheme: dark;
  --bg: #05070f;
  --surface: rgba(15, 22, 40, 0.92);
  --surface-strong: rgba(10, 15, 28, 0.98);
  --surface-soft: rgba(11, 16, 30, 0.82);
  --border: rgba(120, 170, 255, 0.12);
  --border-strong: rgba(120, 170, 255, 0.25);
  --text: #e8eef8;
  --muted: #9ab5d2;
  --accent: #72d2ff;
  --accent-strong: #5bd8ff;
  --accent-soft: rgba(114, 210, 255, 0.12);
  --accent-glow: rgba(85, 205, 255, 0.18);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  --radius: 28px;
  --radius-sm: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(25, 82, 166, 0.12), transparent 35%),
    linear-gradient(180deg, #060916 0%, #02040a 100%);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

img,
svg {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

section {
  padding: 72px 24px;
}

.section {
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at top left, rgba(114, 210, 255, 0.08), transparent 20%),
    linear-gradient(130deg, rgba(92, 155, 255, 0.04), transparent 35%);
  pointer-events: none;
}

.page-shell {
  max-width: 1300px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(4, 7, 15, 0.9);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(114, 210, 255, 0.19), rgba(22, 84, 152, 0.55));
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.06em;
}

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

.brand-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(114, 210, 255, 0.16), rgba(93, 216, 255, 0.24));
  border: 1px solid rgba(93, 216, 255, 0.2);
}

.mobile-nav-toggle {
  display: none;
  border: none;
  background: transparent;
  width: 44px;
  height: 44px;
  position: relative;
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav-toggle span:nth-child(1) {
  top: 12px;
}

.mobile-nav-toggle span:nth-child(2) {
  top: 21px;
}

.mobile-nav-toggle span:nth-child(3) {
  top: 30px;
}

.hero {
  min-height: calc(100vh - 100px);
  padding-top: 120px;
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 0.9fr);
  gap: 32px;
  align-items: center;
}

.hero-copy h2 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.02;
  margin: 0 0 24px;
  max-width: 760px;
}

.hero-text {
  color: var(--muted);
  max-width: 720px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  border: 1px solid transparent;
  font-weight: 600;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  color: #02040a;
  background: linear-gradient(135deg, #72d2ff, #6fb5ff);
}

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

.hero-stats {
  display: inline-flex;
  gap: 16px;
  padding: 18px 24px;
  border-radius: 22px;
  align-items: center;
  justify-content: center;
  margin-top: 26px;
  width: max-content;
}

.hero-stats .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.hero-card {
  position: relative;
  min-height: 420px;
  padding: 32px;
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.visual-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.visual-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(114, 210, 255, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
}

.node-map {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  align-items: center;
  justify-items: center;
  position: relative;
  min-height: 260px;
}

.node {
  min-width: 120px;
  padding: 16px 20px;
  border-radius: 20px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.node-primary {
  background: rgba(13, 46, 78, 0.9);
  border-color: rgba(114, 210, 255, 0.18);
}

.node-secondary {
  background: rgba(2, 10, 18, 0.92);
}

.node-accent {
  background: linear-gradient(135deg, rgba(114, 210, 255, 0.2), rgba(106, 160, 255, 0.16));
  color: #e9f8ff;
}

.flow-lines {
  display: none;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section-large {
  padding-top: 100px;
}

.section-headline,
.section-intro {
  max-width: 760px;
  margin: 0 auto 48px;
  position: relative;
  z-index: 1;
}

.section-headline h2,
.section-intro h2 {
  margin: 0;
  font-size: clamp(2rem, 3.1vw, 3rem);
  line-height: 1.08;
}

.section-headline p,
.section-intro p {
  color: var(--muted);
  margin: 16px 0 0;
  line-height: 1.85;
}

.about-grid,
.expertise-grid,
.projects-grid,
.process-grid,
.contact-grid,
.stack-grid {
  display: grid;
  gap: 24px;
}

.about-grid {
  grid-template-columns: 1.5fr 1fr;
}

.about-copy {
  padding: 32px;
  min-height: 320px;
}

.about-copy p {
  margin: 0 0 20px;
  color: var(--muted);
}

.about-stats {
  display: grid;
  gap: 20px;
}

.stat-card {
  padding: 24px;
}

.stat-card h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.expertise-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.expertise-card {
  padding: 28px;
}

.expertise-card h3 {
  font-size: 1.15rem;
  margin-bottom: 18px;
}

.expertise-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.expertise-card li {
  color: var(--muted);
  line-height: 1.8;
}

.stack-grid {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.stack-categories {
  display: grid;
  gap: 20px;
}

.stack-card {
  padding: 24px;
}

.stack-card h3 {
  margin: 0 0 12px;
}

.stack-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.stack-detail-panel {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.stack-chip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
}

.tech-item {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
  text-align: left;
}

.tech-item:hover,
.tech-item:focus-visible {
  background: rgba(114, 210, 255, 0.12);
  border-color: rgba(114, 210, 255, 0.24);
}

.stack-detail-text {
  color: var(--muted);
  margin: 0;
}

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

.project-card {
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}

.project-image {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.project-card-content {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.project-card-top h3 {
  margin: 0;
}

.project-tag {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(114, 210, 255, 0.12);
  color: var(--accent);
  font-size: 0.85rem;
  white-space: nowrap;
}

.project-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.project-tools {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.project-open {
  width: fit-content;
}

.project-modal-overlay,
.lightbox-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 5, 12, 0.9);
  padding: 24px;
  z-index: 60;
}

.hidden {
  display: none !important;
}

.project-modal {
  width: min(1100px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-close,
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

.project-modal-inner {
  display: grid;
  gap: 24px;
}

.project-modal h3 {
  margin: 0;
  font-size: 2rem;
}

.project-meta,
.project-highlights,
.project-architecture,
.project-gallery,
.project-sections {
  display: grid;
  gap: 16px;
}

.project-meta {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.project-meta .project-field {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  border-radius: 20px;
}

.project-field strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
}

.project-sections h4 {
  margin: 0;
}

.project-sections p,
.project-sections li {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.project-sections ul {
  padding-left: 18px;
  margin: 0;
}

.project-gallery {
  display: grid;
  gap: 18px;
}

.project-gallery img {
  width: 100%;
  border-radius: 24px;
  cursor: pointer;
}

.project-gallery-item {
  display: grid;
  gap: 8px;
  margin: 0;
}

.project-gallery-item figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 24px;
  object-fit: contain;
}

@media (max-width: 1040px) {
  .project-card {
    grid-template-columns: 1fr;
  }
}

.project-details {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.project-details h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.project-details p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.project-architecture {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-architecture span {
  display: block;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.architecture-line {
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline-item {
  position: relative;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-date {
  color: var(--accent);
  font-size: 0.9rem;
}

.timeline-item h3 {
  margin: 14px 0 12px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.process-grid {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}

.process-step {
  padding: 26px;
  min-height: 240px;
}

.process-step span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  color: #02040a;
  font-weight: 700;
  background: var(--accent);
}

.process-step h4 {
  margin: 0 0 14px;
}

.process-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cert-group {
  display: grid;
  gap: 18px;
}

.cert-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 760px) {
  .cert-images {
    grid-template-columns: 1fr;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
}

.cert-image-card {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.cert-image-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  cursor: pointer;
}

.cert-card,
.education-card,
.contact-info,
.contact-form {
  padding: 28px;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(114, 210, 255, 0.14);
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 700;
}

.education-card h3,
.contact-info h3 {
  margin: 0 0 16px;
}

.education-card p,
.contact-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.contact-section {
  padding-bottom: 100px;
}

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

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: max-content;
}

.contact-info > div:first-child {
  margin-bottom: 8px;
}

.contact-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.contact-line strong {
  color: var(--accent);
  min-width: 70px;
  flex-shrink: 0;
}

.contact-line a {
  color: var(--text);
  text-decoration: none;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 10px;
}

.form-field label {
  font-size: 0.95rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: var(--text);
  padding: 14px 16px;
}

.form-field select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(114, 210, 255, 0.24);
}

.form-field select option {
  background: #0a0f1c;
  color: var(--text);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: rgba(114, 210, 255, 0.32);
  box-shadow: 0 0 0 4px rgba(114, 210, 255, 0.1);
}

.field-error {
  color: #ff7a7a;
  min-height: 18px;
  font-size: 0.9rem;
}

.form-feedback {
  color: var(--accent);
  margin: 0;
  min-height: 22px;
}

.site-footer {
  padding: 30px 24px 60px;
  text-align: center;
  color: var(--muted);
}

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

.reveal.visible,
.reveal-item.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1040px) {
  .hero-grid,
  .about-grid,
  .stack-grid,
  .process-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 20px;
  }
}

@media (max-width: 860px) {
  .expertise-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stack-chip-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .site-header {
    flex-wrap: wrap;
    padding-inline: 12px;
    gap: 14px;
  }

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

  .site-nav {
    position: absolute;
    top: 88px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    background: rgba(5, 8, 16, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 20px;
    gap: 16px;
    backdrop-filter: blur(18px);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    width: 100%;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

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

  .hero-card {
    min-height: auto;
  }

  .hero-grid,
  .about-grid,
  .stack-grid,
  .process-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-copy,
  .hero-visual,
  .project-card,
  .project-card-content,
  .project-image,
  .project-card-top,
  .project-tools,
  .project-tag {
    max-width: 100%;
    width: 100%;
  }

  .hero-copy,
  .project-card,
  .project-card-content {
    padding-left: 0;
    padding-right: 0;
  }

  .hero-visual {
    margin-left: 4px;
    margin-right: 4px;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero-copy h2 {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .hero-text {
    margin-bottom: 24px;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    width: 100%;
    justify-content: space-between;
  }

  .hero-stats .stat-value {
    font-size: 1.6rem;
  }

  .visual-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .node-map {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    min-height: 220px;
  }

  .node-map .node {
    min-width: 100%;
  }

  .project-card-content {
    padding: 20px;
  }

  .project-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .project-tag {
    white-space: normal;
  }

  .project-tools {
    font-size: 0.95rem;
  }

  .project-open {
    width: 100%;
  }

  .project-image {
    aspect-ratio: 16 / 9;
  }

  .contact-grid {
    gap: 20px;
  }
}

@media (max-width: 550px) {
  .hero-copy h2 {
    font-size: 2.1rem;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .project-card-content {
    padding: 18px;
  }

  .project-card-top {
    gap: 12px;
  }

  .project-tag {
    white-space: normal;
  }

  .project-tools {
    font-size: 0.92rem;
  }

  .process-step,
  .stat-card {
    padding: 22px;
  }
}
