/* ==================================================
   HOMEPAGE COMPONENTS AND VISUAL EFFECTS
   Tailwind handles layout and viewport breakpoints; CSS handles component design and internal padding.
   ================================================== */

.hero-title {
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.hero-frame {
  border-radius: 0.375rem;
  border-width: 1px;
}

.hero-copy {
  line-height: 1.25;
  letter-spacing: -0.025em;
  filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.35));
}

.hero-eyebrow {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
}

.hero-location-name {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  text-transform: uppercase;
}

.hero-availability {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
}

.hero-role {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

.skill-copy {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.skill-card {
  padding: 1.5rem;
  border-radius: 0.375rem;
  border-width: 1px;
}

.skill-image {
  opacity: 1;
  transition-property:
    color,
    background-color,
    border-color,
    text-decoration-color,
    fill,
    stroke,
    opacity,
    box-shadow,
    transform,
    filter,
    backdrop-filter,
    -webkit-text-decoration-color,
    -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.skill-label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.about-paragraph {
  line-height: 1.625;
  font-size: 1rem;
}

.about-link {
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  border-width: 1px;

  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  transition-property:
    color,
    background-color,
    border-color,
    text-decoration-color,
    fill,
    stroke,
    opacity,
    box-shadow,
    transform,
    filter,
    backdrop-filter,
    -webkit-text-decoration-color,
    -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.about-surface {
  border-radius: 0.375rem;
  border-width: 1px;
}

.about-caption {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.project-all-link {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.project-card {
  border-radius: 0.375rem;
  border-width: 1px;
}

.project-image {
  transition-property:
    color,
    background-color,
    border-color,
    text-decoration-color,
    fill,
    stroke,
    opacity,
    box-shadow,
    transform,
    filter,
    backdrop-filter,
    -webkit-text-decoration-color,
    -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 500ms;
}

.group:hover .project-image {
  transform: scale(1.02);
}

.project-title-link {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  transition-property:
    color,
    background-color,
    border-color,
    text-decoration-color,
    fill,
    stroke,
    opacity,
    box-shadow,
    transform,
    filter,
    backdrop-filter,
    -webkit-text-decoration-color,
    -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.project-copy {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.project-case-link {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.project-case-link:hover {
  opacity: 0.8;
}

.case-preview-frame {
  border-radius: 0.375rem;
  border-width: 1px;
}

.case-preview-image {
  transition-property:
    color,
    background-color,
    border-color,
    text-decoration-color,
    fill,
    stroke,
    opacity,
    box-shadow,
    transform,
    filter,
    backdrop-filter,
    -webkit-text-decoration-color,
    -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 500ms;
}

.group:hover .case-preview-image {
  transform: scale(1.05);
}

.case-preview-card-heading {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.case-preview-copy {
  line-height: 1.625;
}

.case-preview-action {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.case-preview-action:hover {
  opacity: 0.8;
}

.case-preview-surface {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* ==================================================
   EXISTING THEME RULES AND INTERACTIONS
   These follow component defaults to preserve the cascade.
   ================================================== */

@property --captured-length {
  syntax: "<length>";
  initial-value: 0px;
  inherits: true;
}

@property --captured-length2 {
  syntax: "<length>";
  initial-value: 0px;
  inherits: true;
}

.text-fit {
  /* Support sentinel: 9999px when custom property is not registered, 0px when it is */
  --captured-length: initial;
  --support-sentinel: var(--captured-length, 9999px);
}

.text-fit > :not([aria-hidden]) {
  /* Capture the container's inline size as a custom property */
  --captured-length: 100cqi;
  --available-space: var(--captured-length);
}

.text-fit > :not([aria-hidden]) > * {
  --support-sentinel: inherit;
  --captured-length: 100cqi;

  /* Calculate the ratio: available space / (available space - captured length)
       * Using tan(atan2()) to calculate the scaling ratio
       */
  --ratio: tan(
    atan2(
      var(--available-space),
      var(--available-space) - var(--captured-length)
    )
  );

  /* Calculate font size with min and max bounds */
  --font-size: clamp(
    1em,
    1em * var(--ratio),
    var(--max-font-size, infinity * 1px) - var(--support-sentinel)
  );
}

.text-fit > :not([aria-hidden]) > *:not(.text-fit) {
  font-size: var(--font-size);

  /* Prevent text wrapping when container has width */
  @container (inline-size > 0) {
    white-space: nowrap;
  }
}

.text-fit > :not([aria-hidden]) > *.text-fit {
  --captured-length2: var(--font-size);
  font-variation-settings: "opsz" tan(atan2(var(--captured-length2), 1px));
}

#skills {
  background-color: var(--color-navy-raised);
  color: var(--color-text-inverse);
  border-top: 1px solid rgba(203, 208, 215, 0.12);
}

#skills h2 {
  color: var(--color-text-inverse);
}

#skills .theme-muted {
  color: var(--color-text-inverse-muted);
}

#skills .skill-icon {
  background-color: var(--color-navy-card);
  border-color: var(--color-border-dark);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

#skills .skill-icon span {
  color: var(--color-text-inverse);
}

#skills .skill-icon img {
  filter: none;
}

#skills .skill-icon:hover {
  background-color: #292c3b;
  transform: translateY(-3px);
}

#skills .skill-icon-react:hover {
  border-color: #61dafb66;
}

#skills .skill-icon-react:hover img {
  content: url("https://cdn.simpleicons.org/react/61DAFB");
}

#skills .skill-icon-typescript:hover {
  border-color: #3178c666;
}

#skills .skill-icon-typescript:hover img {
  content: url("https://cdn.simpleicons.org/typescript/3178C6");
}

#skills .skill-icon-js:hover {
  border-color: #f7df1e66;
}

#skills .skill-icon-js:hover img {
  content: url("https://cdn.simpleicons.org/javascript/F7DF1E");
}

#skills .skill-icon-html5:hover {
  border-color: #e34f2666;
}

#skills .skill-icon-html5:hover img {
  content: url("https://cdn.simpleicons.org/html5/E34F26");
}

#skills .skill-icon-css:hover {
  border-color: #1572b666;
}

#skills .skill-icon-css:hover img {
  content: url("https://cdn.simpleicons.org/css/1572B6");
}

#skills .skill-icon-git:hover {
  border-color: #f0503266;
}

#skills .skill-icon-git:hover img {
  content: url("https://cdn.simpleicons.org/git/F05032");
}

#skills .skill-icon-github:hover {
  border-color: #ffffff66;
}

#skills .skill-icon-github:hover img {
  content: url("https://cdn.simpleicons.org/github/FFFFFF");
}

#skills .skill-icon-vite:hover {
  border-color: #646cff66;
}

#skills .skill-icon-vite:hover img {
  content: url("https://cdn.simpleicons.org/vite/646CFF");
}

.theme-dark-section .skill-icon img {
  filter: brightness(0) invert(1);
}

.theme-dark-section .skill-icon:hover {
  border-color: var(--color-accent-hover);
}

.project-sabor-cover {
  background-color: var(--color-sabor-cream);
}

@media (prefers-reduced-motion: reduce) {
  .skill-icon,
  .skill-icon img {
    transition: none;
  }
  .skill-icon:hover {
    transform: none;
  }
}

.editorial-header,
.editorial-hero {
  --section-text: var(--color-text-inverse);
  --section-text-muted: var(--color-text-inverse-muted);
  --section-surface: var(--color-navy-raised);
  --section-surface-hover: var(--color-navy-raised);
  --section-border: var(--color-border-dark);
  --section-accent: var(--color-accent-hover);
  background-color: var(--color-navy-deep);
  color: var(--color-text-inverse);
}

.editorial-hero .editorial-portrait {
  border-radius: 10px;
  border-color: var(--color-border-dark);
  background-color: var(--color-navy-deep);
}

.editorial-portrait > img {
  filter: brightness(0.95) saturate(0.9);
}

.editorial-portrait-shade {
  background:
    linear-gradient(
      to top,
      var(--color-navy) 0%,
      rgba(26, 27, 41, 0.85) 10%,
      rgba(26, 27, 41, 0.25) 30%,
      transparent 55%
    ),
    linear-gradient(
      to right,
      rgba(26, 27, 41, 0.48),
      transparent 22%,
      transparent 78%,
      rgba(26, 27, 41, 0.48)
    ),
    linear-gradient(rgba(26, 27, 41, 0.035), rgba(26, 27, 41, 0.035));
}

.editorial-portrait .theme-image-text {
  text-shadow: none;
  filter: none;
}

.editorial-portrait .editorial-availability,
.editorial-portrait p > span:first-child {
  color: var(--color-text-inverse-muted);
}

.editorial-availability::before {
  content: "";

  border-radius: 50%;
  background-color: var(--color-status);
}

#projects {
  --section-accent: var(--color-accent-hover);
  background-color: var(--color-navy-raised);
  color: var(--color-text-inverse);
}

#projects > div > div:first-child .theme-body,
#projects > div > div:first-child .theme-muted {
  color: var(--color-text-inverse-muted);
}

#projects article {
  --section-text: var(--color-text-inverse);
  --section-text-muted: var(--color-text-inverse-muted);
  --section-surface: var(--color-navy-card);
  --section-border: var(--color-border-dark);
  --section-accent: var(--color-accent-hover);
  background-color: var(--color-navy-card);
  color: var(--color-text-inverse);
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    transform 200ms ease;
}

#projects article:hover {
  background-color: #292c3b;
  border-color: var(--color-accent);
  transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
  #projects article {
    transition: none;
  }
  #projects article:hover {
    transform: none;
  }
}

#case-studies {
  background-color: var(--color-canvas);
}

.editorial-header {
  background-color: var(--color-navy);
}

#about {
  background-color: var(--color-canvas);
  color: var(--color-text);
}

#about h2 {
  color: var(--color-text);
}

#about p.theme-body {
  color: #3f4858;
}

#about .theme-muted {
  color: var(--color-text-muted);
}

#about .theme-border {
  border-color: var(--color-border);
}

/* Component appearance and internal padding; sizing and alignment stay in HTML. */
.project-card-body {
  padding: 1.25rem;
}
