/* ========================================
   Zyd Portfolio — Dark + Gold Theme
   Inspired by Qtile setup: #1a1d23 / #f0a030
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #1a1d23;
  color: #d1d5db;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(240, 160, 48, 0.3); color: #fff; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1d23; }
::-webkit-scrollbar-thumb { background: #f0a030; border-radius: 4px; }

img { max-width: 100%; display: block; }
a { color: #f0a030; text-decoration: none; transition: color 0.3s; }
a:hover { color: #f4b94d; }

/* --- Utility --- */
.accent { color: #f0a030; }
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 100px 0;
}
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #e8e8e8;
  margin-bottom: 48px;
  font-family: 'JetBrains Mono', monospace;
}
.section-title .accent { font-weight: 700; }
.section-title.center { text-align: center; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 29, 35, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(240, 160, 48, 0.1);
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: rgba(240, 160, 48, 0.25); }
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #e8e8e8;
  font-family: 'JetBrains Mono', monospace;
}
.logo:hover { color: #f0a030; }
.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}
.nav-link {
  font-size: 0.95rem;
  color: #9ca3af;
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #f0a030;
  transition: width 0.3s;
}
.nav-link:hover { color: #f0a030; }
.nav-link:hover::after { width: 100%; }

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #d1d5db;
  transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
}
.hero-content { text-align: center; max-width: 700px; }
.hero-greeting {
  font-family: 'JetBrains Mono', monospace;
  color: #f0a030;
  font-size: 1rem;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeInUp 0.6s 0.2s forwards;
}
.hero-name {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  color: #e8e8e8;
  line-height: 1.1;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInUp 0.6s 0.4s forwards;
}
.hero-titles {
  height: 40px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.6s 0.6s forwards;
}
.hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  color: #9ca3af;
}
.hero-title::after {
  content: '|';
  color: #f0a030;
  animation: blink 1s step-end infinite;
}
.hero-desc {
  font-size: 1.1rem;
  color: #9ca3af;
  max-width: 500px;
  margin: 0 auto 36px;
  opacity: 0;
  animation: fadeInUp 0.6s 0.8s forwards;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s 1s forwards;
}
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  opacity: 0;
  animation: fadeInUp 0.6s 1.4s forwards;
}
.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, #f0a030, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}
.btn-primary {
  background: #f0a030;
  color: #1a1d23;
  border: 2px solid #f0a030;
}
.btn-primary:hover {
  background: #f4b94d;
  border-color: #f4b94d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240, 160, 48, 0.25);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: #f0a030;
  border: 2px solid #f0a030;
}
.btn-outline:hover {
  background: rgba(240, 160, 48, 0.1);
  transform: translateY(-2px);
}
.btn-large { padding: 16px 40px; font-size: 1rem; }


.skill-stack-divider {
  height: 1px;
  background: rgba(240, 160, 48, 0.12);
  margin: 0 16px;
}
.skill-stack-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #9ca3af;
  cursor: pointer;
  user-select: none;
}
.skill-stack-header:hover {
  background: rgba(240, 160, 48, 0.05);
}
.skill-stack-icon {
  font-size: 0.85rem;
}
.skill-stack-label {
  flex: 1;
  font-weight: 600;
  color: #e8e8e8;
  font-size: 0.82rem;
}
.skill-stack-toggle {
  font-size: 1rem;
  color: #f0a030;
  transition: transform 0.3s;
}
.skill-stack-toggle.open {
  transform: rotate(45deg);
}
.skill-stack-body {
  padding: 4px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 500px;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 1;
}
.skill-stack-body.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}
.skill-stack-item {
  font-size: 0.72rem;
  color: #d1d5db;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.skill-stack-item:hover {
  background: rgba(240, 160, 48, 0.1);
  color: #f0a030;
}
.skill-stack-item[data-cat="ai"] { border-left: 2px solid #a78bfa; }
.skill-stack-item[data-cat="infra"] { border-left: 2px solid #60a5fa; }
.skill-stack-item[data-cat="test"] { border-left: 2px solid #34d399; }
.skill-stack-item[data-cat="ops"] { border-left: 2px solid #f472b6; }
.skill-stack-item[data-cat="crm"] { border-left: 2px solid #fbbf24; }
.skill-stack-item[data-cat="voice"] { border-left: 2px solid #2dd4bf; }
.skill-stack-item[data-cat="web"] { border-left: 2px solid #fb923c; }
.skill-stack-item[data-cat="debug"] { border-left: 2px solid #e879f9; }

/* --- Hermes Agent Widget (sticky badge) --- */
.hermes-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  text-align: left;
  background: rgba(36, 40, 48, 0.92);
  border: 1px solid rgba(240, 160, 48, 0.2);
  border-radius: 10px;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s;
  min-width: 240px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.hermes-widget:hover {
  border-color: rgba(240, 160, 48, 0.4);
}
.hermes-widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(240, 160, 48, 0.12);
  color: #9ca3af;
}
.hermes-dot {
  font-size: 0.7rem;
  color: #22c55e;
  transition: color 0.3s;
}
.hermes-dot.offline {
  color: #ef4444;
}
.hermes-label {
  flex: 1;
  font-weight: 600;
  color: #e8e8e8;
  font-size: 0.82rem;
}
.hermes-spinner {
  font-size: 0.85rem;
  color: #6b7280;
  transition: transform 0.3s;
}
.hermes-spinner.loading {
  animation: spin 1s linear infinite;
  color: #f0a030;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.hermes-widget-body {
  padding: 10px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hermes-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.hermes-key {
  color: #6b7280;
  flex-shrink: 0;
}
.hermes-val {
  color: #d1d5db;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-text p {
  margin-bottom: 16px;
  font-size: 1.05rem;
  color: #9ca3af;
}
.about-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.stat {
  background: #242830;
  border: 1px solid #2a2e38;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.3s;
}
.stat:hover { border-color: rgba(240, 160, 48, 0.4); }
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: #f0a030;
  font-family: 'JetBrains Mono', monospace;
}
.stat-label { color: #9ca3af; font-size: 0.9rem; }

/* --- Skills --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.skill-card {
  background: #242830;
  border: 1px solid #2a2e38;
  border-radius: 12px;
  padding: 28px 24px;
  transition: all 0.3s;
}
.skill-card:hover {
  border-color: #f0a030;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.skill-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: #f0a030;
}
.skill-card h3 {
  font-size: 1.1rem;
  color: #e8e8e8;
  margin-bottom: 8px;
}
.skill-card p { font-size: 0.9rem; color: #9ca3af; }

/* --- Projects --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  background: #242830;
  border: 1px solid #2a2e38;
  border-radius: 12px;
  padding: 28px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: #f0a030;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.project-folder svg { width: 36px; height: 36px; color: #f0a030; }
.project-links { display: flex; gap: 12px; }
.project-links a svg { width: 22px; height: 22px; color: #9ca3af; transition: color 0.3s; }
.project-links a:hover svg { color: #f0a030; }
.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #e8e8e8;
  margin-bottom: 12px;
}
.project-desc {
  font-size: 0.9rem;
  color: #9ca3af;
  flex: 1;
  margin-bottom: 20px;
  line-height: 1.7;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.project-tech li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #9ca3af;
  background: rgba(240, 160, 48, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
}

/* --- Experience (Timeline) --- */
.experience-list {
  position: relative;
  padding-left: 32px;
}
.experience-list::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, #f0a030, rgba(240, 160, 48, 0.15));
}
.exp-card {
  position: relative;
  padding: 0 0 28px 28px;
  border: none;
  background: none;
}
.exp-card:last-child {
  padding-bottom: 0;
}
.exp-card::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f0a030;
  border: 3px solid #1a1d23;
  box-shadow: 0 0 0 2px #f0a030;
  z-index: 1;
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}
.exp-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8e8e8;
  margin-bottom: 2px;
}
.exp-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #f0a030;
}
.exp-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #6b7280;
  white-space: nowrap;
  padding-top: 2px;
}
.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exp-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #9ca3af;
  background: rgba(240, 160, 48, 0.06);
  border: 1px solid rgba(240, 160, 48, 0.1);
  padding: 2px 10px;
  border-radius: 12px;
}

/* --- Achievements --- */
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.achievement-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #242830;
  border: 1px solid #2a2e38;
  border-radius: 10px;
  padding: 12px 20px;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.achievement-item:hover {
  border-color: #f0a030;
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(240, 160, 48, 0.15);
}
.achievement-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #2a2e38;
}
.achievement-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.achievement-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #e8e8e8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.achievement-result {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #f0a030;
}

/* --- Skills Categories --- */
.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.skill-category h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #e8e8e8;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.skill-category h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: #f0a030;
  margin-top: 6px;
}
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-pills span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #d1d5db;
  background: rgba(240, 160, 48, 0.08);
  border: 1px solid rgba(240, 160, 48, 0.15);
  padding: 4px 12px;
  border-radius: 6px;
  transition: all 0.3s;
}
.skill-pills span:hover {
  background: rgba(240, 160, 48, 0.2);
  border-color: #f0a030;
  transform: translateY(-2px);
}

/* --- Contact --- */
.contact-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}
.contact-text {
  font-size: 1.1rem;
  color: #9ca3af;
  margin-bottom: 36px;
  line-height: 1.8;
}
.contact-links {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.contact-link svg {
  width: 28px;
  height: 28px;
  color: #9ca3af;
  transition: all 0.3s;
}
.contact-link:hover svg { color: #f0a030; transform: translateY(-2px); }
.contact-phone {
  margin-top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #6b7280;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 40px 24px;
  color: #6b7280;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}
.footer .accent { font-size: 1rem; }
.ver {
  font-size: 0.65rem;
  color: #4b5563;
  vertical-align: super;
}

/* --- Animations --- */
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(20px); }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(26, 29, 35, 0.98);
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
    gap: 24px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s;
    pointer-events: none;
    border-bottom: 1px solid rgba(240, 160, 48, 0.15);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .menu-toggle { display: flex; }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-name { font-size: 2.5rem; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hermes-widget {
    position: static;
    margin: 32px auto 48px;
    min-width: unset;
    width: calc(100% - 32px);
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; }
}
