:root {
  --bg: #0a0a0d;
  --panel: #141419;
  --panel-2: #1a1a1f;
  --stage: #17171c;
  --text: #f5f5f7;
  --text-secondary: #d8d7dc;
  --muted: #9b99a2;
  --muted-2: #727079;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.13);
  --lime: #FF8A00;
  --cyan: #00f0ff;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --shell: 1280px;
}

html[data-theme="light"] {
  --bg: #f2f2f4;
  --panel: #ffffff;
  --panel-2: #f2f2f4;
  --stage: #e8e8ec;

  --text: #161619;
  --text-secondary: #3f3f46;
  --muted: #62626a;
  --muted-2: #898991;

  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);

  --lime: #BD5B00;
  --cyan: #008e99;
}

* {
  box-sizing: border-box;
}

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

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.theme-transition body,
html.theme-transition .panel,
html.theme-transition .stack-item,
html.theme-transition .contact-links a,
html.theme-transition .segmented-control,
html.theme-transition .preference-button,
html.theme-transition .project-front,
html.theme-transition .project-back {
  transition:
    background-color 320ms ease,
    color 320ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease;
}

button,
a {
  font: inherit;
}

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

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

.shell {
  width: min(var(--shell), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding-block: 18px 80px;
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--lime);
  font-weight: 700;
  letter-spacing: 0.02em;
}


.intro-section {
  padding-top: 34px;
  padding-bottom: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 700px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.intro-left,
.intro-right {
  min-width: 0;
  display: grid;
  gap: 18px;
  align-content: stretch;
}

.intro-left {
  grid-template-rows: 240px auto;
}

.intro-left-bottom {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.intro-right {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

/* HERO */
.hero-card {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.34fr);
}

.hero-copy {
  padding: 24px;
  align-self: start;
}

.eyebrow {
  margin: 0 0 10px 2px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}

.eyebrow--accent {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border: 1px solid rgba(255, 138, 0, 0.18);
  border-radius: 999px;
  background: rgba(255, 138, 0, 0.06);
  color: #C99B6B;
  backdrop-filter: blur(6px);
  letter-spacing: 0.03em;
}

[data-theme="light"] .eyebrow--accent {
  background: rgba(255, 138, 0, 0.18);
  border-color: rgba(255, 138, 0, 0.28);
  color: #9A693D;
}

.hero-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.hero-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.hero-text strong {
  color: var(--lime);
  font-weight: 600;
}

.location-line {
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-2);
  font-size: 0.82rem;
}

.hero-photo {
  min-height: 0;
  background: linear-gradient(135deg, #242019, #101014);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* PREFERENCES */
.preferences-card {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}

.preference-row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.preference-label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segmented-control {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
}

.preference-button {
  min-height: 30px;
  padding: 5px 10px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
  transition: background 180ms ease, color 180ms ease;
}

.preference-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background-color: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.preference-icon--moon {
  mask-image: url("assets/icons/moon.svg");
  -webkit-mask-image: url("assets/icons/moon.svg");
}

.preference-icon--sun {
  mask-image: url("assets/icons/sun.svg");
  -webkit-mask-image: url("assets/icons/sun.svg");
}

.preference-button.is-active {
  background: rgba(255, 138, 0, 0.18);
  color: var(--lime);
}

/* CARD PADDING */
.learning-card,
.expertise-card,
.about-card,
.stack-card,
.contact-card {
  padding: 24px;
}

.learning-card,
.expertise-card {
  height: 100%;
}

.stack-card {
  display: flex;
  flex-direction: column;
}

.stack-card .stack-grid {
  flex: 1;
}

/* CONTACT — desktop: text left, buttons right */
.contact-card {
  display: flex;
  flex-direction: column;
}

.contact-card .contact-links {
  margin-top: 12px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}


/* PANEL HEADINGS */

.panel-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.location-icon,
.panel-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;

  background-color: currentColor;

  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;

  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.panel-icon--location {
  mask-image: url("assets/icons/location.svg");
  -webkit-mask-image: url("assets/icons/location.svg");
}

.panel-icon--learning {
  mask-image: url("assets/icons/learning.svg");
  -webkit-mask-image: url("assets/icons/learning.svg");
}

.panel-icon--expertise {
  mask-image: url("assets/icons/expertise.svg");
  -webkit-mask-image: url("assets/icons/expertise.svg");
}

.panel-icon--about {
  mask-image: url("assets/icons/about.svg");
  -webkit-mask-image: url("assets/icons/about.svg");
}

.panel-icon--stack {
  mask-image: url("assets/icons/stack.svg");
  -webkit-mask-image: url("assets/icons/stack.svg");
}

.panel-icon--contact {
  mask-image: url("assets/icons/contact.svg");
  -webkit-mask-image: url("assets/icons/contact.svg");
}


/* ABOUT + CONTACT TEXT */

.about-card p,
.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}


.project-tags,
.expertise-tags,
.status {
  font-family: "JetBrains Mono", monospace;
}

/* EXPERTISE */

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

.expertise-tags span,
.project-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

.expertise-tags span {
  min-height: 30px;
  padding: 5px 10px;
  background: var(--panel-2);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.expertise-tags .language-tag {
  background: rgba(0, 240, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.17);
  color: #b9faff;
}

[data-theme="light"] .expertise-tags .language-tag {
  background: rgba(0, 150, 165, 0.16);
  border-color: rgba(0, 125, 140, 0.28);
  color: #006A73;
}


/* LEARNING */

.learning-list {
  display: grid;
  gap: 3px;
}

.learning-row {
  min-width: 0;
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.learning-row:last-child {
  border-bottom: 0;
}

.learning-row > div {
  min-width: 0;
}

.learning-row strong,
.learning-row > div > span {
  display: block;
}

.learning-row strong {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.learning-row > div > span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.68rem;
}

.status {
  font-size: 0.65rem;
  white-space: nowrap;
}



/* STACK */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.stack-item {
  min-width: 0;
  min-height: 52px;
  padding: 6px 2px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 3px;

  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);

  color: var(--text-secondary);
  text-align: center;
  font-size: 0.58rem;
}

.stack-icon {
  width: 19px;
  height: 19px;
  object-fit: contain;
  flex-shrink: 0;
}

.stack-icon--light-ui {
  display: none;
}

/* Светлая тема */
[data-theme="light"] .stack-icon--dark-ui {
  display: none;
}

[data-theme="light"] .stack-icon--light-ui {
  display: block;
}


/* CONTACT */

.contact-links {
  margin-top: 10px;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr;
  gap: 8px;
}

.contact-links a {
  min-height: 38px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.contact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;

  background-color: currentColor;

  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;

  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.contact-icon--linkedin {
  mask-image: url("assets/icons/linkedin.svg");
  -webkit-mask-image: url("assets/icons/linkedin.svg");
}

.contact-icon--behance {
  mask-image: url("assets/icons/behance.svg");
  -webkit-mask-image: url("assets/icons/behance.svg");
}

.contact-icon--email {
  mask-image: url("assets/icons/email.svg");
  -webkit-mask-image: url("assets/icons/mail.svg");
}

@media (hover: hover) and (pointer: fine) {
  .contact-links a:hover,
  .contact-links a:focus-visible {
    color: var(--lime);
    border-color: rgba(255, 138, 0, 0.4);

    box-shadow:
      0 0 10px rgba(255, 138, 0, 0.16),
      0 0 20px rgba(255, 138, 0, 0.07);
  }
}


.section-heading {
  margin-bottom: 28px;
}

.section-heading .eyebrow {
  margin-bottom: 7px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 720;
}

.section-note {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

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

  align-items: stretch;
}

.project-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 8 / 5;
  perspective: 1600px;
  border-radius: 28px;

  transition:
    transform 350ms ease,
    height 320ms ease,
    box-shadow 400ms ease,
    border-color 400ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    transform: scale(1.025);

    border-color: rgba(0, 240, 255, 0.22);

  }
}


.project-flip {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform 780ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.project-card.is-flipped .project-flip {
  transform: rotateY(180deg);
}

.project-side {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.project-front {
  isolation: isolate;
}

.project-back {
  padding: clamp(22px, 2.5vw, 32px);
  transform: rotateY(180deg);
  background: var(--panel-2);

  display: flex;
  flex-direction: column;
  gap: 12px;

  overflow: hidden;
}

.project-image-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.055), transparent 48%),
    var(--stage);
}

.project-image-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
}

.project-image-stage img.project-image--contain {
  width: 91%;
  height: 88%;
  object-fit: contain;
}

.project-front-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;

  background: linear-gradient(
  to bottom,
  rgba(0, 0, 0, 0.08) 0%,
  rgba(0, 0, 0, 0.35) 55%,
  rgba(0, 0, 0, 0.75) 100%
);

  pointer-events: none;
}

[data-theme="light"] .project-front-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.02) 0%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.project-front-content {
  position: absolute;
  left: clamp(22px, 3vw, 34px);
  right: 78px;
  bottom: clamp(22px, 3vw, 30px);
  z-index: 2;
}

.project-front-content h3 {
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  line-height: 1.25;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.035em;
  color: #f5f5f7;
}

.project-back-content h3 {
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  line-height: 1.25;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.035em;
}

.project-back-content p {
  margin: 12px 0 0;
}

.project-back-content p:last-of-type {
  margin-bottom: 0;
}

.project-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-tags span {
  min-height: 27px;
  padding: 4px 9px;
  border-color: rgba(255, 255, 255, 0.21);
  background: rgba(20, 20, 25, 0.55);
  color: #e3e2e6;
  font-size: 0.64rem;
  backdrop-filter: blur(6px);
}

.project-back .project-tags span {
  border-color: rgba(255, 138, 0, 0.18);
  background: rgba(255, 138, 0, 0.06);
  color: #C99B6B;
}

[data-theme="light"] .project-back .project-tags span {
  border-color: rgba(255, 138, 0, 0.28);
  background: rgba(255, 138, 0, 0.18);
  color: #9A693D;
}

.project-back-content {
   max-width: 92%;
  }

.project-back {
  padding: clamp(22px, 2.5vw, 32px);

  display: flex;
  flex-direction: column;

  overflow: hidden;
}

.project-back p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.05vw, 1rem);
}

.project-front .project-flip-button.is-pressed {
  transform: scale(0.97);

  color: #00F0FF;
  border-color: rgba(0, 240, 255, 0.5);

  box-shadow:
    0 0 10px rgba(0, 240, 255, 0.18),
    0 0 22px rgba(0, 240, 255, 0.08);
}

.project-flip-button--back.is-pressed {
  transform: scale(0.97);

  color: #FF8A00;
  border-color: rgba(255, 138, 0, 0.55);

  box-shadow:
    0 0 10px rgba(255, 138, 0, 0.18),
    0 0 22px rgba(255, 138, 0, 0.08);
}

.project-flip-button {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;

  min-height: 44px;
  padding: 0 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 1px solid rgba(255, 255, 255, 0.21);
  border-radius: 999px;

  background: rgba(20, 20, 25, 0.55);
  color: #e3e2e6;

  cursor: pointer;
  font-size: 0.75rem;

  backdrop-filter: blur(8px);

  transition:
    color 250ms ease,
    border-color 250ms ease,
    background 250ms ease,
    box-shadow 250ms ease;
}

.project-back .project-flip-button {
  position: static;

  margin-top: auto;
  margin-left: auto;

  flex-shrink: 0;
}

.project-flip-arrow {
  display: inline-block;
  transition:
    transform 250ms ease,
    filter 250ms ease;
}

@media (hover: hover) and (pointer: fine) {

  /* VIEW DETAILS — голубое свечение */
  .project-flip-button:not(.project-flip-button--back):hover {
    color: #b9faff;
    border-color: rgba(0, 240, 255, 0.4);

    box-shadow:
      0 0 16px rgba(0, 240, 255, 0.18),
      0 0 32px rgba(0, 240, 255, 0.08);
  }

  .project-flip-button:not(.project-flip-button--back):hover
  .project-flip-arrow {
    transform: translateX(5px);

    filter:
      drop-shadow(0 0 5px rgba(0, 240, 255, 0.7));
  }


  /* BACK — жёлто-зелёное свечение */
  .project-flip-button--back:hover {
    color: #FF8A00;
    border-color: rgba(255, 138, 0, 0.4);

    box-shadow:
    0 0 16px rgba(255, 138, 0, 0.18),
    0 0 32px rgba(255, 138, 0, 0.08);
  }

  .project-flip-button--back:hover .project-flip-arrow {
    transform: translateX(-5px);

    filter:
      drop-shadow(0 0 5px rgba(255, 138, 0, 0.7));
  }

}

.site-footer {
  padding: 8px 0 42px;
  color: var(--muted-2);
  font-size: 0.74rem;
}

.footer-shell {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--lime);
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* RESPONSIVE */
@media (max-width: 1200px) {
  .intro-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  }

  .intro-left-bottom {
    grid-template-columns: 1fr;
  }

  .preferences-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .preference-row {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
  }

  .stack-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .stack-item {
    width: auto;
  }

}

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

  .intro-left {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
  }

  .hero-card {
    height: auto;
    min-height: 0;
    align-self: start;
  }

}

@media (max-width: 900px) {
  .hero-card {
    padding: 20px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px;
    grid-template-areas:
      "heading photo"
      "text    text"
      "location location";

    gap: 14px 16px;
    align-items: center;
  }

  .hero-copy {
    display: contents;
  }

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

  .hero-photo {
    grid-area: photo;

    width: 84px;
    height: 84px;
    min-height: 0;

    border-radius: 14px;
    overflow: hidden;
  }

  .hero-text {
    grid-area: text;
    margin: 0;
  }

  .location-line {
    grid-area: location;
    margin: 0;
  }

}


@media (max-width: 840px) {
  .contact-card .contact-links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .contact-card .contact-links a {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(var(--shell), calc(100% - 24px));
  }

  /* Одна основная колонка */
  .intro-grid {
    grid-template-columns: 1fr;
  }

  /* Позволяем свободно менять порядок карточек */
  .intro-left,
  .intro-left-bottom,
  .intro-right {
    display: contents;
  }

  /* Hero */
  .hero-card {
    grid-column: 1;
    order: 1;
  }

  /* Preferences сразу после Hero */
  .preferences-card {
    grid-column: 1;
    order: 2;
  }

  /* Learning */
  .learning-card {
    grid-column: 1;
    order: 3;
  }

  /* Expertise */
  .expertise-card {
    grid-column: 1;
    order: 4;
  }

  /* About */
  .about-card {
    grid-column: 1;
    order: 5;
  }

  /* Stack — отдельная строка */
  .stack-card {
    grid-column: 1;
    order: 6;
  }

  /* 6 инструментов в один ряд */
  .stack-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    justify-content: stretch;
  }

  .stack-item {
    width: auto;
  }

  /* Contacts — под Stack */
  .contact-card {
    grid-column: 1;
    order: 7;
  }

  /* Три контактные кнопки снова в один ряд */
  .contact-card .contact-links {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .learning-card,
  .expertise-card,
  .about-card,
  .stack-card,
  .contact-card {
    padding: 20px;
  }

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

@media (max-width: 480px) {
  .contact-card .contact-links {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .contact-card .contact-links a {
    border-radius: 999px;
    min-height: 48px;

    transition:
      transform 160ms ease,
      color 180ms ease,
      border-color 180ms ease,
      background-color 180ms ease,
      box-shadow 180ms ease;

    -webkit-tap-highlight-color: transparent;
  }

  .contact-card .contact-links a:active {
    transform: scale(0.975);

    color: #FF8A00;
    border-color: rgba(255, 138, 0, 0.55);
    background: rgba(255, 138, 0, 0.10);

    box-shadow:
      0 0 10px rgba(255, 138, 0, 0.18),
      0 0 22px rgba(255, 138, 0, 0.08);
  }

  .project-front {
    display: grid;
    grid-template-rows: 1fr auto auto;
  }

  .project-front-content {
    position: static;
    align-self: end;

    padding: 24px;
  }

  .project-front .project-flip-button,
  .project-back .project-flip-button--back {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;

    padding: 0;

    right: 20px;
    bottom: 20px;

    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Текст View details скрываем только на мобильном */
  .project-front .project-flip-text,
  .project-back .project-flip-button--back span:not(.project-flip-arrow) {
    display: none;
  }

  .project-front .project-flip-arrow,
  .project-back .project-flip-button--back .project-flip-arrow {
    margin: 0;
    font-size: 1rem;
  }

}
