/* === Brand Portfolio Stylesheet === */
/* Separate from style.css — only loaded on work.html (brand page) */

/* --- CSS Custom Properties --- */
:root,
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-secondary: #111;
  --bg-tertiary: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #999;
  --text-dim: #666;
  --accent-teal: #2eafa7;
  --accent-teal-dim: rgba(46, 175, 167, 0.15);
  --accent-green: #008c23;
  --border: #222;
  --border-light: #333;
  --shadow: rgba(0, 0, 0, 0.3);
  --card-hover-shadow: rgba(46, 175, 167, 0.1);
  --nav-bg: rgba(10, 10, 10, 0.95);
  --severity-high: #ff4444;
  --severity-medium: #ffaa00;
  --cert-inactive-border: #333;
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-secondary: #fff;
  --bg-tertiary: #f0f0f0;
  --text: #1a1a1a;
  --text-muted: #666;
  --text-dim: #888;
  --accent-teal: #1a7a77;
  --accent-teal-dim: rgba(26, 122, 119, 0.1);
  --accent-green: #006b1a;
  --border: #e0e0e0;
  --border-light: #ccc;
  --shadow: rgba(0, 0, 0, 0.08);
  --card-hover-shadow: rgba(26, 122, 119, 0.08);
  --nav-bg: rgba(250, 250, 250, 0.95);
  --severity-high: #cc0000;
  --severity-medium: #cc8800;
  --cert-inactive-border: #ccc;
}

/* --- Reset & Base --- */
*, *::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: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* --- Section wrapper --- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-teal);
  margin-bottom: 8px;
  font-weight: 600;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  margin-bottom: 40px;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Sticky Navigation --- */
.brand-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.3s, box-shadow 0.3s;
}

.brand-nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--accent-teal);
}

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

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-teal);
}

/* Theme toggle in nav */
.nav-theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}

.nav-theme-toggle:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
  padding-top: 120px;
  padding-bottom: 60px;
  text-align: center;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent-teal);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text);
}

.hero-role {
  font-size: 20px;
  color: var(--accent-teal);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.hero-pill {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent-teal);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  border: 2px solid var(--accent-teal);
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-teal);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--accent-teal);
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  border: 2px solid var(--accent-teal);
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--accent-teal);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-bar .section {
  padding: 40px 24px;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent-teal);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Card base pattern --- */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--card-hover-shadow);
}

.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.card-tag.vuln { background: rgba(255, 68, 68, 0.15); color: var(--severity-high); }
.card-tag.ctf { background: rgba(46, 175, 167, 0.15); color: var(--accent-teal); }
.card-tag.speaking { background: rgba(0, 140, 35, 0.15); color: var(--accent-green); }
.card-tag.leadership { background: rgba(255, 170, 0, 0.15); color: var(--severity-medium); }

.card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-teal);
}

.card-link:hover {
  text-decoration: underline;
}

/* --- Featured Work Grid --- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* --- Experience Timeline --- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-teal);
  border: 2px solid var(--bg);
}

.timeline-date {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-role {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.timeline-company {
  font-size: 15px;
  color: var(--accent-teal);
  margin-bottom: 8px;
  font-weight: 500;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 600px;
}

/* --- CVE Cards --- */
.cve-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.cve-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.cve-id {
  font-family: 'Source Code Pro', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.cve-severity {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.cve-severity.high {
  background: rgba(255, 68, 68, 0.15);
  color: var(--severity-high);
}

.cvss-vector {
  font-family: 'Source Code Pro', monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 8px;
  font-weight: 400;
}

.cve-product {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.cve-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.cve-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cve-links a {
  font-size: 13px;
  font-weight: 500;
}

.cve-credit {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
  font-style: italic;
}

/* --- Tools Grid --- */
.tools-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
}

.tools-header svg {
  width: 18px;
  height: 18px;
  fill: var(--text-dim);
}

.tools-header a {
  color: var(--accent-teal);
  font-weight: 500;
}

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

.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  display: block;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--card-hover-shadow);
  border-color: var(--accent-teal);
  color: var(--text);
}

.tool-name {
  font-family: 'Source Code Pro', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.tool-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Speaking Section --- */
.speaking-intro {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.talks-list {
  list-style: none;
}

.talks-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.talks-list li:last-child {
  border-bottom: none;
}

.talk-year {
  font-size: 13px;
  color: var(--text-dim);
  min-width: 40px;
  font-weight: 500;
  font-family: 'Source Code Pro', monospace;
}

.talk-title {
  flex: 1;
  color: var(--text);
}

.talk-title a {
  color: var(--text);
}

.talk-title a:hover {
  color: var(--accent-teal);
}

.talk-venue {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 120px;
  text-align: right;
}

.talks-hidden {
  display: none;
}

.talks-hidden.expanded {
  display: block;
}

.talks-toggle {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}

.talks-toggle:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

/* --- Media & Writing Card Grid --- */
.media-grid,
.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.media-card,
.writing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.media-card:hover,
.writing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--card-hover-shadow);
}

.media-year,
.writing-year {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 6px;
  font-family: 'Source Code Pro', monospace;
}

.media-title,
.writing-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.media-title a,
.writing-title a {
  color: var(--text);
}

.media-title a:hover,
.writing-title a:hover {
  color: var(--accent-teal);
}

.media-source {
  font-size: 13px;
  color: var(--text-muted);
}

/* Blog preview subsection */
.blog-preview-section {
  margin-top: 40px;
}

.blog-preview-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.blog-preview-list {
  list-style: none;
}

.blog-preview-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.blog-preview-list li:last-child {
  border-bottom: none;
}

.blog-date {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 90px;
  font-family: 'Source Code Pro', monospace;
}

.blog-link {
  font-size: 15px;
  color: var(--text);
}

.blog-link:hover {
  color: var(--accent-teal);
}

.blog-tags {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: auto;
}

.blog-view-all {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
}

/* --- Certifications --- */
.certs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.cert-badge {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 28px;
  text-align: center;
  min-width: 140px;
  transition: transform 0.2s;
}

.cert-badge.active {
  border-color: var(--accent-teal);
  box-shadow: 0 0 20px var(--accent-teal-dim);
}

.cert-badge.inactive {
  border-color: var(--cert-inactive-border);
  border-style: dashed;
  opacity: 0.6;
}

.cert-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.cert-status {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cert-badge.active .cert-status {
  color: var(--accent-teal);
}

.cert-badge.inactive .cert-status {
  color: var(--text-dim);
}

/* --- Contact CTA --- */
.contact-cta {
  text-align: center;
  padding: 80px 24px;
}

.contact-cta h2 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.contact-cta .contact-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 32px;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-socials a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.contact-socials a:hover {
  color: var(--accent-teal);
}

/* --- Footer --- */
.brand-footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-copy {
  font-size: 0.85em;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-teal);
}

.footer-logo {
  text-align: center;
}

.footer-spin-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  animation: spin 12s linear infinite;
}

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

/* --- Scroll Animations --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive: Tablet (1024px) --- */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    gap: 32px;
  }
}

/* --- Responsive: Mobile (768px) --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 24px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 24px var(--shadow);
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-role {
    font-size: 17px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 24px;
  }

  .featured-grid,
  .cve-grid {
    grid-template-columns: 1fr;
  }

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

  .stat-number {
    font-size: 36px;
  }

  .stats-grid {
    gap: 24px;
  }

  .talks-list li {
    flex-direction: column;
    gap: 4px;
  }

  .talk-venue {
    text-align: left;
  }

  .contact-cta h2 {
    font-size: 28px;
  }

  .media-grid,
  .writing-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Responsive: Small Mobile (480px) --- */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero-pills {
    gap: 6px;
  }

  .hero-pill {
    font-size: 11px;
    padding: 4px 10px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    text-align: center;
    max-width: 280px;
  }

  .certs-grid {
    flex-direction: column;
  }

  .cert-badge {
    min-width: unset;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Print --- */
@media print {
  .brand-nav,
  .hamburger,
  .nav-theme-toggle { display: none !important; }
  .fade-in-up { opacity: 1 !important; transform: none !important; }
  .section { padding: 30px 0; }
  body { background: #fff; color: #000; }
}
