/* EB-1A Evidence Portfolio — Sairamakrishna Karri */

:root {
  --bg: #0f1419;
  --bg-elevated: #171e26;
  --bg-soft: #1c2530;
  --surface: #222c38;
  --text: #f2efe8;
  --text-muted: #a8b0bb;
  --accent: #2ec4b6;
  --accent-soft: rgba(46, 196, 182, 0.14);
  --accent-hover: #3dd9ca;
  --line: rgba(242, 239, 232, 0.1);
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Sora", system-ui, sans-serif;
  --space: clamp(1rem, 2.5vw, 2rem);
  --max: 1120px;
  --radius: 6px;
  --nav-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 0.5rem);
}

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

ul {
  list-style: none;
}

.container {
  width: min(100% - 2 * var(--space), var(--max));
  margin-inline: auto;
}

/* ——— Nav ——— */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(15, 20, 25, 0.94);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: none;
  gap: 0.15rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-links a.is-active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0.55rem;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  padding: 1rem var(--space) 1.25rem;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-drawer.is-open {
  display: flex;
}

.nav-drawer a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--line);
}

.nav-drawer a:hover,
.nav-drawer a.is-active {
  color: var(--accent);
}

@media (min-width: 960px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle,
  .nav-drawer {
    display: none !important;
  }
}

/* ——— Hero ——— */

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(46, 196, 182, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(46, 196, 182, 0.08), transparent 50%),
    linear-gradient(160deg, #0f1419 0%, #151c24 45%, #1a2430 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-block: clamp(3rem, 8vh, 5.5rem);
}

@media (min-width: 800px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }
}

.hero-copy {
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise-in 0.9s var(--ease) 0.15s forwards;
}

.hero-photo-wrap {
  justify-self: center;
  opacity: 0;
  transform: translateY(1.25rem) scale(0.97);
  animation: rise-in 1s var(--ease) 0.35s forwards;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.35rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.hero-headline {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.hero-lead {
  max-width: 36ch;
  color: var(--text-muted);
  font-size: 1.02rem;
  margin-bottom: 1.75rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #0a1210;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0a1210;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 550;
}

.hero-photo {
  width: min(380px, 82vw);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(242, 239, 232, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ——— Sections ——— */

.section {
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
  border-top: 1px solid var(--line);
}

.section--alt {
  background: var(--bg-elevated);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

.subsection-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2rem 0 1rem;
  color: var(--text);
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.subsection-title:first-of-type {
  margin-top: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 48ch;
}

.reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— About ——— */

.about-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 720px) {
  .about-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
  }
}

.about-text p + p {
  margin-top: 1rem;
}

.about-text p {
  color: var(--text-muted);
}

.skill-clusters {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skill-cluster h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tags span {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

/* ——— Experience timeline ——— */

.timeline {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
  margin-left: 0.35rem;
}

.timeline > .timeline-item::marker {
  content: none;
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-55%);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-meta {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.15rem;
}

.timeline-org {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
}

.timeline-points {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.timeline-points li {
  position: relative;
  padding-left: 0.9rem;
  margin-bottom: 0.35rem;
}

.timeline-points li::marker {
  content: none;
}

.timeline-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
}

/* ——— Speaking year timeline ——— */

.year-timeline {
  list-style: none;
  margin: 0 0 0 3.75rem;
  padding: 0 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  border-left: 2px solid var(--line);
}

.year-timeline > .year-timeline-item::marker {
  content: none;
}

.year-timeline-item {
  position: relative;
  padding: 0 0 2.25rem 1.15rem;
}

.year-timeline-item:last-child {
  padding-bottom: 0;
}

.year-timeline-year {
  position: absolute;
  right: calc(100% + 2.65rem);
  top: 0.15rem;
  width: 3.25rem;
  text-align: right;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
  pointer-events: none;
}

.year-timeline-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

.year-timeline-entries {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.year-timeline-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section--alt .year-timeline-entry {
  background: var(--surface);
}

.year-timeline-entry:hover {
  border-color: rgba(46, 196, 182, 0.35);
}

.year-timeline-body {
  flex: 1;
  min-width: 12rem;
}

.year-timeline-role {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
  line-height: 1.35;
}

.year-timeline-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.year-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .year-timeline {
    margin-left: 3rem;
    padding-left: 1.25rem;
  }

  .year-timeline-year {
    right: calc(100% + 1.4rem);
    width: 2.75rem;
    font-size: 0.95rem;
  }

  .year-timeline-item {
    padding-left: 0.85rem;
  }

  .year-timeline-item::before {
    left: -1.25rem;
  }
}

/* ——— Evidence lists ——— */

.evidence-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.evidence-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}

.section--alt .evidence-item {
  background: var(--surface);
}

.evidence-item:hover {
  border-color: rgba(46, 196, 182, 0.35);
}

.evidence-body {
  flex: 1;
  min-width: 12rem;
}

.evidence-title {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.evidence-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.evidence-grid {
  display: grid;
  gap: 0.65rem;
}

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

/* ——— Publications ——— */

.pub-item .evidence-title {
  font-size: 0.95rem;
  font-weight: 550;
  line-height: 1.4;
}

/* ——— Profiles ——— */

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.section--alt .profile-chip {
  background: var(--surface);
}

.profile-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ——— Education ——— */

.edu-list {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .edu-list {
    grid-template-columns: 1fr 1fr;
  }
}

.edu-item {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.edu-degree {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.edu-school {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
}

/* ——— Contact ——— */

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.contact-value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}

.contact-value a {
  color: var(--text);
}

.contact-value a:hover {
  color: var(--accent);
}

/* ——— Footer ——— */

.site-footer {
  padding: 1.75rem 0 2.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ——— Utilities ——— */

.evidence-actions img.org-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
}

.membership-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}

.section--alt .membership-item {
  background: var(--surface);
}

.membership-item:hover {
  border-color: rgba(46, 196, 182, 0.35);
}

.membership-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius);
  object-fit: contain;
  background: #fff;
  padding: 4px;
}

.membership-body {
  flex: 1;
  min-width: 12rem;
}

.membership-body .evidence-title {
  margin-bottom: 0.2rem;
}

.membership-org {
  margin: 0 0 0.15rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}

.membership-body .evidence-meta {
  margin-bottom: 0;
}

.membership-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}
