/* ==========================================================================
   Dayanand Balaboina — Portfolio
   Modern, dependency-free stylesheet (no Bootstrap, no jQuery plugins)
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f7f6f4;
  --color-ink: #17171a;
  --color-ink-soft: #46464c;
  --color-ink-faint: #7a7a82;
  --color-border: #e7e5e1;
  --color-accent: #e2542f;
  --color-accent-dark: #b8401f;
  --color-accent-soft: #fdece5;
  --color-accent-border: #f3bbac;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container-w: 1120px;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(23, 23, 26, 0.06), 0 1px 1px rgba(23, 23, 26, 0.04);
  --shadow-md: 0 8px 24px rgba(23, 23, 26, 0.08);

  --nav-h: 68px;
}

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

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dark); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 0.6em; color: var(--color-ink); }

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent-dark); margin-top: 2.2em; }

p { margin: 0 0 1em; color: var(--color-ink-soft); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; color: var(--color-ink-soft); }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }

.section { padding: 88px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .rule { width: 56px; height: 3px; background: var(--color-accent); margin: 18px auto 0; border: 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 0.8em;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  background: var(--color-ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--color-ink);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color .15s ease;
}
.btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--color-ink); }
.btn-outline:hover { background: var(--color-ink); color: #fff; }

/* Header / nav ------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  z-index: 100;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.92);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { font-weight: 700; font-size: 1.05rem; color: var(--color-ink); letter-spacing: -0.01em; }
.brand:hover { color: var(--color-accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--color-ink); border-radius: 2px; }

.nav-links { display: flex; align-items: center; gap: 2.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--color-ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--color-ink); }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.is-open { max-height: 260px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 24px; width: 100%; }
}

/* Hero (homepage) --------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 0 40px;
}
.hero .container { width: 100%; }
.hero h1 { text-transform: uppercase; }
.hero .rule {
  width: 56px;
  height: 3px;
  background: var(--color-accent);
  border: 0;
  margin: 24px auto;
}
.hero p.lede {
  max-width: 700px;
  margin: 0 auto 2em;
  font-size: 1.15rem;
  color: var(--color-ink-soft);
}
.hero .btn {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.hero .btn:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
}

/* About ------------------------------------------------------------------- */
.about-flex {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 56px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 800px) {
  .about-flex { grid-template-columns: 1fr; text-align: center; }
}
.about-photo {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.about-bio { font-size: 1.05rem; }
.about-bio p:last-child { margin-bottom: 0; }

.logo-marquee-heading {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
  margin: 56px 0 24px;
}
.logo-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.logo-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.logo-marquee:hover .logo-marquee-track { animation-play-state: paused; }
.logo-marquee-track img {
  height: 34px;
  width: auto;
  margin-right: 64px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.logo-marquee-track img:hover { filter: grayscale(0%); opacity: 1; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Projects grid ------------------------------------------------------------ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.project-card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  color: inherit;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-bg-alt); }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; }
.project-card-body { padding: 20px 22px 24px; }
.project-card-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}
.project-card-title { font-size: 1.1rem; font-weight: 700; margin: 0.4em 0 0.35em; color: var(--color-ink); }
.project-card-tech { font-size: 0.85rem; color: var(--color-ink-faint); margin: 0; }

/* Project detail page ------------------------------------------------------ */
.project-hero {
  padding: calc(var(--nav-h) + 56px) 0 40px;
  border-bottom: 1px solid var(--color-border);
}
.project-hero .eyebrow a { color: inherit; }
.project-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.project-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .project-layout { grid-template-columns: 1fr; }
}

.project-body figure { margin: 1.6em 0; }
.project-body figure img {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.project-body figcaption {
  font-size: 0.85rem;
  color: var(--color-ink-faint);
  margin-top: 0.6em;
}

.project-gallery {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.project-gallery figure { margin: 0; }
.project-gallery img { border: 1px solid var(--color-border); border-radius: var(--radius); }
.project-gallery figcaption { font-size: 0.85rem; color: var(--color-ink-faint); margin-top: 0.6em; }

/* Lightbox ------------------------------------------------------------------ */
.project-gallery img,
.project-body figure img {
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}
.project-gallery img:hover,
.project-body figure img:hover { opacity: 0.9; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(23, 23, 26, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.lightbox-overlay.is-open { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }

.tech-groups { margin-top: 1em; }
.tech-group { margin-bottom: 1.4em; }
.tech-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6em;
}
.tech-group-label svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-accent-dark);
}
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  padding: 0.4em 0.9em;
  font-size: 0.85rem;
  color: var(--color-ink);
  background: var(--color-accent-soft);
  border-radius: 999px;
}

.project-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }

.project-nav-footer {
  padding: 40px 0 0;
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
}
.back-link { font-weight: 600; }
.back-link::before { content: "← "; }

/* Experience timeline -------------------------------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 44px;
  max-width: 760px;
  margin: 0 auto;
}
.timeline-item {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--color-border);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
}
.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 4px;
}
.timeline-role { font-weight: 700; font-size: 1.05rem; color: var(--color-ink); }
.timeline-company { font-size: 0.9rem; color: var(--color-ink-faint); margin: 0 0 10px; }
.timeline-dates { font-size: 0.82rem; font-weight: 600; color: var(--color-accent-dark); white-space: nowrap; }
.timeline-item ul { margin-top: 0.6em; }
.timeline-item ul:last-child { margin-bottom: 0; }

/* Education --------------------------------------------------------------- */
.education-list {
  max-width: 760px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.education-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}
.education-degree { font-weight: 600; color: var(--color-ink); }
.education-school { font-size: 0.9rem; color: var(--color-ink-faint); }

/* Contact ------------------------------------------------------------------ */
.contact-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
}
.contact-icons a {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.contact-icons a:hover { background: var(--color-ink); color: #fff; transform: translateY(-2px); }
.contact-icons svg { width: 22px; height: 22px; fill: currentColor; }

/* Footer --------------------------------------------------------------------- */
.site-footer {
  padding: 28px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-ink-faint);
  border-top: 1px solid var(--color-border);
}

/* Scroll reveal --------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .logo-marquee-track { animation: none; }
}

/* Resume page --------------------------------------------------------------- */
.resume-meta { color: var(--color-ink-faint); font-size: 0.95rem; max-width: 720px; }
.resume-actions { margin-top: 1.4em; }
.resume-actions .btn { border: 0; cursor: pointer; }

@media print {
  .site-header, .site-footer, .resume-actions, #contact { display: none !important; }
  .project-hero { padding-top: 24px; border-bottom: 0; }
  body { color: #000; }
}
