/* ========================================
   01. DESIGN SYSTEM
======================================== */

:root {
  color-scheme: dark;

  --background: #0b0d10;
  --surface: #13161c;
  --surface-hover: #191d25;
  --border: #272b34;
  --control-border: #747b8b;

  --text: #f2f4f8;
  --muted: #a0a7b5;

  --accent: #a5b4fc;
  --accent-hover: #c7d2fe;
  --accent-subtle: rgba(165, 180, 252, 0.08);
  --accent-border: #464d70;

  --font: "Inter", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;

  --mono: "SFMono-Regular", Consolas, monospace;

  --content-width: 1200px;
  --reading-width: 62ch;

  --radius: 10px;
  --radius-large: 20px;

  --section-padding: clamp(64px, 8vw, 112px);
  --gutter: clamp(20px, 5vw, 64px);

  --transition: 220ms ease;
}


/* ========================================
   02. RESET AND TYPOGRAPHY
======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  background: var(--background);
  color: var(--text);

  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;

  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

::selection {
  background: var(--accent);
  color: var(--background);
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 650;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(40px, 6vw, 76px);
}

h2 {
  font-size: clamp(28px, 3.5vw, 44px);
}

h3 {
  font-size: clamp(20px, 2vw, 26px);
}

p {
  color: var(--muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

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

ul {
  padding: 0;
}

.list-unstyled {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--text);
  color: var(--background);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--background);
}


/* ========================================
   03. GLOBAL LAYOUT
======================================== */

.shell {
  width: min(var(--content-width),
      calc(100% - var(--gutter) * 2));

  margin-inline: auto;
}

.section-space {
  padding-block: var(--section-padding);
}

.section-band {
  border-block: 1px solid var(--border);
  background: #0f1115;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
}

.section-heading h2 {
  margin-top: 12px;
}

.page-content {
  padding-block: var(--section-padding);
}

.page-intro {
  margin-bottom: 48px;
}

.page-intro h1 {
  margin-block: 12px 20px;
}

.intro {
  max-width: var(--reading-width);
  font-size: clamp(16px, 1.5vw, 18px);
}

.eyebrow {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}


/* ========================================
   04. HEADER AND NAVIGATION
======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;

  background: rgba(11, 13, 16, 0.94);
  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  position: relative;
  min-height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-logo {
  display: block;

  width: 44px;
  height: 44px;

  object-fit: contain;
  border-radius: 10px;

  transition:
    transform 250ms ease,
    opacity 250ms ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {

  .brand:hover .brand-logo {
    transform: scale(1.06);
    opacity: 0.85;
  }

}

@media (max-width: 639px) {

  .brand-logo {
    width: 38px;
    height: 38px;
  }

}

.site-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.site-menu a {
  display: flex;
  align-items: center;

  min-height: 44px;
  padding: 10px 17px;

  color: var(--muted);
  border-radius: var(--radius);
  font-size: 14px;

  transition:
    background var(--transition),
    color var(--transition);
}

.site-menu a:hover {
  background: var(--surface);
  color: var(--text);
}

.site-menu a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-subtle);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  min-height: 44px;
  padding: 10px 14px;

  font: inherit;
  font-size: 13px;
  color: var(--text);

  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.menu-icon {
  width: 16px;
  height: 10px;
  border-block: 1px solid currentColor;
}

.menu-toggle[aria-expanded="true"] {
  color: var(--accent);
}


/* ========================================
   05. BUTTONS AND LABELS
======================================== */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-height: 48px;
  padding: 12px 22px;

  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);

  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.action-primary {
  background: var(--text);
  color: var(--background);
}

.action-primary:hover {
  background: var(--accent);
  color: var(--background);
  transform: translateY(-2px);
}

.action-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--control-border);
}

.action-outline:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;

  font-size: 14px;
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 5px 10px;

  background: var(--accent-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;

  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}


/* ========================================
   06. HOMEPAGE HERO
======================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);

  align-items: center;
  gap: clamp(40px, 6vw, 100px);

  min-height: 580px;
  padding-block: clamp(80px, 10vw, 140px);
}

.hero-copy {
  min-width: 0;
  animation: enter 600ms ease both;
}

.hero-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  margin-bottom: 24px;
}

.location-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86efac;
  box-shadow: 0 0 12px rgba(134, 239, 172, 0.3);
}

.hero h1 {
  font-size: clamp(44px, 5.8vw, 80px);
  line-height: 1.06;
  letter-spacing: -0.065em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-headline {
  margin-top: 24px;
  font-size: 20px;
  color: var(--text);
}

.hero .intro {
  margin-top: 18px;
  max-width: 52ch;
}

.hero .actions {
  margin-top: 34px;
}

.hero-panel {
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);

  background:
    radial-gradient(ellipse at top right,
      rgba(165, 180, 252, 0.1),
      transparent 60%),
    var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius-large);

  animation: enter 700ms 100ms ease both;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;

  padding-bottom: 20px;
  margin-bottom: 28px;

  border-bottom: 1px solid var(--border);
}

.panel-index {
  color: var(--muted);
  font: 12px var(--mono);
}

.profile-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.portrait {
  width: clamp(100px, 10vw, 140px);
  flex: none;
}

.portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--control-border);
}

.profile-summary h2 {
  font-size: 20px;
}

.profile-summary p {
  font-size: 13px;
  margin-top: 4px;
}

.profile-details {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.profile-detail {
  display: grid;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.profile-detail strong {
  font-size: 15px;
  font-weight: 500;
}


/* ========================================
   07. PROJECT CARDS
======================================== */

.project-grid,
.profile-grid,
.skill-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.featured-grid>.project-card {
  grid-column: span 6;
}

.featured-grid>.project-card:first-child {
  grid-column: span 7;
}

.featured-grid>.project-card:nth-child(2) {
  grid-column: span 5;
}

.project-card,
.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.project-card {
  display: flex;
  flex-direction: column;

  overflow: hidden;
  scroll-margin-top: 24px;

  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.project-card:hover,
.project-card:focus-within {
  border-color: var(--accent-border);
  background: var(--surface-hover);
}

.project-card:target {
  border-color: var(--accent);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 15px;
  padding: clamp(22px, 3vw, 36px);
}

.project-body h2,
.project-body h3 {
  font-size: clamp(24px, 3vw, 32px);
}

.project-body p:not(.eyebrow) {
  font-size: 15px;
}

.project-body .tags {
  margin-block: 6px;
}

.project-body .actions {
  margin-top: auto;
  padding-top: 12px;
}

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

  overflow: hidden;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;

  transition: transform 400ms ease;
}


/* Decorative project covers */

.project-cover {
  position: relative;
  display: grid;
  align-content: space-between;

  min-height: 180px;
  padding: 26px;

  isolation: isolate;
  overflow: hidden;

  border-bottom: 1px solid var(--border);

  background:
    radial-gradient(ellipse at 85% 25%,
      var(--project-glow, rgba(165, 180, 252, 0.15)),
      transparent 65%),
    #101218;
}

.project-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px,
      transparent 1px),
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px);

  background-size: 28px 28px;
}

.project-number {
  font: 11px var(--mono);
  color: var(--muted);
  letter-spacing: 0.08em;
}

.project-symbol {
  justify-self: center;

  font-family: var(--mono);
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 600;
  line-height: 1;

  color: var(--project-color, var(--accent));
  letter-spacing: -0.08em;

  transition: transform 400ms ease;
}

.cover-localmind {
  --project-color: #a5b4fc;
  --project-glow: rgba(129, 140, 248, 0.18);
}

.cover-atlas {
  --project-color: #99f6e4;
  --project-glow: rgba(45, 212, 191, 0.13);
}

.cover-youtube {
  --project-color: #fda4af;
  --project-glow: rgba(244, 63, 94, 0.12);
}

.cover-blockchain {
  --project-color: #fcd34d;
  --project-glow: rgba(245, 158, 11, 0.12);
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    transform: translateY(-4px);
  }

  .project-card:hover .project-image img {
    transform: scale(1.035);
  }

  .project-card:hover .project-symbol {
    transform: scale(1.08);
  }
}


/* ========================================
   08. SKILLS AND CONTENT PANELS
======================================== */

.skills-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);

  align-items: start;
  gap: 40px;
}

.skills-preview h2 {
  margin-block: 12px 16px;
}

.tech-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tech-group,
.skill-group {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.tech-group h3,
.skill-group h3 {
  margin-bottom: 16px;
  font-size: 17px;
}

.panel {
  padding: clamp(24px, 4vw, 40px);
}

.panel>*+* {
  margin-top: 18px;
}

.panel h2 {
  font-size: 26px;
}

.skill-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.skills-section {
  padding-bottom: 0;
}

.contact-primary {
  border-color: var(--accent-border);
}

.email-address {
  overflow-wrap: anywhere;
}

.contact-links a {
  display: flex;
  justify-content: space-between;
}

.contact-links li+li {
  border-top: 1px solid var(--border);
}


/* ========================================
   09. CONTACT CALL TO ACTION
======================================== */

.contact-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;

  align-items: center;
  gap: 30px;

  padding: clamp(28px, 6vw, 64px);

  background:
    radial-gradient(ellipse at top right,
      rgba(165, 180, 252, 0.1),
      transparent 65%),
    var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius-large);
}

.contact-cta h2 {
  margin-block: 14px;
}

.contact-cta p:not(.eyebrow) {
  max-width: 48ch;
}

/* ========================================
   10. FOOTER
======================================== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--background);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 28px;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: clamp(12px, 3vw, 32px);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;

  color: var(--muted);
  font-size: 13px;
  font-weight: 500;

  border-radius: var(--radius);

  transition:
    color var(--transition),
    background var(--transition);
}

.social-links svg {
  display: block;

  width: 19px;
  height: 19px;
  flex: none;

  transition: transform var(--transition);
}


/* Brand colors */

.social-links .social-github {
  --social-color: #ffffff;
}

.social-links .social-linkedin {
  --social-color: #70b5f9;
}

.social-links .social-instagram {
  --social-color: #e879a9;
}

.social-links .social-twitter {
  --social-color: #ffffff;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--social-color, var(--accent));
  background: var(--surface);
}


/* Hover animation */

@media (hover: hover) and (prefers-reduced-motion: no-preference) {

  .social-links a:hover svg {
    transform: translateY(-3px);
  }

}


/* Mobile footer */

@media (max-width: 639px) {

  .site-footer .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;

    padding-block: 20px;
  }

  .social-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 8px 16px;
  }

  .social-links a {
    width: 100%;
    justify-content: flex-start;
    padding: 10px;
  }

  .social-links svg {
    width: 18px;
    height: 18px;
  }

}

/* ========================================
   11. ANIMATIONS
======================================== */

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ========================================
   12. RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    min-height: auto;
    gap: 32px;
  }

  .featured-grid>.project-card,
  .featured-grid>.project-card:first-child,
  .featured-grid>.project-card:nth-child(2) {
    grid-column: span 6;
  }
}

@media (max-width: 767px) {
  .hero {
    grid-template-columns: 1fr;
    padding-block: 72px;
    gap: 40px;
  }

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

  .skills-preview,
  .skill-grid,
  .contact-cta {
    grid-template-columns: 1fr;
  }

  .contact-cta .actions {
    justify-content: flex-start;
  }
}

@media (max-width: 639px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-toggle:not([hidden])+.site-menu:not([hidden]) {
    position: absolute;
    inset: 100% 0 auto;
    z-index: 25;

    display: grid;
    gap: 4px;
    padding: 12px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  }

  .site-menu a {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(38px, 10vw, 56px);
  }

  .hero-headline {
    font-size: 18px;
  }

  .project-grid,
  .profile-grid,
  .contact-grid,
  .tech-groups {
    grid-template-columns: 1fr;
  }

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

  .featured-grid>.project-card,
  .featured-grid>.project-card:first-child,
  .featured-grid>.project-card:nth-child(2) {
    grid-column: auto;
  }

  .project-cover {
    min-height: 160px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .project-card:hover,
  .action:hover,
  .project-card:hover .project-symbol,
  .project-card:hover .project-image img {
    transform: none;
  }
}

/* ========================================
   13. INNER PAGE HEADERS
======================================== */

.page-hero {
  padding-block: clamp(64px, 9vw, 120px);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  max-width: 850px;
  margin-block: 20px 24px;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.08;
}

.page-hero h1 span {
  color: var(--accent);
}

.page-hero .intro {
  max-width: 65ch;
}

.page-hero .actions {
  margin-top: 28px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-label::after {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--accent-border);
}


/* ========================================
   14. PROJECT CASE STUDIES
======================================== */

.case-studies {
  display: grid;
  gap: 32px;
}

.case-study {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);

  overflow: hidden;
  scroll-margin-top: 24px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);

  transition: border-color var(--transition);
}

.case-study:hover,
.case-study:target {
  border-color: var(--accent-border);
}

.case-study .project-cover {
  min-height: 360px;
  border-bottom: 0;
  border-right: 1px solid var(--border);
}

.case-study .project-symbol {
  align-self: center;
  font-size: clamp(70px, 9vw, 120px);
}

.case-content {
  display: flex;
  flex-direction: column;
  min-width: 0;

  gap: 20px;
  padding: clamp(24px, 4vw, 48px);
}

.case-content h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.case-content .actions {
  margin-top: 10px;
}

.case-features {
  display: grid;
  gap: 12px;
  padding: 20px 0;
  border-block: 1px solid var(--border);
}

.case-features li {
  display: flex;
  align-items: baseline;
  gap: 12px;

  color: var(--muted);
  font-size: 14px;
}

.case-features li::before {
  content: "↳";
  color: var(--accent);
  flex: none;
}

.project-status {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;

  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;

  font: 11px var(--mono);
  color: var(--muted);
}

.project-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #86efac;
}

.project-status.development::before {
  background: #fcd34d;
}


/* ========================================
   15. ABOUT PAGE
======================================== */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);

  align-items: start;
  gap: clamp(32px, 6vw, 80px);
}

.about-story h2 {
  margin-bottom: 24px;
}

.about-story p {
  max-width: 65ch;
  margin-bottom: 20px;
  font-size: 17px;
}

.about-story .actions {
  margin-top: 32px;
}

.about-photo {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
}

.about-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.about-photo figcaption {
  padding: 16px 4px 4px;
}

.about-photo strong {
  font-size: 17px;
}

.about-photo p {
  margin-top: 4px;
  font-size: 13px;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.expertise-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 20px;

  padding: clamp(24px, 3vw, 36px);

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);

  transition:
    background var(--transition),
    border-color var(--transition);
}

.expertise-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent-border);
}

.expertise-card h3 {
  font-size: 24px;
}

.expertise-card p {
  font-size: 15px;
}

.expertise-number {
  color: var(--accent);
  font: 12px var(--mono);
}

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

.principle {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.principle h3 {
  margin-bottom: 12px;
}

.principle p {
  font-size: 15px;
}


/* ========================================
   16. CONTACT PAGE
======================================== */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
}

.contact-main {
  min-width: 0;
  padding: clamp(28px, 5vw, 56px);

  background:
    radial-gradient(ellipse at top right,
      rgba(165, 180, 252, 0.12),
      transparent 65%),
    var(--surface);

  border: 1px solid var(--accent-border);
  border-radius: var(--radius-large);
}

.contact-main h2 {
  margin-block: 18px;
}

.contact-main .actions {
  margin-top: 28px;
}

.contact-email:empty {
  display: none;
}

.contact-options {
  display: grid;
  gap: 16px;
}

.contact-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 24px;
  min-width: 0;

  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);

  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.contact-option:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--accent-border);
}

.contact-option strong {
  display: block;
  font-size: 18px;
}

.contact-option p {
  margin-top: 6px;
  font-size: 13px;
}

.contact-arrow {
  flex: none;
  font-size: 22px;
  color: var(--accent);
}

.contact-topics {
  margin-top: 24px;
}

.contact-topics h3 {
  margin-bottom: 18px;
}


/* ========================================
   17. ADDITIONAL RESPONSIVE RULES
======================================== */

@media (max-width: 900px) {
  .case-study {
    grid-template-columns: 1fr;
  }

  .case-study .project-cover {
    min-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

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

  .about-photo {
    max-width: 360px;
  }
}

@media (max-width: 639px) {
  .page-hero {
    padding-block: 56px;
  }

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

  .case-study .project-cover {
    min-height: 200px;
  }

  .case-content {
    padding: 24px;
  }

  .contact-option {
    padding: 20px;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {

  .contact-option:hover {
    transform: translateY(-3px);
  }

  .case-study:hover .project-symbol {
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {

  .contact-option:hover,
  .case-study:hover .project-symbol {
    transform: none;
  }
}

/* ========================================
   19. THEME SWITCH AND NAVIGATION
======================================== */

.header-inner nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-menu a {
  position: relative;
}

.site-menu a::after {
  content: "";

  position: absolute;
  bottom: 4px;
  left: 17px;
  right: 17px;

  height: 1px;
  background: var(--accent);

  transform: scaleX(0);
  transition: transform var(--transition);
}

.site-menu a:hover::after,
.site-menu a[aria-current="page"]::after {
  transform: scaleX(1);
}


/* ========================================
   20. SCROLL ANIMATIONS
======================================== */

@keyframes scroll-reveal {
  from {
    opacity: 0.3;
    translate: 0 18px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    animation: scroll-reveal 550ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}


/* ========================================
   21. PROJECT FILTERS
======================================== */

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 44px;
  padding: 10px 18px;

  background: transparent;
  border: 1px solid var(--control-border);
  border-radius: 100px;

  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;

  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.filter-button:hover {
  color: var(--text);
  border-color: var(--accent);
}

.filter-button[aria-pressed="true"] {
  background: var(--text);
  color: var(--background);
  border-color: var(--text);
}

.filter-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}


/* ========================================
   22. CONTACT INTERACTIONS
======================================== */

.copy-button {
  font-family: inherit;
  cursor: pointer;
}

.copy-button.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-status {
  min-height: 24px;
  margin-top: 10px;
  font-size: 13px;
}


/* ========================================
   23. INTERACTION RESPONSIVENESS
======================================== */

@media (max-width: 639px) {
  .header-inner nav {
    gap: 8px;
  }

  .filter-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-buttons {
    gap: 6px;
  }

  .filter-button {
    padding-inline: 14px;
    font-size: 12px;
  }

  .site-menu a::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    animation: none;
  }
}

/* ========================================
   24. PROJECT SCREENSHOTS
======================================== */

.project-preview {
  display: grid;
  place-items: center;

  min-width: 0;
  aspect-ratio: 16 / 9;
  padding: clamp(16px, 3vw, 32px);

  background:
    radial-gradient(ellipse at center,
      rgba(129, 140, 248, 0.15),
      transparent 80%),
    #101218;

  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.project-preview img {
  display: block;
  width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;

  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);

  transition: transform 400ms ease;
}

.case-study .project-preview {
  aspect-ratio: auto;
  align-self: stretch;
  border-bottom: 0;
  border-right: 1px solid var(--border);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {

  .project-card:hover .project-preview img,
  .case-study:hover .project-preview img {
    transform: scale(1.035);
  }

}

@media (max-width: 900px) {

  .case-studies {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-study {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .case-study .project-preview {
    display: block;

    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    aspect-ratio: auto;

    padding: 16px;

    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .case-study .project-preview img {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;

    object-fit: contain;
    transform: none;
  }

}

@media (max-width: 639px) {

  .case-study .project-preview {
    padding: 10px;
  }

  .case-study .project-preview img {
    border-radius: 8px;
  }

}

/* ========================================
   28. TECHNICAL ARCHITECTURE
======================================== */

.architecture {
  display: grid;
  gap: 12px;

  padding: 18px;

  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.architecture h3 {
  margin-bottom: 4px;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.architecture-root {
  padding: 14px;

  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 8px;

  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.architecture-branches {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;
}

.architecture-node {
  display: grid;
  align-content: center;
  gap: 6px;

  padding: 14px 10px;
  min-width: 0;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;

  text-align: center;
  overflow-wrap: anywhere;
}

.architecture-node strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.architecture-node span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.architecture-connector {
  color: var(--accent);
  text-align: center;
  font-size: 18px;
  line-height: 1;
}


/* ========================================
   29. GALLERY RESPONSIVENESS
======================================== */

@media (max-width: 639px) {

  .gallery-dialog {
    width: calc(100% - 20px);
  }

  .architecture {
    padding: 12px;
  }

  .gallery-thumbnails {
    grid-template-columns: 1fr;
  }

  .gallery-header {
    gap: 10px;
  }

}

@media (max-width: 380px) {

  .architecture-branches {
    grid-template-columns: 1fr;
  }

}

/* ========================================
   30. NAVIGATION REFINEMENT
======================================== */

.header-inner {
  min-height: 72px;
}

.header-inner nav {
  gap: 8px;
}

.site-menu {
  gap: 6px;
}

.site-menu a {
  padding-inline: 20px;

  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-menu a[aria-current="page"] {
  background: var(--accent-subtle);
  color: var(--accent);
}

.site-menu a::after {
  bottom: 5px;
  left: 20px;
  right: 20px;
}

@media (max-width: 639px) {

  .header-inner {
    min-height: 64px;
  }

  .site-menu a {
    padding-inline: 14px;
  }

}

/* Responsive homepage project images */

@media (max-width: 639px) {

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

  .project-card .project-preview {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    padding: 12px;
  }

  .project-card .project-preview img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    transform: none;
  }

}