/* ============================================================
   JAKSecurity.com — "Security Brief" Theme
   Dense, grid-based, dark. Inspired by SOC dashboards.
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Backgrounds */
  --bg-deep:     #06060c;
  --bg-base:     #0a0a12;
  --bg-surface:  #111119;
  --bg-card:     #151520;
  --bg-card-hover: #1a1a28;
  --bg-alt:      #0d0d16;

  /* Borders */
  --border:      #1e1e2e;
  --border-light: #2a2a3a;

  /* Text */
  --text-primary:   #e2e2ea;
  --text-secondary: #9090a8;
  --text-muted:     #606078;
  --text-heading:   #f0f0f6;

  /* Accent */
  --accent:        #00b4d8;
  --accent-dim:    #0090ad;
  --accent-glow:   rgba(0, 180, 216, 0.15);
  --accent-subtle: rgba(0, 180, 216, 0.08);

  /* Status */
  --status-live:     #22c55e;
  --status-progress: #eab308;
  --status-complete: #8b8ba0;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 60px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-lg));
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; display: block; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(6, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition-base);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--text-heading); }
.nav-logo-mark { color: var(--accent); }
.nav-logo-text { color: var(--text-heading); }

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--transition-fast);
}
.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  transition: all var(--transition-base);
}

/* --- Hero --- */
.hero {
  padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-3xl);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Subtle grid pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 180, 216, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 216, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Radial glow behind name */
.hero::after {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0, 180, 216, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  margin-bottom: var(--space-2xl);
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-sm);
}

.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}
.hero-tagline em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

/* Stats row */
.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  transition: border-color var(--transition-base);
}
.stat-card:hover {
  border-color: var(--border-light);
}

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Sections --- */
.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-heading {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: calc(var(--space-2xl) * -1 + var(--space-md));
  margin-bottom: var(--space-2xl);
  max-width: 700px;
}

/* --- Expertise Grid --- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-xl);
  transition: all var(--transition-base);
}
.expertise-card:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.expertise-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: var(--space-md);
}
.expertise-icon svg {
  width: 100%;
  height: 100%;
}

.expertise-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-sm);
}

.expertise-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Portfolio Grid --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
}
.project-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.project-name {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
}

.project-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
}

.status-live {
  color: var(--status-live);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-progress {
  color: var(--status-progress);
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.status-complete {
  color: var(--status-complete);
  background: rgba(139, 139, 160, 0.1);
  border: 1px solid rgba(139, 139, 160, 0.2);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-md);
  flex: 1;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 3px;
}

.project-stats {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: auto;
}
.project-link:hover {
  color: var(--text-heading);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: var(--space-2xl);
}

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

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
}
.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: calc(var(--space-2xl) * -1 + 4px);
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-light);
  border: 2px solid var(--bg-base);
}

.timeline-current .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-lg) var(--space-xl);
  transition: border-color var(--transition-base);
}
.timeline-content:hover {
  border-color: var(--border-light);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timeline-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: var(--space-xs) 0 var(--space-sm);
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Credentials Grid --- */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.cred-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-xl);
}

.cred-group-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.cred-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.cred-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: 4px;
}

.cred-primary {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-subtle);
}

.cred-edu {
  font-size: 0.78rem;
  font-weight: 500;
}

.cred-clearance {
  color: var(--status-live);
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.08);
}

.cred-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 600px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-xl);
  transition: all var(--transition-base);
}
.contact-card:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
  color: var(--text-heading);
}

.contact-card svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

.contact-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* --- Footer --- */
.footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */

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

/* Mobile */
@media (max-width: 768px) {
  :root {
    --space-xl: 1.25rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  /* Nav mobile */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(6, 6, 12, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl) 0;
    gap: var(--space-lg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  /* Hero mobile */
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-name {
    font-size: 1.8rem;
  }

  /* Grids mobile */
  .expertise-grid,
  .portfolio-grid,
  .credentials-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .project-stats {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
}
