/* ========================================
   PORTFOLIO STYLES - Tony Capodagli
   Design System: 4-Layer Research Model Colors
   ======================================== */

:root {
  /* 4-Layer Research Model Colors */
  --intent-blue: #3b82f6;
  --workflow-green: #10b981;
  --support-amber: #f59e0b;
  --context-purple: #8b5cf6;
  --accent-red: #ef4444;

  /* Neutrals */
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --white: #ffffff;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  color: var(--slate-600);
  line-height: 1.6;
  background: var(--white);
}

/* ========================================
   NAVIGATION
   ======================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--slate-300);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  color: var(--slate-300);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-cta {
  background: var(--intent-blue);
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
}

.nav-cta:hover {
  background: #2563eb;
}

/* Mega Menu */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  background: var(--slate-800);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.nav-links > li:hover .mega-menu {
  opacity: 1;
  visibility: visible;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.mega-menu-item {
  display: flex;
  gap: 0.875rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.2s;
}

.mega-menu-item:hover {
  background: rgba(255,255,255,0.05);
}

.mega-menu-thumb {
  width: 60px;
  height: 60px;
  border-radius: 0.375rem;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--slate-700);
}

.mega-menu-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mega-menu-tag {
  display: inline-block;
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  margin-bottom: 0.25rem;
}

.mega-tag-healthcare { background: var(--workflow-green); color: var(--white); }
.mega-tag-ai { background: var(--context-purple); color: var(--white); }
.mega-tag-fintech { background: var(--intent-blue); color: var(--white); }

.mega-menu-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.125rem;
}

.mega-menu-item-desc {
  font-size: 0.6875rem;
  color: var(--slate-400);
  line-height: 1.4;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 50%, #1e3a5a 100%);
  padding: 8rem 2rem 6rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero-badge-text {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  font-weight: 500;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-gradient {
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--slate-300);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--slate-400);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.hero-stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

.hero-photo {
  width: 100%;
  max-width: 400px;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  aspect-ratio: 1;
  object-fit: cover;
}

/* ========================================
   FEATURED WORK SECTION
   ======================================== */
.featured-work {
  padding: 6rem 2rem;
  background: var(--slate-100);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--intent-blue);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--slate-500);
  max-width: 600px;
  margin: 0 auto;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.case-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.case-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-700) 0%, var(--slate-800) 100%);
}

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

.case-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.9) 0%, transparent 60%);
}

.case-card-tags {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
}

.case-tag {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  color: var(--white);
}

.tag-healthcare { background: var(--workflow-green); }
.tag-ai { background: var(--context-purple); }
.tag-fintech { background: var(--intent-blue); }

.case-card-content {
  padding: 1.5rem;
}

.case-card-org {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  margin-bottom: 0.5rem;
}

.case-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.case-card-description {
  font-size: 0.9375rem;
  color: var(--slate-500);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.case-card-metrics {
  display: flex;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-100);
}

.case-metric-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
}

.case-metric-label {
  font-size: 0.6875rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   4-LAYER RESEARCH MODEL SECTION
   ======================================== */
.four-layer-section {
  padding: 6rem 2rem;
  background: var(--white);
}

.layer-model {
  max-width: 900px;
  margin: 0 auto;
}

.layer-row {
  display: flex;
  gap: 1.5rem;
  position: relative;
}

.layer-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  flex-shrink: 0;
}

.layer-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  position: relative;
  z-index: 2;
  transition: transform 0.3s, box-shadow 0.3s;
}

.layer-row:hover .layer-number {
  transform: scale(1.1);
}

.layer-line {
  width: 3px;
  flex: 1;
  min-height: 40px;
  opacity: 0.3;
}

.layer-intent .layer-number { background: var(--intent-blue); }
.layer-intent .layer-line { background: var(--intent-blue); }
.layer-intent .layer-title { color: var(--intent-blue); }

.layer-workflow .layer-number { background: var(--workflow-green); }
.layer-workflow .layer-line { background: var(--workflow-green); }
.layer-workflow .layer-title { color: var(--workflow-green); }

.layer-support .layer-number { background: var(--support-amber); }
.layer-support .layer-line { background: var(--support-amber); }
.layer-support .layer-title { color: var(--support-amber); }

.layer-context .layer-number { background: var(--context-purple); }
.layer-context .layer-line { background: var(--context-purple); }
.layer-context .layer-title { color: var(--context-purple); }

.layer-content {
  flex: 1;
  padding-bottom: 2rem;
  cursor: pointer;
}

.layer-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--slate-100);
  border-radius: 0.75rem;
  transition: all 0.3s;
}

.layer-row:hover .layer-header {
  background: var(--slate-800);
}

.layer-row:hover .layer-header .layer-title,
.layer-row:hover .layer-header .layer-subtitle {
  color: var(--white) !important;
}

.layer-icon {
  font-size: 1.5rem;
}

.layer-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  transition: color 0.3s;
}

.layer-subtitle {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin-left: auto;
  transition: color 0.3s;
}

.layer-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
}

.layer-row:hover .layer-details {
  max-height: 300px;
  opacity: 1;
  padding: 1.25rem;
}

.layer-description {
  font-size: 1rem;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.layer-questions {
  background: var(--slate-100);
  border-radius: 0.5rem;
  padding: 1rem;
}

.question-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  display: block;
  margin-bottom: 0.5rem;
}

.layer-questions ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.layer-questions li {
  font-size: 0.9375rem;
  color: var(--slate-600);
  padding: 0.375rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.layer-questions li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--slate-400);
}

.layer-insight {
  max-width: 700px;
  margin: 3rem auto 0;
  text-align: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
  border-radius: 1rem;
  color: var(--slate-300);
  font-size: 1rem;
  line-height: 1.6;
}

.layer-insight strong {
  color: var(--white);
}

/* ========================================
   CAPABILITIES SECTION
   ======================================== */
.what-i-do {
  padding: 6rem 2rem;
  background: var(--slate-100);
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.capability-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.capability-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.icon-blue { background: rgba(59,130,246,0.1); }
.icon-green { background: rgba(16,185,129,0.1); }
.icon-amber { background: rgba(245,158,11,0.1); }
.icon-purple { background: rgba(139,92,246,0.1); }

.capability-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
}

.capability-description {
  font-size: 0.9375rem;
  color: var(--slate-500);
  line-height: 1.5;
}

/* ========================================
   EXPERIENCE STRIPE
   ======================================== */
.experience-stripe {
  background: var(--slate-900);
  padding: 4rem 2rem;
}

.experience-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.experience-stat {
  text-align: center;
  color: var(--white);
}

.experience-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.experience-label {
  font-size: 0.875rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
  padding: 6rem 2rem;
  background: var(--slate-100);
}

.contact-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1rem;
}

.contact-description {
  font-size: 1.125rem;
  color: var(--slate-500);
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--white);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--slate-700);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  color: var(--intent-blue);
}

.contact-link svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--slate-900);
  padding: 2rem;
  color: var(--slate-400);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--slate-400);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ========================================
   CASE STUDY PAGE STYLES
   ======================================== */
.case-study-hero {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
  padding: 8rem 2rem 4rem;
  color: var(--white);
}

.case-study-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.case-study-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 0.875rem;
  color: var(--slate-400);
}

.meta-label {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.case-study-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.case-study-intro {
  font-size: 1.25rem;
  color: var(--slate-300);
  line-height: 1.6;
}

.case-study-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.case-study-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.case-study-section {
  margin-bottom: 4rem;
}

.case-study-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--slate-100);
}

.case-study-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-800);
  margin: 2rem 0 1rem;
}

.case-study-section p {
  font-size: 1.0625rem;
  color: var(--slate-600);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.case-study-image {
  margin: 2rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.case-study-image img {
  width: 100%;
  height: auto;
  display: block;
}

.case-study-image figcaption {
  padding: 1rem;
  background: var(--slate-100);
  font-size: 0.875rem;
  color: var(--slate-500);
  text-align: center;
}

.callout-box {
  background: var(--slate-100);
  border-left: 4px solid var(--intent-blue);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.callout-box.green { border-left-color: var(--workflow-green); }
.callout-box.amber { border-left-color: var(--support-amber); }
.callout-box.purple { border-left-color: var(--context-purple); }

.callout-title {
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 0.5rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-description {
    margin: 0 auto 2rem;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .work-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-study-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 6rem 1.5rem 4rem;
    min-height: auto;
  }

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

  .hero-stats {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

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

  .experience-inner {
    justify-content: center;
  }

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

  .mega-menu {
    display: none;
  }

  .nav-links {
    gap: 1rem;
  }

  .case-study-stats {
    grid-template-columns: 1fr 1fr;
  }
}
