:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --primary: #171717;
  --primary-hover: #2e2e2e;
  --primary-foreground: #fafafa;
  --secondary: #f5f5f5;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --ring: #a1a1a1;
  --text-body: #374151;
  --text-subtle: #6b7280;
  --link: #3b82f6;
  --link-hover: #2563eb;
  --danger: #ef4444;
  --radius: 0.625rem;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--border);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  background: var(--background);
  color: var(--foreground);
}

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

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

main {
  flex: 1;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.page-title {
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  text-align: center;
}

.status {
  text-align: center;
  color: var(--text-subtle);
  padding: 1rem 0;
}

.status.error {
  color: var(--danger);
}

/* ---------- Navbar ---------- */

.navbar {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.navbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  padding: 0 1rem;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--secondary);
}

.nav-toggle {
  position: absolute;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
}

.nav-toggle:hover {
  background: #e5e7eb;
}

.mobile-menu {
  border-top: 1px solid var(--border);
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  font-size: 1rem;
  color: #1f2937;
  transition: color 0.15s;
}

.mobile-menu a:hover,
.mobile-menu a[aria-current="page"] {
  color: var(--link);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle,
  .mobile-menu {
    display: none !important;
  }
}

/* ---------- Footer ---------- */

.footer {
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer a {
  color: #000;
  font-weight: 700;
}

.footer a:hover {
  text-decoration: underline;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s, opacity 0.15s;
}

.btn:focus-visible,
.input:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(161, 161, 161, 0.5);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: var(--background);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
  background: var(--secondary);
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Cards & badges ---------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 0;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-xl);
}

.card-content {
  padding: 0 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--primary);
  color: var(--primary-foreground);
}

.badge-secondary {
  background: var(--secondary);
  color: var(--primary);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ---------- Category filters ---------- */

.filters {
  margin-bottom: 1.25rem;
}

.select {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: var(--background);
  cursor: pointer;
}

.filter-buttons {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .filters .select {
    display: none;
  }

  .filter-buttons {
    display: flex;
  }
}

/* ---------- Project & certification grid ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.item-card {
  text-align: center;
}

.item-card .card-title {
  margin-bottom: 0.5rem;
}

.item-card .card-description {
  color: #4b5563;
}

.media-link {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--secondary);
}

.media-link.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.media-link.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.media-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.media-link:hover img {
  transform: scale(1.05);
}

.media-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
}

.media-link:hover .media-overlay,
.media-link:focus-visible .media-overlay {
  opacity: 1;
}

/* ---------- About ---------- */

.about {
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  padding-top: 2rem;
}

.profile-pic {
  flex-shrink: 0;
  width: 18rem;
  height: 18rem;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.intro-text p {
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--text-body);
}

.intro-actions {
  display: flex;
  gap: 1rem;
}

@media (min-width: 768px) {
  .intro {
    flex-direction: row;
  }
}

.timeline-section {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.timeline {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 7px;
  width: 2px;
  background: #d1d5db;
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-dot {
  position: absolute;
  z-index: 1;
  top: 1.25rem;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 2px solid #000;
  border-radius: 50%;
  background: #fff;
}

.timeline-dot::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #fff;
  transition: background-color 0.3s;
}

.timeline-item:hover .timeline-dot::after {
  background: #000;
}

.timeline-card {
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: var(--shadow-lg);
  color: var(--text-body);
  transition: transform 0.5s, box-shadow 0.5s;
}

.timeline-item:hover .timeline-card {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-2xl);
}

.timeline-card strong {
  display: block;
  font-size: 1.125rem;
}

.timeline-card .period {
  display: block;
  font-size: 0.875rem;
  color: var(--text-subtle);
}

@media (min-width: 768px) {
  .timeline {
    gap: 4rem;
  }

  .timeline::before {
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-item {
    display: flex;
    align-items: center;
    padding-left: 0;
  }

  .timeline-dot {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .timeline-card {
    width: calc(50% - 2.5rem);
    padding: 1.5rem;
  }

  .timeline-item:nth-child(odd) .timeline-card {
    margin-right: auto;
    text-align: right;
  }

  .timeline-item:nth-child(even) .timeline-card {
    margin-left: auto;
  }

  .timeline-item:hover .timeline-card {
    transform: translateY(-0.5rem);
  }
}

.highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .highlights {
    grid-template-columns: repeat(3, 1fr);
  }
}

.highlight-card {
  height: 100%;
  padding: 1.5rem;
  gap: 0.75rem;
  text-align: center;
}

.highlight-card .card-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.quote-card {
  max-width: 48rem;
  width: 100%;
  margin: 2rem auto 0;
  padding: 1.5rem;
}

.quote-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.quote-text {
  font-size: 1.125rem;
  font-weight: 600;
  font-style: italic;
  color: #1f2937;
}

.quote-author {
  color: var(--text-subtle);
}

.quote-content .badge {
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .quote-text {
    font-size: 1.25rem;
  }

  .quote-author {
    font-size: 1rem;
  }
}

/* ---------- Blogs ---------- */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-card {
  flex-direction: column;
  padding: 0;
  gap: 0;
}

.blog-card img {
  width: 100%;
  height: 14rem;
  object-fit: contain;
  background: #f3f4f6;
}

.blog-card .card-content {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.blog-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  overflow: hidden;
  color: var(--text-body);
}

.blog-card .badge {
  align-self: flex-start;
}

.blogs-more {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .blog-card {
    flex-direction: row;
  }

  .blog-card img {
    width: 33.333%;
    height: auto;
  }
}

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.contact-hero {
  text-align: center;
}

.contact-hero .page-title {
  margin-bottom: 1.5rem;
}

.contact-hero p {
  max-width: 48rem;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--text-subtle);
}

.separator {
  border: 0;
  border-top: 1px solid var(--border);
}

.form-card {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}

.form-card .card-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0 1.5rem;
}

.form-card .card-title {
  font-size: 1.25rem;
}

.form-card .card-description {
  font-size: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field label {
  font-weight: 500;
}

.input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input::placeholder {
  color: var(--muted-foreground);
}

textarea.input {
  min-height: 7rem;
  resize: vertical;
}

.contact-form .btn {
  height: auto;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.contact-form .btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.connect {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.connect h2 {
  font-size: 1.875rem;
  font-weight: 600;
}

.contact-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
}

.contact-details a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.15s;
}

.contact-details a:hover,
.socials a:hover {
  color: var(--link);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 1.5rem;
}

.socials a {
  transition: color 0.15s, transform 0.15s;
}

.socials a:hover {
  transform: scale(1.1);
}

@media (min-width: 640px) {
  .contact-details {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .contact {
    padding-left: 6rem;
    padding-right: 6rem;
  }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 50;
  max-width: calc(100% - 2rem);
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  transform: translate(-50%, -150%);
  transition: transform 0.3s;
}

.toast.show {
  transform: translate(-50%, 0);
}

/* ---------- 404 ---------- */

.not-found {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
}

.not-found .page-title {
  margin-bottom: 0;
}

.not-found p {
  max-width: 48rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--text-subtle);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
