/* ============================================
   ONESTUDIO CORPORATE WEBSITE
   CSS STYLESHEET - Pure CSS3
   ============================================ */

/* ============================================
   1. CSS VARIABLES & COLOR SYSTEM
   ============================================ */
:root {
  /* Primary Colors */
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  
  /* Secondary Colors */
  --secondary: #1f2937;
  --secondary-dark: #111827;
  --secondary-light: #374151;
  
  /* Accent Colors */
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  
  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */

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

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

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  overflow-x: hidden;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-lg);
  color: var(--secondary-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-md);
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  color: var(--gray-600);
  line-height: 1.8;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================
   4. NAVIGATION
   ============================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

nav.hidden {
  transform: translateY(-100%);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-xl);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  transition: transform var(--transition);
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--gray-600);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--gray-800);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: var(--white);
  flex-direction: column;
  padding: var(--spacing-xl);
  gap: var(--spacing-lg);
  z-index: 999;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease-out;
}

.mobile-nav.active {
  display: flex;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   5. BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

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

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

.btn-accent {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-sm {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 0.875rem;
}

.btn-lg {
  padding: var(--spacing-lg) var(--spacing-2xl);
  font-size: 1.05rem;
}

/* ============================================
   6. CONTAINERS & SECTIONS
   ============================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

section {
  padding: var(--spacing-4xl) var(--spacing-xl);
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: var(--spacing-lg);
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
}

.section-title p {
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ============================================
   7. HERO SECTION
   ============================================ */

.hero {
  padding-top: 140px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  margin-bottom: var(--spacing-lg);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero > .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.hero-text {
  animation: slideInLeft 1s ease-out;
}

.hero-image {
  animation: slideInRight 1s ease-out;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  flex-wrap: wrap;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   8. CARDS
   ============================================ */

.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card-image {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  animation: none;
}

.card h3 {
  margin-bottom: var(--spacing-md);
}

.card p {
  margin-bottom: var(--spacing-lg);
}

.card-footer {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

/* ============================================
   9. GRID LAYOUTS
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-2xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   10. FORMS
   ============================================ */

.form-group {
  margin-bottom: var(--spacing-xl);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--gray-700);
}

input,
textarea,
select {
  width: 100%;
  padding: var(--spacing-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* ============================================
   11. ANIMATIONS & TRANSITIONS
   ============================================ */

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

.slide-left {
  animation: slideLeft 0.6s ease-out;
}

.slide-right {
  animation: slideRight 0.6s ease-out;
}

.zoom-in {
  animation: zoomIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Counter Animation */
.counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* ============================================
   12. FOOTER
   ============================================ */

footer {
  background: var(--secondary-dark);
  color: var(--gray-300);
  padding: var(--spacing-3xl) var(--spacing-xl) var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--spacing-lg);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-md);
}

.footer-links a {
  color: var(--gray-300);
}

.footer-links a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: var(--spacing-lg);
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

.footer-bottom p {
  margin: 0;
}

/* ============================================
   13. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  section {
    padding: var(--spacing-3xl) var(--spacing-xl);
  }
  
  .hero > .container {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    gap: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  nav {
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  .nav-container {
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .mobile-nav {
    gap: var(--spacing-md);
  }
  
  .mobile-nav a {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    background: var(--gray-100);
  }
  
  section {
    padding: var(--spacing-2xl) var(--spacing-lg);
  }
  
  .hero {
    padding-top: 100px;
    min-height: 80vh;
  }
  
  .card {
    padding: var(--spacing-xl);
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 13px;
  }
  
  .container {
    padding: 0 var(--spacing-lg);
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  section {
    padding: var(--spacing-2xl) var(--spacing-md);
  }
  
  .card-image {
    height: 180px;
  }
  
  .card-footer {
    flex-direction: column;
  }
  
  .card-footer .btn {
    width: 100%;
  }
}

/* ============================================
   14. UTILITY CLASSES
   ============================================ */

.text-center {
  text-align: center;
}

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

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

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mt-2xl { margin-top: var(--spacing-2xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.back-to-top {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 900;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
}

.back-to-top.show {
  display: flex;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

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

/* ============================================
   15. LOADING SCREEN
   ============================================ */

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeOut 0.6s ease-out 1.5s forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Logo animation */
.loading-logo {
  position: absolute;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 100px;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================
   16. NEWSLETTER SECTION
   ============================================ */

.newsletter {
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-3xl);
  text-align: center;
  margin: var(--spacing-3xl) 0;
}

.newsletter h3 {
  color: var(--white);
  margin-bottom: var(--spacing-lg);
}

.newsletter p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-xl);
}

.newsletter-form {
  display: flex;
  gap: var(--spacing-md);
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: var(--spacing-md);
  border: none;
  border-radius: var(--radius-lg);
}

.newsletter-form button {
  background: var(--accent);
  color: var(--white);
}

.newsletter-form button:hover {
  background: var(--accent-light);
}

/* ============================================
   17. TESTIMONIALS
   ============================================ */

.testimonial-card {
  background: var(--gray-50);
  padding: var(--spacing-2xl);
  border-radius: var(--radius-xl);
  border-left: 4px solid var(--accent);
  position: relative;
}

.testimonial-text {
  margin-bottom: var(--spacing-lg);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
}

.author-info h4 {
  margin: 0;
  font-size: 0.95rem;
}

.author-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* ============================================
   18. PORTFOLIO FILTERS
   ============================================ */

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 2px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-600);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
}

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

/* ============================================
   19. STATUS BADGES
   ============================================ */

.badge {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-open {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge-closed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.badge-coming {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

/* ============================================
   20. TIMELINE
   ============================================ */

.timeline {
  position: relative;
  padding: var(--spacing-2xl) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--gray-300);
}

.timeline-item {
  margin-bottom: var(--spacing-2xl);
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: auto;
  width: 48%;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
  margin-right: 0;
  width: 48%;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: 4px solid var(--white);
  border-radius: 50%;
  z-index: 10;
}

.timeline-content {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }
  
  .timeline-marker {
    left: 20px;
  }
  
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px;
    margin-right: 0;
  }
}

/* ============================================
   21. THREE-D BOOK EFFECT
   ============================================ */

.book-cover {
  perspective: 1000px;
  height: 350px;
  cursor: pointer;
}

.book-cover-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.book-cover.flipped .book-cover-inner {
  transform: rotateY(180deg);
}

.book-front,
.book-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  font-size: 3rem;
}

.book-back {
  transform: rotateY(180deg);
  background: var(--gray-300);
  color: var(--white);
}

/* Responsive media framing: keeps every supplied image aligned without cropping important content. */
.hero-image {
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
}

.hero-image img,
.card-image img,
.book-front img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-image {
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 0;
}

.card-image img {
  aspect-ratio: 16 / 10;
}

.book-cover {
  height: clamp(260px, 30vw, 350px);
  max-width: 100%;
}

.book-front img {
  object-fit: contain;
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
}

.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.social-links a {
  flex: 0 0 auto;
}

.card-footer .btn {
  min-height: 44px;
}

/* Dedicated featured grids keep media, copy, and actions in predictable card layers. */
.featured-portfolio-grid,
.featured-books-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.featured-portfolio-grid > .card,
.featured-books-grid > .card {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.featured-portfolio-grid .card-image {
  flex: 0 0 auto;
  height: clamp(190px, 20vw, 250px);
}

.featured-portfolio-grid .card h3,
.featured-books-grid .card h3 {
  overflow-wrap: anywhere;
}

.featured-portfolio-grid .card-footer,
.featured-books-grid .card-footer {
  margin-top: auto;
  padding-top: var(--spacing-md);
}

.featured-books-grid .book-cover {
  flex: 0 0 auto;
  width: 100%;
  height: clamp(280px, 30vw, 360px);
  margin-bottom: var(--spacing-xl);
}

.featured-books-grid .book-cover-inner,
.featured-books-grid .book-front,
.featured-books-grid .book-back {
  width: 100%;
  height: 100%;
}

.featured-books-grid .book-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 900px) {
  .featured-portfolio-grid,
  .featured-books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .featured-portfolio-grid,
  .featured-books-grid {
    grid-template-columns: 1fr;
  }

  .featured-portfolio-grid .card-image {
    height: min(62vw, 280px);
  }

  .featured-books-grid .book-cover {
    height: min(92vw, 340px);
  }
}

@media (max-width: 768px) {
  .hero-image {
    max-width: 100%;
  }

  .hero-image img {
    max-height: 360px;
    object-fit: cover;
  }

  .book-cover {
    height: 300px;
  }

  .card-footer {
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .card-image {
    aspect-ratio: 4 / 3;
  }

  .card-image img {
    aspect-ratio: 4 / 3;
  }

  .book-cover {
    height: 260px;
  }
}
/* Creative Director profile image correction */
.card.scroll-reveal.text-center .card-image {
  overflow: hidden;
  position: relative;
}

.card.scroll-reveal.text-center .card-image img {
  width: 90%;
  height: 160%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.2);
  transform-origin: 50% 20%;
}