/* ============================================================
   QA PORTFOLIO — STYLES
   Structure:
   1. CSS Custom Properties (Light & Dark themes)
   2. Reset & Base
   3. Background Effects
   4. Topbar & Navigation
   5. Hero Section
   6. Stats Strip
   7. Skills Section
   8. Experience / Timeline Section
   9. Tools Section
   10. Contact Section
   11. Footer
   12. Animations & Scroll Reveal
   13. Dark Mode Toggle Button
   14. Responsive / Media Queries
   ============================================================ */


/* ── 1. CSS CUSTOM PROPERTIES ── */

:root {
  /* Light theme (default) */
  --bg:            #f5f6fa;
  --surface:       #ffffff;
  --surface2:      #eef0f7;
  --border:        #dde1ef;
  --accent:        #2563eb;
  --accent-bright: #3b82f6;
  --accent2:       #7c3aed;
  --accent3:       #d97706;
  --text:          #111827;
  --muted:         #6b7280;
  --danger:        #dc2626;

  --topbar-bg:      rgba(245, 246, 250, 0.88);
  --grid-color:     rgba(37, 99, 235, 0.05);
  --terminal-bg:    #1e2133;
  --terminal-header:#262b3e;
  --terminal-border:#323858;
  --card-line:      linear-gradient(90deg, #2563eb, #7c3aed);

  --theme-transition: background 0.35s ease, color 0.35s ease,
                      border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Dark theme — applied when <html> has class="dark" */
html.dark {
  --bg:            #0c0e14;
  --surface:       #13161f;
  --surface2:      #1a1e2b;
  --border:        #2a2f42;
  --accent:        #4f8ef7;
  --accent-bright: #93c5fd;
  --accent2:       #a78bfa;
  --accent3:       #f7a14f;
  --text:          #e8eaf2;
  --muted:         #7a7f98;
  --danger:        #ff5e7a;

  --topbar-bg:      rgba(12, 14, 20, 0.85);
  --grid-color:     rgba(79, 142, 247, 0.04);
  --terminal-bg:    #0c0e14;
  --terminal-header:#13161f;
  --terminal-border:#2a2f42;
  --card-line:      linear-gradient(90deg, #4f8ef7, #a78bfa);
}


/* ── 2. RESET & BASE ── */

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  transition: var(--theme-transition);
}


/* ── 3. BACKGROUND EFFECTS ── */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}


/* ── 4. TOPBAR & NAVIGATION ── */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  transition: var(--theme-transition);
}

.topbar-logo {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.topbar-logo span { color: var(--muted); }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.topbar-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.topbar-nav a:hover { color: var(--text); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.resume-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace !important;
  font-size: 12px !important;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s !important;
}

.resume-btn:hover {
  background: var(--accent2) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

.resume-btn svg { flex-shrink: 0; }


/* ── 5. HERO SECTION ── */

section { position: relative; z-index: 1; }

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.35);
  border-radius: 100px;
  padding: 8px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #16a34a;
  letter-spacing: 0.01em;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both, badgeGlow 2.5s ease-in-out infinite;
  transition: var(--theme-transition);
}

.hero-badge em {
  font-style: italic;
  color: inherit;
}

html.dark .hero-badge {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #22c55e;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.2), 0 0 12px rgba(22, 163, 74, 0.1);
  }
  50% {
    box-shadow: 0 0 14px rgba(22, 163, 74, 0.5), 0 0 28px rgba(22, 163, 74, 0.25);
  }
}

html.dark .hero-badge {
  animation: fadeUp 0.6s ease both, badgeGlowDark 2.5s ease-in-out infinite;
}

@keyframes badgeGlowDark {
  0%, 100% {
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.2), 0 0 12px rgba(34, 197, 94, 0.1);
  }
  50% {
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.55), 0 0 28px rgba(34, 197, 94, 0.3);
  }
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-name em {
  font-style: normal;
  color: var(--accent);
}

.hero-desc {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 32px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.05);
}

html.dark .btn-ghost:hover {
  background: rgba(79, 142, 247, 0.05);
}

/* Terminal Card */
.terminal-card {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 12px;
  overflow: hidden;
  animation: fadeUp 0.6s 0.25s ease both;
  box-shadow: 0 24px 56px rgba(0,0,0,0.12);
  transition: border-color 0.35s ease, background 0.35s ease;
}

html.dark .terminal-card {
  box-shadow: 0 32px 64px rgba(0,0,0,0.4);
}

.terminal-header {
  background: var(--terminal-header);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--terminal-border);
}

.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot:nth-child(1) { background: #ff5e57; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-title {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: #6b7280;
  margin-left: 8px;
}

.terminal-body {
  padding: 24px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 2;
  color: #c9d1d9;
}

.t-line   { display: flex; gap: 8px; }
.t-prompt { color: #28c840; flex-shrink: 0; }
.t-cmd    { color: #e6edf3; }
.t-out    { color: #8b949e; margin-left: 16px; }
.t-key    { color: #79c0ff; }
.t-val    { color: #ffa657; }
.t-pass   { color: #56d364; }
.t-fail   { color: #ff7b72; }

.t-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: #28c840;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}


/* ── 6. STATS STRIP ── */

.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
  transition: var(--theme-transition);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  padding: 8px 32px;
  border-right: 1px solid var(--border);
}

.stat-item:last-child  { border-right: none; }
.stat-item:first-child { padding-left: 0; }

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
}


/* ── 7. SKILLS SECTION ── */

.skills-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 48px;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition: border-color 0.25s, transform 0.2s, background 0.35s ease, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-line);
  opacity: 0;
  transition: opacity 0.25s;
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

html.dark .skill-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.skill-card:hover::before { opacity: 1; }

.skill-icon  { font-size: 28px; margin-bottom: 16px; }

.skill-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
}

.skill-desc { font-size: 14px; color: var(--muted); }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
  letter-spacing: 0.04em;
  transition: var(--theme-transition);
}


/* ── 8. EXPERIENCE / TIMELINE SECTION ── */

.exp-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 100px 0;
  transition: var(--theme-transition);
}

.exp-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.timeline {
  display: flex;
  flex-direction: column;
  margin-top: 48px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 180px;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.timeline-item:last-child { border-bottom: none; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: 176px;
  top: 46px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  transition: var(--theme-transition);
}

.timeline-date {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  padding-top: 4px;
  text-align: right;
  padding-right: 48px;
}

.timeline-date span {
  display: block;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.job-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.job-company {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--accent2);
  margin-bottom: 16px;
}

.job-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.job-achievements {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.achievement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.achievement::before {
  content: '→';
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
  margin-top: 1px;
}


/* ── 9. TOOLS SECTION ── */

.tools-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 48px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.tool-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.35s ease;
  cursor: default;
  letter-spacing: 0.02em;
}

.tool-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.04);
  background: var(--surface2);
}

.tool-icon {
  font-size: 22px;
  display: block;
  margin-bottom: 8px;
}


/* ── 10. CONTACT SECTION ── */

.contact-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 100px 0;
  transition: var(--theme-transition);
}

.contact-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 48px;
  text-align: center;
}

.contact-section .section-label,
.contact-section .section-title { text-align: center; }

.contact-subtitle {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 48px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 20px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, background 0.35s ease;
  display: block;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.contact-card-icon  { font-size: 28px; margin-bottom: 12px; }

.contact-card-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.contact-card-val { font-size: 14px; color: var(--text); }


/* ── 11. FOOTER ── */

footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  transition: var(--theme-transition);
}

.footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

.footer-copy span { color: var(--accent); }

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

.status-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}


/* ── 12. ANIMATIONS & SCROLL REVEAL ── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/*
  Single pulse definition — colours are handled via the
  CSS custom property --accent so light/dark auto-update.
*/
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
  50%       { opacity: 0.85; box-shadow: 0 0 0 6px transparent; }
}

/* Scroll-reveal base state */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── 13. DARK MODE TOGGLE BUTTON ── */

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.35s ease, transform 0.15s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.08);
}

.icon-sun  { display: none; }
.icon-moon { display: block; }

html.dark .icon-sun  { display: block; }
html.dark .icon-moon { display: none; }


/* ── 14. RESPONSIVE / MEDIA QUERIES ── */

@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .topbar     { padding: 0 24px; }
  .topbar-nav { display: none; }

  .hero,
  .skills-section,
  .exp-inner,
  .tools-section,
  .contact-inner { padding-left: 24px; padding-right: 24px; }

  .hero-inner    { grid-template-columns: 1fr; }
  .terminal-card { display: none; }

  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-right: 1px solid var(--border); padding-left: 0; }
  .stat-item:nth-child(4) { border-right: none; }

  .skills-grid { grid-template-columns: 1fr 1fr; }

  .timeline::before        { display: none; }
  .timeline-item           { grid-template-columns: 1fr; gap: 8px; }
  .timeline-item::before   { display: none; }
  .timeline-date           { text-align: left; padding-right: 0; }

  .contact-cards { grid-template-columns: 1fr; }

  footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .skills-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); padding: 0 24px; }
  .stat-item   { padding: 8px 16px; }
  .hero-ctas   { flex-direction: column; align-items: flex-start; }
}

  </style>
