:root {
  --bg: #0d1b2a;
  --surface: #132a44;
  --surface-2: #183455;
  --text: #e6eef8;
  --muted: #b8c7db;
  --accent: #4aa3ff;
  --accent-2: #7dc4ff;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  font-family: "Playfair Display", serif;
  letter-spacing: 0.2px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.site-header {
  position: sticky;
  top: 0;
  background: rgba(13, 27, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  color: var(--text);
}

.nav-links a {
  margin-left: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); }

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-title {
  margin-bottom: 24px;
}
.section-title p {
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-size: 0.8rem;
}

.desc {
  margin: 16px 0 24px;
  color: var(--muted);
}

.hero-actions .btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  margin-right: 10px;
  border: 1px solid var(--border);
}

.btn.primary {
  background: var(--accent);
  color: #031221;
  border-color: transparent;
}

.btn.ghost {
  color: var(--text);
  background: transparent;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-pic {
  width: 280px;
  height: 280px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* max 2 per row */
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.project-details {
  padding-left: 20px;
  margin-top: 8px;
}

.project-details li {
  margin-bottom: 6px;
}

.card-links {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 16px;
  align-items: center;
}

.timeline-item ul {
  padding-left: 20px;
  margin-top: 8px;
}

.timeline-item li {
  margin-bottom: 6px;
}

.timeline-logo img {
  width: 120px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-left: auto;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.cert-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 12px;
  flex: 0 0 calc((100% - 32px) / 3);
  max-width: 280px;
}

.badge-container {
  height: 120px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.badge-container img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.tryhackme-badge {
  margin-top: 12px;
  max-width: 360px;
}

.thm-cert {
  margin-left: auto;
  margin-right: auto;
}

.tryhackme-badge iframe {
  width: 100%;
  height: 80px;
  border-radius: 8px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .cert-card {
    flex: 0 0 calc((100% - 16px) / 2);
  }
  .timeline-item {
    grid-template-columns: 1fr;
  }
  .timeline-logo img {
    margin: 0;
  }
  .contact-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none; /* minimal nav on small screens */
  }
}

@media (max-width: 600px) {
  .cert-card {
    flex: 0 0 100%;
  }
}

@media (max-width: 800px) {
  .card-grid {
    grid-template-columns: 1fr; /* 1 per row on smaller screens */
  }
}

.cv-section {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.cv-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.cv-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.cv-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cv-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.08);
}