﻿/* Color themes, components, and responsive refinements. */
:root {
  --paper: #f4f7f9;
  --ink: #182c3d;
  --muted: #536878;
  --green: #087865;
  --line: #cbd9df;
  --accent: #bce9da;
  --surface: #ffffff;
  --soft: #e7eff2;
  --grid: rgba(39,113,132,.07);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #0b1420;
  --ink: #e7f0f7;
  --muted: #a2b6c7;
  --green: #68e1bc;
  --line: #293b4c;
  --accent: #1d5148;
  --surface: #111f2e;
  --soft: #172b39;
  --grid: rgba(115,199,218,.07);
  color-scheme: dark;
}

body {
  background: radial-gradient(ellipse at 90% 10%,var(--soft),transparent 45%),var(--paper);
}

header {
  gap: 24px;
  position: relative;
  z-index: 3;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

nav {
  gap: 22px;
}

.theme-toggle {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--green);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--green);
}

.theme-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

a: focus-visible,button:focus-visible,summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 5px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  gap: 40px;
}

.hero>div:not(.market-background) {
  z-index: 1;
  min-width: 0;
}

.market-background {
  position: absolute;
  inset: 25px -4% 25px 25%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg,transparent,#000 25%,#000 78%,transparent),
    linear-gradient(transparent,#000 18%,#000 82%,transparent);
  mask-composite: intersect;
}

.market-background svg {
  width: 100%;
  height: 100%;
  fill: none;
  color: var(--green);
}

.hero-candle-series {
  stroke: currentColor;
  opacity: .21;
}

.hero-trend-line,.hero-trend-glow {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-trend-line {
  stroke-width: 2.5;
  opacity: .38;
}

.hero-trend-glow {
  stroke-width: 8;
  opacity: 0;
}

@media(prefers-reduced-motion:no-preference) {
  .hero-candle-series {
    animation: reveal-hero-candles 2.4s ease-out both;
  }

  .hero-trend-line {
    stroke-dasharray: 100;
    animation: draw-hero-trend 2.4s ease-out both;
  }

  .hero-trend-glow {
    opacity: .85;
    stroke-dasharray: 12 100;
    animation: sweep-hero-glow 2.4s ease-out both;
  }
}

.eyebrow {
  color: var(--green);
}

h1 {
  font-size: clamp(44px,5.5vw,72px);
  letter-spacing: -3.7px;
}

.intro-copy {
  color: var(--muted);
}

.button {
  background: var(--green);
  color: var(--paper);
}

.portrait {
  background: var(--soft);
  border-color: var(--surface);
  outline-color: var(--line);
  box-shadow: 0 25px 80px #08786515;
}

.portrait svg {
  fill: var(--muted);
  opacity: .4;
}

.portrait-note {
  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 11px;
}

.small-note {
  margin-top: 25px;
}

.project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s,border-color .2s;
}

.project:hover {
  transform: translateY(-5px);
  border-color: var(--green);
}

.project-art {
  border-radius: 0;
  height: 210px;
  background: var(--soft);
  padding: 25px;
}

.project-meta {
  padding: 0 22px;
}

.project-meta h3 {
  font-size: 17px;
}

.project>p {
  padding: 0 22px;
}

.project .tag {
  margin: 16px 22px 22px;
  color: var(--green);
  border-color: var(--line);
}

.art-label {
  font: 11px monospace;
  letter-spacing: 2px;
  color: var(--muted);
  position: absolute;
  top: 20px;
  left: 22px;
}

.project-art svg {
  width: 100%;
  height: 130px;
  color: var(--green);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.idea-details {
  margin: 0 22px 23px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.idea-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
}

.idea-details p {
  font-size: 12px;
  margin: 10px 0;
}

.idea-details strong {
  color: var(--ink);
}

.skill-icon,.project-meta span {
  color: var(--green);
}

.pill {
  border-color: var(--line);
  background: var(--surface);
}

.menu {
  color: var(--ink);
}

.contact .arrow {
  color: var(--green);
}

.contact-links span {
  line-height: 1.7;
}

.section-label {
  color: var(--muted);
}

@keyframes reveal-hero-candles {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

@keyframes draw-hero-trend {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

@keyframes sweep-hero-glow {
  from { stroke-dashoffset: 12; }
  92% { opacity: .85; }
  to { stroke-dashoffset: -100; opacity: 0; }
}

@media(max-width:1050px) {
  header {
    gap: 15px;
  }

  nav {
    gap: 14px;
    font-size: 12px;
  }

  .brand {
    white-space: nowrap;
  }

  .hero {
    gap: 25px;
  }

  .portrait {
    width: 280px;
  }

  .portrait-note {
    right: 0;
  }

}

@media(max-width:800px) {
  .header-tools {
    margin-left: auto;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .hero {
    min-height: auto;
  }

  .market-background {
    inset: 20px -3%;
  }

  h1 {
    font-size: clamp(39px,8vw,60px);
    letter-spacing: -2.2px;
  }

  .portrait-note {
    right: 5%;
  }

  .project-art {
    height: 230px;
  }

  .actions {
    flex-wrap: wrap;
    gap: 15px;
  }

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

  .section-top {
    flex-direction: column;
  }

  .section-top>p {
    max-width: 100%;
  }

  .contact-top {
    gap: 10px;
  }

  .contact .arrow {
    font-size: 45px;
  }

}

@media(prefers-reduced-motion:reduce) {
  .project {
    transition: none;
  }

  .project:hover {
    transform: none;
  }

}

#skills>.skills-ai-background {
  container-type: inline-size;
}

.skills-ai-track {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  width: max-content;
  transform: translateY(-50%);
  animation: skills-ai-seamless 24s linear infinite;
  will-change: transform;
}

.skills-ai-group {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 30px;
  flex: 0 0 auto;
  width: 100cqw;
  padding: 0 30px;
}

.skills-ai-group svg {
  width: clamp(100px,18vw,200px);
  height: auto;
  flex: none;
}

.skills-ai-group span {
  font-family: Manrope,sans-serif;
  font-size: clamp(65px,9vw,125px);
  font-weight: 800;
  letter-spacing: -5px;
  white-space: nowrap;
}

@keyframes skills-ai-seamless {
  from {
    transform: translate(-50%,-50%);
  }

  to {
    transform: translate(0,-50%);
  }

}

@media(max-width:800px) {
  .skills-ai-group {
    gap: 16px;
    padding: 0 12px;
  }

  .skills-ai-group svg {
    width: clamp(65px,20vw,120px);
  }

  .skills-ai-group span {
    font-size: clamp(48px,12vw,80px);
    letter-spacing: -3px;
  }

}

@media(prefers-reduced-motion:reduce) {
  .skills-ai-track {
    animation: none;
    will-change: auto;
  }

}

.skills-ai-track {
  animation-direction: normal;
}

.languages-heading {
  font-size: 14px;
  font-weight: 500;
  margin: 28px 0 14px;
}

.contact-links a:hover {
  color: var(--green);
  border-color: var(--green);
}

.contact-links {
  overflow-wrap: anywhere;
}

.skills-logo-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
}

.skill-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 112px;
  padding: 18px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb,var(--surface) 72%,transparent);
}

.skill-logo :is(img,svg) {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.skill-logo span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

.skills-context {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 20px 0 0;
}

[data-theme="dark"] .skill-logo img[src$="bash.svg"] {
  filter: brightness(1.8);
}

@media(max-width:480px) {
  .skills-logo-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
  }

  .skill-logo {
    min-height: 100px;
  }

}

.experience-columns {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.15fr);
  gap: 44px;
  align-items: start;
  margin-top: 36px;
}

.experience-columns>.timeline {
  width: 100%;
  margin: 0;
  min-width: 0;
}

.internship-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.internship-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.internship-status {
  font-size: 11px;
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 10px;
}

.internship-card h3 {
  font-family: Manrope,sans-serif;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -.7px;
  font-weight: 600;
  margin: 23px 0 8px;
}

.internship-company {
  color: var(--green);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.internship-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.internship-card ul {
  margin: 24px 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.internship-card li+li {
  margin-top: 9px;
}

.internship-card li::marker {
  color: var(--green);
}

.internship-card .pill {
  font-size: 11px;
  padding: 7px 11px;
}

.experience-columns .timeline-item {
  grid-template-columns: 90px minmax(0,1fr);
  gap: 18px;
}

@media(max-width:800px) {
  .experience-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .internship-card {
    padding: 23px;
  }

  .experience-columns .timeline-item {
    grid-template-columns: 85px minmax(0,1fr);
    gap: 15px;
  }

}

.skills-extra {
  margin-top: 30px;
}

.skills-extra>h3 {
  font-family: Manrope,sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: -.3px;
}

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

.skills-extra-group h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink);
}

.skills-extra-group h4 span {
  color: var(--green);
  font-size: 17px;
}

.skills-extra-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.skills-extra-group li {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  padding-left: 12px;
  position: relative;
}

.skills-extra-group li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .7em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

@media(max-width:520px) {
  .skills-extra-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .skills-extra-group ul {
    gap: 6px;
  }

}

.contact-trigger {
  cursor: pointer;
  background: none;
  color: var(--ink);
}

.header-contact {
  white-space: nowrap;
  font-size: 12px;
  margin-right: 8px;
}

header nav {
  margin-left: auto;
}

.header-tools {
  margin-left: 0;
}

.text-link.contact-trigger {
  border: 0;
  border-bottom: 1px solid var(--ink);
  font-weight: 600;
  font-size: 13px;
}

.contact .contact-trigger.arrow {
  border: 0;
  padding: 0;
}

.dialog-open {
  overflow: hidden;
}

.contact-dialog {
  width: min(560px,calc(100% - 32px));
  max-height: 90dvh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 100px #0004;
  overflow-y: auto;
}

.contact-dialog::backdrop {
  background: #07131cb3;
  backdrop-filter: blur(7px);
}

.dialog-content {
  padding: 30px;
}

.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.dialog-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font-size: 25px;
  cursor: pointer;
}

.contact-dialog h2 {
  font-size: 32px;
  margin-top: 12px;
}

#contact-dialog-description {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0 24px;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

#contact-form label {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

#contact-form input:not([type="hidden"]),#contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 14px;
  font: 14px 'DM Sans',sans-serif;
}

#contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

#contact-form input::placeholder,#contact-form textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

#contact-form input:focus-visible,#contact-form textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.form-privacy {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 5px 0;
}

.form-submit {
  border: 0;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  margin-top: 5px;
}

.dialog-alternatives {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 20px;
  display: grid;
  gap: 12px;
}

.dialog-alternatives h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
}

.dialog-alternatives a {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.dialog-alternatives a span {
  color: var(--muted);
}

.dialog-alternatives a:hover {
  color: var(--green);
}

@media(max-width:1050px) and (min-width:801px) {
  header {
    padding-left: 3%;
    padding-right: 3%;
    gap: 10px;
  }

  header nav {
    gap: 10px;
  }

  .header-contact {
    padding: 10px 12px;
    margin: 0;
    font-size: 11px;
  }

  .brand {
    font-size: 18px;
  }

}

@media(max-width:800px) {
  .header-contact {
    margin-left: auto;
    margin-right: 0;
    padding: 9px 12px;
    font-size: 11px;
  }

  .header-tools {
    gap: 8px;
  }

  .dialog-content {
    padding: 22px;
  }

  .contact-dialog h2 {
    font-size: 28px;
  }

}

@media(max-width:430px) {
  header {
    padding-left: 4%;
    padding-right: 4%;
    gap: 8px;
  }

  .brand {
    font-size: 17px;
  }

  .header-contact {
    font-size: 10px;
    padding: 9px;
  }

  .menu {
    font-size: 0;
    padding: 0;
    width: 34px;
    height: 36px;
  }

  .menu::after {
    content: '☰';
    font-size: 18px;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }

}

#contact .footer-bottom {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: end;
  gap: 20px;
  padding-top: 25px;
}

.footer-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: end;
  justify-self: start;
  gap: 14px;
}

#contact .footer-identity>span {
  line-height: 1.8;
}

#contact .footer-bottom .contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-self: end;
  gap: 2px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.footer-email-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  max-width: 100%;
}

#contact .footer-bottom .footer-email-row .footer-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 28px;
  min-height: 28px;
  max-width: 100%;
  padding-bottom: 0;
  border-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
  text-decoration: none;
}

.footer-linkedin svg {
  display: block;
  transition: transform .2s ease;
  transform-origin: center;
}

.footer-linkedin:hover svg,.footer-linkedin:focus-visible svg {
  transform: scale(1.15);
}

#contact .footer-bottom .footer-contact-text {
  color: inherit;
  border: 0;
  padding: 0;
  line-height: 1.8;
  cursor: text;
  text-decoration: none;
}

@media(max-width:600px) {
  #contact .footer-bottom {
    grid-template-columns: auto minmax(0,1fr);
    gap: 22px 12px;
  }

  #contact .footer-bottom .contact-links {
    grid-column: 2;
    grid-row: 1;
  }

  #contact .footer-identity {
    grid-column: 1;
    grid-row: 1;
  }

  .footer-email-row {
    gap: 6px;
  }

}

@media(max-width:480px) {
  .footer-identity {
    font-size: 10px;
  }

  #contact .footer-bottom .contact-links {
    font-size: 11px;
  }

}

@media(prefers-reduced-motion:reduce) {
  .footer-linkedin svg {
    transition: none;
  }

}

.intro-languages {
  margin-top: 26px;
}

.intro-languages h3 {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 12px;
}

.intro-languages ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
}

.intro-languages li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

.intro-languages li span {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 6px;
}

#skills.skills-layout {
  grid-template-columns: minmax(0,1fr);
  gap: 30px;
}

#skills .skills-showcase {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 800px;
  max-width: 1120px;
  margin-inline: auto;
  padding-block: 270px;
}

#skills .skills-logo-grid {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

#skills .skills-logo-grid > li {
  position: absolute;
  top: var(--skills-y);
  left: var(--skills-x);
}

#skills .skill-logo {
  width: min(108px, 9.2%);
  height: 88px;
  min-height: 0;
  translate: -50% -50%;
  gap: 5px;
  padding: 3px 4px;
  background: var(--surface);
  text-align: center;
  pointer-events: auto;
}

#skills .skill-logo :is(img, svg) {
  flex: none;
}

#skills .skill-logo span {
  max-width: 100%;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

#skills .skills-extra {
  width: min(65%, 42rem);
  margin: 0;
}

[data-theme="dark"] .skill-logo img[src$="github.svg"] {
  filter: invert(1);
}

/* Clockwise from the upper-left edge, following the two inward bends. */
#skills .skills-logo-grid > li:nth-child(1) { --skills-x: 9%; --skills-y: 18%; }
#skills .skills-logo-grid > li:nth-child(2) { --skills-x: 18.6%; --skills-y: 13%; }
#skills .skills-logo-grid > li:nth-child(3) { --skills-x: 28%; --skills-y: 7%; }
#skills .skills-logo-grid > li:nth-child(4) { --skills-x: 39%; --skills-y: 17%; }
#skills .skills-logo-grid > li:nth-child(5) { --skills-x: 50%; --skills-y: 29%; }
#skills .skills-logo-grid > li:nth-child(6) { --skills-x: 61%; --skills-y: 25%; }
#skills .skills-logo-grid > li:nth-child(7) { --skills-x: 72%; --skills-y: 15%; }
#skills .skills-logo-grid > li:nth-child(8) { --skills-x: 81.4%; --skills-y: 8%; }
#skills .skills-logo-grid > li:nth-child(9) { --skills-x: 91%; --skills-y: 18%; }
#skills .skills-logo-grid > li:nth-child(10) { --skills-x: 93.5%; --skills-y: 29.5%; }
#skills .skills-logo-grid > li:nth-child(11) { --skills-x: 95%; --skills-y: 41%; }
#skills .skills-logo-grid > li:nth-child(12) { --skills-x: 95%; --skills-y: 52.5%; }
#skills .skills-logo-grid > li:nth-child(13) { --skills-x: 95%; --skills-y: 64%; }
#skills .skills-logo-grid > li:nth-child(14) { --skills-x: 93.5%; --skills-y: 75.5%; }
#skills .skills-logo-grid > li:nth-child(15) { --skills-x: 91%; --skills-y: 87%; }
#skills .skills-logo-grid > li:nth-child(16) { --skills-x: 81.4%; --skills-y: 93%; }
#skills .skills-logo-grid > li:nth-child(17) { --skills-x: 72%; --skills-y: 88%; }
#skills .skills-logo-grid > li:nth-child(18) { --skills-x: 61%; --skills-y: 78%; }
#skills .skills-logo-grid > li:nth-child(19) { --skills-x: 50%; --skills-y: 72%; }
#skills .skills-logo-grid > li:nth-child(20) { --skills-x: 39%; --skills-y: 82%; }
#skills .skills-logo-grid > li:nth-child(21) { --skills-x: 28%; --skills-y: 92%; }
#skills .skills-logo-grid > li:nth-child(22) { --skills-x: 18.6%; --skills-y: 93%; }
#skills .skills-logo-grid > li:nth-child(23) { --skills-x: 9%; --skills-y: 87%; }
#skills .skills-logo-grid > li:nth-child(24) { --skills-x: 6.5%; --skills-y: 75.5%; }
#skills .skills-logo-grid > li:nth-child(25) { --skills-x: 5%; --skills-y: 64%; }
#skills .skills-logo-grid > li:nth-child(26) { --skills-x: 5%; --skills-y: 52.5%; }
#skills .skills-logo-grid > li:nth-child(27) { --skills-x: 5%; --skills-y: 41%; }
#skills .skills-logo-grid > li:nth-child(28) { --skills-x: 6.5%; --skills-y: 29.5%; }

@media (max-width: 1023px) {
  #skills .skill-logo :is(img, svg) {
    width: 38px;
    height: 38px;
  }

  #skills .skill-logo span {
    font-size: 11px;
  }
}

@media (max-width: 760px) {
  #skills .skills-showcase {
    min-height: 765px;
    max-width: 600px;
    padding-block: 210px;
  }

  #skills .skill-logo {
    width: min(88px, calc(25% - 13px));
    height: 70px;
    gap: 3px;
  }

  #skills .skill-logo :is(img, svg) {
    width: 28px;
    height: 28px;
  }

  #skills .skills-extra {
    width: 49%;
    overflow-wrap: anywhere;
  }

  #skills .skills-extra-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  /* Two short staggered rows make each bend legible on a narrow screen. */
  #skills .skills-logo-grid > li:nth-child(1) { --skills-x: 14%; --skills-y: 125px; }
  #skills .skills-logo-grid > li:nth-child(2) { --skills-x: 14%; --skills-y: 44px; }
  #skills .skills-logo-grid > li:nth-child(3) { --skills-x: 38%; --skills-y: 40px; }
  #skills .skills-logo-grid > li:nth-child(4) { --skills-x: 38%; --skills-y: 153px; }
  #skills .skills-logo-grid > li:nth-child(5) { --skills-x: 62%; --skills-y: 165px; }
  #skills .skills-logo-grid > li:nth-child(6) { --skills-x: 62%; --skills-y: 52px; }
  #skills .skills-logo-grid > li:nth-child(7) { --skills-x: 86%; --skills-y: 44px; }
  #skills .skills-logo-grid > li:nth-child(8) { --skills-x: 86%; --skills-y: 125px; }
  #skills .skills-logo-grid > li:nth-child(9) { --skills-x: 87%; --skills-y: calc(125px + (100% - 250px) * 0.1428571); }
  #skills .skills-logo-grid > li:nth-child(10) { --skills-x: 88%; --skills-y: calc(125px + (100% - 250px) * 0.2857143); }
  #skills .skills-logo-grid > li:nth-child(11) { --skills-x: 88.8%; --skills-y: calc(125px + (100% - 250px) * 0.4285714); }
  #skills .skills-logo-grid > li:nth-child(12) { --skills-x: 88.8%; --skills-y: calc(125px + (100% - 250px) * 0.5714286); }
  #skills .skills-logo-grid > li:nth-child(13) { --skills-x: 88%; --skills-y: calc(125px + (100% - 250px) * 0.7142857); }
  #skills .skills-logo-grid > li:nth-child(14) { --skills-x: 87%; --skills-y: calc(125px + (100% - 250px) * 0.8571429); }
  #skills .skills-logo-grid > li:nth-child(15) { --skills-x: 86%; --skills-y: calc(100% - 125px); }
  #skills .skills-logo-grid > li:nth-child(16) { --skills-x: 86%; --skills-y: calc(100% - 44px); }
  #skills .skills-logo-grid > li:nth-child(17) { --skills-x: 62%; --skills-y: calc(100% - 40px); }
  #skills .skills-logo-grid > li:nth-child(18) { --skills-x: 62%; --skills-y: calc(100% - 164px); }
  #skills .skills-logo-grid > li:nth-child(19) { --skills-x: 38%; --skills-y: calc(100% - 168px); }
  #skills .skills-logo-grid > li:nth-child(20) { --skills-x: 38%; --skills-y: calc(100% - 51px); }
  #skills .skills-logo-grid > li:nth-child(21) { --skills-x: 14%; --skills-y: calc(100% - 43px); }
  #skills .skills-logo-grid > li:nth-child(22) { --skills-x: 14%; --skills-y: calc(100% - 125px); }
  #skills .skills-logo-grid > li:nth-child(23) { --skills-x: 13%; --skills-y: calc(125px + (100% - 250px) * 0.8571429); }
  #skills .skills-logo-grid > li:nth-child(24) { --skills-x: 12%; --skills-y: calc(125px + (100% - 250px) * 0.7142857); }
  #skills .skills-logo-grid > li:nth-child(25) { --skills-x: 11.200000000000003%; --skills-y: calc(125px + (100% - 250px) * 0.5714286); }
  #skills .skills-logo-grid > li:nth-child(26) { --skills-x: 11.200000000000003%; --skills-y: calc(125px + (100% - 250px) * 0.4285714); }
  #skills .skills-logo-grid > li:nth-child(27) { --skills-x: 12%; --skills-y: calc(125px + (100% - 250px) * 0.2857143); }
  #skills .skills-logo-grid > li:nth-child(28) { --skills-x: 13%; --skills-y: calc(125px + (100% - 250px) * 0.1428571); }
}

#skills .skills-orbit-running .skill-logo {
  top: 0;
  left: 0;
}

#skills {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

#skills>.skills-ai-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  display: block;
  color: var(--green);
  opacity: .045;
}

[data-theme="dark"] #skills>.skills-ai-background {
  opacity: .055;
}

/* Match the introduction grid in the investing section only. */
.market-candle-background {
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
}


[data-theme="dark"] .skill-logo img[src$="wordpress.svg"] {
  filter: invert(1);
}


.internship-top h3 {
  margin: 0;
}

.internship-top {
  margin-bottom: 16px;
}
/* Contact button interaction, shared with keyboard focus. */
.header-contact {
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.header-contact:hover,
.header-contact:focus-visible {
  transform: translateY(-2px);
  background-color: var(--green);
  border-color: var(--green);
  color: var(--paper);
  box-shadow: 0 5px 16px color-mix(in srgb, var(--green) 18%, transparent);
}

.header-contact:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .header-contact {
    transition: none;
  }

  .header-contact:hover,
  .header-contact:focus-visible,
  .header-contact:active {
    transform: none;
  }
}

.dialog-top .dialog-close {
  margin-left: auto;
}


.project-deck {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  isolation: isolate;
  padding: clamp(24px, 5vw, 58px) 5%;
}

.project-card {
  --offset: 10px;
  --angle: -9deg;
  position: relative;
  display: block;
  width: 124%;
  margin-inline: -12%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--surface);
  border-radius: clamp(6px, 1.5vw, 18px);
  background: var(--soft);
  box-shadow: 0 12px 30px #07131c45;
  cursor: pointer;
  transform: translateY(var(--offset)) rotate(var(--angle));
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.project-card:nth-child(2) { --offset: -14px; --angle: 5deg; }
.project-card:nth-child(3) { --offset: 13px; --angle: -5deg; }
.project-card:nth-child(4) { --offset: -7px; --angle: 9deg; }

.project-card:focus-visible {
  z-index: 1;
  outline: 3px solid var(--green);
  outline-offset: 4px;
  transform: translateY(-18px) scale(1.09);
  box-shadow: 0 20px 36px #07131c65;
}

@media (hover: hover) {
  .project-card:hover {
    z-index: 1;
    transform: translateY(-18px) scale(1.09);
    box-shadow: 0 20px 36px #07131c65;
  }
}

.project-cover {
  --cover-light: #56b5aa;
  --cover-dark: #143747;
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 18% 18%, var(--cover-light), transparent 68%),
    repeating-linear-gradient(130deg, #ffffff12 0 1px, transparent 1px 14px),
    var(--cover-dark);
  object-fit: cover;
}

.project-cover[data-roblox-cover] {
  display: grid;
  align-items: end;
  justify-items: start;
  padding: clamp(8px, 2.5vw, 22px);
  background-image: linear-gradient(0deg, #0d2435de, transparent 80%),
    var(--roblox-cover-image, none),
    radial-gradient(ellipse at 22% 18%, #34897f, transparent 78%);
  background-position: center;
  background-size: cover;
}

.project-cover-title {
  color: #fff;
  font: 800 clamp(.7rem, 2.2vw, 1.5rem)/1.08 Manrope, sans-serif;
  text-align: left;
  text-shadow: 0 1px 5px #0a1a26;
}

.project-cover[data-cover="2"] { --cover-light: #7897d3; --cover-dark: #292a53; }
.project-cover[data-cover="3"] { --cover-light: #d29669; --cover-dark: #573032; }
.project-cover[data-cover="4"] { --cover-light: #81a881; --cover-dark: #243f38; }

.project-preview {
  width: min(760px, calc(100% - 32px));
  max-height: 90dvh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px #07131c80;
}

.project-preview::backdrop {
  background: #07131cb3;
}

body:has(.project-preview[open]) {
  overflow: hidden;
}

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

.project-preview-art img {
  object-fit: contain;
  background: var(--soft);
}

.project-preview-info {
  padding: clamp(16px, 4vw, 28px);
}

.project-description {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.project-links a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
}

.project-links a[aria-disabled="true"] {
  color: var(--muted);
}

.project-preview .project-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
  .project-card { transition: none; }
}
