:root {
  --bg: #f9f9f9;
  --bg-soft: #f2f2f2;
  --text: #0d0d0d;
  --muted: #4f4f4f;
  --line: #1f1f1f;
  --line-soft: #c9c9c9;
  --card: #ffffff;
  --radius: 20px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, #ffffff 0%, #f7f7f7 35%, #efefef 100%);
  font-family: "Space Grotesk", sans-serif;
  min-height: 100vh;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='%23000' fill-opacity='0.06'%3E%3Ccircle cx='18' cy='22' r='1'/%3E%3Ccircle cx='74' cy='38' r='1'/%3E%3Ccircle cx='146' cy='68' r='1'/%3E%3Ccircle cx='39' cy='121' r='1'/%3E%3Ccircle cx='111' cy='149' r='1'/%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(249, 249, 249, 0.8);
  border-bottom: 1px solid #d8d8d8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px clamp(16px, 4vw, 48px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  font-weight: 700;
}

.header-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.nav a:hover, .nav a.active {
  border-color: var(--line-soft);
  transform: translateY(-1px);
}

.nav a.active {
  background: var(--line-soft);
  color: var(--text);
  font-weight: 500;
}

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 28px auto 80px;
  display: grid;
  gap: 32px;
}

.section,
.hero,
.contact-box {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  scroll-margin-top: 85px;
}

#certificates {
  scroll-margin-top: 85px;
}

.hero {
  padding: clamp(24px, 4vw, 42px);
  display: grid;
  gap: 22px;
  grid-template-columns: 2.5fr 1fr;
  align-items: center;
  min-height: 320px;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
  color: #3e3e3e;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.02;
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.8vw, 2.2rem);
}

.muted {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.hero-avatar-wrap {
  display: flex;
  justify-content: right;
}

.hero-avatar {
  width: min(280px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  border-radius: 28px;
  border: 2px solid var(--line);
  background: #f0f0f0;
}

.section {
  padding: clamp(20px, 3vw, 28px);
}

.about-text {
  margin-top: 12px;
  line-height: 1.7;
}

.social-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.92rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}

.social-link:hover img {
  filter: grayscale(0) contrast(1);
  transform: scale(1.1);
}

.section-head {
  margin-bottom: 14px;
}

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

.item {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 16px;
  background: var(--bg);
}

.item-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.item-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: white;
  padding: 6px;
}

.item-title {
  margin: 0;
  font-size: 1.03rem;
}

.item-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.item-time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: #383838;
}

.highlight {
  color: #0284c7;
  font-weight: 500;
}

.item ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #2a2a2a;
  line-height: 1.6;
}

.skills-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.skill-category {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 24px;
  transition: box-shadow 0.25s ease;
}

.skill-category:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.skill-category-title {
  margin: 0 0 20px 0;
  font-size: 1.15rem;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  border-bottom: 1px dashed var(--line-soft);
  padding-bottom: 12px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg);
  padding: 8px 16px 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill:hover {
  border-color: var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.skill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.skill:hover img {
  filter: grayscale(0) contrast(1);
  transform: scale(1.15);
}

.skill p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 20px;
}

.project {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 24px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  border-color: #d1d5db;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.project h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.project-role {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 999px;
  color: #166534;
  font-weight: 600;
  white-space: nowrap;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tech-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.project-description {
  margin: 4px 0 0;
  color: #4b5563;
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
}

.project-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line-soft);
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}



.project-link {
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-link.btn-primary {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
}

.project-link.btn-primary:hover {
  background: #334155;
  border-color: #334155;
}

.project-link.btn-outline {
  background: transparent;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.project-link.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.project-link.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(100%);
}

.contact-box {
  padding: clamp(24px, 4vw, 42px);
  text-align: center;
}

/* ==========================================================================
   Certificates Section
   ========================================================================== */

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.certificate {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.certificate:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.certificate-image-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.certificate-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.certificate-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.certificate-info h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.certificate-issuer {
  margin: 0;
  color: #4b5563;
  font-size: 0.9rem;
}

.certificate-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: auto;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.testimonial {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.testimonial-text {
  font-size: 1.05rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--text);
  margin: 0;
  position: relative;
}

.testimonial-text::before {
  content: "“";
  font-size: 3rem;
  color: var(--line-soft);
  position: absolute;
  top: -20px;
  left: -10px;
  z-index: -1;
  font-family: serif;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
}

.testimonial-author-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.testimonial-author-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.btn {
  margin-top: 8px;
  display: inline-block;
  text-decoration: none;
  color: white;
  background: black;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid black;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: #1c1c1c;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.65s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
.reveal:nth-child(5) { animation-delay: 0.32s; }
.reveal:nth-child(6) { animation-delay: 0.4s; }
.reveal:nth-child(7) { animation-delay: 0.48s; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-avatar-wrap {
    justify-content: center;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(249, 249, 249, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #d8d8d8;
    padding: 16px;
    gap: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
  }

  .nav.active {
    display: flex !important;
  }

  .nav a {
    text-align: center;
    padding: 12px;
  }

  .item-head {
    grid-template-columns: auto 1fr;
  }

  .item-time {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .nav {
    gap: 8px;
  }

  .container {
    width: min(1080px, calc(100% - 20px));
    gap: 20px;
  }
}
