/* ============================================
   FAKHRUL.DEV — Portfolio
   Style: Media Diame / Plainthing Studio
   Flat dark, editorial, bold typography
   ============================================ */

/* ---------- Google Fonts are loaded in HTML ---------- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #0e0e0e;
  color: #fefefe;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-pad { padding: 6rem 0; }
.section-pad-sm { padding: 4rem 0; }

.accent { color: #d37d5c; }
.accent-gold { color: #ca7a1c; }
.accent-bright { color: #f0a553; }
.text-muted { color: #a0a0a0; }

/* ---------- Typography ---------- */
.display-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); line-height: 1.2; }
h4 { font-size: 1.125rem; }

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
}

/* ---------- Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid rgba(254, 254, 254, 0.08);
  margin: 0;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(47, 47, 47, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(254, 254, 254, 0.06);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-mark {
  height: 28px;
  width: auto;
  display: block;
}

.nav-logo-text {
  display: inline;
  letter-spacing: -0.02em;
}

.nav-logo-text { color: #d37d5c; }
.nav-logo-text > span { color: #ffffff; }

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

.nav-links a {
  font-size: 0.875rem;
  color: #a0a0a0;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active { color: #fefefe; }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #d37d5c;
}

.lang-toggle {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(254, 254, 254, 0.15);
  border-radius: 4px;
  color: #a0a0a0;
  transition: all 0.2s;
}

.lang-toggle:hover {
  border-color: #d37d5c;
  color: #d37d5c;
}

/* Hamburger */
.hamburger {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fefefe;
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- Mobile Nav ---------- */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .navbar {
    padding-top: env(safe-area-inset-top);
  }

  .nav-links {
    position: fixed;
    top: calc(4rem + env(safe-area-inset-top));
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(47, 47, 47, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem 1.5rem calc(2rem + env(safe-area-inset-bottom));
    gap: 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(254, 254, 254, 0.06);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  }

  .nav-links a {
    font-size: 1.0625rem;
    padding: 0.5rem 0;
  }

  .nav-links.open { transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4rem; /* navbar offset */
  position: relative;
  overflow: hidden;
}

/* Animated background orbs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #d37d5c 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation: hero-orb-1 12s ease-in-out infinite alternate;
}

.hero::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #ca7a1c 0%, transparent 70%);
  bottom: -15%;
  left: -10%;
  animation: hero-orb-2 15s ease-in-out infinite alternate;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

/* Hero office video */
.hero-video-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(211, 125, 92, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(211, 125, 92, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  background: #12141c;
}

.hero-video-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 60px rgba(211, 125, 92, 0.14);
}

.hero-video {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hero-visual-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #666;
}

.hero-visual-label .dot {
  width: 6px;
  height: 6px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Floating grid lines (subtle) */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg-grid::before {
  content: '';
  position: absolute;
  inset: -50%;
  background-image:
    linear-gradient(rgba(211,125,92,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(211,125,92,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: grid-drift 20s linear infinite;
}

/* Floating particles */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #d37d5c;
  border-radius: 50%;
  opacity: 0;
  animation: particle-float 8s ease-in-out infinite;
}

.hero-particle:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; animation-duration: 9s; }
.hero-particle:nth-child(2) { left: 70%; top: 30%; animation-delay: 1.5s; animation-duration: 11s; background: #f0a553; }
.hero-particle:nth-child(3) { left: 40%; top: 60%; animation-delay: 3s; animation-duration: 8s; }
.hero-particle:nth-child(4) { left: 85%; top: 70%; animation-delay: 4.5s; animation-duration: 10s; background: #ca7a1c; }
.hero-particle:nth-child(5) { left: 25%; top: 80%; animation-delay: 2s; animation-duration: 12s; background: #f0a553; }
.hero-particle:nth-child(6) { left: 55%; top: 15%; animation-delay: 5s; animation-duration: 9s; width: 2px; height: 2px; }
.hero-particle:nth-child(7) { left: 90%; top: 50%; animation-delay: 3.5s; animation-duration: 13s; background: #c8b49a; width: 4px; height: 4px; }
.hero-particle:nth-child(8) { left: 10%; top: 45%; animation-delay: 6s; animation-duration: 10s; background: #f0a553; }

@keyframes hero-orb-1 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.12; }
  50%  { transform: translate(-60px, 40px) scale(1.15); opacity: 0.18; }
  100% { transform: translate(30px, -30px) scale(0.9); opacity: 0.10; }
}

@keyframes hero-orb-2 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.10; }
  50%  { transform: translate(50px, -50px) scale(1.2); opacity: 0.16; }
  100% { transform: translate(-40px, 30px) scale(0.85); opacity: 0.08; }
}

@keyframes grid-drift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(80px, 80px) rotate(1deg); }
}

@keyframes particle-float {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  15%  { opacity: 0.6; }
  50%  { transform: translateY(-40px) scale(1.5); opacity: 0.3; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(-80px) scale(1); opacity: 0; }
}

.hero-title {
  font-size: clamp(4rem, 12vw, 8rem);
}

.hero-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: #d37d5c;
  margin-top: 0.75rem;
  letter-spacing: -0.01em;
}

.hero-tagline {
  color: #a0a0a0;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  max-width: 540px;
  margin-top: 1.25rem;
  line-height: 1.7;
}

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

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: 10rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.page-hero-title {
  font-size: clamp(3.5rem, 10vw, 7rem);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.25s;
}

.btn-primary {
  background: #d37d5c;
  color: #0e0e0e;
}

.btn-primary:hover {
  background: #f0a553;
}

.btn-outline {
  border: 1px solid rgba(254, 254, 254, 0.2);
  color: #fefefe;
}

.btn-outline:hover {
  border-color: #d37d5c;
  color: #d37d5c;
}

/* ---------- "What I Do" Cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #1a1a1a;
  border: 1px solid rgba(254, 254, 254, 0.05);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  transition: border-color 0.25s;
}

.service-card:hover {
  border-color: #d37d5c;
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  color: #d37d5c;
}

.service-card h3 { margin-bottom: 0.75rem; }

.service-card p {
  color: #a0a0a0;
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ---------- Featured / Project Cards ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  background: #1a1a1a;
  border: 1px solid rgba(254, 254, 254, 0.05);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: #d37d5c;
  transform: translateY(-4px);
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #d37d5c 0%, #ca7a1c 50%, #f0a553 100%);
  position: relative;
}

/* Variation gradients */
.project-thumb.var-2 { background: linear-gradient(135deg, #ca7a1c 0%, #c8b49a 50%, #d37d5c 100%); }
.project-thumb.var-3 { background: linear-gradient(135deg, #f0a553 0%, #d37d5c 60%, #1a1a1a 100%); }
.project-thumb.var-4 { background: linear-gradient(135deg, #c8b49a 0%, #d37d5c 50%, #ca7a1c 100%); }
.project-thumb.var-5 { background: linear-gradient(135deg, #d37d5c 0%, #1a1a1a 50%, #f0a553 100%); }
.project-thumb.var-6 { background: linear-gradient(135deg, #ca7a1c 0%, #f0a553 50%, #c8b49a 100%); }
.project-thumb.var-7 { background: linear-gradient(135deg, #f0a553 0%, #c8b49a 50%, #ca7a1c 100%); }
.project-thumb.var-8 { background: linear-gradient(135deg, #c8b49a 0%, #ca7a1c 50%, #d37d5c 100%); }
.project-thumb.var-9 { background: linear-gradient(135deg, #d37d5c 0%, #f0a553 40%, #c8b49a 100%); }

.project-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-body h3 { margin-bottom: 0.5rem; }

.project-desc {
  color: #a0a0a0;
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  padding: 0.3rem 0.625rem;
  background: rgba(211, 125, 92, 0.12);
  color: #d37d5c;
  border-radius: 4px;
  white-space: nowrap;
}

.external-icon {
  font-size: 0.8125rem;
  color: #a0a0a0;
  margin-left: 0.375rem;
  vertical-align: middle;
}

/* ---------- Tech Stack Badges ---------- */
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stack-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid rgba(254, 254, 254, 0.1);
  border-radius: 100px;
  color: #c8b49a;
  transition: all 0.2s;
}

.stack-badge:hover {
  border-color: #d37d5c;
  color: #d37d5c;
}

/* ---------- Section Heading ---------- */
.section-heading {
  margin-bottom: 3rem;
}

.section-heading h2 { margin-bottom: 0.75rem; }

.section-heading p {
  color: #a0a0a0;
  max-width: 560px;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #d37d5c;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* ---------- About Page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #d37d5c 0%, #ca7a1c 50%, #c8b49a 100%);
  border-radius: 8px;
}

.bio p {
  color: #a0a0a0;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.bio p strong { color: #fefefe; }

/* Skill Tags */
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.skill-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(254, 254, 254, 0.08);
  border-radius: 100px;
  color: #a0a0a0;
  transition: all 0.2s;
}

.skill-tag:hover {
  border-color: #d37d5c;
  color: #d37d5c;
}

.skill-tag.highlight {
  border-color: #d37d5c;
  color: #d37d5c;
  background: rgba(211, 125, 92, 0.08);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(254, 254, 254, 0.08);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d37d5c;
  transform: translateX(-50%);
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #d37d5c;
  margin-bottom: 0.375rem;
}

.timeline-item h3 { font-size: 1.125rem; margin-bottom: 0.25rem; }

.timeline-item .company {
  color: #c8b49a;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.timeline-item p {
  color: #a0a0a0;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ---------- Project Detail ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #a0a0a0;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover { color: #d37d5c; }

.detail-hero-thumb {
  width: 100%;
  aspect-ratio: 21 / 9;
  background: linear-gradient(135deg, #d37d5c 0%, #ca7a1c 50%, #f0a553 100%);
  border-radius: 8px;
  margin-bottom: 3rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.detail-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: #a0a0a0;
}

.detail-content {
  max-width: 720px;
}

.detail-content h2 {
  font-size: 1.5rem;
  margin: 3rem 0 1rem;
}

.detail-content p {
  color: #a0a0a0;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.arch-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  border: 1px dashed rgba(254, 254, 254, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a0a0a0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  margin: 2rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ca7a1c 0%, #c8b49a 100%);
  border-radius: 6px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  color: #a0a0a0;
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid rgba(254, 254, 254, 0.08);
  border-radius: 6px;
  padding: 0.875rem 1rem;
  color: #fefefe;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #d37d5c;
}

.form-group textarea { min-height: 160px; resize: vertical; }

.contact-info h3 { margin-bottom: 1.5rem; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(254, 254, 254, 0.05);
  color: #a0a0a0;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.contact-link:hover { color: #d37d5c; }

.contact-link-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #d37d5c;
  min-width: 3rem;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(254, 254, 254, 0.06);
  padding: 3rem 0;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: #a0a0a0;
}

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

.footer-links a {
  font-size: 0.8125rem;
  color: #a0a0a0;
  transition: color 0.2s;
}

.footer-links a:hover { color: #d37d5c; }

/* ---------- Fade In Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero { min-height: auto; padding: calc(6rem + env(safe-area-inset-top)) 0 3.5rem; }
  .hero .container { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { order: 2; width: 100%; max-width: 440px; margin: 1.5rem auto 0; }
  .hero-title { font-size: clamp(2.75rem, 11vw, 4.5rem); }
  .hero-subtitle { font-size: 1.125rem; margin-top: 0.5rem; }
  .hero-tagline { font-size: 0.9375rem; margin-top: 1rem; line-height: 1.6; }
  .hero-cta { margin-top: 1.75rem; gap: 0.75rem; }
  .section-pad { padding: 3.5rem 0; }
  .section-pad-sm { padding: 2.5rem 0; }
  .section-heading { margin-bottom: 2rem; }
  .page-hero { padding: calc(6.5rem + env(safe-area-inset-top)) 0 2rem; }
  .page-hero-title { font-size: clamp(2.75rem, 10vw, 4.5rem); }
  .services-grid { gap: 1.25rem; }
  .service-card { padding: 1.75rem 1.25rem; }
  .project-body { padding: 1.25rem 1rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-group input,
  .form-group textarea { font-size: 1rem; padding: 0.875rem; }
  .pixel-office { aspect-ratio: 4 / 3; }
  .po-agent .po-label { font-size: 0.4rem; }
  .po-agent .po-head { width: 10px; height: 10px; }
  .po-agent .po-body { width: 12px; height: 12px; }
}

@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-title { font-size: clamp(2.25rem, 10vw, 3rem); }
  .photo-placeholder { aspect-ratio: 16 / 10; max-height: 260px; }
  .timeline { padding-left: 1.5rem; }
  .timeline-item::before { left: -1.5rem; }
  .detail-hero-thumb { aspect-ratio: 16 / 9; margin-bottom: 2rem; }
  .detail-content h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
  .po-agent .po-label { display: none; }
}

/* ==========================================================
   PIXEL OFFICE — pure CSS 8-bit animated scene
   ponytail: box-shadow pixel art; upgrade to canvas if >10 agents
   ========================================================== */

/* Container */
.pixel-office {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
  border-radius: 12px;
  border: 1px solid rgba(211, 125, 92, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(211, 125, 92, 0.08);
  overflow: hidden;
  image-rendering: pixelated;
}

/* Floor */
.po-floor {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background:
    repeating-linear-gradient(90deg, #252525 0px, #252525 10%, #222 10%, #222 20%);
}

/* Wall */
.po-wall {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 65%;
  background: #1e1e1e;
  border-bottom: 3px solid #333;
}

/* -- Desks -- */
.po-desk {
  position: absolute;
  bottom: 25%;
  height: 12%;
  background: #3d2e1e;
  border-top: 3px solid #5a4230;
  border-radius: 2px;
}
.po-desk::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: 15%;
  width: 8%;
  height: 40%;
  background: #3d2e1e;
  box-shadow: calc(100% + 200%) 0 0 0 #3d2e1e;
}
.po-desk-1 { left: 4%; width: 20%; }
.po-desk-2 { left: 28%; width: 20%; }
.po-desk-3 { left: 52%; width: 20%; }

/* -- Monitors on desks -- */
.po-monitor {
  position: absolute;
  bottom: 37%;
  width: 8%;
  aspect-ratio: 5/4;
  background: #111;
  border: 2px solid #444;
  border-radius: 2px;
}
.po-monitor::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: #1a3a2a;
  animation: po-screen-glow 3s ease-in-out infinite alternate;
}
.po-monitor::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 30%;
  width: 40%;
  height: 6px;
  background: #444;
}
.po-mon-1 { left: 10%; }
.po-mon-2 { left: 34%; }
.po-mon-3 { left: 58%; }

@keyframes po-screen-glow {
  0%   { background: #1a3a2a; }
  50%  { background: #1e4535; }
  100% { background: #1a3a2a; }
}

/* -- Chairs -- */
.po-chair {
  position: absolute;
  bottom: 12%;
  width: 7%;
  height: 14%;
  background: #2a2a2a;
  border-radius: 2px 2px 0 0;
}
.po-chair::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 20%;
  width: 60%;
  height: 4px;
  background: #333;
  border-radius: 0 0 2px 2px;
}
.po-chair-1 { left: 11%; }
.po-chair-2 { left: 35%; }
.po-chair-3 { left: 59%; }

/* -- Whiteboard -- */
.po-whiteboard {
  position: absolute;
  top: 10%;
  left: 78%;
  width: 14%;
  height: 28%;
  background: #e8e0d4;
  border: 2px solid #c8b49a;
  border-radius: 2px;
}
.po-whiteboard::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 15%;
  width: 50%;
  height: 3px;
  background: #d37d5c;
  box-shadow:
    0 8px 0 0 #f0a553,
    0 16px 0 0 #d37d5c,
    20px 24px 0 0 #f0a553;
}

/* -- Server Rack -- */
.po-server-rack {
  position: absolute;
  right: 3%;
  bottom: 10%;
  width: 8%;
  height: 45%;
  background: #2a2a2a;
  border: 2px solid #444;
  border-radius: 2px;
}
.po-server-rack::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 15%;
  width: 70%;
  height: 6%;
  background: #333;
  border: 1px solid #555;
  box-shadow:
    0 0 3px rgba(76, 175, 80, 0.5),
    0px 10px 0 0 #333,
    0px 20px 0 0 #333,
    0px 30px 0 0 #333,
    0px 40px 0 0 #333;
}
.po-server-rack::after {
  content: '';
  position: absolute;
  top: 12%;
  right: 20%;
  width: 4px;
  height: 4px;
  background: #4caf50;
  border-radius: 50%;
  box-shadow:
    0 10px 0 0 #f0a553,
    0 20px 0 0 #4caf50,
    0 30px 0 0 #4caf50,
    0 40px 0 0 #d37d5c;
  animation: po-server-blink 2s steps(1) infinite;
}

@keyframes po-server-blink {
  0%   { opacity: 1; }
  50%  { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ===== AGENTS (shared) ===== */
.po-agent {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.po-agent .po-head {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  image-rendering: pixelated;
}
.po-agent .po-body {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  margin-top: -1px;
}
.po-agent .po-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: #888;
  margin-top: 2px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -- 1. Planner: seated, nodding -- */
.po-planner {
  bottom: 27%;
  left: 12%;
}
.po-planner .po-head {
  background: #d37d5c;
  animation: po-nod 4s ease-in-out infinite;
}
.po-planner .po-body {
  background: #5a4a8a;
}

@keyframes po-nod {
  0%, 70%, 100% { transform: translateY(0); }
  75% { transform: translateY(2px); }
  80% { transform: translateY(0); }
  85% { transform: translateY(2px); }
}

/* -- 2. Heavy Coder: seated, typing -- */
.po-coder {
  bottom: 27%;
  left: 36%;
}
.po-coder .po-head {
  background: #f0a553;
}
.po-coder .po-body {
  background: #2d6a4f;
}
.po-coder .po-hands {
  display: flex;
  gap: 6px;
  margin-top: -2px;
}
.po-coder .po-hands::before,
.po-coder .po-hands::after {
  content: '';
  width: 5px;
  height: 4px;
  background: #f0a553;
  border-radius: 1px;
  animation: po-type 0.4s steps(2) infinite alternate;
}
.po-coder .po-hands::after {
  animation-delay: 0.2s;
}

@keyframes po-type {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

/* -- 3. Designer: standing, drawing on whiteboard -- */
.po-designer {
  bottom: 16%;
  left: 76%;
}
.po-designer .po-head {
  background: #c8b49a;
}
.po-designer .po-body {
  background: #d37d5c;
  height: 20px;
}
.po-designer .po-arm {
  position: absolute;
  top: 16px;
  right: -8px;
  width: 10px;
  height: 3px;
  background: #c8b49a;
  transform-origin: left center;
  animation: po-draw 3s ease-in-out infinite;
}
.po-designer .po-arm::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -1px;
  width: 3px;
  height: 5px;
  background: #d37d5c;
  border-radius: 1px;
}

@keyframes po-draw {
  0%, 100% { transform: rotate(-15deg); }
  25%      { transform: rotate(10deg) translateX(2px); }
  50%      { transform: rotate(-5deg) translateX(-1px); }
  75%      { transform: rotate(15deg) translateX(3px); }
}

/* -- 4. Tester: seated, scrolling -- */
.po-tester {
  bottom: 27%;
  left: 60%;
}
.po-tester .po-head {
  background: #8bc34a;
  animation: po-scroll-look 5s ease-in-out infinite;
}
.po-tester .po-body {
  background: #455a64;
}

@keyframes po-scroll-look {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(1px); }
  60%      { transform: translateY(-1px); }
  90%      { transform: translateY(1px); }
}

/* -- 5. DevOps: standing by server rack -- */
.po-devops {
  bottom: 16%;
  right: 3%;
}
.po-devops .po-head {
  background: #ff7043;
  animation: po-maintain 6s ease-in-out infinite;
}
.po-devops .po-body {
  background: #37474f;
  height: 20px;
}

@keyframes po-maintain {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(3px); }
  50%      { transform: translateX(-2px); }
  75%      { transform: translateX(1px); }
}
