:root {
  --navy: #16324f;
  --blue: #1f66a5;
  --ink: #17202a;
  --muted: #5d6976;
  --surface: #f4f7fa;
  --line: #dbe3ea;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  color: var(--ink);
  font-family: 'Roboto', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  background: var(--white);
  margin: 0;
}

.fa, .fab, .fas, .far, .fal, .fad {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome", sans-serif !important;
  font-style: normal;
  font-weight: 400;
  speak: never;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

a {
  color: var(--blue);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  left: 0;
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  min-width: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--surface);
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.content {
  min-width: 0;
  width: 100%;
  max-width: 1120px;
  padding: 3rem clamp(1.5rem, 5vw, 4.5rem) 4rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.nav-link {
  display: block;
  text-align: center;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink) !important;
  text-decoration: none !important;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.nav-link:visited {
  color: var(--ink) !important;
  text-decoration: none !important;
}

.nav-link:hover {
  background: #e5ebf1;
}

.nav-link.active {
  background: var(--navy);
  color: var(--white) !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(22, 50, 79, 0.16);
}

.social {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.6em 1.2em;
  border-radius: 7px;
  color: #fff !important;
  text-decoration: none !important;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.social-link:visited {
  color: #fff !important;
  text-decoration: none !important;
}
.social-link.linkedin {
  background: #0077b5;
}
.social-link.github {
  background: #181717;
}
.social-link.scholar {
  background: #4285f4;
}
.social-link:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  padding: 1rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  max-width: 760px;
  margin: 0.3rem 0 1rem;
  color: var(--navy);
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 1.04;
}

.eyebrow,
.card-label {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.16rem;
}

.profile-photo {
  width: clamp(170px, 20vw, 230px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(22, 50, 79, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 7px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  background: var(--navy);
  color: var(--white);
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--navy);
  background: var(--white);
}

.proof-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 2.5rem;
}

.proof-card,
.project-card {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.proof-card h2,
.project-card h2,
.project-card h3 {
  margin: 0.3rem 0 0.6rem;
  color: var(--navy);
  font-size: 1.15rem;
}

.proof-card p,
.project-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.project-grid-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.text-link {
  font-weight: 700;
}

.cv-intro {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.cv-intro h1 {
  margin-top: 0.25rem;
}

.cv-frame {
  width: 100%;
  height: 900px;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

@media (max-width: 820px) {
  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .social {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .social-link {
    flex: 1 1 120px;
    justify-content: center;
  }

  .content {
    padding: 2rem 1.25rem 3rem;
  }

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

  .profile-photo {
    width: 170px;
  }

  .proof-grid,
  .project-grid,
  .project-grid-wide {
    grid-template-columns: 1fr;
  }

  .cv-frame {
    height: 70vh;
  }
}

@media (max-width: 480px) {
  .nav-link {
    padding: 0.65rem 0.35rem;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: 2.35rem;
  }
}
