/* =============================================================
   PREMIUM APPLE-INSPIRED PORTFOLIO
   Glassmorphism · Auroras · Macbook dock · Smooth motion
============================================================= */

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

:root {
  /* Brand */
  --primary: #0a84ff;
  --accent:  #bf5af2;

  /* Dark theme palette */
  --bg-1: #06060d;
  --bg-2: #0c0c18;
  --bg-3: #15152a;
  --text: #f5f6fa;
  --text-dim: #a4a8c1;
  --muted: #6b7090;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --glass: rgba(255,255,255,0.06);
  --glass-strong: rgba(255,255,255,0.12);
  --shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 8px 30px -10px rgba(0,0,0,0.4);
  --shadow-soft: 0 18px 50px -20px rgba(0,0,0,0.45);

  /* Transitions */
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

[data-theme="light"] {
  --bg-1: #f3f4fb;
  --bg-2: #eaecf6;
  --bg-3: #ffffff;
  --text: #0e1020;
  --text-dim: #4f5571;
  --muted: #818699;
  --line: rgba(15,16,30,0.08);
  --line-strong: rgba(15,16,30,0.18);
  --glass: rgba(255,255,255,0.55);
  --glass-strong: rgba(255,255,255,0.75);
  --shadow: 0 30px 80px -30px rgba(20,30,80,0.25), 0 8px 30px -10px rgba(20,30,80,0.12);
  --shadow-soft: 0 18px 50px -20px rgba(20,30,80,0.18);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-1);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .8s var(--ease), color .4s var(--ease);
  letter-spacing: -0.01em;
  padding-bottom: 120px;
}

/* =========== AURORA BACKGROUND =========== */
.aurora {
  position: fixed; inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 50% -10%, rgba(10,132,255,0.18), transparent 60%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(191,90,242,0.15), transparent 65%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  animation: float 28s var(--ease) infinite;
}
.blob-1 { width: 500px; height: 500px; background: radial-gradient(circle, var(--primary), transparent 70%); top: -120px; left: -100px; }
.blob-2 { width: 600px; height: 600px; background: radial-gradient(circle, var(--accent), transparent 70%); top: 40%; right: -200px; animation-delay: -10s; }
.blob-3 { width: 420px; height: 420px; background: radial-gradient(circle, #30d158, transparent 70%); bottom: -100px; left: 30%; animation-delay: -18s; opacity: .35; }
[data-theme="light"] .aurora-blob { opacity: .28; }
.aurora-grain {
  position: absolute; inset: 0;
  opacity: .25;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.1); }
  66% { transform: translate(-40px, 50px) scale(0.95); }
}

/* =========== TOP CONTROLS (theme LEFT, clock RIGHT) =========== */
.top-left-controls,
.top-right-controls {
  position: fixed; top: 22px;
  display: flex; gap: 12px; align-items: center;
  z-index: 50;
  animation: slideDown .8s var(--ease) .2s both;
}
.top-left-controls  { left: 22px;  }
.top-right-controls { right: 22px; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.glass-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all .3s var(--ease);
  text-decoration: none;
}
.glass-pill:hover { background: var(--glass-strong); border-color: var(--line-strong); transform: translateY(-1px); }
.glass-pill svg { width: 16px; height: 16px; stroke-width: 2; }
.clock { font-variant-numeric: tabular-nums; }
.clock .dot { width: 4px; height: 4px; background: var(--text-dim); border-radius: 50%; }

/* Theme toggle (Apple-style switch) */
.theme-toggle {
  position: relative;
  width: 64px; height: 34px;
  padding: 0;
  cursor: pointer;
  background: var(--glass);
}
.theme-toggle .icon-sun, .theme-toggle .icon-moon {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.theme-toggle .icon-sun { left: 9px; opacity: 1; color: #ffd60a; }
.theme-toggle .icon-moon { right: 9px; opacity: .35; color: var(--text-dim); }
[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; }
[data-theme="dark"]  .theme-toggle .icon-moon { opacity: .9; }
.toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 28px; height: 28px;
  background: linear-gradient(180deg, #fff, #e5e7ee);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25), inset 0 -1px 1px rgba(0,0,0,0.05);
  transition: transform .35s var(--ease-spring), background .3s var(--ease);
}
[data-theme="dark"] .toggle-knob {
  transform: translateX(30px);
  background: linear-gradient(180deg, #2c2e44, #1a1c2e);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 -1px 1px rgba(255,255,255,0.06);
}

.back-pill { color: var(--text); }

/* =========== TYPOGRAPHY =========== */
.display, .display-2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.display { font-size: clamp(48px, 8vw, 96px); }
.display-2 { font-size: clamp(36px, 5vw, 64px); }
.display em, .display-2 em { font-style: italic; color: var(--text-dim); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 6px 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
.eyebrow svg { width: 14px; height: 14px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.6);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(48, 209, 88, 0); }
  100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); }
}

.lead { font-size: 18px; color: var(--text-dim); max-width: 640px; }
.muted { color: var(--muted); }

.grad-text {
  background: linear-gradient(120deg, var(--primary), var(--accent) 60%, #ff8a5b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========== LAYOUT =========== */
.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 28px;
  position: relative;
}
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head .lead { margin: 16px auto 0; }

/* =========== HERO =========== */
.hero { padding-top: 140px; min-height: 90vh; display: flex; flex-direction: column; justify-content: center; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-text > * { animation: rise .8s var(--ease) both; }
.hero-text > *:nth-child(1) { animation-delay: .1s; }
.hero-text > *:nth-child(2) { animation-delay: .2s; }
.hero-text > *:nth-child(3) { animation-delay: .3s; }
.hero-text > *:nth-child(4) { animation-delay: .4s; }
.hero-text > *:nth-child(5) { animation-delay: .5s; }
.hero-text > *:nth-child(6) { animation-delay: .6s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

.hero-tag {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 24px; color: var(--text-dim); margin: 16px 0 6px;
}
.hero-intro { font-size: 17px; color: var(--text-dim); max-width: 540px; margin-bottom: 32px; }

.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px;
}

/* Call button: number on desktop, "Call Now" on small screens */
.call-btn .call-cta { display: none; }
.call-btn .call-num { display: inline; }
.hero-meta {
  display: flex; gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta strong { font-size: 28px; font-weight: 700; }
.hero-meta span { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.orbit {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.ring {
  position: absolute;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}
.ring.r1 { width: 92%; height: 92%; }
.ring.r2 { width: 75%; height: 75%; animation-direction: reverse; animation-duration: 30s; border-style: solid; border-color: var(--line); }
.ring.r3 { width: 60%; height: 60%; animation-duration: 22s; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.photo-frame {
  position: relative;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 1s var(--ease) .3s both;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 120px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}
.halo {
  position: absolute; inset: -25%;
  background: radial-gradient(circle, var(--primary), transparent 60%);
  opacity: .35;
  filter: blur(40px);
  z-index: -1;
}

.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: var(--glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  animation: floatY 5s ease-in-out infinite;
}
.float-card svg { width: 22px; height: 22px; color: var(--primary); }
.float-card strong { font-size: 14px; display: block; }
.float-card span { font-size: 11px; color: var(--text-dim); }
.card-1 { top: 12%; right: -6%; animation-delay: -2s; }
.card-2 { bottom: 14%; left: -8%; }

.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text-dim);
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%,100% { transform: translate(-50%, 0); }
  50%     { transform: translate(-50%, 8px); }
}

/* =========== BUTTONS =========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 14px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .3s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 10px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--primary), 0 4px 14px -6px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--primary), 0 6px 20px -6px var(--accent); }

.btn-glass {
  background: var(--glass);
  border-color: var(--line);
  color: var(--text);
  backdrop-filter: blur(20px);
}
.btn-glass:hover { background: var(--glass-strong); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--glass); }

/* =========== GLASS CARD =========== */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: all .4s var(--ease);
}
.glass-card:hover { border-color: var(--line-strong); }

/* =========== ABOUT =========== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}
.about-text { padding: 36px; }
.about-text h4 { margin: 24px 0 14px; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px;
  font-size: 12px; font-weight: 500;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }

.stats-stack { display: grid; gap: 16px; }
.stat {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 26px;
}
.stat svg {
  width: 32px; height: 32px;
  padding: 8px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-sizing: content-box;
}
.stat strong { font-size: 26px; font-weight: 700; display: block; }
.stat span { font-size: 13px; color: var(--text-dim); }

/* =========== PROJECTS =========== */
.project-toolbar {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  padding: 16px 18px;
  margin-bottom: 36px;
}
.search-box {
  flex: 1; min-width: 240px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--line);
  border-radius: 12px;
}
[data-theme="light"] .search-box { background: rgba(255,255,255,0.5); }
.search-box svg { width: 18px; height: 18px; color: var(--text-dim); }
.search-box input {
  flex: 1;
  background: transparent; border: none; outline: none;
  font-family: inherit; font-size: 14px; color: var(--text);
}
.search-box input::placeholder { color: var(--muted); }

.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 9px 16px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .25s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--line-strong); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px -8px var(--primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
}
.project-card {
  padding: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), border-color .3s var(--ease);
}
.project-card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.project-card.hidden { display: none; }

.project-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.project-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.project-card:hover .project-img img { transform: scale(1.06); }
.no-img-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: rgba(255,255,255,.7);
}
.no-img-placeholder svg { width: 48px; height: 48px; }
.cat-tag {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.project-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.project-body p { font-size: 14px; color: var(--text-dim); flex: 1; margin-bottom: 18px; }
.project-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.no-results { text-align: center; padding: 40px; }

/* =========== SERVICES =========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.service-card {
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  animation: rise .8s var(--ease) both;
  animation-delay: var(--delay, 0ms);
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(10,132,255,0.15), transparent 50%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.service-card:hover::before { opacity: 1; }
.service-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.service-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px -8px var(--primary);
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.service-card p { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }
.price-tag {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  padding: 6px 12px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
}

/* =========== CONTACT =========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
}
.contact-info { padding: 36px; }
.contact-info h3 { font-size: 20px; font-weight: 600; margin-bottom: 18px; }
.contact-info ul { list-style: none; display: grid; gap: 14px; }
.contact-info li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-dim); }
.contact-info li svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 3px; }
.contact-info a { color: var(--text-dim); text-decoration: none; transition: color .25s; }
.contact-info a:hover { color: var(--text); }
.contact-info h4 { margin-top: 24px; font-weight: 600; font-size: 14px; }

.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: all .25s var(--ease);
}
.social-btn:hover { color: var(--text); transform: translateY(-3px); border-color: var(--line-strong); }
.social-btn svg { width: 18px; height: 18px; }

.contact-form { padding: 36px; }
.contact-form h3 { font-size: 20px; font-weight: 600; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
  font-size: 13px; font-weight: 500;
  color: var(--text-dim);
}
.contact-form input,
.contact-form textarea {
  padding: 13px 16px;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit; font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .25s, background .25s;
  resize: vertical;
}
[data-theme="light"] .contact-form input,
[data-theme="light"] .contact-form textarea { background: rgba(255,255,255,0.6); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); background: rgba(10,132,255,0.06); }

.form-status { margin-top: 14px; font-size: 13px; min-height: 18px; }
.form-status.success { color: #30d158; }
.form-status.error { color: #ff453a; }

/* =========== DOCK (Footer) =========== */
.dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  animation: dockUp 1s var(--ease-spring) .3s both;
}
@keyframes dockUp {
  from { opacity: 0; transform: translate(-50%, 80px) scale(0.85); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.dock-shelf {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 12px;
  background: var(--glass-strong);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: var(--shadow);
  position: relative;
}
.dock-shelf::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 60%);
  pointer-events: none;
}
.dock-divider {
  width: 1px; height: 32px;
  background: var(--line-strong);
  margin: 0 6px;
  align-self: center;
}
.dock-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none;
  padding: 4px;
  transition: transform .3s var(--ease-spring);
}
.dock-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  transition: all .3s var(--ease-spring);
  box-shadow: 0 6px 14px -4px rgba(0,0,0,0.3);
}
.dock-icon svg { width: 22px; height: 22px; }
.dock-label {
  display: none;
}
.dock-item[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%; transform: translateX(-50%) scale(.9);
  padding: 6px 12px;
  font-size: 12px; font-weight: 500;
  color: var(--text);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.dock-item:hover { transform: translateY(-12px) scale(1.15); }
.dock-item:hover .dock-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-color: transparent;
  box-shadow: 0 14px 30px -6px var(--primary);
}
.dock-item:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

.dock-item .active-dot {
  position: absolute;
  bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s var(--ease);
  box-shadow: 0 0 8px var(--primary);
}
.dock-item.active .active-dot { opacity: 1; }
.dock-item.active .dock-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-color: transparent;
}

/* =========== PROJECT DETAIL =========== */
.project-page { padding-top: 100px; }
.project-hero { text-align: center; }
.project-hero .lead { margin: 18px auto 30px; }
.project-hero .hero-actions { justify-content: center; }
.project-cover { padding: 0; overflow: hidden; }
.project-cover img { width: 100%; display: block; max-height: 540px; object-fit: cover; }

.project-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.project-detail-grid h2 { font-size: 28px; margin-bottom: 14px; font-weight: 600; }
.project-detail-grid p { color: var(--text-dim); }

.project-meta h3 { font-size: 18px; margin-bottom: 18px; font-weight: 600; }
.meta-row { margin-bottom: 20px; }
.meta-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin-bottom: 8px;
}
.meta-label svg { width: 14px; height: 14px; }
.creds {
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
[data-theme="light"] .creds { background: rgba(255,255,255,0.6); }
.link { color: var(--primary); text-decoration: none; word-break: break-all; }
.link:hover { text-decoration: underline; }

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.screenshot {
  padding: 0;
  overflow: hidden;
  display: block;
}
.screenshot img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  transition: transform .5s var(--ease);
}
.screenshot:hover img { transform: scale(1.04); }
.text-center { text-align: center; }

/* =========== RESPONSIVE =========== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 380px; margin: 0 auto; }
  .hero-meta { gap: 24px; }
  .about-grid, .contact-grid, .project-detail-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .display { font-size: clamp(40px, 11vw, 72px); }
}

@media (max-width: 640px) {
  .section { padding: 70px 20px; }
  .hero { padding-top: 100px; padding-bottom: 140px; }
  .top-left-controls  { top: 14px; left: 14px; gap: 6px; }
  .top-right-controls { top: 14px; right: 14px; gap: 6px; }
  .glass-pill { padding: 8px 12px; font-size: 12px; }
  .clock { font-size: 11px; }
  .clock #clock-date { display: none; }
  .dock { bottom: 14px; }
  .dock-shelf { padding: 6px 8px; gap: 2px; }
  .dock-icon { width: 40px; height: 40px; border-radius: 11px; }
  .dock-icon svg { width: 18px; height: 18px; }
  .dock-divider { height: 28px; }
  .float-card { display: none; }
  .hero-actions { width: 100%; margin-bottom: 28px; }
  .btn { flex: 1; justify-content: center; min-width: 0; }
  /* Show "Call Now" text on mobile, hide raw number */
  .call-btn .call-cta { display: inline; }
  .call-btn .call-num { display: none; }
  .hero-meta { flex-wrap: wrap; gap: 18px 32px; }
  .hero-meta strong { font-size: 22px; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .dock-icon { width: 36px; height: 36px; border-radius: 10px; }
  .dock-icon svg { width: 16px; height: 16px; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* =========== PROJECT PAGE — TIGHT, PREDICTABLE SPACING =========== */
/* Make the whole project page a flex column with controlled gaps */
.project-page {
  padding-top: 90px;
  padding-bottom: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Kill the default 100px section padding entirely on project page */
.project-page .section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 auto;
  width: 100%;
}

/* Hero block */
.project-page .project-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.project-page .project-hero .display { margin-bottom: 14px; }
.project-page .project-hero .lead { margin: 0 auto 24px; max-width: 720px; }
.project-page .project-hero .hero-actions { margin: 0 auto 32px; justify-content: center; }
.project-page .project-cover { margin: 0; width: 100%; }
.project-page .project-cover img { max-height: 520px; width: 100%; }

/* Detail section: about/meta grid + screenshots inside, with internal gap */
.project-page .project-detail-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Screenshots heading — centered */
.project-page .screenshots-block { margin: 0; }
.project-page .screenshots-block .section-head {
  margin-bottom: 24px;
  text-align: center;
}
.project-page .screenshots-block .section-head .eyebrow { margin-bottom: 10px; }
.project-page .screenshots-block .section-head .display-2 {
  font-size: clamp(28px, 4vw, 38px);
}

/* Back arrow in dock — subtle accent */
.dock-back .dock-icon {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.18), rgba(191, 90, 242, 0.14));
}

@media (max-width: 640px) {
  .project-page { padding-top: 80px; padding-bottom: 120px; gap: 24px; }
  .project-page .project-detail-section { gap: 24px; }
}