/* ===============================
   CyberSafe Portfolio - style.css
   Modern Cybersecurity Portfolio
================================= */

:root {
  --bg: #070b14;
  --bg-soft: #0d1324;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-solid: #111827;
  --text: #e5e7eb;
  --text-soft: #94a3b8;
  --muted: #64748b;
  --border: rgba(148, 163, 184, 0.18);

  --primary: #22c55e;
  --primary-2: #14b8a6;
  --secondary: #38bdf8;
  --accent: #a855f7;
  --danger: #ef4444;

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.22);

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;

  --container: 1150px;
  --header-height: 76px;
}

html[data-theme="light"] {
  --bg: #f8fafc;
  --bg-soft: #eef2ff;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-solid: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.12);

  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.1);
}

/* Global Reset */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 95px;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.14), transparent 35%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(34, 197, 94, 0.35);
  color: var(--text);
}

/* Layout */

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.section-padding {
  padding: 110px 0;
}

.alt-section {
  background:
    linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.055), transparent);
}

.two-column {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 70px;
  align-items: start;
}

.center {
  text-align: center;
  margin-inline: auto;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 20, 0.74);
  border-bottom: 1px solid var(--border);
}

html[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.78);
}

.navbar {
  width: min(100% - 40px, var(--container));
  height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #03110a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}

.nav-links .nav-cta {
  color: #04120a;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.2);
}

.nav-links .nav-cta:hover {
  color: #04120a;
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.theme-toggle,
.nav-toggle {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
  transition: 0.25s ease;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.theme-toggle:hover,
.nav-toggle:hover {
  transform: translateY(-1px);
  background: rgba(148, 163, 184, 0.16);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-toggle span + span {
  margin-top: 6px;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.75;
}

.hero-bg::before {
  width: 420px;
  height: 420px;
  right: -120px;
  top: 80px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.16), transparent 65%);
  animation: floatBlob 9s ease-in-out infinite;
}

.hero-bg::after {
  width: 340px;
  height: 340px;
  left: -110px;
  bottom: 30px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15), transparent 65%);
  animation: floatBlob 10s ease-in-out infinite reverse;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: center;
}

.hero-content h1 {
  margin-top: 18px;
  font-size: clamp(2.7rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.gradient-text {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 670px;
  margin-top: 28px;
  color: var(--text-soft);
  font-size: clamp(1.03rem, 1.7vw, 1.22rem);
}

.hero-subtitle strong {
  color: var(--text);
}

.cursor {
  color: var(--primary);
  font-weight: 900;
  animation: blink 0.8s steps(2) infinite;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-100%);
  transition: 0.45s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:hover::after {
  opacity: 1;
  transform: translateX(100%);
}

.btn-primary {
  color: #03110a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.25);
}

.btn-secondary {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.14);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.social-row a,
.inline-link,
.card-link,
.blog-card a {
  color: var(--primary);
  font-weight: 800;
  transition: 0.25s ease;
}

.social-row a:hover,
.inline-link:hover,
.card-link:hover,
.blog-card a:hover {
  color: var(--secondary);
}

/* Terminal Card */

.hero-panel {
  perspective: 900px;
}

.terminal-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.72)),
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 40%);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-style: preserve-3d;
}

html[data-theme="light"] .terminal-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.78)),
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.13), transparent 40%);
}

.terminal-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.45), transparent 32%, rgba(56, 189, 248, 0.28));
  opacity: 0.38;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  padding: 1px;
  border-radius: inherit;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.terminal-top {
  display: flex;
  gap: 8px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.terminal-top span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
}

.terminal-top span:nth-child(1) {
  background: #ef4444;
}

.terminal-top span:nth-child(2) {
  background: #f59e0b;
}

.terminal-top span:nth-child(3) {
  background: #22c55e;
}

.terminal-body {
  padding: 28px;
  min-height: 330px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--text-soft);
}

.terminal-body p {
  margin-bottom: 13px;
}

.terminal-green {
  color: var(--primary);
  font-weight: 900;
}

/* Stats */

.stats-section {
  padding: 0 0 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card,
.skill-card,
.project-card,
.blog-card,
.contact-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  padding: 26px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-card h3 {
  font-size: 2.3rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-card p {
  margin-top: 10px;
  color: var(--text-soft);
  font-weight: 700;
}

/* About */

.about-text {
  color: var(--text-soft);
  font-size: 1.04rem;
}

.about-text p + p {
  margin-top: 18px;
}

.inline-link {
  display: inline-block;
  margin-top: 24px;
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 48px;
}

.skill-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: 0.28s ease;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.13), transparent 45%);
  opacity: 0;
  transition: 0.28s ease;
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 197, 94, 0.35);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card h3 {
  position: relative;
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.skill-card p {
  position: relative;
  color: var(--text-soft);
}

/* Projects */

.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.filter-btn {
  border: 1px solid var(--border);
  color: var(--text-soft);
  background: rgba(148, 163, 184, 0.08);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: #03110a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 26px;
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.35);
}

.project-card.hide {
  display: none;
}

.project-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 22px;
}

.project-tag {
  color: var(--primary);
}

.project-card h3 {
  font-size: 1.3rem;
  line-height: 1.25;
}

.project-card p {
  margin-top: 14px;
  color: var(--text-soft);
}

.card-link {
  margin-top: auto;
  padding-top: 22px;
}

/* Timeline */

.timeline {
  position: relative;
  max-width: 800px;
  margin: 48px auto 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--primary), var(--secondary), transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  padding: 0 0 34px;
}

.timeline-dot {
  width: 26px;
  height: 26px;
  border: 6px solid var(--bg);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 0 1px var(--border), 0 0 24px rgba(34, 197, 94, 0.35);
}

.timeline-item h3 {
  font-size: 1.2rem;
}

.timeline-item p {
  margin-top: 8px;
  color: var(--text-soft);
}

/* Blog */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 48px;
}

.blog-card {
  padding: 26px;
  border-radius: var(--radius-md);
  transition: 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(168, 85, 247, 0.35);
}

.blog-date {
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.blog-card h3 {
  margin-top: 13px;
  line-height: 1.25;
}

.blog-card p:not(.blog-date) {
  margin-top: 12px;
  color: var(--text-soft);
}

.blog-card a {
  display: inline-block;
  margin-top: 22px;
}

/* Contact */

.contact-section {
  padding-top: 70px;
}

.contact-card {
  max-width: 900px;
  padding: clamp(34px, 6vw, 64px);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.15), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.13), transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(168, 85, 247, 0.14), transparent 38%);
  pointer-events: none;
}

.contact-card > * {
  position: relative;
}

.contact-card h2 {
  max-width: 720px;
  margin: 12px auto 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.contact-card p:not(.eyebrow) {
  max-width: 650px;
  margin: 18px auto 0;
  color: var(--text-soft);
}

.contact-actions {
  justify-content: center;
}

/* Footer */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-soft);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.92rem;
}

/* Reveal Animations */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(22px, -26px, 0) scale(1.08);
  }
}

/* Responsive */

@media (max-width: 980px) {
  .hero-grid,
  .two-column {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    max-width: 620px;
  }

  .stats-grid,
  .skills-grid,
  .project-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 780px) {
  :root {
    --header-height: 70px;
  }

  .section-padding {
    padding: 82px 0;
  }

  .nav-toggle {
    display: block;
    order: 3;
  }

  .theme-toggle {
    order: 2;
    margin-left: auto;
  }

  .nav-links {
    position: fixed;
    left: 20px;
    right: 20px;
    top: calc(var(--header-height) + 12px);
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--bg-card-solid);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    width: 100%;
    justify-content: center;
  }

  .hero-content h1 {
    font-size: clamp(2.45rem, 13vw, 4.2rem);
  }

  .terminal-body {
    min-height: auto;
    padding: 22px;
    font-size: 0.9rem;
  }
}

@media (max-width: 620px) {
  .container,
  .navbar {
    width: min(100% - 28px, var(--container));
  }

  .stats-grid,
  .skills-grid,
  .project-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    text-align: left;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .filter-buttons {
    justify-content: flex-start;
  }
}