/* Minimal, modern, responsive CSS (no framework). */
:root {
  --bg: #000000;
  --surface: #111111;
  --text: #ffffff;
  --muted: #cccccc;
  --primary: #ffb366;
  --primary-600: #fa7f03;
  --ring: rgba(255,179,102,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body { 
  background: var(--bg); 
  color: var(--text); 
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; 
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.site-header { 
  position: sticky; 
  top: 0; 
  z-index: 20; 
  background: rgba(0,0,0,0.8); 
  backdrop-filter: blur(10px); 
  border-bottom: 1px solid rgba(255,179,102,0.2); 
  transition: all 0.3s ease;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { 
  color: var(--text); 
  text-decoration: none; 
  font-weight: 700; 
  letter-spacing: 0.2px; 
  transition: color 0.2s ease, transform 0.2s ease;
}
.brand:hover { 
  color: var(--primary); 
  transform: translateY(-1px);
}
.nav-toggle { 
  display: none; 
  background: none; 
  border: none; 
  color: var(--text); 
  font-size: 22px; 
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.nav-toggle:hover { 
  color: var(--primary); 
  transform: scale(1.1);
}
.nav-list { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav-list a { 
  color: var(--text); 
  text-decoration: none; 
  opacity: 0.9; 
  transition: color 0.2s ease, opacity 0.2s ease;
  position: relative;
}
.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.nav-list a:hover { 
  color: var(--primary); 
  opacity: 1;
}
.nav-list a:hover::after {
  width: 100%;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-list { display: none; position: absolute; top: 64px; right: 20px; background: var(--surface); padding: 12px 14px; border: 1px solid rgba(255,179,102,0.3); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
  .nav-list.open { display: block; }
}

.hero { 
  padding: 80px 0 16px; 
  margin-bottom: 0;
  animation: fadeInUp 0.9s ease;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero h1 { 
  font-size: clamp(32px, 5.5vw, 56px); 
  margin: 0 0 16px; 
  font-weight: 700;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.highlight { 
  color: var(--primary); 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subtitle { 
  color: var(--muted); 
  max-width: 720px; 
  margin: 0; 
  font-size: 18px;
  line-height: 1.7;
}
.hero-cta { 
  margin-top: 24px; 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap;
}

.button { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: 8px; 
  padding: 12px 20px; 
  border-radius: 12px; 
  border: 1px solid rgba(255,179,102,0.3); 
  color: var(--text); 
  background: linear-gradient(180deg, rgba(255,179,102,0.15), rgba(255,179,102,0.08)); 
  text-decoration: none; 
  box-shadow: 0 4px 12px rgba(255,179,102,0.1), inset 0 1px 0 rgba(255,255,255,0.05); 
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}
.button:hover::before {
  left: 100%;
}
.button:hover { 
  border-color: rgba(255,179,102,0.8); 
  background: linear-gradient(180deg, rgba(255,179,102,0.3), rgba(255,179,102,0.2)); 
  transform: translateY(-2px); 
  box-shadow: 0 8px 24px rgba(255,179,102,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}
.button:active {
  transform: translateY(0);
}
.button.secondary { 
  background: transparent; 
  border-color: rgba(255,179,102,0.2);
}
.button.secondary:hover {
  background: rgba(255,179,102,0.1);
}

.section { 
  padding: 2px 0; 
  animation: fadeInUp 0.9s ease 0.2s both;
}
.section-head h2 { 
  margin: 0 0 8px; 
  font-size: 28px; 
  font-weight: 700;
}
.section-head p { 
  margin: 0 0 24px; 
  color: var(--muted); 
  font-size: 16px;
}

.grid { 
  display: grid; 
  grid-template-columns: repeat(3, minmax(0, 1fr)); 
  gap: 24px; 
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; gap: 20px; } }

.card { 
  background: var(--surface); 
  border: 1px solid rgba(255,179,102,0.2); 
  border-radius: 16px; 
  overflow: hidden; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
  display: flex; 
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.card-link:hover {
  text-decoration: none;
  color: inherit;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,179,102,0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover::before {
  opacity: 1;
}
.card:hover { 
  transform: translateY(-4px); 
  border-color: rgba(255,179,102,0.6); 
  box-shadow: 0 20px 50px rgba(255,179,102,0.2);
}
.card img { 
  width: 100%; 
  height: 200px; 
  object-fit: cover; 
  background: #1a1a1a; 
  transition: transform 0.3s ease;
}
.card:hover img {
  transform: scale(1.05);
}
.card-body { 
  padding: 20px; 
  display: grid; 
  gap: 12px; 
}
.card-title { 
  margin: 0; 
  font-size: 20px; 
  font-weight: 600;
}
.card-desc { 
  color: var(--muted); 
  margin: 0; 
  line-height: 1.6;
}
.card-tags { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
}
.tag { 
  font-size: 12px; 
  padding: 6px 12px; 
  border-radius: 20px; 
  border: 1px solid rgba(255,179,102,0.3); 
  background: rgba(255,179,102,0.08);
  color: var(--muted); 
  transition: all 0.2s ease;
  font-weight: 500;
}
.tag:hover {
  border-color: rgba(255,179,102,0.5);
  background: rgba(255,179,102,0.15);
  color: var(--primary);
}
.card-actions { 
  display: flex; 
  gap: 16px; 
  margin-top: 8px; 
}
.card-actions a { 
  font-size: 14px; 
  color: var(--primary); 
  text-decoration: none; 
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}
.card-actions a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.card-actions a:hover { 
  color: var(--primary-600); 
}
.card-actions a:hover::after {
  width: 100%;
}

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

.site-footer { 
  padding: 32px 0 48px; 
  color: var(--muted); 
  text-align: center;
  border-top: 1px solid rgba(255,179,102,0.1);
}
.site-footer p {
  margin: 0;
  font-size: 14px;
}

/* Case Study Pages */
main.section h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 16px;
  font-weight: 700;
  line-height: 1.2;
}

main.section h2 {
  margin: 32px 0 16px;
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
}

main.section h3 {
  margin: 24px 0 12px;
  font-size: 20px;
  font-weight: 600;
}

main.section p {
  margin: 0 0 16px;
  line-height: 1.7;
}

main.section ul, main.section ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

main.section li {
  margin: 8px 0;
  line-height: 1.7;
}

main.section code {
  background: rgba(255,179,102,0.15);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Courier New', monospace;
}

figure {
  margin: 32px 0;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  font-style: italic;
}

/* Focus styles */
:where(a, button, [tabindex]) { outline: none; }
:where(a, button, [tabindex]):focus-visible { box-shadow: 0 0 0 3px var(--ring); border-radius: 10px; }

/* Loading animation for content */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#projects-grid .card {
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

#projects-grid .card:nth-child(1) { animation-delay: 0.1s; }
#projects-grid .card:nth-child(2) { animation-delay: 0.2s; }
#projects-grid .card:nth-child(3) { animation-delay: 0.3s; }
#projects-grid .card:nth-child(4) { animation-delay: 0.4s; }
#projects-grid .card:nth-child(5) { animation-delay: 0.5s; }
#projects-grid .card:nth-child(6) { animation-delay: 0.6s; }
