/* ============================================================
   PORTFOLIO — Professional Master Stylesheet
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0b0d11;
  --bg-secondary: #121418;
  --bg-card: #181b20;
  --bg-card-hover: #1e2128;
  --bg-elevated: #1f2229;
  --border-color: #262930;
  --border-light: #32353e;
  --text-primary: #e8eaed;
  --text-secondary: #9ca0a8;
  --text-muted: #686d78;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-subtle: rgba(59, 130, 246, 0.1);
  --accent-green: #22c55e;
  --accent-amber: #eab308;
  --accent-red: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

::selection {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1rem, 1.5vw, 1.25rem); }
h4 { font-size: 0.9375rem; }

p { color: var(--text-secondary); }
small { font-size: 0.8125rem; color: var(--text-muted); }

.section-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

/* --- Layout --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 13, 17, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.navbar.scrolled {
  background: rgba(11, 13, 17, 0.96);
  border-bottom-color: var(--border-color);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.navbar-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.navbar-logo span {
  color: var(--accent);
}

.navbar-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.navbar-links a {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.2s;
}
.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.375rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* --- Hero Section --- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 3.75rem;
}

.hero-content {
  max-width: 780px;
}

.hero h1 {
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

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

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
}

/* --- About Section --- */
#about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-info {
  display: grid;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.info-item i {
  width: 1rem;
  text-align: center;
  color: var(--text-muted);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.about-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}

.about-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1.2;
}

.about-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

/* --- Skills --- */
.skills-full h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.375rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Experience Section --- */
#experience {
  background: var(--bg-primary);
}

.exp-timeline {
  max-width: 720px;
  margin: 0 auto;
}

.exp-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 1.75rem;
}
.exp-item:last-child {
  padding-bottom: 0;
}

.exp-dot {
  position: absolute;
  left: 0;
  top: 0.375rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.exp-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}

.exp-content h4 {
  margin-bottom: 0.25rem;
}

.exp-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Certifications Section --- */
#certifications {
  background: var(--bg-secondary);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.875rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.2s;
}
.cert-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.cert-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.75rem;
  background: var(--accent-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
}

.cert-card h4 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.cert-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Showcase Grid (Homepage) --- */
#projects-showcase {
  background: var(--bg-primary);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.showcase-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
  background: var(--bg-card);
}
.showcase-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11,13,17,0.95) 100%);
  z-index: 0;
}

.showcase-content {
  position: relative;
  z-index: 1;
  padding: 1.25rem;
  width: 100%;
}

.showcase-icon {
  font-size: 1.125rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.showcase-card h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.showcase-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.showcase-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* --- Page Header (Subpages) --- */
.page-header {
  padding-top: 7rem;
  padding-bottom: 1rem;
}

/* --- Project Categories Page (projects.html) --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.75rem;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.category-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.category-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.category-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.category-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.category-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 0.875rem;
}

.project-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* --- GRC Projects List (grc-projects.html) --- */
.project-list {
  display: grid;
  gap: 1.25rem;
}

.project-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.2s;
}
.project-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.project-card-image {
  overflow: hidden;
}

.project-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
}

.project-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.project-card-tags {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
  flex-wrap: wrap;
}

.project-tag {
  padding: 0.125rem 0.625rem;
  background: var(--accent-subtle);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--accent);
}

.project-card-body h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-card-body p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.875rem;
  flex: 1;
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.project-card-meta i {
  margin-right: 0.25rem;
  color: var(--accent);
}

.project-card-arrow {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--accent);
}

/* --- Contact Section --- */
#contact {
  background: var(--bg-primary);
}

.contact-card {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-link i {
  font-size: 1rem;
  color: var(--accent);
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
}

footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

footer .social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

footer .social-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.2s;
}
footer .social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

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

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

@media (max-width: 768px) {
  section { padding: 3rem 0; }

  .navbar-links {
    display: none;
    position: absolute;
    top: 3.75rem;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 0.5rem;
  }
  .navbar-links.open { display: flex; }
  .navbar-toggle { display: block; }

  .hero { min-height: auto; padding: 5rem 0 2.5rem; }
  .hero p { font-size: 1rem; }

  .about-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .showcase-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card { grid-template-columns: 1fr; }
  .project-card-image { display: none; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .certs-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
}

/* --- RiskCommand Stat Counters --- */
.rc-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  font-variant-numeric: tabular-nums;
}
.rc-timeline {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rc-timeline > div {
  min-width: 90px;
}

/* --- RiskCommand Chart Cards --- */
.chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

/* --- RiskCommand Responsive --- */
@media (max-width: 768px) {
  .rc-stats { grid-template-columns: repeat(2, 1fr) !important; }
  #metrics > .container > div:first-of-type { grid-template-columns: 1fr !important; }
  #vendor-risk [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}
