/* ===================================
  FishEye - Main Stylesheet
=================================== */

/* =========================
  Design System & Variables
========================= */
:root {
  /* Colors */
  --bg-color-primary: #901c1c;
  --bg-color-secondary: #d3573c;
  --bg-color-dark: #232323;
  --bg-color-modal: #db8876;
  --bg-color-light: #f5f5f5;
  --txt-color-primary: var(--bg-color-primary);
  --txt-color-secondary: #525252;
  --txt-color-light: #666;
  --txt-color-muted: #9ca3af;
  --color-white: #fff;
  --color-black: #000;
  --color-dark: #000;
  --color-error: #ff4906;
  --color-success: #279e7a;
  --color-warning: #ff9800;
  --color-likes: #ff6b6b;

  /* Typography */
  --font-family-primary: "DM Sans", arial, helvetica, sans-serif;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 5rem;

  /* Sizes */
  --size-full: 100%;
  --size-profile-mobile: 120px;
  --size-profile-tablet: 180px;
  --size-profile-desktop: 200px;
  --size-card-height-mobile: 300px;
  --size-card-height-tablet: 380px;
  --size-card-height-desktop: 400px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-circle: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgb(0 0 0 / 8%);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 12%);
  --shadow-lg: 0 4px 20px rgb(0 0 0 / 30%);
  --shadow-hover: 0 6px 16px rgb(0 0 0 / 30%);
  --shadow-modal: 0 20px 60px rgb(0 0 0 / 50%);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Z-index Layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-fixed: 500;
  --z-modal: 1000;
  --z-lightbox: 1100;

  /* Modal */
  --modal-height: calc(100vh - env(keyboard-inset-height, 0px));
}

/* =========================
  CSS Reset & Base Styles
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

button,
a {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* =========================
  Chrome Autofill Fix
========================= */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  background-clip: text;
  -webkit-text-fill-color: inherit;
  transition: background-color 5000s ease-in-out 0s;
  box-shadow: inset 0 0 20px 20px #23232329;
}

/* =========================
  Body Scroll Prevention
========================= */
.no-scroll {
  overflow: hidden;
}

/* =========================
  Base Typography & Layout
========================= */
@font-face {
  font-family: "DM Sans";
  font-display: swap;
}

@font-face {
  font-family: Roboto;
  font-display: swap;
}

@font-face {
  font-family: Shrikhand;
  font-display: swap;
}

html {
  font-family: var(--font-family-primary);
  color: var(--color-black);
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
}

body,
header,
main,
footer {
  max-width: 100%;
  margin: 0 auto;
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 var(--space-md) 0;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
}

/* =========================
  Navigation
========================= */
nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  color: var(--txt-color-primary);
}

nav h1 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-medium);
  margin: 0;
}

.nav-logo {
  height: 1.9rem;
  transition: var(--transition-fast);
}

.nav-logo:hover {
  transform: scale(1.02);
}

/* =========================
  Homepage Photographers
========================= */
.photographers {
  display: grid;
  place-items: center center;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

.photographer {
  display: grid;
  position: relative;
  place-items: center center;
  gap: var(--space-xs);
  transition: var(--transition-normal);
}

.photographer:hover {
  transform: translateY(-2px);
}

.photographer a {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: var(--z-base);
}

.photographer h1 {
  font-size: 1.5rem;
  color: var(--txt-color-primary);
  font-weight: 700;
  line-height: 1.2;
}

.photographer p {
  font-size: 1rem;
  color: var(--txt-color-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.photographer span {
  font-size: 0.9rem;
  color: var(--txt-color-secondary);
  font-weight: 600;
  line-height: 1.3;
}

/* =========================
  Footer
========================= */
footer {
  display: grid;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  padding: var(--space-md);
  margin-top: var(--space-2xl);
  color: var(--txt-color-primary);
}

footer p {
  font-size: 1.2rem;
  font-weight: var(--font-weight-light);
}

/* =========================
  Utility Classes
========================= */
.btn-base,
.btn-primary,
.btn-secondary,
.card-base {
  transition: var(--transition-normal);
}

.btn-base {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.btn-primary,
.btn-secondary {
  color: var(--color-white);
}

.btn-primary {
  background: linear-gradient(0deg, var(--bg-color-primary) 0%, var(--bg-color-secondary) 100%);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
}

.btn-primary:hover,
.card-base:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-color-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-lg);
  font-weight: var(--font-weight-medium);
}

.btn-secondary:hover {
  background: var(--bg-color-secondary);
}

.card-base {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0f0f0;
  overflow: hidden;
}

.card-base:hover {
  box-shadow: var(--shadow-md);
}

.profile-picture,
.container-picture {
  width: 100%;
  height: 100%;
}

.profile-picture {
  border-radius: var(--radius-circle);
  display: inline-block;
}

.container-picture {
  width: var(--size-profile-desktop);
  height: var(--size-profile-desktop);
}

/* =========================
  Focus Management
========================= */

/* Global focus styles for all interactive elements */
*:focus-visible,
.media-card:focus-within {
  outline: 3px solid var(--color-black);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-black) 40%, transparent);
}

[aria-hidden="true"] {
  display: none;
}

/* =========================
  Responsive Design
========================= */

/* Mobile (up to 767px) */
@media (width <= 767px) {
  .nav-logo {
    height: 1.8rem;
  }

  nav {
    padding: var(--space-sm);
  }

  nav h1 {
    font-size: 1.2rem;
  }

  main {
    gap: var(--space-sm);
    padding: var(--space-sm);
  }

  .photographers {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .photographer h1 {
    font-size: 1.5rem;
  }

  .photographer p,
  .photographer span {
    font-size: 0.9rem;
  }

  .container-picture {
    width: var(--size-profile-mobile);
    height: var(--size-profile-mobile);
  }

  footer {
    margin-top: var(--space-lg);
  }

  footer p {
    font-size: 1rem;
  }
}

/* Tablet (768px to 1023px) */
@media (width >= 768px) and (width <= 1023px) {
  .nav-logo {
    height: 2.2rem;
  }

  main {
    gap: var(--space-md);
  }

  .photographers {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .photographer h1 {
    font-size: 1.8rem;
  }

  .photographer p,
  .photographer span {
    font-size: 1rem;
  }

  .container-picture {
    width: var(--size-profile-tablet);
    height: var(--size-profile-tablet);
  }
}

/* Desktop (1024px and above) */
@media (width >= 1024px) {
  .nav-logo {
    height: 2.5rem;
  }

  main {
    gap: var(--space-lg);
  }

  .photographers {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }

  .photographer h1 {
    font-size: 2rem;
  }

  .photographer p,
  .photographer span {
    font-size: 1.2rem;
  }
}
