/* ============================================================
   Portfolio — Prasanna Kumar Gujuluva Sankarachary
   Inspired by brittanychiang.com
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:        #0a192f;
  --navy-light:  #112240;
  --slate:       #8892b0;
  --slate-light: #a8b2d8;
  --white:       #ccd6f6;
  --white-bright:#e6f1ff;
  --green:       #64ffda;
  --green-tint:  rgba(100, 255, 218, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--navy);
  color: var(--slate);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Cursor glow ── */
#cursor-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  transition: opacity 0.3s;
  background: radial-gradient(600px at 50% 50%, rgba(29, 78, 216, 0.15), transparent 80%);
}

/* ── Layout ── */
.layout {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SIDEBAR (LEFT — FIXED) 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 42%;
  min-width: 300px;
  max-width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px 48px 96px 0;
}

/* ── Avatar photo ── */
.avatar-wrap {
  margin-bottom: 24px;
  display: inline-block;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--green);
  filter: grayscale(20%);
  transition: filter 0.3s, transform 0.3s;
}

.avatar:hover {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.sidebar-top h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--white-bright);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.sidebar-top h2 {
  margin-top: 12px;
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  font-weight: 500;
  color: var(--white);
}

.sidebar-top p {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--slate);
  max-width: 320px;
  line-height: 1.7;
}

/* ── Navigation ── */
nav {
  margin-top: 56px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  text-decoration: none;
  color: var(--slate);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s;
  width: fit-content;
}

nav a .nav-line {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--slate);
  transition: width 0.25s, background 0.25s;
}

nav a:hover,
nav a.active {
  color: var(--white-bright);
}

nav a:hover .nav-line,
nav a.active .nav-line {
  width: 64px;
  background: var(--white-bright);
}

nav a.active {
  color: var(--green);
}

nav a.active .nav-line {
  background: var(--green);
}

/* ── Social icons ── */
.social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.social a {
  color: var(--slate);
  text-decoration: none;
  transition: color 0.25s, transform 0.25s;
  display: flex;
  align-items: center;
}

.social a:hover {
  color: var(--green);
  transform: translateY(-3px);
}

.social a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MAIN CONTENT (RIGHT — SCROLLS)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.content {
  flex: 1;
  padding: 96px 0;
  max-width: 700px;
}

/* ── Sections ── */
section {
  margin-bottom: 100px;
  scroll-margin-top: 96px;
}

.section-label {
  display: none;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-bright);
  white-space: nowrap;
}

.section-heading .line {
  flex: 1;
  height: 1px;
  background: rgba(168, 178, 216, 0.1);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ABOUT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#about p {
  font-size: 1rem;
  color: var(--slate-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

#about p:last-of-type {
  margin-bottom: 0;
}

#about strong {
  color: var(--white-bright);
  font-weight: 500;
}

#about .green {
  color: var(--green);
}

/* Info cards (education / languages) */
.info-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.info-card {
  flex: 1;
  min-width: 220px;
  padding: 20px 24px;
  background: var(--navy-light);
  border-radius: 8px;
  border: 1px solid rgba(100, 255, 218, 0.08);
  transition: border-color 0.25s;
}

.info-card:hover {
  border-color: rgba(100, 255, 218, 0.2);
}

.info-card h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.info-card p,
.info-card li {
  font-size: 0.875rem;
  color: var(--slate-light);
  line-height: 1.8;
}

.info-card ul {
  list-style: none;
}

.info-card ul li {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.info-card ul li::before {
  content: '▹';
  color: var(--green);
  flex-shrink: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   EXPERIENCE CARDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.exp-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 24px;
  padding: 20px 24px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background 0.25s, box-shadow 0.25s;
  cursor: default;
  border: 1px solid transparent;
}

.exp-card:hover {
  background: var(--navy-light);
  border-color: rgba(100, 255, 218, 0.12);
  box-shadow: 0 4px 24px rgba(2, 12, 27, 0.5);
}

.exp-card:hover .exp-title {
  color: var(--green);
}

.exp-date {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 4px;
  white-space: nowrap;
}

.exp-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  transition: color 0.25s;
  line-height: 1.3;
}

.exp-company {
  font-size: 0.875rem;
  color: var(--slate-light);
  margin-top: 2px;
}

.exp-desc {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--slate);
  line-height: 1.7;
}

.exp-desc ul {
  padding-left: 0;
  list-style: none;
}

.exp-desc ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.exp-desc ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--green);
}

/* Skill tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--green);
  background: var(--green-tint);
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SKILLS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.skill-group {
  padding: 24px;
  background: var(--navy-light);
  border-radius: 8px;
  border: 1px solid rgba(100, 255, 218, 0.08);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.skill-group:hover {
  border-color: rgba(100, 255, 218, 0.2);
  box-shadow: 0 4px 24px rgba(2, 12, 27, 0.5);
}

.skill-group h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-list li {
  font-size: 0.875rem;
  color: var(--slate-light);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.skill-list li::before {
  content: '▹';
  color: var(--green);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CERTIFICATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s;
  cursor: default;
}

.cert-card:hover {
  background: var(--navy-light);
  border-color: rgba(100, 255, 218, 0.12);
}

.cert-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--green-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green);
}

.cert-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.cert-name {
  font-size: 0.9rem;
  color: var(--white);
  font-weight: 500;
}

.cert-badge {
  margin-left: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--green);
  background: var(--green-tint);
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cert-badge.in-progress {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AWARDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.awards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.award-card {
  padding: 20px;
  background: var(--navy-light);
  border-radius: 8px;
  border: 1px solid rgba(100, 255, 218, 0.08);
  transition: border-color 0.25s, transform 0.25s;
}

.award-card:hover {
  border-color: rgba(100, 255, 218, 0.2);
  transform: translateY(-2px);
}

.award-org {
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  color: var(--green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.award-title {
  font-size: 0.875rem;
  color: var(--white);
  font-weight: 500;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
footer {
  text-align: center;
  padding: 40px 24px;
  font-size: 0.78rem;
  color: var(--slate);
}

footer a {
  color: var(--green);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ── Back to top ── */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-tint);
  border: 1px solid rgba(100, 255, 218, 0.3);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.25s;
  z-index: 100;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: rgba(100, 255, 218, 0.2);
}

#back-to-top svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — MOBILE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    padding: 0 16px;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100%;
    padding: 64px 0 40px;
  }

  .content {
    padding: 16px 0 64px;
    max-width: 100%;
  }

  nav {
    display: none;
  }

  .section-label {
    display: block;
  }

  .exp-card {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .skills-grid,
  .awards-grid {
    grid-template-columns: 1fr;
  }
}
