/* ================================================
   TRUE LOVE CREATIVE - Design System
   Apple-inspired Bento Grid with Glassmorphism
   ================================================ */

/* === DESIGN TOKENS === */
:root {
  /* Colors - Dark elegant theme */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --accent: #e90404;
  --accent-light: #ff3333;
  --accent-glow: rgba(233, 4, 4, 0.4);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.4);

  /* Glass effect */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --gap: clamp(0.75rem, 1.5vw, 1.5rem);
  --padding-section: clamp(1rem, 4vw, 3rem);
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.6s;
}

/* === RESET & BASE === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle animated background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(233, 4, 4, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(233, 4, 4, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

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

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

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent {
  color: var(--accent);
}

/* === HEADER === */
.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--padding-section);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
}

.glass-header>* {
  pointer-events: auto;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
}

.lang-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 100px;
  transition: all var(--duration-fast) ease;
}

.lang-btn.active {
  background: var(--accent);
  color: white;
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* === PILL NAVIGATION === */
.pill-nav {
  position: fixed;
  /* Desktop: Top below header */
  top: 90px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 999;
  gap: 0.5rem;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 2;
  gap: 0.5rem;
}

.nav-item i {
  font-size: 1.1rem;
}

.nav-text {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-item.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.nav-item:hover:not(.active) {
  background: var(--glass-bg);
  color: #fff;
}

/* Hide text on mobile for tighter pill */
@media (max-width: 768px) {
  .nav-text {
    display: none;
  }

  .nav-item {
    padding: 0.8rem;
  }
}

/* === MAIN CONTENT === */
main {
  /* Header (72px) + Menu (~60px) + Spacing */
  padding-top: 180px;
}

@media (max-width: 768px) {
  main {
    padding-top: 80px;
    /* Only header height needed on mobile */
  }
}

.bento-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  padding: var(--gap);
  max-width: 1100px;
  margin: 0 auto;
}

/* === BENTO CARDS === */
.bento-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    background var(--duration-fast) ease;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.bento-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 60px var(--accent-glow);
}

/* Card sizes */
.bento-full {
  grid-column: span 4;
}

.bento-wide {
  grid-column: span 3;
}

.bento-half {
  grid-column: span 2;
}

.bento-quarter {
  grid-column: span 1;
}

.bento-tall {
  grid-row: span 2;
}

/* === HERO SECTION === */
.bento-hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(233, 4, 4, 0.1) 0%, transparent 70%),
    var(--bg-card);
}

.hero-subtitle {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-title .accent {
  color: var(--accent);
  display: block;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 1.5rem;
}

/* === PORTFOLIO SECTION === */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.filter-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/10;
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out);
}

.portfolio-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
  z-index: 1;
}

.portfolio-item:hover {
  transform: scale(1.02);
}

.portfolio-item:hover::before {
  opacity: 1;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out);
  z-index: 2;
}

.portfolio-item:hover .portfolio-info {
  transform: translateY(0);
  opacity: 1;
}

.portfolio-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.portfolio-info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Placeholder items */
.portfolio-placeholder {
  background: linear-gradient(135deg, var(--glass-bg) 0%, rgba(233, 4, 4, 0.05) 100%);
  border: 2px dashed var(--glass-border);
  cursor: default;
}

.portfolio-placeholder:hover {
  transform: none;
}

.portfolio-placeholder:hover img,
.portfolio-placeholder:hover::before {
  transform: none;
  opacity: 0;
}

.placeholder-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-secondary);
  z-index: 2;
}

.placeholder-content i {
  font-size: 3rem;
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}

.placeholder-content span {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

/* Hidden items (for filtering) */
.portfolio-item.hidden {
  display: none;
}

/* === ABOUT SECTION === */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-content p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.about-content p:first-of-type {
  font-size: 1.125rem;
  color: var(--text-primary);
}

/* === CONTACT SECTION === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
  margin-top: 1.5rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-value {
  font-size: 1rem;
  color: var(--text-primary);
  transition: color var(--duration-fast) ease;
}

.contact-value:hover {
  color: var(--accent);
}

.social-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 1.125rem;
  color: var(--text-secondary);
  transition: all var(--duration-fast) ease;
}

.social-icon:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* === FOOTER === */
.footer {
  padding: 2rem var(--padding-section);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  border-top: 1px solid var(--glass-border);
}

/* === SCROLL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for grids */
.reveal-stagger>* {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.reveal-stagger.visible>*:nth-child(1) {
  transition-delay: 0.1s;
}

.reveal-stagger.visible>*:nth-child(2) {
  transition-delay: 0.15s;
}

.reveal-stagger.visible>*:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal-stagger.visible>*:nth-child(4) {
  transition-delay: 0.25s;
}

.reveal-stagger.visible>*:nth-child(5) {
  transition-delay: 0.3s;
}

.reveal-stagger.visible>*:nth-child(6) {
  transition-delay: 0.35s;
}

.reveal-stagger.visible>* {
  opacity: 1;
  transform: translateY(0);
}

/* === SCROLL TO TOP === */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-fast) ease;
  z-index: 100;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-4px);
}

/* === RESPONSIVE === */

/* Tablet */
@media (max-width: 1024px) {
  .bento-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-full {
    grid-column: span 2;
  }

  .bento-wide {
    grid-column: span 2;
  }

  .bento-quarter {
    grid-column: span 1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .glass-header {
    height: 64px;
    padding: 0 1rem;
  }

  /* Pill nav adjustments for mobile */
  .pill-nav {
    top: auto;
    bottom: 1.5rem;
    padding: 0.4rem;
    gap: 0.25rem;
  }

  .nav-item {
    padding: 0.8rem;
  }

  .nav-text {
    display: none;
  }

  .bento-container {
    grid-template-columns: 1fr;
    padding: var(--gap);
  }

  .bento-full,
  .bento-wide,
  .bento-half,
  .bento-quarter {
    grid-column: span 1;
  }

  .bento-hero {
    min-height: 50vh;
  }

  .hero-title {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }

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

  .portfolio-item {
    aspect-ratio: 16/9;
  }

  .scroll-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --gap: 0.75rem;
    --radius: 16px;
    --radius-sm: 12px;
  }

  .bento-card {
    padding: 1.25rem;
  }

  .portfolio-filters {
    justify-content: center;
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}