/* Lala Sadikhzada, resume site.
   Look based on the "Right Resume" template by TemplateFlip, rewritten without Bootstrap/AOS. */

:root {
  --primary: #4a89dc;
  --primary-dark: #3f74bb;
  --success: #37bc9b;
  --success-dark: #2fa084;
  --light: #e6e9ed;
  --text: #434a54;
  --muted: #6c757d;
  --secondary: #656d78;
  --page-bg: #f5f7fa;
  --border: rgba(0, 0, 0, 0.125);
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--page-bg);
}

h1, h2, h3 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  font-size: calc(1.3rem + 0.6vw); /* Bootstrap .h3 */
}

p {
  margin: 0 0 1rem;
}

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

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1064px;
  margin: 0 auto;
  padding: 0 0.75rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  vertical-align: middle;
}

.icon-lg {
  width: 2rem;
  height: 2rem;
}

/* ---------- Header ---------- */

.site-header {
  padding: 2rem 0;
}

.header-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;

  @media (min-width: 768px) {
    flex-direction: row;
    justify-content: space-between;
  }
}

.site-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 2.5rem;
}

.site-header nav {
  display: flex;
  gap: 1rem;
}

.icon-link {
  color: rgba(0, 0, 0, 0.5);
  line-height: 2.5rem;
  transition: color 0.15s;

  &:hover,
  &:focus-visible {
    color: rgba(0, 0, 0, 0.8);
  }
}

/* ---------- Card ---------- */

.cover {
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.cover-bg {
  color: #fff;
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.12'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  padding: 2rem;
  border-radius: 10px 10px 0 0;

  @media (min-width: 992px) {
    padding: 3rem;
  }
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  @media (min-width: 768px) {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
}

.avatar {
  flex: none;
  max-width: 216px;
  margin-top: 20px;
  background: #fff;
  border: 8px solid lightgray;
  border-bottom: 0;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.18s ease-in-out;

  &:hover {
    transform: translateY(-2px);
  }

  img {
    display: block;
    height: auto;
    filter: grayscale(100%);
  }

  @media (min-width: 768px) {
    margin-bottom: -80px;
  }
}

/* Avatar column: 5/12 on tablets, 4/12 on desktop (like the original grid) */
.avatar-col {
  display: flex;
  justify-content: center;

  @media (min-width: 768px) {
    flex: 0 0 41.667%;
    justify-content: flex-start;
  }

  @media (min-width: 992px) {
    flex: 0 0 33.333%;
  }
}

.hero-text {
  flex: 1;
  padding-top: 0.5rem;

  @media (min-width: 768px) {
    padding-left: 0.75rem;
  }

  h1 {
    margin: 1rem 0;
    font-size: calc(1.375rem + 1.5vw);

    @media (min-width: 1200px) {
      font-size: 2.5rem;
    }
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;

  @media (min-width: 768px) {
    justify-content: flex-start;
  }
}

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

.btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 3rem;
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.18s ease-in-out;

  &:hover,
  &:focus-visible {
    transform: translateY(-2px);
  }

  &:disabled {
    opacity: 0.65;
    cursor: default;
    transform: none;
  }
}

.btn-light {
  color: #000;
  background: var(--light);
}

.btn-success {
  color: #fff;
  background: var(--success);

  &:hover { background: var(--success-dark); }
}

.btn-primary {
  color: #fff;
  background: var(--primary);

  &:hover { background: var(--primary-dark); }
}

/* ---------- Sections ---------- */

.section {
  padding: 2rem 1rem;
  border-top: 1px solid var(--light);

  @media (min-width: 576px) {
    padding: 2rem;
  }

  h2 {
    margin-bottom: 2rem;
  }

  @media (min-width: 992px) {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.about {
  display: grid;
  gap: 1rem;
  border-top: 0;
  margin-top: 0.5rem;
  padding-top: 3rem;

  @media (min-width: 768px) {
    grid-template-columns: 1fr 1fr;
    gap: 8.33%;
  }
}

.facts {
  display: grid;
  align-content: start;
  grid-template-columns: 1fr;
  margin: 1rem 0 0;

  @media (min-width: 576px) {
    grid-template-columns: 1fr 2fr;
  }

  dt,
  dd {
    margin: 0;
    padding-bottom: 0.5rem;
  }

  dd {
    color: var(--secondary);
    margin-bottom: 0.5rem;

    @media (min-width: 576px) {
      margin-bottom: 0;
    }

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

      &:hover { text-decoration: underline; }
    }
  }
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  gap: 0 1.5rem;

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

.skill {
  margin-bottom: 1rem;
}

.bar {
  height: 1rem;
  margin: 0.5rem 0;
  overflow: hidden;
  background: #e9ecef;
  border-radius: 0.25rem;
}

.fill {
  height: 100%;
  width: var(--value);

  &.primary { background: var(--primary); }
  &.success { background: var(--success); }
}

/* ---------- Timeline ---------- */

.section:has(.timeline) h2 {
  margin-bottom: 3rem;
}

.timeline {
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-left: 2px solid var(--light);
}

.timeline-card {
  --accent: var(--primary);
  position: relative;
  margin: 0 0 2rem 31px;
  padding: 1.25rem;

  @media (min-width: 576px) {
    padding: 2rem;
  }
  background: #fff;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0.25rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);

  &:last-child {
    margin-bottom: 1rem;
  }

  &.success {
    --accent: var(--success);
  }

  /* Dot on the line */
  &::before {
    content: "";
    position: absolute;
    top: 20px;
    left: -41px;
    z-index: 2;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--accent);
    border-radius: 10px;
  }

  /* Connector from the line to the card */
  &::after {
    content: "";
    position: absolute;
    top: 25px;
    left: -29px;
    z-index: 1;
    width: 29px;
    height: 2px;
    background: var(--accent);
  }

  h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
  }

  .muted {
    font-size: 1rem;
    color: var(--muted);
  }

  .date {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--muted);
  }

  ul {
    margin: 0;
    padding-left: 1.25rem;
  }
}

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

.contact,
.education {
  padding-bottom: 3rem;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;

  @media (min-width: 768px) {
    grid-template-columns: 7fr 5fr;
  }
}

.contact-form {
  margin: 1rem 0;

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

  input,
  textarea {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font: inherit;
    color: var(--text);
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 0.25rem;
    transition: border-color 0.15s;

    &:focus {
      outline: none;
      border-color: var(--primary);
    }
  }

  textarea {
    margin: 1rem 0;
    resize: none;
  }

  .btn {
    margin-top: 0;
  }
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;

  &.success { color: var(--success-dark); }
  &.error { color: #e9573f; }
}

.contact-info {
  margin-top: 1rem;

  h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
  }

  p {
    padding-bottom: 1rem;
    margin-bottom: 0;
  }

  a {
    color: var(--secondary);
    text-decoration: none;

    &:hover { text-decoration: underline; }
  }
}

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

.site-footer {
  padding: 3rem 0 4rem;
  text-align: center;
  color: var(--muted);

  .footer-name {
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.5rem;
  }

  .linkedin {
    color: var(--primary);
  }

  .credit {
    margin: 1rem 0 0;
    font-size: 0.875rem;

    a {
      color: inherit;
      text-decoration: none;
      border-bottom: 1px dashed;
    }
  }
}

/* ---------- Scroll animations (enabled by JS, off for reduced motion) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--delay, 0ms);

  &.reveal-left {
    transform: translateX(40px);
  }

  &.visible {
    opacity: 1;
    transform: none;
  }
}

.js .fill {
  width: 0;
  transition: width 1s ease;
  transition-delay: var(--delay, 0ms);
}

.js .skills.visible .fill {
  width: var(--value);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .fill {
    transition: none;
  }
}

/* ---------- Print ---------- */

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .cover,
  .cover-bg {
    border-radius: 0;
    box-shadow: none;
  }

  .cover-bg {
    padding: 5rem 5rem 10px;
  }

  .avatar {
    margin-top: -10px;
  }

  .about {
    padding: 6.5rem 5rem 2rem;
  }

  .section {
    padding: 1.5rem 5rem 2rem;
    border-top: 0;
  }

  .page-break {
    padding-top: 5rem;
    break-before: page;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .js .fill {
    width: var(--value);
  }
}
