/* ============================================
   MrOne.Inc Portfolio — Modern Dark Theme
   ============================================ */

:root,
[data-theme="dark"] {
  --bg:         #0a0a0b;
  --bg-alt:     #111113;
  --surface:    #18181b;
  --border:     #27272a;
  --text:       #a1a1aa;
  --text-light: #d4d4d8;
  --white:      #fafafa;
  --accent:     #6366f1;
  --accent-2:   #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green:      #22c55e;
  --nav-bg:     rgba(10, 10, 11, 0.85);
  --radius:     12px;
  --radius-sm:  8px;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:       'JetBrains Mono', monospace;
}

[data-theme="light"] {
  --bg:         #ffffff;
  --bg-alt:     #f4f4f5;
  --surface:    #ffffff;
  --border:     #e4e4e7;
  --text:       #52525b;
  --text-light: #3f3f46;
  --white:      #18181b;
  --accent:     #4f46e5;
  --accent-2:   #6366f1;
  --accent-glow: rgba(79, 70, 229, 0.1);
  --green:      #16a34a;
  --nav-bg:     rgba(255, 255, 255, 0.85);
}

[data-theme="gold"] {
  --bg:         #0f0d08;
  --bg-alt:     #171309;
  --surface:    #1c1810;
  --border:     #33291a;
  --text:       #b8a882;
  --text-light: #ddd0b0;
  --white:      #fdf6e3;
  --accent:     #d4a017;
  --accent-2:   #f0c040;
  --accent-glow: rgba(212, 160, 23, 0.15);
  --green:      #86b300;
  --nav-bg:     rgba(15, 13, 8, 0.88);
}

[data-theme="silver"] {
  --bg:         #121215;
  --bg-alt:     #18181c;
  --surface:    #1e1e23;
  --border:     #2e2e35;
  --text:       #9e9ea8;
  --text-light: #c8c8d0;
  --white:      #eeeef2;
  --accent:     #8b8b9e;
  --accent-2:   #b0b0c4;
  --accent-glow: rgba(139, 139, 158, 0.12);
  --green:      #6dd495;
  --nav-bg:     rgba(18, 18, 21, 0.88);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--white); }

*, *::before, *::after {
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: 0s;
}
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition-duration: 0.3s !important;
  transition-timing-function: ease !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s;
}
.nav-scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  letter-spacing: -0.5px;
}
.logo-bracket { color: var(--text); }
.logo-dot { color: var(--accent); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-2); }

/* Theme Switcher */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  margin-left: 16px;
}
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.theme-btn:hover {
  color: var(--white);
  background: var(--border);
}
.theme-btn.active {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent-2);
  background: var(--accent-glow);
  border: 1px solid rgba(99,102,241,0.2);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.text-accent { color: var(--accent); }
.cursor {
  color: var(--accent);
  font-weight: 300;
  animation: none;
}
.hero-subtitle {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  max-width: 600px;
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-2);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-full { width: 100%; }

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 48px;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
}
.stat-label {
  font-size: 13px;
  color: var(--text);
  margin-top: 4px;
}

/* ---- Sections ---- */
.section {
  padding: 100px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-header.in-view {
  opacity: 1;
  transform: translateY(0);
}
.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 16px;
  color: var(--text);
  max-width: 500px;
  margin: 0 auto;
}

/* ---- Filter Bar ---- */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.filter-btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--white);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-lead {
  font-size: 20px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}
.about-text p {
  margin-bottom: 16px;
}
.about-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.tech-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-2);
  background: var(--accent-glow);
  border: 1px solid rgba(99,102,241,0.15);
  padding: 4px 14px;
  border-radius: 100px;
}

/* Skills */
.skill { margin-bottom: 20px; }
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.skill-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
}
.skill-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  font-family: var(--mono);
}
.skill-bar {
  height: 6px;
  background: var(--surface);
  border-radius: 100px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.skill-fill.in-view {
  width: var(--fill);
}

/* ---- Services ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
}
.service-card.in-view {
  opacity: 1;
  transform: translateY(0);
}
.service-card:nth-child(1).in-view { transition-delay: 0s; }
.service-card:nth-child(2).in-view { transition-delay: 0.1s; }
.service-card:nth-child(3).in-view { transition-delay: 0.2s; }
.service-card:nth-child(4).in-view { transition-delay: 0.3s; }
.service-card:nth-child(5).in-view { transition-delay: 0.4s; }
.service-card:nth-child(6).in-view { transition-delay: 0.5s; }

.service-card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  color: var(--accent-2);
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.service-card p {
  font-size: 14px;
  line-height: 1.7;
}

/* ---- Projects ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(20px);
}
.project-card.in-view {
  opacity: 1;
  transform: translateY(0);
}
.project-card:nth-child(1).in-view { transition-delay: 0s; }
.project-card:nth-child(2).in-view { transition-delay: 0.08s; }
.project-card:nth-child(3).in-view { transition-delay: 0.16s; }
.project-card:nth-child(4).in-view { transition-delay: 0.24s; }
.project-card:nth-child(5).in-view { transition-delay: 0.32s; }
.project-card:nth-child(6).in-view { transition-delay: 0.4s; }
.project-card:nth-child(7).in-view { transition-delay: 0.48s; }
.project-card:nth-child(8).in-view { transition-delay: 0.56s; }
.project-card:nth-child(9).in-view { transition-delay: 0.64s; }
.project-card:nth-child(10).in-view { transition-delay: 0.72s; }
.project-card:nth-child(11).in-view { transition-delay: 0.8s; }

.project-card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.project-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--surface), rgba(99,102,241,0.05));
  border-color: rgba(99,102,241,0.2);
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.project-type {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-2);
}
.project-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 100px;
}
.status-live {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.project-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.project-card p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-tech span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent-2);
  flex-shrink: 0;
}
.contact-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 2px;
}
.contact-item a,
.contact-item span:not(.contact-label) {
  font-size: 15px;
  color: var(--text-light);
}
.contact-social {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}
.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: all 0.2s;
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  transform: translateY(-2px);
}

/* Contact Form */
.contact-form .form-group { margin-bottom: 16px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--white);
  transition: border-color 0.2s;
  outline: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #52525b;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer p {
  font-size: 13px;
  color: #52525b;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; order: 3; }
  .theme-switcher { order: 2; margin-left: auto; margin-right: 12px; }
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }
  .nav-links a { font-size: 20px; }

  .hero { padding: 100px 0 60px; }
  .hero-stats { gap: 32px; }
  .stat-number { font-size: 24px; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .section { padding: 64px 0; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
