/* =============================================================
   Dhriti Yadav — Portfolio
   Design language: "compile log" — a dark editor/terminal world
   built around the two things she actually spends time in:
   a code editor and a competitive-programming judge.
   ============================================================= */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --ink: #0a0d0c;
  --ink-2: #101513;
  --panel: #131917;
  --line: rgba(238, 242, 239, 0.1);
  --line-2: rgba(238, 242, 239, 0.18);
  --paper: #eef2ef;
  --muted: #8b9490;
  --amber: #ffb454;
  --amber-dim: #8a6530;
  --teal: #5fd8c4;
  --red: #ff6b6b;
  --radius: 10px;
  --display: "Space Grotesk", sans-serif;
  --body: "Inter", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Aesthetic layered background — grid + glow orbs + noise, fixed so it
   doesn't scroll away and stays subtle behind all sections */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--ink);
  background-image:
    /* soft glow orbs, same amber/teal accents used elsewhere */
    radial-gradient(650px 500px at 12% 8%, rgba(255, 180, 84, 0.08), transparent 60%),
    radial-gradient(700px 550px at 90% 25%, rgba(95, 216, 196, 0.07), transparent 60%),
    radial-gradient(600px 500px at 30% 90%, rgba(95, 216, 196, 0.05), transparent 60%),
    radial-gradient(600px 500px at 80% 95%, rgba(255, 180, 84, 0.05), transparent 60%),
    /* fine code-editor grid lines */
    linear-gradient(rgba(238, 242, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 242, 239, 0.035) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    42px 42px,
    42px 42px;
  background-position: 0 0, 0 0, 0 0, 0 0, -1px -1px, -1px -1px;
}

/* very light grain so flat dark areas don't look "sada"/plasticky */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
section {
  padding: 110px 0;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  margin: 0;
  letter-spacing: -0.01em;
}

/* -- utility: comment-style eyebrow, encodes "this is a code comment" -- */
.eyebrow {
  font-family: var(--mono);
  color: var(--teal);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "//";
  color: var(--amber-dim);
}

.section-head {
  margin-bottom: 56px;
  max-width: 640px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}
.section-head p {
  color: var(--muted);
  margin-top: 14px;
}

/* keyboard focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =================== NAVBAR =================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(10, 13, 12, 0);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}
.nav.scrolled {
  background: rgba(10, 13, 12, 0.85);
  backdrop-filter: blur(10px);
  border-color: var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--paper);
}
.nav-brand .prompt {
  color: var(--amber);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.nav-links a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  transition:
    color 0.2s ease,
    background 0.2s ease;
}
.nav-links a:hover {
  color: var(--paper);
  background: var(--panel);
}
.nav-links .path {
  color: var(--amber-dim);
}
.nav-cta {
  font-family: var(--mono);
  font-size: 0.82rem;
  border: 1px solid var(--line-2);
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--amber) !important;
}
.nav-cta:hover {
  background: var(--amber);
  color: var(--ink) !important;
  border-color: var(--amber);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  width: 38px;
  height: 34px;
  color: var(--paper);
  font-family: var(--mono);
  cursor: pointer;
}

/* =================== HERO =================== */
.hero {
  padding: 170px 0 110px;
  border-top: none;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background:
    radial-gradient(
      600px 320px at 20% 0%,
      rgba(255, 180, 84, 0.1),
      transparent 60%
    ),
    radial-gradient(
      600px 320px at 85% 10%,
      rgba(95, 216, 196, 0.1),
      transparent 60%
    );
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
  position: relative;
}
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--teal);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 18px;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(95, 216, 196, 0.18);
}
.hero-tag {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.hero-tag span {
  color: var(--amber);
}
.hero-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--line-2);
  margin-bottom: 22px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}
.hero-photo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--amber);
  background: linear-gradient(
    135deg,
    rgba(255, 180, 84, 0.16),
    rgba(95, 216, 196, 0.16)
  );
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
}
.hero h1 .accent {
  color: var(--amber);
}
.hero-desc {
  color: var(--muted);
  max-width: 50ch;
  margin-top: 20px;
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.btn-solid {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
  font-weight: 600;
}
.btn-solid:hover {
  background: #ffc275;
  transform: translateY(-2px);
}
.btn-ghost {
  color: var(--paper);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}

/* -- hero code photo: bigger, framed like an editor screenshot -- */
.code-photo {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.65);
}
.code-photo img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.92);
}

/* -- terminal window, sits below the code photo in hero -- */
.term {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a4f4c;
}
.term-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.term-body {
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--paper);
}
.term-body .ln {
  color: var(--muted);
}
.term-line {
  margin: 0 0 10px;
  white-space: pre-wrap;
}
.term-key {
  color: var(--teal);
}
.term-str {
  color: var(--amber);
}
.term .cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--amber);
  vertical-align: -3px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.term-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.term-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.term-stat .n {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--paper);
}
.term-stat .l {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =================== ABOUT =================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-text p {
  color: var(--muted);
}
.about-text strong {
  color: var(--paper);
}
.profile-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.profile-card h4 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-card h4 .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  font-family: var(--mono);
  font-size: 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--paper);
  transition: all 0.2s ease;
}
.chip:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.chip.solid {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
  font-weight: 600;
}
.profile-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
.profile-card li {
  margin-bottom: 6px;
}

.about-photo {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.65);
}
.about-photo img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.9);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  background: var(--ink-2);
}
.stat .n {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--amber);
}
.stat .l {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 4px;
}

/* =================== EXPERIENCE (git log style) =================== */
.log {
  position: relative;
  padding-left: 26px;
}
.log::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line-2);
}
.log-item {
  position: relative;
  padding-bottom: 40px;
}
.log-item:last-child {
  padding-bottom: 0;
}
.log-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--teal);
}
.log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.log-head h3 {
  font-size: 1.1rem;
}
.log-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.log-item p {
  color: var(--muted);
  margin-top: 8px;
  max-width: 65ch;
}

/* =================== PROJECTS =================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}
.pcard:hover {
  transform: translateY(-6px);
  border-color: var(--amber-dim);
}
.pcard-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.pcard-thumb {
  height: 150px;
  overflow: hidden;
  background: var(--ink-2);
}
.pcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.85);
  transition: all 0.4s ease;
}
.pcard:hover .pcard-thumb img {
  filter: saturate(1) brightness(1);
  transform: scale(1.05);
}
.pcard-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pcard-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.pcard-body p {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}
.pcard-foot {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pcard-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.pcard-links .pcard-foot {
  margin-top: 0;
}
.pcard-links a.pcard-foot:hover {
  color: var(--amber);
}

/* =================== SKILLS =================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.skill-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--panel);
}
.skill-block h4 {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.tag i {
  font-size: 1rem;
  line-height: 1;
  color: var(--paper);
}
.tag i.colored {
  color: initial;
}

/* =================== CERTIFICATIONS =================== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cert {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--panel);
}
.cert .ic {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 180, 84, 0.12);
  color: var(--amber);
  font-family: var(--mono);
  font-weight: 600;
  margin-bottom: 14px;
}
.cert h4 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}
.cert p {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

/* =================== CONTACT =================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--muted);
}
.contact-info-item .k {
  color: var(--teal);
}
.social-row {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
.social-row a {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--paper);
  font-size: 1.4rem;
}
.social-row a:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-2px);
  background: rgba(255, 180, 84, 0.08);
}
.social-row a i.colored {
  color: initial;
}
.social-row a:hover i.colored {
  color: var(--amber) !important;
}

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--paper);
  font-family: var(--body);
  font-size: 0.92rem;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--amber);
}
.field textarea {
  resize: vertical;
  min-height: 120px;
}
.form-note {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 10px;
}

/* =================== FOOTER =================== */
footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}

/* =================== REVEAL ON SCROLL =================== */
/* Content is visible by default — animation only kicks in if JS successfully
   adds "js-anim" to <html>. This way the page never depends on JS to show content. */
.reveal {
  opacity: 1;
  transform: none;
}
.js-anim .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.js-anim .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* =================== RESPONSIVE =================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-photo img {
    height: 260px;
  }
  .code-photo img {
    height: 200px;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  section {
    padding: 70px 0;
  }
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--ink-2);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    gap: 2px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}