/*************************************************
 *  Portfolio Stylesheet
 *  sahilpanjwani.com
 **************************************************/

/*************************************************
 *  Core
 **************************************************/

*,
*::after,
*::before {
  box-sizing: border-box;
}

.row::after,
.row::before {
  content: " ";
  clear: both;
  display: table;
}

html {
  font-family: Merriweather, serif;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.8);
  line-height: 1.65;
  scroll-padding-top: 80px;
}

@media screen and (min-width: 58em) {
  html {
    font-size: 15px;
  }
}

@media screen and (min-width: 992px) and (max-width: 1199px) {
  .container {
    width: 1100px;
  }
}

body {
  font-family: inherit;
  font-size: 1rem;
  line-height: inherit;
  color: inherit;
  margin-top: 71px; /* Offset body content by navbar height. */
  padding-top: 0;
  counter-reset: captions;
}

@media screen and (max-width: 1200px) {
  /* Match max-width of .nav-bar query. */
  body {
    margin-top: 20px; /* Offset body content by navbar height. */
  }
}

/* Body text */
p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Lists */
ul,
ol,
dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Navigation bar text */
.navbar-default {
  font-family: Lato, sans-serif;
  font-weight: 400;
  line-height: 1.25;
  text-rendering: optimizeLegibility;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Lato, sans-serif;
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.25;
  color: #313131;
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  margin-top: 1rem;
  font-size: 1.5rem;
}

h3 {
  font-weight: 700;
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

h4,
h5,
h6 {
  font-weight: 700;
  margin-top: 1rem;
  font-size: 1rem;
}

a,
h3.article-title a:hover {
  color: #0095eb;
  text-decoration: none;
  transition: color 0.6s ease;
}

a:hover,
a:focus {
  color: #005181;
}

img,
video {
  height: auto;
  max-width: 100%;
  display: block;
}

figcaption::before {
  font-weight: 700;
  text-transform: uppercase;
  content: "Figure " counter(captions) ": ";
}

figcaption {
  display: block;
  margin-top: 0.75em;
  line-height: 1.25;
  font-size: 1rem;
  margin-bottom: 1.65rem;
  font-family: Lato, sans-serif;
  counter-increment: captions;
}

figcaption h4 {
  display: inline-block;
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
}

pre,
code {
  font-family: "Roboto Mono", "Courier New", Courier, monospace;
}

pre {
  margin: 0 0 1rem;
  overflow: auto;
}

hr {
  border: 0;
  height: 1px;
  background: #333;
  background-image: linear-gradient(to right, #ccc, #333, #ccc);
}

/* Quotes */
blockquote {
  padding: 0.5rem 1rem;
  margin: 0.8rem 0;
  color: #7a7a7a;
  border-left: 0.25rem solid #e5e5e5;
}

blockquote p:last-child {
  margin-bottom: 0;
}

@media (min-width: 30em) {
  blockquote {
    padding-right: 5rem;
    padding-left: 1.25rem;
  }
}

/*************************************************
 *  Home Sections
 **************************************************/

.typewriter h1 {
  overflow: hidden;
  border-right: 0.15em solid white;
  white-space: nowrap;
  margin: auto 0;
  letter-spacing: 0.08em;
  animation:
    typing 4s steps(100, end),
    blink-caret 0.55s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: white;
  }
}

@keyframes intro {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.home-section {
  background-color: rgb(255, 255, 255);
  padding: 60px 0;
  animation: intro 0.75s both;
  animation-delay: 0.3s;
}

.home-section:first-of-type {
  padding-top: 50px;
}

.home-section:nth-of-type(even) {
  background-color: #f7f7f7;
}

@media screen and (max-width: 768px) {
  .home-section {
    padding: 40px 0;
  }

  .home-section:first-of-type {
    padding-top: 30px;
  }
}

.section-heading h2 {
  margin: 0 0 10px;
}

.section-heading p {
  font-family: Lato, sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: #6d6d6d;
}

/*************************************************
 *  Biography
 **************************************************/

#about [itemprop="description"] > p {
  text-align: justify;
}

#profile {
  text-align: center;
  padding: 30px 10px;
  position: relative;
}

#profile .portrait {
  margin: 0 auto;
  border-radius: 50%;
  background-size: cover;
}

#profile .portrait-title h2 {
  font-size: 1.75em;
  font-weight: 300;
  color: #000;
  margin: 20px 0;
}

#profile .portrait-title h3 {
  font-size: 1.13em;
  font-weight: 300;
  color: #737373;
  margin: 0 0 10px;
}

#profile ul.social-icon {
  display: inline-flex;
  flex-flow: row wrap;
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

#profile .social-icon li {
  margin-right: 10px;
}

#profile .social-icon li:last-of-type {
  margin-right: 0;
}

#profile .social-icon li:hover {
  transform: scale(1.3);
}

.big-icon {
  font-size: 2rem;
}

ul.ul-interests li {
  font-size: 0.9rem;
  margin-left: -2em;
  text-align: justify;
}

ul.ul-edu {
  list-style: none;
}

ul.ul-edu li {
  position: relative;
  padding: 10px 0 10px 55px;
  list-style: none;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 30px;
}

ul.ul-edu li .description p {
  margin: 0;
}

ul.ul-edu li .description p.course {
  font-size: 1rem;
}

ul.ul-edu li .description p.institution {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.6);
}

/*************************************************
 *  Blog Articles
 **************************************************/

.article-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-top: 0.75rem;
}

.article-title a {
  color: #151515;
  transition: color 0.6s ease;
}

/*************************************************
 *  Publications
 **************************************************/

.pub-banner {
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.pub .pub-title {
  margin-bottom: 5px;
}

.pub .pub-authors {
  font-style: italic;
  line-height: 30px; /* Match share bar line height. */
}

.pub .pub-row-heading {
  font-weight: bold;
}

.pub-list-item {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.pub-list-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pub-list-item .pub-abstract {
  font-size: 1rem;
}

.pub-list-item .pub-authors {
  line-height: normal;
  font-style: normal;
  font-size: 1rem;
  color: #3170a5;
}

.pub-list-item .pub-publication {
  color: #067506;
  font-size: 1rem;
}

.pub-list-item .pub-links {
  padding-top: 10px;
}

/*************************************************
 *  Projects
 **************************************************/

#projects.home-section li {
  margin-bottom: 1rem;
}

#projects.home-section li:last-of-type {
  margin-bottom: 0;
}

/*************************************************
 *  Contact
 **************************************************/

#contact.home-section .fa-ul {
  margin-left: 3.14285714rem; /* Must be > `fa-2x` icon size. */
}

#contact.home-section .fa-li {
  position: absolute;
  left: -3.14285714rem; /* Negative of `#contact.home-section .fa-ul` margin. */
  width: 2rem; /* Match `fa-2x` icon size. */
  top: 0.14285714em; /* Default FA value. */
  text-align: center;
}

#contact.home-section li {
  padding-top: 0.8rem; /* Align text with bottom of `fa-2x` icon. */
  margin-bottom: 0.3rem;
}

#contact.home-section li:last-of-type {
  margin-bottom: 0;
}

/*************************************************
 *  Footer
 **************************************************/

footer {
  margin: 4rem 0 0;
  padding: 2rem 0;
  width: 100%;
}

footer p {
  font-size: 0.75rem;
  text-align: center;
}

.site-footer,
footer a#back_to_top i {
  color: #899596;
}

/*************************************************
 *  Button Primary: Color Override
 **************************************************/

.btn-primary {
  background: rgb(68, 119, 207);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background: #0077b6;
}

/*************************************************
 *  Button Outlines
 **************************************************/

.btn-outline {
  background-color: transparent;
  color: inherit;
  transition: all 0.5s;
}

.btn-primary.btn-outline {
  color: #023350;
  border-color: #0095eb;
}

.btn-primary.btn-outline:hover {
  color: #fff;
}

/*************************************************
 *  Navigation Bar
 **************************************************/

.navbar {
  min-height: 70px !important;
}

.navbar-default {
  background: rgba(255, 255, 255, 0.931);
  box-shadow: 0 0.125rem 1rem 0 rgba(0, 0, 0, 0.295);
}

nav#navbar-main li {
  font-size: 16px;
}

.navbar-default .navbar-nav > li > a,
.navbar-default .navbar-nav > a:focus,
.navbar-default .navbar-nav > a:hover {
  white-space: nowrap;
  transition: 0.2s ease;
  color: #34495e;
  font-weight: 600;
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .active > a:hover {
  color: #0095eb;
  font-weight: 700;
  background-color: transparent !important; /* Override Bootstrap. */
}

.navbar-brand,
.navbar-nav li a {
  height: inherit;
  line-height: 50px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.navbar-fixed-top .nav-item:hover {
  transform: scale(1.05);
}

.navbar-default .navbar-brand {
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1.7em;
  color: #2b2b2b;
}

/* Contact CTA button in navbar */
.navbar-default .navbar-nav > .nav-cta-item > a.nav-cta {
  background: transparent;
  color: #0095eb;
  border: 1.5px solid #0095eb;
  border-radius: 4px;
  padding: 5px 14px;
  margin-top: 16px;
  line-height: 1.5;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.navbar-default .navbar-nav > .nav-cta-item > a.nav-cta:hover,
.navbar-default .navbar-nav > .nav-cta-item > a.nav-cta:focus {
  background: #0095eb;
  color: #fff;
}

@media screen and (max-width: 1200px) {
  .navbar-default .navbar-nav > .nav-cta-item > a.nav-cta {
    margin-top: 5px;
    display: inline-block;
  }

  .navbar {
    min-height: 50px !important;
  }

  .navbar-brand,
  .navbar-nav li a {
    height: inherit;
    line-height: 40px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .navbar-header {
    float: none;
    min-height: inherit;
  }

  .navbar-left,
  .navbar-right {
    float: none !important;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar-fixed-top {
    top: 0;
    border-width: 0 0 1px;
  }

  .navbar-collapse.collapse {
    display: none !important;
  }

  .navbar-nav {
    float: none !important;
    margin-top: 7.5px;
  }

  .navbar-nav > li {
    float: none;
  }

  .navbar-nav > li > a {
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: normal;
  }

  .collapse.in {
    display: block !important;
  }
}

/*************************************************
 *  Tables
 **************************************************/

table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
  font-size: 0.93rem;
}

table > thead > tr > th,
table > tbody > tr > th,
table > tfoot > tr > th,
table > thead > tr > td,
table > tbody > tr > td,
table > tfoot > tr > td {
  padding: 8px;
  line-height: 1.43;
  vertical-align: top;
  border-top: 1px solid #ddd;
}

table > thead > tr > th {
  vertical-align: bottom;
  border-bottom: 2px solid #ddd;
}

table > caption + thead > tr:first-child > th,
table > colgroup + thead > tr:first-child > th,
table > thead:first-child > tr:first-child > th,
table > caption + thead > tr:first-child > td,
table > colgroup + thead > tr:first-child > td,
table > thead:first-child > tr:first-child > td {
  border-top: 0;
}

table > tbody + tbody {
  border-top: 2px solid #ddd;
}

table table {
  background-color: #fff;
}

/* Table Striped */
table > tbody > tr:nth-child(odd) > td,
table > tbody > tr:nth-child(odd) > th {
  background-color: #f9f9f9;
}

/* Table Hover */
table > tbody > tr:hover > td,
table > tbody > tr:hover > th {
  background-color: #e5e5e5;
}

/*************************************************
 *  Alerts
 **************************************************/

div.alert {
  border-radius: 10px;
  margin-bottom: 1rem;
}

div.alert p {
  position: relative;
  display: block;
  font-size: 1rem;
  margin-left: 2rem;
  margin-top: 0;
  margin-bottom: 0;
}

div.alert p:first-child::before {
  position: absolute;
  top: -0.5rem;
  left: -2rem;
  font-family: FontAwesome;
  font-size: 1.5rem;
  color: #fff;
  content: "\f05a";
  width: 1.5rem;
  text-align: center;
}

div.alert-warning p:first-child::before {
  content: "\f071";
}

div.alert a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-bottom: solid 1px #e4e4e4;
  transition:
    color 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
}

div.alert a:hover {
  border-bottom-color: transparent;
  color: rgba(255, 255, 255, 0.5) !important;
}

/*************************************************
 *  Featured Project
 **************************************************/

#featured-projects h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.project-subtitle {
  color: #666;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.project-features {
  padding-left: 1.2em;
  margin: 0.75rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.project-features li {
  margin-bottom: 0.25rem;
}

.project-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.project-stat {
  background: #fff;
  border: 1px solid #ddd;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.project-stat strong {
  color: #0095eb;
}

.project-tech-stack {
  color: #6b6b6b;
  font-size: 0.8rem;
  font-family: "Roboto Mono", monospace;
  margin-bottom: 0.75rem;
}

.project-image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

@media screen and (max-width: 991px) {
  #featured-projects .project-image-col {
    margin-bottom: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  .project-stats-row {
    flex-direction: column;
  }
}

/*************************************************
 *  Consistent Section Header Styling
 **************************************************/

.home-section .section-heading h2 {
  font-weight: 700;
  color: #2b2b2b;
  font-size: 2rem;
  letter-spacing: 0.01em;
}

/* Featured Project: centered heading with accent bar */
#featured-projects .section-heading h2 {
  text-align: center;
  margin-bottom: 0.25rem;
}

#featured-projects .section-heading h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: #0095eb;
  margin: 12px auto 24px;
  border-radius: 2px;
}

/*************************************************
 *  Case Study Pages
 **************************************************/

.case-study-page {
  padding-top: 30px;
}

.case-study-nav {
  margin-bottom: 1.5rem;
}

.case-study-nav a {
  color: #0095eb;
  font-size: 0.95rem;
}

.case-study-nav a:hover {
  color: #005181;
  text-decoration: none;
}

.case-study-nav-bottom {
  margin-top: 3rem;
  margin-bottom: 0;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.case-study-header h1 {
  font-family: Lato, sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #2b2b2b;
  margin-bottom: 0.25rem;
}

.case-study-subtitle {
  font-size: 1.15rem;
  color: #555;
  margin-bottom: 1.25rem;
}

.case-study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #f7f7f7;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #444;
}

.case-study-meta .meta-item strong {
  color: #2b2b2b;
}

.case-study-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.tech-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: #e8f4fd;
  color: #0077b6;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: "Roboto Mono", monospace;
}

.case-study-hero {
  margin-bottom: 2.5rem;
}

.case-study-hero img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.case-study-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
}

.case-study-body h2 {
  font-family: Lato, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #2b2b2b;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #0095eb;
}

.case-study-body h3 {
  font-family: Lato, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #2b2b2b;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.case-study-body p {
  margin-bottom: 1.25rem;
  text-align: justify;
}

.case-study-body ul,
.case-study-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.case-study-body li {
  margin-bottom: 0.4rem;
  text-align: justify;
}

.case-study-body strong {
  color: #2b2b2b;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 1.25rem;
}

.result-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.result-metric {
  font-family: Lato, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0095eb;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.result-label {
  font-family: Lato, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2b2b2b;
  margin-bottom: 0.3rem;
}

.result-detail {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

.case-study-links {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.case-study-links h2 {
  font-family: Lato, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #2b2b2b;
  margin-bottom: 1rem;
}

.case-study-links .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

@media screen and (max-width: 768px) {
  .case-study-header h1 {
    font-size: 1.6rem;
  }

  .case-study-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .case-study-body {
    font-size: 1rem;
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}
