:root {
  --bg: #08111f;
  --bg-soft: #0d1728;
  --panel: #111d30;
  --panel-2: #15243a;
  --text: #f1f5f9;
  --muted: #9eacc0;
  --line: rgba(255,255,255,.10);
  --accent: #39c6c8;
  --accent-2: #69e3e5;
  --shadow: 0 20px 50px rgba(0,0,0,.25);
  --radius: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8,17,31,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(57,198,200,.5);
  background: rgba(57,198,200,.10);
  color: var(--accent-2);
  border-radius: 10px;
  letter-spacing: .03em;
}

.brand-text {
  font-size: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--muted);
  font-size: .95rem;
  transition: color .2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  padding: 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  min-height: 760px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -130px;
  top: 80px;
  background: radial-gradient(circle, rgba(57,198,200,.18) 0%, rgba(57,198,200,0) 70%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 64px;
  padding-bottom: 64px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6.7rem);
  line-height: .96;
  letter-spacing: -.055em;
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 62px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-secondary {
  border-color: var(--line);
  background: rgba(255,255,255,.03);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 930px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.hero-stats div {
  min-height: 120px;
  padding: 24px;
  background: rgba(9,18,33,.92);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  margin-bottom: 8px;
}

.hero-stats span {
  color: var(--muted);
  font-size: .92rem;
}

.section {
  padding: 110px 0;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 80px;
  align-items: start;
}

.split h2,
.section-heading h2,
.cta-card h2 {
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.035em;
}

.lead-copy {
  color: var(--muted);
  font-size: 1.12rem;
}

.lead-copy p:last-child {
  margin-bottom: 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 48px;
}

.section-heading > p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
}

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.info-card,
.project-card,
.skill-group {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-card {
  min-height: 270px;
  padding: 26px;
}

.card-number {
  display: inline-block;
  margin-bottom: 56px;
  color: var(--accent-2);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.info-card h3,
.project-card h3,
.timeline-item h3,
.skill-group h3 {
  margin-bottom: 12px;
  font-size: 1.28rem;
}

.info-card p,
.project-card p,
.timeline-item p,
.skill-group li {
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  padding: 30px;
}

.project-card.featured {
  grid-column: 1 / -1;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(110deg, rgba(57,198,200,.10), rgba(255,255,255,.025)),
    var(--panel);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  color: var(--accent-2);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
}

.project-card h3 {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: .78rem;
}

.journey-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 90px;
}

.sticky-heading {
  align-self: start;
  position: sticky;
  top: 110px;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 12px;
  left: 7px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 20px;
  padding-bottom: 48px;
}

.timeline-dot {
  width: 15px;
  height: 15px;
  margin-top: 7px;
  border-radius: 50%;
  border: 3px solid var(--bg-soft);
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(57,198,200,.4);
  z-index: 2;
}

.timeline-label {
  margin-bottom: 8px;
  color: var(--accent-2) !important;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

.skill-group {
  padding: 28px;
}

.skill-group ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.skill-group li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .93rem;
}

.skill-group li:last-child {
  border-bottom: 0;
}

.cta-section {
  padding-top: 70px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 52px;
  border: 1px solid rgba(57,198,200,.26);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(57,198,200,.15), transparent 34%),
    var(--panel);
}

.cta-card > div {
  max-width: 760px;
}

.cta-card p:last-child {
  color: var(--muted);
}

.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: .9rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--text);
}

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

  .split,
  .journey-layout {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .sticky-heading {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: 72px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    background: #0a1424;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 100px;
    padding-bottom: 80px;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .hero-stats,
  .project-grid,
  .card-grid-4,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: auto;
  }

  .section {
    padding: 82px 0;
  }

  .cta-card,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-card {
    padding: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

.architecture-panel {
  margin-top: 54px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  box-shadow: var(--shadow);
}

.architecture-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: end;
  margin-bottom: 24px;
}

.architecture-heading h3 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.architecture-heading > p {
  margin-bottom: 0;
  color: var(--muted);
}

.diagram-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: zoom-in;
}

.diagram-button img {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-button span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(8,17,31,.88);
  color: #fff;
  font: inherit;
  font-size: .82rem;
}

.diagram-modal[hidden] {
  display: none;
}

.diagram-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(2,7,14,.94);
}

.diagram-modal img {
  display: block;
  max-width: 96vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
}

.diagram-close {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 101;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(8,17,31,.9);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 760px) {
  .architecture-panel {
    padding: 18px;
  }

  .architecture-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .diagram-button span {
    position: static;
    display: block;
    border-radius: 0;
  }
}

.project-link {
  display: inline-flex;
  margin-top: 24px;
  color: var(--accent-2);
  font-weight: 800;
  font-size: .92rem;
}

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

.projects-footer-link {
  margin-top: 28px;
}

.detail-hero {
  padding: 100px 0 70px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 10%, rgba(57,198,200,.12), transparent 32%),
    var(--bg);
}

.detail-hero .breadcrumb {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: .9rem;
}

.detail-hero .breadcrumb a {
  color: var(--accent-2);
}

.detail-hero h1 {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
}

.detail-hero .hero-copy {
  max-width: 850px;
}

.project-summary-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: start;
}

.detail-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.detail-panel h2,
.detail-panel h3 {
  margin-bottom: 16px;
}

.detail-panel p,
.detail-panel li {
  color: var(--muted);
}

.detail-list {
  margin: 0;
  padding-left: 20px;
}

.detail-list li + li {
  margin-top: 10px;
}

.fact-list {
  display: grid;
  gap: 16px;
}

.fact {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.fact:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.fact span {
  display: block;
}

.fact-label {
  color: var(--accent-2);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fact-value {
  margin-top: 5px;
  color: var(--text);
}

.case-study-section {
  padding: 70px 0;
  border-bottom: 1px solid var(--line);
}

.case-study-section h2 {
  margin-bottom: 24px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.case-study-section p {
  max-width: 900px;
  color: var(--muted);
}

.case-study-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.case-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.case-card h3 {
  margin-bottom: 10px;
}

.case-card p {
  margin-bottom: 0;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 42px 0 80px;
}

.projects-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.projects-index-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.projects-index-card p {
  color: var(--muted);
}

@media (max-width: 820px) {
  .project-summary-grid,
  .case-study-grid,
  .projects-index-grid {
    grid-template-columns: 1fr;
  }

  .project-nav {
    flex-direction: column;
  }
}

.evidence-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.evidence-card {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.evidence-card.full {
  grid-column: 1 / -1;
}

.evidence-card h3 {
  margin-bottom: 10px;
}

.evidence-card p {
  color: var(--muted);
}

.evidence-code {
  margin: 18px 0 0;
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #07101c;
  color: #d7e2ee;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .84rem;
  line-height: 1.55;
  white-space: pre;
}

.evidence-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(57,198,200,.06);
  color: var(--muted);
  border-radius: 0 10px 10px 0;
}

.problem-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.problem-step {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.problem-step span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.problem-step p {
  margin-bottom: 0;
  color: var(--muted);
}

.project-diagram {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.project-diagram img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 820px) {
  .evidence-grid,
  .problem-flow {
    grid-template-columns: 1fr;
  }

  .evidence-card.full {
    grid-column: auto;
  }
}

/* V6 - Cybersecurity hierarchy and TryHackMe */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-dropdown-toggle span {
  font-size: .7em;
  opacity: .7;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 40;
  display: none;
  min-width: 220px;
  padding: 10px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 16, 28, .98);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: rgba(57,198,200,.09);
  color: var(--accent-2);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.site-nav a.active {
  color: var(--accent-2);
}

.thm-home-wrap {
  margin-top: -28px;
  margin-bottom: 70px;
}

.thm-journey-card {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 10%, rgba(130,190,65,.13), transparent 35%),
    var(--panel);
}

.thm-journey-card h3 {
  margin: 2px 0 10px;
  font-size: 1.65rem;
}

.thm-journey-card p:not(.section-kicker) {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.thm-card-actions,
.thm-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cyber-hero,
.thm-hero {
  background:
    radial-gradient(circle at 82% 10%, rgba(130,190,65,.10), transparent 32%),
    radial-gradient(circle at 15% 10%, rgba(57,198,200,.10), transparent 28%),
    var(--bg);
}

.cyber-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.cyber-path-card {
  position: relative;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.cyber-path-card.featured {
  background:
    radial-gradient(circle at 95% 5%, rgba(130,190,65,.13), transparent 38%),
    var(--panel);
}

.cyber-card-badge {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border: 1px solid rgba(130,190,65,.35);
  border-radius: 14px;
  background: rgba(130,190,65,.08);
  color: #a8d95d;
  font-size: .85rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.thm-profile-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: start;
}

.cert-card {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 32px;
  align-items: center;
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.cert-image-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111827;
}

.cert-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .25s ease;
}

.cert-image:hover {
  transform: scale(1.012);
}

.cert-copy h3 {
  margin: 4px 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.cert-copy p {
  color: var(--muted);
}

.cert-meta {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .thm-journey-card,
  .cert-card {
    grid-template-columns: 1fr;
  }

  .thm-journey-card {
    display: grid;
  }

  .cyber-path-grid,
  .thm-profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-dropdown {
    display: block;
  }

  .nav-dropdown-menu {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 0 12px;
    transform: none;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .nav-dropdown-menu::before {
    display: none;
  }

  .nav-dropdown-menu a {
    padding: 7px 0;
    font-size: .9em;
  }
}
