/* ==========================================================================
   Selected projects carousel
   ========================================================================== */

:root {
  --bg: #070b12;
  --panel: #0a111b;
  --cyan: #6ff7ff;
  --cyan-strong: #d9fdff;
  --muted: #84c9d1;
  --line: #173845;
  --accent: #8c7bff;
  --text: #deeff8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

.projects-page {
  min-height: 100vh;
  padding: 28px clamp(20px, 4vw, 60px) 34px;
  position: relative;
  background:
    radial-gradient(circle at 16% 12%, rgba(35, 217, 255, 0.09), transparent 27%),
    radial-gradient(circle at 86% 74%, rgba(140, 123, 255, 0.09), transparent 30%),
    linear-gradient(180deg, #0a0f18, #060a11);
}

.projects-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.008) 0,
      rgba(255, 255, 255, 0.008) 1px,
      rgba(0, 0, 0, 0.022) 2px,
      rgba(0, 0, 0, 0.022) 4px
    );
  opacity: 0.17;
}

.projects-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--cyan-strong);
  outline: none;
}

.projects-status {
  margin-right: 92px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
}

.carousel {
  position: relative;
  z-index: 1;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding-top: clamp(34px, 5vw, 64px);
}

.carousel-stage {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: clamp(10px, 2vw, 28px);
  align-items: center;
}

.carousel-control {
  width: 44px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 17, 27, 0.74);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  color: var(--cyan-strong);
  border-color: rgba(111, 247, 255, 0.42);
  background: rgba(35, 217, 255, 0.06);
  outline: none;
}

.carousel-control--prev:hover {
  transform: translateX(-3px);
}

.carousel-control--next:hover {
  transform: translateX(3px);
}

.project-slide {
  min-width: 0;
  display: block;
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.project-slide.is-leaving-left {
  opacity: 0;
  transform: translateX(-18px);
}

.project-slide.is-leaving-right {
  opacity: 0;
  transform: translateX(18px);
}

.project-visual {
  min-width: 0;
  width: 100%;
}

.project-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8.7;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(35, 217, 255, 0.04), rgba(140, 123, 255, 0.04)),
    #090f17;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.project-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.01) 0,
      rgba(255, 255, 255, 0.01) 1px,
      transparent 2px,
      transparent 4px
    );
  opacity: 0.18;
}

.project-image {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-image.is-loaded {
  display: block;
}

.image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  background:
    linear-gradient(rgba(111, 247, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 247, 255, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
}

.image-placeholder[hidden] {
  display: none;
}

.image-placeholder strong {
  font-family: "Orbitron", "IBM Plex Mono", monospace;
  font-size: clamp(30px, 4.5vw, 72px);
  line-height: 0.95;
  color: var(--cyan-strong);
  text-transform: uppercase;
}

.placeholder-code,
.image-placeholder span:last-child {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.visual-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  color: #9fd3da;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-copy {
  min-width: 0;
  margin-top: clamp(26px, 3vw, 42px);
}

.project-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.project-kicker {
  margin-bottom: 12px;
  color: #a4d8de;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Orbitron", "IBM Plex Mono", monospace;
  font-size: clamp(34px, 4.6vw, 76px);
  line-height: 0.95;
  color: var(--cyan-strong);
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.project-status-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-summary {
  margin: 22px 0 0;
  color: #d4e5e9;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.72;
}

.project-columns {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(28px, 4vw, 64px);
  margin-top: 30px;
  align-items: start;
}

.project-highlights {
  min-width: 0;
}

.project-description {
  min-width: 0;
}

.info-block {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.info-label {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.info-block p {
  margin: 0;
  color: #c2d5da;
  font-size: 14px;
  line-height: 1.72;
}

.highlight-list {
  display: grid;
  gap: 8px;
}

.highlight-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(23, 56, 69, 0.65);
}

.highlight-row span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.highlight-row strong {
  color: #e5f4f7;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tech-tag {
  padding: 6px 8px;
  border: 1px solid var(--line);
  color: #bffbff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.action-link {
  display: inline-block;
  padding: 11px 13px;
  border: 1px solid var(--line);
  color: #bffbff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.action-link:hover,
.action-link:focus-visible {
  background:
    linear-gradient(90deg, rgba(35, 217, 255, 0.08), rgba(140, 123, 255, 0.05));
  color: #fff;
  transform: translateY(-2px);
  outline: none;
}

.action-link.is-disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.carousel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 28px 58px 0;
}

.carousel-dots {
  display: flex;
  gap: 9px;
}

.carousel-dot {
  width: 28px;
  height: 3px;
  padding: 0;
  border: 0;
  background: #24414a;
  cursor: pointer;
  transition:
    width 0.18s ease,
    background 0.18s ease;
}

.carousel-dot.is-active {
  width: 46px;
  background: var(--cyan);
}

.carousel-help {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .project-columns {
    grid-template-columns: minmax(200px, 0.38fr) minmax(0, 0.62fr);
    gap: 34px;
  }

  .carousel-stage {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 14px;
  }

  .carousel-control {
    width: 38px;
    height: 58px;
  }
}

@media (max-width: 820px) {
  .projects-page {
    padding-inline: 18px;
  }

  .project-columns {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .project-highlights {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
    gap: 18px 24px;
  }

  .project-highlights .project-actions {
    grid-column: 1 / -1;
  }

  .project-description {
    order: 2;
  }

  .carousel-stage {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 10px;
  }

  .carousel-control {
    width: 34px;
    height: 54px;
  }

  .project-screen {
    aspect-ratio: 16 / 9.2;
  }
}

@media (max-width: 640px) {
  .projects-page {
    padding: 18px 12px 28px;
  }

  .projects-topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .projects-status {
    text-align: right;
    font-size: 9px;
  }

  .carousel {
    padding-top: 24px;
  }

  .carousel-stage {
    grid-template-columns: 1fr;
  }

  .carousel-control {
    position: fixed;
    z-index: 10;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(7, 11, 18, 0.9);
    backdrop-filter: blur(12px);
  }

  .carousel-control--prev {
    left: 16px;
  }

  .carousel-control--next {
    right: 16px;
  }

  .project-screen {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
  }

  .visual-meta {
    flex-direction: column;
    gap: 4px;
  }

  .project-heading-row {
    display: grid;
    gap: 14px;
    padding-bottom: 18px;
  }

  h1 {
    font-size: clamp(32px, 11vw, 54px);
  }

  .project-status-pill {
    justify-self: start;
  }

  .project-summary {
    font-size: 15px;
  }

  .project-highlights {
    display: block;
  }

  .project-highlights .info-block + .info-block {
    margin-top: 18px;
  }

  .project-actions {
    margin-top: 18px;
  }

  .action-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .carousel-footer {
    margin: 24px 0 64px;
    align-items: flex-start;
    flex-direction: column;
  }

  .carousel-help {
    line-height: 1.6;
  }
}

@media (orientation: landscape) and (max-height: 650px) {
  .projects-page {
    padding: 14px 18px 24px;
  }

  .projects-topbar {
    padding-bottom: 10px;
  }

  .carousel {
    padding-top: 18px;
  }

  .project-screen {
    aspect-ratio: 16 / 7.6;
    max-height: 68vh;
  }

  .project-copy {
    margin-top: 22px;
  }

  .project-heading-row {
    padding-bottom: 16px;
  }

  h1 {
    font-size: clamp(30px, 4vw, 56px);
  }

  .project-summary {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.6;
  }

  .project-columns {
    margin-top: 22px;
  }

  .carousel-footer {
    margin-top: 20px;
  }
}

@media (orientation: landscape) and (max-width: 900px) and (max-height: 520px) {
  .projects-page {
    padding-inline: 12px;
  }

  .carousel-stage {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 8px;
  }

  .carousel-control {
    position: sticky;
    bottom: auto;
    width: 32px;
    height: 48px;
    border-radius: 8px;
  }

  .project-screen {
    aspect-ratio: 16 / 6.8;
    max-height: 62vh;
  }

  .project-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .project-highlights .project-actions {
    grid-column: 1 / -1;
  }

  .carousel-footer {
    margin-inline: 42px;
    margin-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


.language-switch {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(111, 247, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 11, 18, 0.78);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lang-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
}

.lang-button:hover,
.lang-button:focus-visible {
  color: var(--cyan-strong);
  outline: none;
}

.lang-button.is-active {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(111, 247, 255, 0.28);
}

@media (max-width: 640px) {
  .language-switch {
    top: 12px;
    right: 12px;
  }
}


.language-switch {
  min-width: 74px;
  justify-content: center;
}


@media (max-width: 700px) {
  .projects-topbar {
    padding-right: 82px;
  }

  .projects-status {
    margin-right: 0;
    max-width: 52%;
    font-size: 9px;
    line-height: 1.45;
  }

  .language-switch {
    top: 12px;
    right: 12px;
  }
}


@media (max-width: 460px) {
  .projects-topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-right: 82px;
  }

  .projects-status {
    max-width: 100%;
    text-align: left;
  }
}


/* ==========================================================================
   Theme controls
   ========================================================================== */

:root {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="light"] body,
html[data-theme="light"] .terminal-shell,
html[data-theme="light"] .projects-page,
html[data-theme="light"] .contact-page {
  --bg: #eef4f6;
  --panel: #ffffff;
  --panel-2: #f6fafb;
  --cyan: #006f7b;
  --cyan-strong: #07343b;
  --muted: #4f7177;
  --line: #b8cdd1;
  --accent: #5c54d6;
  --text: #13272b;
}

html[data-theme="light"] .terminal-shell,
html[data-theme="light"] .projects-page,
html[data-theme="light"] .contact-page {
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 111, 123, 0.08), transparent 28%),
    radial-gradient(circle at 82% 74%, rgba(92, 84, 214, 0.07), transparent 30%),
    linear-gradient(180deg, #f7fbfc 0%, #edf4f6 100%);
}

html[data-theme="light"] .terminal-shell::before,
html[data-theme="light"] .projects-page::before,
html[data-theme="light"] .contact-page::before {
  opacity: 0.06;
}

html[data-theme="light"] .terminal-shell::after {
  box-shadow:
    inset 0 0 80px rgba(0, 35, 42, 0.06),
    inset 0 0 28px rgba(0, 111, 123, 0.03);
}

html[data-theme="light"] .projects-panel,
html[data-theme="light"] .contact-form-panel,
html[data-theme="light"] .project-screen,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .terminal-link,
html[data-theme="light"] .language-switch,
html[data-theme="light"] .theme-switch {
  background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .project-summary,
html[data-theme="light"] .info-block p,
html[data-theme="light"] .intro-copy,
html[data-theme="light"] .contact-card-value,
html[data-theme="light"] .form-field input,
html[data-theme="light"] .form-field textarea {
  color: #29454b;
}

html[data-theme="light"] .form-field input,
html[data-theme="light"] .form-field textarea {
  background: #ffffff;
}

html[data-theme="light"] .image-placeholder {
  background:
    linear-gradient(rgba(0, 111, 123, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 111, 123, 0.035) 1px, transparent 1px),
    #f7fbfc;
  background-size: 34px 34px;
}

.theme-switch {
  position: fixed;
  top: 18px;
  right: 112px;
  z-index: 100;
}

.theme-button {
  min-height: 32px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(111, 247, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 11, 18, 0.78);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.theme-button:hover,
.theme-button:focus-visible {
  color: var(--cyan-strong);
  border-color: rgba(111, 247, 255, 0.52);
  outline: none;
}

.theme-icon {
  color: var(--cyan);
  font-size: 12px;
}

html[data-theme="light"] .theme-button {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 111, 123, 0.24);
  color: #4f7177;
}

@media (max-width: 700px) {
  .theme-switch {
    top: 12px;
    right: 98px;
  }

  .theme-label {
    display: none;
  }

  .theme-button {
    width: 34px;
    min-width: 34px;
    justify-content: center;
    padding-inline: 0;
  }
}


html[data-theme="light"] .terminal-link,
html[data-theme="light"] .about-action,
html[data-theme="light"] .action-link,
html[data-theme="light"] .copy-button,
html[data-theme="light"] .send-button,
html[data-theme="light"] .theme-button,
html[data-theme="light"] .lang-button,
html[data-theme="light"] .back-link {
  color: #17383e;
}

html[data-theme="light"] .terminal-link::before,
html[data-theme="light"] .theme-icon,
html[data-theme="light"] .lang-button.is-active,
html[data-theme="light"] .about-action--primary,
html[data-theme="light"] .action-link {
  color: #005f69;
}

html[data-theme="light"] .terminal-link:hover,
html[data-theme="light"] .terminal-link:focus-visible,
html[data-theme="light"] .about-action:hover,
html[data-theme="light"] .about-action:focus-visible,
html[data-theme="light"] .action-link:hover,
html[data-theme="light"] .action-link:focus-visible,
html[data-theme="light"] .copy-button:hover,
html[data-theme="light"] .copy-button:focus-visible,
html[data-theme="light"] .theme-button:hover,
html[data-theme="light"] .theme-button:focus-visible,
html[data-theme="light"] .lang-button:hover,
html[data-theme="light"] .lang-button:focus-visible {
  color: #072f35;
}


/* Keep top-right controls isolated from header status text */
.projects-topbar {
  position: relative;
  padding-right: 210px;
}

.projects-status {
  margin-right: 0;
  max-width: calc(100% - 220px);
}

.theme-switch {
  top: 18px;
  right: 112px;
}

.language-switch {
  top: 18px;
  right: 22px;
}

@media (max-width: 820px) {
  .projects-topbar {
    padding-right: 180px;
  }

  .projects-status {
    max-width: 100%;
    margin-right: 0;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .projects-topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 52px;
    padding-right: 0;
  }

  .projects-status {
    max-width: 100%;
    text-align: left;
  }

  .theme-switch {
    top: 12px;
    right: 98px;
  }

  .language-switch {
    top: 12px;
    right: 12px;
  }
}


/* ==========================================================================
   Global top-right controls: professional links + theme + language
   ========================================================================== */

.global-links {
  position: fixed;
  top: 18px;
  right: 202px;
  z-index: 101;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.global-link {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(111, 247, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 11, 18, 0.78);
  backdrop-filter: blur(10px);
  color: var(--muted);
  text-decoration: none;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.global-link:hover,
.global-link:focus-visible {
  color: var(--cyan-strong);
  border-color: rgba(111, 247, 255, 0.52);
  background: rgba(111, 247, 255, 0.07);
  transform: translateY(-1px);
  outline: none;
}

html[data-theme="light"] .global-link {
  color: #23474e;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 95, 105, 0.22);
}

html[data-theme="light"] .global-link:hover,
html[data-theme="light"] .global-link:focus-visible {
  color: #06373e;
  border-color: rgba(0, 95, 105, 0.46);
  background: rgba(0, 95, 105, 0.055);
}

@media (max-width: 760px) {
  .global-links {
    top: 12px;
    right: 174px;
    gap: 4px;
  }

  .global-link {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 560px) {
  .global-links {
    position: static;
    margin-left: auto;
    margin-bottom: 8px;
  }
}


@media (min-width: 561px) {
  .projects-topbar,
  .contact-topbar,
  .about-topbar {
    padding-right: 320px;
  }

  .projects-status,
  .contact-status,
  .about-status {
    max-width: calc(100% - 320px);
  }
}


@media (max-width: 560px) {
  .theme-switch,
  .language-switch {
    position: fixed;
  }

  .global-links {
    position: fixed;
    top: 12px;
    left: 12px;
    right: auto;
    margin: 0;
  }

  .projects-topbar,
  .contact-topbar,
  .about-topbar {
    padding-top: 54px;
    padding-right: 0;
  }

  .projects-status,
  .contact-status,
  .about-status {
    max-width: 100%;
  }
}


/* Refined external-link icon buttons */
.global-link {
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.015),
    0 8px 20px rgba(0,0,0,0.12);
}

.global-link__icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.global-link__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.global-link:hover .global-link__icon,
.global-link:focus-visible .global-link__icon {
  transform: scale(1.05);
}

.global-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 16px rgba(111,247,255,0.05);
  pointer-events: none;
}

html[data-theme="light"] .global-link::after {
  box-shadow: inset 0 0 14px rgba(0,95,105,0.035);
}


/* ==========================================================================
   2026-10 portfolio refinement
   ========================================================================== */
.project-heading-row {
  margin-bottom: clamp(22px, 3vw, 34px);
  padding-bottom: 20px;
}

.project-copy {
  margin-top: clamp(28px, 3.2vw, 44px);
}

.project-summary,
.info-block p {
  min-height: 1.72em;
}

.project-summary.is-typing::after,
.info-block p.is-typing::after {
  content: "_";
  display: inline-block;
  margin-left: 0.12em;
  color: var(--cyan);
  animation: project-caret 0.7s steps(1, end) infinite;
}

@keyframes project-caret {
  50% { opacity: 0; }
}

html[data-theme="light"] .project-kicker,
html[data-theme="light"] .visual-meta,
html[data-theme="light"] .highlight-row span,
html[data-theme="light"] .carousel-help,
html[data-theme="light"] .projects-status,
html[data-theme="light"] .back-link {
  color: #35575d;
}

html[data-theme="light"] .project-summary,
html[data-theme="light"] .info-block p,
html[data-theme="light"] .highlight-row strong {
  color: #17383e;
}

html[data-theme="light"] .tech-tag {
  color: #153b42;
  border-color: rgba(0, 95, 105, 0.28);
  background: rgba(0, 95, 105, 0.035);
}

html[data-theme="light"] .action-link:not(.is-disabled) {
  color: #f6fbfc;
  border-color: #0b5059;
  background: #0b5059;
}

html[data-theme="light"] .action-link:not(.is-disabled):hover,
html[data-theme="light"] .action-link:not(.is-disabled):focus-visible {
  color: #ffffff;
  background: #073a42;
  border-color: #073a42;
}

html[data-theme="light"] .carousel-control {
  color: #f6fbfc;
  border-color: #174e57;
  background: #174e57;
}

html[data-theme="light"] .carousel-control:hover,
html[data-theme="light"] .carousel-control:focus-visible {
  color: #ffffff;
  background: #0d3b43;
  border-color: #0d3b43;
}

@media (prefers-reduced-motion: reduce) {
  .project-summary.is-typing::after,
  .info-block p.is-typing::after {
    animation: none;
    display: none;
  }
}


/* Visible CV download control */
.global-link--cv {
  width: auto;
  min-width: 58px;
  padding-inline: 9px;
  gap: 6px;
}
.global-link--cv .global-link__icon {
  width: 14px;
  height: 14px;
}
.global-link__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
}
@media (max-width: 560px) {
  .global-link--cv { min-width: 52px; padding-inline: 7px; }
}
