/* ==========================================================================
   getNGFY — Mobile-First Design System (Clean Rebuild)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --font-header: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;

  --space-xs: 0.35rem;
  --space-sm: 0.7rem;
  --space-md: 1.1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.2rem;
  --space-xxl: 3.5rem;

  --max-width: 850px;
  --header-height: 65px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Dark Canvas (Default) */
  --bg-primary: #09090b;
  --bg-secondary: #09090b;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
}

[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #fafafa;
  --border-color: rgba(0, 0, 0, 0.08);
  --text-primary: #09090b;
  --text-secondary: #71717a;
  --text-muted: #a1a1aa;
}

body.show-services { --accent-color: #a855f7; }
body.show-portfolio { --accent-color: #3b82f6; }

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

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

h1, h2, h3, h4 {
  font-family: var(--font-header);
  font-weight: 400;
  line-height: 1.2;
}

p { color: var(--text-secondary); }
a { color: inherit; text-decoration: none; transition: color var(--transition); }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

.section { padding: var(--space-xl) 0; }

.section-title {
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 550px;
}

/* --- Header (Mobile Default) --- */
.header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-header);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.logo-dot {
  color: var(--accent-color);
  transition: color var(--transition);
}

/* Mobile Off-Canvas Menu (Default) */
.nav-menu {
  position: fixed;
  top: var(--header-height);
  right: -100%;
  width: 250px;
  height: calc(100vh - var(--header-height));
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}

.nav-menu.open { right: 0; }

.nav-menu div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md) !important;
  width: 100%;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  position: relative;
}

.nav-link:hover, .nav-link.active { color: var(--text-primary); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-color);
  transition: width var(--transition);
}

.nav-link.active::after { width: 30px; }

/* Mode Switcher */
.mode-switcher-minimal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-header);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.switcher-link {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.2rem 0.3rem;
  transition: color var(--transition);
  font-family: var(--font-header);
  font-size: 0.8rem;
}

.switcher-link:hover { color: var(--text-primary); }
.switcher-link.active { color: var(--accent-color); font-weight: 600; }
.switcher-separator { color: var(--text-muted); user-select: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0.4rem;
  transition: color var(--transition);
}

.theme-toggle:hover { color: var(--text-primary); }
.theme-toggle .sun-icon { display: none; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }
[data-theme="light"] .theme-toggle .sun-icon { display: block; }

/* Hamburger (Visible by default on mobile) */
.hamburger {
  display: block;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 22px;
  height: 18px;
  position: relative;
  z-index: 101;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  left: 0;
  transition: 0.2s ease-in-out;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

.hamburger.open span:nth-child(1) { top: 8px; transform: rotate(135deg); }
.hamburger.open span:nth-child(2) { opacity: 0; left: -20px; }
.hamburger.open span:nth-child(3) { top: 8px; transform: rotate(-135deg); }

/* --- Hero (Mobile: Centered Stack) --- */
.hero { padding: var(--space-xl) 0; }

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-color);
}

.hero-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.03em;
}

.hero-description {
  font-size: 0.95rem;
  margin: 0 auto;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xs);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  order: -1;
}

.hero-image-wrapper {
  width: 140px;
  height: 140px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.hero-avatar {
  width: 90px;
  height: 90px;
  transition: transform var(--transition);
}

.hero-image-wrapper:hover .hero-avatar { transform: scale(1.03); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-header);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  gap: var(--space-xs);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover { border-color: var(--text-primary); }

.badge-outline {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* --- Row Lists --- */
.row-list {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-lg);
}

.row-item {
  border-top: 1px solid var(--border-color);
  padding: var(--space-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.row-item-left {
  font-family: var(--font-header);
  font-size: 1.05rem;
  font-weight: 500;
}

.row-item-left-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.row-item-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.bullet-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--space-md);
}

.bullet-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* --- Why Us Grid --- */
.why-us-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-lg);
}

/* --- Project Rows --- */
.project-row {
  border-top: 1px solid var(--border-color);
  padding: var(--space-md) 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  cursor: pointer;
  transition: border-color var(--transition);
}

.project-row:last-child { border-bottom: 1px solid var(--border-color); }

.project-row-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-right: var(--space-sm);
}

.project-row-title {
  font-family: var(--font-header);
  font-size: 1.02rem;
  font-weight: 500;
}

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

.project-row-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.project-row:hover .project-row-title { color: var(--accent-color); }
.project-row:hover .project-row-arrow { transform: translateX(4px); color: var(--accent-color); }

/* --- Timeline --- */
.timeline-minimal {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-lg);
}

.timeline-item-minimal {
  border-top: 1px solid var(--border-color);
  padding: var(--space-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.timeline-date-minimal {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline-content-minimal {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.timeline-role-minimal {
  font-family: var(--font-header);
  font-size: 1.05rem;
  font-weight: 500;
}

.timeline-company-minimal {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

/* --- Contact --- */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.contact-info-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.contact-info-value { font-size: 0.95rem; }
.contact-info-value a:hover { color: var(--accent-color); }

/* Conversational Form */
.contact-form-conversational {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-family: var(--font-header);
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.conversational-sentence {
  display: inline;
  word-wrap: break-word;
}

.conv-input {
  display: inline-block;
  border: none;
  border-bottom: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0 2px;
  outline: none;
  transition: border-color var(--transition), color var(--transition);
  border-radius: 0;
  min-width: 120px;
  max-width: 100%;
}

.conv-input:focus {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.conv-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

select.conv-input {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg fill='none' stroke='%23888888' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'></path></svg>");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 10px;
}

.form-status {
  font-size: 0.8rem;
  font-family: var(--font-mono);
}
.form-status.success { color: #10b981; }
.form-status.error { color: #ef4444; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-color);
  padding: var(--space-md) 0;
  margin-top: var(--space-xl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-back-to-top {
  color: var(--text-muted);
  padding: 0.3rem;
  display: flex;
  transition: color var(--transition);
}

.footer-back-to-top:hover { color: var(--text-primary); }

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 92%;
  max-width: 580px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: var(--space-lg);
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
}

.modal-close:hover { color: var(--text-primary); }

.modal-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.modal-bullet-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--space-md);
}

.modal-bullet-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* --- View Pane Switching --- */
.view-pane { display: none; }
.view-pane.active { display: block; }


/* ==========================================================================
   DESKTOP UPGRADES (min-width: 768px)
   ========================================================================== */
@media (min-width: 768px) {
  html { font-size: 15px; }

  :root {
    --space-xs: 0.4rem;
    --space-sm: 0.8rem;
    --space-md: 1.2rem;
    --space-lg: 1.8rem;
    --space-xl: 2.5rem;
    --space-xxl: 4.5rem;
  }

  .container { padding: 0 var(--space-lg); }
  .section { padding: var(--space-xxl) 0; }
  .section-title { font-size: 1.8rem; margin-bottom: var(--space-sm); }
  .section-subtitle { font-size: 1rem; margin-bottom: var(--space-xl); }

  /* Desktop Nav */
  .hamburger { display: none; }

  .nav-menu {
    position: static;
    width: auto;
    height: auto;
    border: none;
    padding: 0;
    flex-direction: row;
    background: transparent;
    transition: none;
  }

  .nav-menu div {
    flex-direction: row;
    align-items: center;
    gap: var(--space-lg) !important;
  }

  .nav-link { width: auto; }
  .nav-link.active::after { width: 100%; }

  /* Desktop Hero */
  .hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    text-align: left;
    gap: var(--space-xl);
  }

  .hero-visual {
    order: 0;
    justify-content: flex-end;
  }

  .hero-title { font-size: 2.4rem; }
  .hero-description { margin: 0; }
  .hero-cta { justify-content: flex-start; }

  .hero-image-wrapper { width: 200px; height: 200px; }
  .hero-avatar { width: 130px; height: 130px; }

  /* Desktop Rows */
  .row-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
  }

  .timeline-item-minimal {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
  }

  /* Desktop Contact */
  .contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-xl);
  }

  .contact-form-conversational { font-size: 1.2rem; }
  .conv-input { font-size: 1.2rem; min-width: 150px; }

  /* Desktop Why Us */
  .why-us-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}


/* ==========================================================================
   Logo Animation — "Thinking Outside the Box"
   The outer hex (the "box") breathes and fades. The code brackets push 
   outward past its boundaries. The N stays solid and centered.
   ========================================================================== */

/* All animated elements share the same transform-origin: center of the SVG viewBox */
.logo-hex-outer,
.logo-hex-inner,
.logo-crossline,
.logo-bracket-left,
.logo-bracket-right,
.logo-n {
  transform-origin: 100px 100px;
}

/* Outer hex: expands outward, fades, then snaps back */
.logo-hex-outer {
  animation: hex-breathe 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Inner dashed hex: slow continuous rotation */
.logo-hex-inner {
  animation: hex-rotate 20s linear infinite;
}

/* Crosslines: subtle fade pulse */
.logo-crossline {
  animation: crossline-pulse 6s ease-in-out infinite;
}

/* Left bracket: pushes further left, past the box */
.logo-bracket-left {
  animation: bracket-push-left 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Right bracket: pushes further right, past the box */
.logo-bracket-right {
  animation: bracket-push-right 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* N letterform: stays solid with a subtle presence pulse */
.logo-n {
  animation: n-pulse 6s ease-in-out infinite;
}


/* --- Keyframes --- */

@keyframes hex-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  35% {
    transform: scale(1.12);
    opacity: 0.08;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.04;
  }
  70% {
    transform: scale(1.08);
    opacity: 0.12;
  }
}

@keyframes hex-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes crossline-pulse {
  0%, 100% { opacity: 0.1; }
  40% { opacity: 0.03; }
  60% { opacity: 0.03; }
}

@keyframes bracket-push-left {
  0%, 100% {
    transform: translateX(0);
    opacity: 1;
  }
  35% {
    transform: translateX(-12px);
    opacity: 1;
  }
  50% {
    transform: translateX(-16px);
    opacity: 0.7;
  }
  70% {
    transform: translateX(-8px);
    opacity: 0.9;
  }
}

@keyframes bracket-push-right {
  0%, 100% {
    transform: translateX(0);
    opacity: 1;
  }
  35% {
    transform: translateX(12px);
    opacity: 1;
  }
  50% {
    transform: translateX(16px);
    opacity: 0.7;
  }
  70% {
    transform: translateX(8px);
    opacity: 0.9;
  }
}

@keyframes n-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .logo-hex-outer,
  .logo-hex-inner,
  .logo-crossline,
  .logo-bracket-left,
  .logo-bracket-right,
  .logo-n {
    animation: none;
  }
}
