/* =========================================
   VIVEK REDDY CHENNU — Resume (style.css)
   Centered column • Justified text • h3 left
   ========================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap");

/* ---------- Gentle reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: #1d4ed8;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid #14b8a6;
  outline-offset: 3px;
}

/* ---------- Theme tokens ---------- */
:root {
  --bg: #f6f8fc; /* page background */
  --surface: #ffffff; /* card bg */
  --text: #0b1220; /* primary text */
  --muted: #475569; /* secondary text */
  --border: #e5e7eb; /* card border */
  --accent: #2563eb; /* blue */
  --accent-2: #14b8a6; /* teal */

  --radius: 14px;
  --shadow: 0 10px 18px rgba(2, 6, 23, 0.06);
  --maxw: 880px; /* centered column width */
}

/* ---------- Base layout ---------- */
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  padding: 24px; /* page breathing room */
}

/* Center every top-level section */
body > * {
  max-width: var(--maxw);
  margin-inline: auto; /* centered column */
}

/* ---------- Top: Name + Contact ---------- */
h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.2px;
  text-align: center; /* keep your name centered */
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent; /* reveals gradient */
}

#contact {
  margin: 0 0 26px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Link “chips” inside contact */
#contact a {
  color: #0b1220;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  transition: transform 0.06s ease, background 0.2s ease;
}
#contact a:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

/* Tiny icons */
#contact a[href^="mailto:"]::before {
  content: "✉︎";
  font-size: 0.95em;
}
#contact a[href*="linkedin.com"]::before {
  content: "in";
  font-weight: 800;
  font-size: 0.8em;
  line-height: 1;
  color: #fff;
  background: #0a66c2;
  padding: 3px 6px;
  border-radius: 6px;
}

/* ---------- Headings & Sections ---------- */
/* h3 must be left-aligned per your requirement */
h3 {
  margin: 28px 0 10px;
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 800;
  letter-spacing: 0.2px;
  text-align: left;
  position: relative;
  padding-bottom: 6px;
}
h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 110px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

h4 {
  margin: 10px 0 6px;
  font-size: 16px;
  font-weight: 600;
}

/* Turn immediate section content into clean “cards” */
h3 + p,
h3 + ul,
h3 + .flexcontainer + ul,
.flexcontainer + ul {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px 18px 28px; /* extra left gutter */
  box-shadow: var(--shadow);
  margin: 10px 0 0 0;
}

/* ---------- Justified content text ---------- */
p,
li {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* ---------- Lists ---------- */
ul {
  padding-left: 28px;
  margin: 0;
}
ul > li {
  margin: 8px 0;
  padding-left: 2px;
}
ul > li::marker {
  color: var(--accent-2);
}

/* Nested skill lists */
ul ul {
  margin-top: 6px;
  padding-left: 22px;
  border-left: 2px dashed #e5e7eb;
}

/* ---------- Role | Dates row ---------- */
.flexcontainer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 12px 0;
}
.flexcontainer span:first-child b {
  font-weight: 800;
}
.flexcontainer span:nth-last-child b {
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(
    90deg,
    rgba(37, 99, 235, 0.12),
    rgba(20, 184, 166, 0.12)
  );
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ---------- Small polish ---------- */
@media (hover: hover) {
  h3 + ul li:hover,
  .flexcontainer + ul li:hover {
    background: linear-gradient(
      90deg,
      rgba(37, 99, 235, 0.07),
      transparent 45%
    );
    border-radius: 8px;
    transition: background 0.18s ease-out;
    padding-left: 6px;
  }
}

/* Long URLs (LinkedIn) wrap nicely */
a {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ---------- Print (A4 friendly) ---------- */
@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --text: #000;
    --muted: #333;
    --border: #ddd;
    --shadow: none;
  }
  body {
    background: #fff;
    padding: 0.6in;
    font-size: 11pt;
  }
  h1 {
    color: #000;
    background: none;
    -webkit-background-clip: initial;
  }
  #contact {
    box-shadow: none;
  }
  #contact a {
    background: transparent;
    border: none;
    padding: 0;
  }
  h3::after {
    background: #000;
  }
  h3 + p,
  h3 + ul,
  h3 + .flexcontainer + ul,
  .flexcontainer + ul {
    box-shadow: none;
  }
  h3,
  .flexcontainer,
  ul {
    break-inside: avoid;
  }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 480px) {
  #contact {
    gap: 6px 10px;
    padding: 10px 12px;
  }
  #contact a {
    padding: 5px 9px;
  }
}
body {
  margin-left: 100px;
}
div {
  margin-left: 0px;
  text-align: justify;
}
/* ===============================
   Circular Skills Meters (0–10y)
   =============================== */

.skills-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 14px);
  padding: 18px 22px;
  box-shadow: var(--shadow, 0 10px 18px rgba(2, 6, 23, 0.06));
  margin: 10px 0 0 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 18px;
  align-items: start;
}

.skill {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

/* Circular ring */
/* 5-YEAR SCALE RINGS */
.ring {
  /* Size & thickness (unchanged) */
  --size: 96px;
  --thickness: 10px;

  /* Colors (unchanged) */
  --ring-track: #e6edf5;
  --ring-fill: var(--accent, #2563eb);

  /* Years: clamp 0..5; 1 unit = 72deg (360/5) */
  --y: clamp(0, var(--years, 0), 5);
  --angle: calc(var(--y) * 72deg);

  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(
    var(--ring-fill) var(--angle),
    var(--ring-track) 0
  );

  /* Hollow center to form a ring */
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--thickness)),
    #000 0
  );
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--thickness)),
    #000 0
  );

  position: relative;
  display: grid;
  place-items: center;
}

/* Tick marks each 1/5 of the circle */
.ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(2, 6, 23, 0.14) 0 1deg,
    transparent 1deg 72deg
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--thickness)),
    #000 0
  );
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--thickness)),
    #000 0
  );
  pointer-events: none;
}

/* Value badge inside */
.ring > span {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text, #0b1220);
  line-height: 1;
  background: #f8fafc;
  border: 1px solid var(--border, #e5e7eb);
  padding: 2px 6px;
  border-radius: 999px;
}

/* Label */
.skill .label {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Compact variant so the section stays tight */
.skills-grid.compact {
  gap: 14px;
}
.skills-grid.compact .ring {
  --size: 78px;
  --thickness: 9px;
}
.skills-grid.compact .label {
  font-size: 0.9rem;
}
.skills-grid.compact .ring > span {
  font-size: 0.9rem;
}

/* Small screens */
@media (max-width: 420px) {
  .skills-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
  }
  .skills-grid.compact .ring {
    --size: 70px;
    --thickness: 8px;
  }
}

/* Print */
@media print {
  .skills-card {
    box-shadow: none;
  }
  .ring::after {
    background: repeating-conic-gradient(#bbb 0 1deg, transparent 1deg 36deg);
  }
}
