/* ========================================
   FOBKISCO STUDIO - MODERN DESIGN SYSTEM
   ======================================== */

/* CSS Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0F172A;
  --primary-light: #1E293B;
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --text: #334155;
  --text-light: #64748B;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --border: #E2E8F0;
  --success: #10B981;
  --error: #EF4444;

  --sidebar-width: 260px;
  --mobile-header-height: 70px;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--primary);
  color: #FFFFFF;
  padding: 40px 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 30px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 60px;
  transition: var(--transition);
}

.sidebar-logo:hover {
  opacity: 0.8;
}

.logo-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #FFFFFF;
}

.nav-icon {
  font-size: 0.8rem;
  opacity: 0.6;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* ========================================
   MOBILE HEADER
   ======================================== */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-header-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
}

.mobile-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   MAIN CONTENT LAYOUT
   ======================================== */

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
  padding: 120px 60px;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border-bottom: 1px solid var(--border);
}

.hero-wrapper {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 16px 32px;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 10px;
  font-size: 1rem;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  padding: 16px 32px;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: var(--transition);
}

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

/* ========================================
   STATS BAR
   ======================================== */

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 50px 60px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 50px;
  background: var(--border);
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.projects-section {
  padding: 100px 60px;
  background: var(--bg);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
  border-color: var(--accent);
}

.project-image {
  width: 100%;
  height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.view-arrow {
  font-size: 3rem;
  color: #FFFFFF;
  transform: translateX(-10px);
  transition: var(--transition);
}

.project-card:hover .view-arrow {
  transform: translateX(0);
}

.project-info {
  padding: 24px;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.project-meta {
  font-size: 0.95rem;
  color: var(--text-light);
}

.section-cta {
  text-align: center;
  margin-top: 40px;
}

/* ========================================
   CONTACT PAGE
   ======================================== */

.contact-hero {
  padding: 80px 60px 60px;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.contact-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.contact-description {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.7;
}

.contact-form-section {
  padding: 80px 60px;
  background: var(--bg);
}

.form-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.05);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-form .trap {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
  font-family: var(--font-main);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent);
}

.form-checkbox label {
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
}

.form-submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-submit {
  padding: 16px 36px;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
}

.form-status.ok {
  color: var(--success);
}

.form-status.error {
  color: var(--error);
}

.form-note {
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 10px;
}

.form-note a {
  color: var(--accent);
  text-decoration: underline;
}

.contact-success {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success);
  color: #FFFFFF;
  font-size: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.contact-success h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.contact-success p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 30px;
}

/* ========================================
   FOOTER
   ======================================== */

.main-footer {
  padding: 40px 60px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

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

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

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }
.fade-in-up:nth-child(5) { animation-delay: 0.5s; }
.fade-in-up:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
  .hero-section,
  .projects-section,
  .contact-form-section,
  .stats-bar {
    padding-left: 40px;
    padding-right: 40px;
  }

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

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-header {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding-top: var(--mobile-header-height);
  }

  .hero-section {
    padding: 60px 24px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .stats-bar {
    flex-direction: column;
    gap: 30px;
    padding: 40px 24px;
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

  .projects-section {
    padding: 60px 24px;
  }

  .section-title {
    font-size: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-hero {
    padding: 60px 24px 40px;
  }

  .contact-title {
    font-size: 2.2rem;
  }

  .contact-form-section {
    padding: 60px 24px;
  }

  .form-container {
    padding: 30px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    text-align: center;
  }

  .main-footer {
    padding: 30px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .contact-title {
    font-size: 1.9rem;
  }
}

/* ========================================
   LEGACY COMPATIBILITY STYLES
   (For work.html and about.html)
   ======================================== */

.header {
  display: block;
}

/* Portfolio/project page header refresh */
body > .header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
}

body > .header .nav {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

body > .header .logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

body > .header .links {
  display: flex;
  align-items: center;
  gap: 8px;
}

body > .header .links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 14px;
  transition: var(--transition);
}

body > .header .links a:hover {
  color: var(--primary);
  background: var(--bg-alt);
  border-color: var(--border);
}

body > .header .links a.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

body > .header .links a.cta {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

body > .header .links a.cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

body > .header .menu-btn {
  display: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 900px) {
  body > .header .nav {
    min-height: 64px;
    padding: 0 16px;
  }

  body > .header .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body > .header .links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  body > .header .links.open {
    display: flex;
  }

  body > .header .links a {
    border-radius: 10px;
    padding: 10px 12px;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  padding: 80px 60px 60px;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border-bottom: 1px solid var(--border);
}

.panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.05);
}

.section {
  padding: 60px 60px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  justify-content: center;
}

.work-filters {
  margin-bottom: 50px;
}

.filter-row button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

.filter-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-row button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.work-group {
  margin-top: 60px;
}

.work-group:first-of-type {
  margin-top: 0;
}

.work-group-head {
  text-align: center;
  margin-bottom: 40px;
}

.work-group-head h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.work-group-head p {
  font-size: 1.1rem;
  color: var(--text-light);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
  border-color: var(--accent);
}

.card .thumb {
  width: 100%;
  height: 220px;
  background-color: var(--bg-alt);
  background-size: cover;
  background-position: center;
}

.card .body {
  padding: 20px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 10px 0;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.card-actions {
  margin-top: 12px;
}

.mini-btn {
  padding: 8px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.mini-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.drawer {
  margin-top: 24px;
  padding: 30px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.drawer h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary);
  margin: 0 0 10px 0;
}

.drawer p {
  color: var(--text-light);
  line-height: 1.7;
  margin: 0 0 20px 0;
}

.drawer-actions {
  display: flex;
  gap: 12px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.list li {
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
  color: var(--text);
  line-height: 1.6;
}

.list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0 0 20px 0;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.footer {
  padding: 40px 60px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-light);
}

.footer-link {
  color: var(--accent);
  text-decoration: underline;
}

.work-card.is-hidden {
  display: none;
}

.group-actions {
  margin-top: 30px;
  text-align: center;
}

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero,
  .section {
    padding: 40px 24px;
  }

  .panel {
    padding: 24px;
  }

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

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-row button {
    width: 100%;
    text-align: center;
  }
}
