/* ═══════════════════════════════════════════════════════════════════════════
   ALEX KOTLIARSKY — WARM CREATIVE PORTFOLIO
   Friendly, approachable, design-forward
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Warm Light Palette */
  --bg-cream: #faf9f6;
  --bg-white: #ffffff;
  --bg-warm: #f5f4f0;
  
  /* Text Colors */
  --text-dark: #1a1a1a;
  --text-body: #4a4a4a;
  --text-muted: #777777;
  
  /* Accent Colors */
  --teal: #1a5653;
  --teal-light: #2a7a76;
  --yellow: #f5c144;
  --yellow-light: #ffd966;
  --coral: #e07a5f;
  
  /* Decorative */
  --brush-teal: #3d8b87;
  --brush-yellow: #f5c144;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --space-3xl: 8rem;
  
  /* Timing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--yellow);
  color: var(--text-dark);
}

a, 
button, 
.nav-link, 
.nav-logo, 
.menu-btn, 
.hero-email, 
.btn, 
.project-card-link, 
.contact-email-btn, 
.footer-link {
  cursor: pointer;
  text-decoration: none !important;
  color: inherit;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

.font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-script {
  font-family: 'Caveat', cursive;
}

/* Hero Title */
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-dark);
}

/* Section Title */
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

/* Eyebrow */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
}

/* Body Text */
.body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-body);
}

.body-md {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
}

/* Script/Handwritten Style */
.script-text {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--teal);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: transparent;
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Caveat', cursive;
  font-size: 1.75rem;
  color: var(--text-dark);
  font-weight: 700;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: var(--bg-warm);
  color: var(--text-dark);
}

.nav-link.active {
  background: var(--teal);
  color: white;
}

.nav-contact {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
}

@media (min-width: 1024px) {
  .nav-contact {
    display: flex;
  }
}

/* Mobile Menu Button */
.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-cream);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s var(--ease-out);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--teal);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-greeting {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--teal);
  margin-bottom: var(--space-sm);
}

.hero-intro {
  margin-top: var(--space-lg);
  max-width: 400px;
}

.hero-email {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding: 0.75rem 1.25rem;
  background: var(--yellow);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.hero-email:hover {
  background: var(--yellow-light);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.hero-stat {
  text-align: left;
}

.hero-stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo-container {
  position: relative;
  width: 100%;
  max-width: 400px;
}

/* Brush Stroke Decorations */
.brush-stroke {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.brush-stroke-1 {
  top: -20px;
  right: -40px;
  width: 200px;
  height: 300px;
  background: var(--brush-teal);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: rotate(-15deg);
  opacity: 0.9;
}

.brush-stroke-2 {
  bottom: 20px;
  left: -30px;
  width: 150px;
  height: 200px;
  background: var(--brush-teal);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  transform: rotate(20deg);
  opacity: 0.7;
}

.brush-stroke-3 {
  top: 50%;
  right: -60px;
  width: 80px;
  height: 120px;
  background: var(--yellow);
  border-radius: 50%;
  transform: rotate(-30deg);
  opacity: 0.8;
}

.hero-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Credential Badge */
.credential-badge {
  position: absolute;
  bottom: 20px;
  right: -20px;
  z-index: 2;
  background: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.credential-badge-title {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.credential-badge-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SERVICES / WHAT I DO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.services-section {
  padding: var(--space-3xl) 0;
  background: var(--bg-white);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: 280px 1fr;
  }
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.service-item:hover {
  background: var(--bg-warm);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-icon.teal {
  background: var(--teal);
  color: white;
}

.service-icon.yellow {
  background: var(--yellow);
  color: var(--text-dark);
}

.service-icon.coral {
  background: var(--coral);
  color: white;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.service-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Services Info */
.services-info {
  padding: var(--space-xl) 0;
}

.services-info .section-title {
  margin-bottom: var(--space-lg);
}

.services-info p {
  color: var(--text-body);
  margin-bottom: var(--space-md);
  max-width: 500px;
}

.services-stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.services-stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.services-stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WORK / PROJECTS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.work-section {
  padding: var(--space-3xl) 0;
  background: var(--bg-cream);
}

.work-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .work-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Project Card */
.project-card {
  background: var(--bg-white);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.project-card:hover .project-card-image img {
  transform: scale(1.05);
}

.project-card-tag {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: var(--teal);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.375rem 0.75rem;
  border-radius: 100px;
}

.project-card-content {
  padding: var(--space-lg);
}

.project-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-xs);
}

.project-card-tagline {
  font-family: 'Caveat', cursive;
  font-size: 1.125rem;
  color: var(--teal);
  margin-bottom: var(--space-sm);
}

.project-card-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal);
  transition: gap 0.3s ease;
}

.project-card-link:hover {
  gap: 0.75rem;
}

.project-card-link svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXPERIENCE SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.experience-section {
  padding: var(--space-3xl) 0;
  background: var(--bg-white);
}

.experience-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.experience-grid {
  display: grid;
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

.experience-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-cream);
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

@media (max-width: 640px) {
  .experience-item {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

.experience-item:hover {
  background: var(--bg-warm);
}

.experience-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.experience-role {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.experience-company {
  font-size: 0.875rem;
  color: var(--teal);
  margin-bottom: var(--space-sm);
}

.experience-description {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.contact-section {
  padding: var(--space-3xl) 0;
  background: var(--teal);
  color: white;
  text-align: center;
}

.contact-section .section-title {
  color: white;
  margin-bottom: var(--space-md);
}

.contact-section p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

.contact-email-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--yellow);
  color: var(--text-dark);
  padding: 1rem 2rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.contact-email-btn:hover {
  background: var(--yellow-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
  padding: var(--space-xl) 0;
  background: var(--bg-cream);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--teal);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS & REVEALS
   ═══════════════════════════════════════════════════════════════════════════ */

[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Reveal Delays */
.hero-content[data-reveal] { transition-delay: 0.1s; }
.hero-visual[data-reveal] { transition-delay: 0.3s; }

/* Staggered Children Reveal */
[data-reveal-parent].revealed > * {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-parent] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

/* Generate delays for children */
[data-reveal-parent] > *:nth-child(1) { transition-delay: 0.1s; }
[data-reveal-parent] > *:nth-child(2) { transition-delay: 0.2s; }
[data-reveal-parent] > *:nth-child(3) { transition-delay: 0.3s; }
[data-reveal-parent] > *:nth-child(4) { transition-delay: 0.4s; }
[data-reveal-parent] > *:nth-child(5) { transition-delay: 0.5s; }

/* Magnetic Button Hover */
.btn, .hero-email, .contact-email-btn {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              background 0.3s ease, 
              box-shadow 0.3s ease;
}

/* Floating Animation for Hero Decorations */
@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(10px, -15px) rotate(2deg); }
  66% { transform: translate(-5px, 10px) rotate(-1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.brush-stroke-1 { animation: float 8s infinite ease-in-out; }
.brush-stroke-2 { animation: float 10s infinite ease-in-out -2s; }
.brush-stroke-3 { animation: float 7s infinite ease-in-out -4s; }

/* Ambient Glow Overlay (Light Mode) */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
              rgba(26, 86, 83, 0.05) 0%, 
              transparent 50%);
  opacity: 0;
  transition: opacity 1s ease;
}

body:hover .ambient-glow {
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--teal);
  color: white;
}

.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
