/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

a {
  background-color: transparent;
}

img {
  border-style: none;
}

[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box;
  padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

[hidden] {
  display: none;
}

/* Base element defaults */
h1,
p {
  margin: 0;
}

html {
  font-family: "Source Code Pro", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e2e8f0;
}

img {
  border-style: solid;
  display: block;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

[role="button"] {
  cursor: pointer;
}

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

/* Design Tokens / Dark Mode Palette */
:root {
  --bg-hero: rgba(0, 0, 0, 0.5);        /* Overlay */
  --bg-section: #0f172a;                /* Slate-900 */
  --bg-card: #1e293b;                   /* Slate-800 */
  --text-primary: #f1f5f9;              /* Slate-100 */
  --text-secondary: #94a3b8;            /* Slate-400 */
  --text-muted: #64748b;                /* Slate-500 */
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
  --footer-height: 0;
}

/* Global Layout & Typography */
html {
  scroll-behavior: smooth;
}

/* Disable scroll snapping on small screens to avoid jumpy/overlapping sections */
@media (max-width: 767px) {
  html {
    scroll-snap-type: none;
  }

  section,
  header.hero {
    scroll-snap-align: none;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Code Pro", monospace;
  line-height: 1.6;
  background-color: var(--bg-section);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--footer-height);
}

main {
  min-height: 100vh;
}

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

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

a:hover {
  color: #e2e8f0;
}

a:focus-visible {
  outline: 2px solid #e2e8f0;
  outline-offset: 3px;
}

section,
header.hero {
  scroll-snap-align: start;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
}

h3 {
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  h3 {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  h3 {
    font-size: 1.75rem;
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-image:
    linear-gradient(var(--bg-hero), var(--bg-hero)),
    url("../img/bg.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero__overlay {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__card {
  width: 100%;
  max-width: 640px;
  padding: 2rem 1.75rem 2.5rem;
  border-radius: 1rem;
  background-color: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  text-align: center;
  backdrop-filter: blur(6px);
}

.hero__portrait {
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
  margin: 0 auto 1.5rem;
  object-fit: cover;
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.hero__specialization {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.hero__social a {
  font-size: 1.5rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.hero__social a:hover,
.hero__social a:focus-visible {
  transform: scale(1.1);
  color: #f97316;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  background-color: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

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

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

.icon--instagram {
  -webkit-mask-image: url("../icons/instagram-square.svg");
  mask-image: url("../icons/instagram-square.svg");
}

.icon--chevron-down {
  -webkit-mask-image: url("../icons/chevron-down.svg");
  mask-image: url("../icons/chevron-down.svg");
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  cursor: pointer;
}

.scroll-indicator__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(15, 23, 42, 0.8);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  animation: bounce 2s infinite;
}

.scroll-indicator__icon .icon {
  font-size: 1rem;
}

.scroll-indicator:hover .scroll-indicator__icon,
.scroll-indicator:focus-visible .scroll-indicator__icon {
  color: var(--text-primary);
  border-color: #e2e8f0;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

/* References Section */
.references {
  background-color: var(--bg-section);
  padding: 3rem 1.5rem 4rem;
  color: var(--text-primary);
}

.references__inner {
  max-width: 1400px;
  margin: 0 auto;
}

.references__header {
  margin-bottom: 2rem;
}

.references-grid {
  display: grid;
  gap: 2rem;
}

/* Mobile */
@media (max-width: 767px) {
  .references {
    padding: 2rem 1rem 4rem;
  }

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

  /* Ensure reference cards are always visible on mobile,
     even if scroll-triggered animations fail */
  .reference-card {
    opacity: 1;
    transform: none;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .references-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .references-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Reference Cards */
.reference-card {
  background-color: var(--bg-card);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.reference-card__image {
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.reference-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.reference-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.reference-card.visible:hover,
.reference-card.visible:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(248, 250, 252, 0.25);
}

.reference-card .position {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.reference-card .description {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.reference-card .client {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.reference-card .client a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.reference-card .client a:hover {
  color: #e2e8f0;
}

/* Footer */
.footer {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  background: transparent;
  color: #e2e8f0;
  text-align: left;
  font-size: 0.875rem;
  z-index: 100;
}

.footer a {
  color: inherit;
}

.footer a:hover,
.footer a:focus-visible {
  color: #f1f5f9;
}

.reference-card .photo-credit {
  font-size: 0.75rem;
  color: var(--text-muted); /* Using text-muted for a subtle look, consistent with other muted texts */
  margin-top: -0.5rem; /* Adjust margin to bring it closer to the client info */
}

@media (prefers-reduced-motion: reduce) {
  .reference-card {
    opacity: 1;
    transform: none;
    transition:
      box-shadow 0.3s ease,
      border-color 0.3s ease;
  }
}
