/* =========================================================
   ARUNKUMAR KESAVAN
   MLOps & AI Platform Engineer
   Clean GitHub Pages Portfolio
   ========================================================= */


/* ---------------------------------------------------------
   Design System
   --------------------------------------------------------- */

:root {
  --bg: #f6f7f9;
  --paper: #ffffff;

  --text: #273142;
  --heading: #111827;
  --muted: #667085;

  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;

  --border: #e5e7eb;
  --border-dark: #d1d5db;

  --header: #111827;
  --header-soft: #1f2937;

  --max-width: 1040px;
}


/* ---------------------------------------------------------
   Reset
   --------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--bg);

  color: var(--text);

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

  font-size: 15px;
  line-height: 1.7;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

strong {
  color: var(--heading);
  font-weight: 700;
}


/* ---------------------------------------------------------
   Page
   --------------------------------------------------------- */

.page {
  width: min(100% - 32px, var(--max-width));

  margin: 32px auto;

  background: var(--paper);

  border: 1px solid var(--border);

  border-radius: 8px;

  overflow: hidden;
}


/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.header {
  padding: 42px 52px 30px;

  background: var(--header);

  color: #ffffff;
}

.header-top {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 40px;
}

.header h1 {
  margin: 0;

  color: #ffffff;

  font-size: clamp(2.2rem, 5vw, 3.2rem);

  font-weight: 700;

  letter-spacing: -0.04em;

  line-height: 1.1;
}

.role {
  margin: 9px 0 0;

  color: #93c5fd;

  font-size: 1.15rem;

  font-weight: 500;
}

.header-label {
  padding-top: 5px;

  color: #9ca3af;

  font-size: 0.7rem;

  font-weight: 700;

  line-height: 1.7;

  letter-spacing: 0.12em;

  text-align: right;
}


/* ---------------------------------------------------------
   Contact
   --------------------------------------------------------- */

.contact {
  display: flex;

  align-items: center;

  flex-wrap: wrap;

  gap: 0;

  margin-top: 28px;

  padding-top: 18px;

  border-top: 1px solid rgba(255, 255, 255, 0.12);

  font-size: 0.84rem;
}

.contact span,
.contact a {
  margin-right: 18px;

  margin-bottom: 5px;
}

.contact span {
  color: #d1d5db;
}

.contact a {
  color: #ffffff;

  text-decoration: none;

  transition: color 0.2s ease;
}

.contact a:hover {
  color: #93c5fd;
}


/* ---------------------------------------------------------
   Main
   --------------------------------------------------------- */

main {
  padding: 0 52px;
}

section {
  padding: 38px 0;

  border-bottom: 1px solid var(--border);
}

section:last-child {
  border-bottom: 0;
}


/* ---------------------------------------------------------
   Section Headings
   --------------------------------------------------------- */

section h2 {
  position: relative;

  margin: 0 0 22px;

  padding-bottom: 10px;

  color: var(--heading);

  font-size: 1.25rem;

  font-weight: 700;

  letter-spacing: -0.02em;
}

section h2::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: 0;

  width: 36px;
  height: 2px;

  background: var(--primary);
}


/* ---------------------------------------------------------
   Professional Summary
   --------------------------------------------------------- */

section:first-child p {
  margin: 0 0 16px;

  color: var(--muted);

  font-size: 0.94rem;
}

section:first-child p:last-child {
  margin-bottom: 0;
}


/* ---------------------------------------------------------
   Skills
   --------------------------------------------------------- */

.skills {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  border-top: 1px solid var(--border);

  border-left: 1px solid var(--border);
}

.skill {
  padding: 20px 22px;

  border-right: 1px solid var(--border);

  border-bottom: 1px solid var(--border);
}

.skill h3 {
  margin: 0 0 6px;

  color: var(--heading);

  font-size: 0.95rem;

  font-weight: 700;
}

.skill p {
  margin: 0;

  color: var(--muted);

  font-size: 0.88rem;

  line-height: 1.65;
}


/* ---------------------------------------------------------
   Experience
   --------------------------------------------------------- */

.experience {
  padding-bottom: 26px;

  margin-bottom: 26px;

  border-bottom: 1px solid var(--border);
}

.experience:last-child {
  padding-bottom: 0;

  margin-bottom: 0;

  border-bottom: 0;
}

.experience-title {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 24px;

  margin-bottom: 13px;
}

.experience h3 {
  margin: 0;

  color: var(--heading);

  font-size: 1rem;

  font-weight: 700;

  line-height: 1.45;
}

.company {
  margin: 3px 0 0;

  color: var(--primary);

  font-size: 0.87rem;

  font-weight: 600;
}

.experience time {
  flex-shrink: 0;

  color: var(--muted);

  font-size: 0.82rem;

  font-weight: 500;

  white-space: nowrap;
}

.experience ul,
.project ul {
  margin: 0;

  padding-left: 20px;
}

.experience li,
.project li {
  margin-bottom: 7px;

  color: var(--muted);

  font-size: 0.9rem;

  line-height: 1.65;
}

.experience li:last-child,
.project li:last-child {
  margin-bottom: 0;
}

li::marker {
  color: var(--primary);
}


/* ---------------------------------------------------------
   Projects
   --------------------------------------------------------- */

.project {
  padding: 24px 0;

  border-bottom: 1px solid var(--border);
}

.project:first-of-type {
  padding-top: 0;
}

.project:last-child {
  padding-bottom: 0;

  border-bottom: 0;
}

.project-title {
  margin-bottom: 13px;
}

.project h3 {
  margin: 0 0 4px;

  color: var(--heading);

  font-size: 1rem;

  font-weight: 700;

  line-height: 1.45;
}

.project h3 a {
  color: var(--heading);

  text-decoration: none;

  border-bottom: 1px solid #93c5fd;

  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.project h3 a:hover {
  color: var(--primary);

  border-color: var(--primary);
}

.tech {
  margin: 0;

  color: var(--primary);

  font-size: 0.78rem;

  font-weight: 700;

  line-height: 1.5;
}


/* ---------------------------------------------------------
   Education
   --------------------------------------------------------- */

.education {
  border-top: 1px solid var(--border);
}

.education > div {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  padding: 14px 4px;

  border-bottom: 1px solid var(--border);
}

.education strong {
  font-size: 0.9rem;
}

.education span {
  color: var(--muted);

  font-size: 0.86rem;

  font-weight: 600;
}


/* ---------------------------------------------------------
   Certifications
   --------------------------------------------------------- */

.certifications {
  margin: 0;

  padding-left: 20px;
}

.certifications li {
  margin-bottom: 8px;

  color: var(--muted);

  font-size: 0.9rem;
}

.certifications li:last-child {
  margin-bottom: 0;
}


/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

footer {
  padding: 22px 52px 26px;

  color: #8a94a3;

  border-top: 1px solid var(--border);

  font-size: 0.76rem;

  text-align: center;
}


/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 800px) {

  .page {
    width: min(100% - 24px, var(--max-width));

    margin: 20px auto;
  }

  .header {
    padding: 36px 32px 28px;
  }

  .header-top {
    flex-direction: column;

    gap: 16px;
  }

  .header-label {
    padding: 0;

    text-align: left;
  }

  main {
    padding: 0 32px;
  }

  .experience-title {
    flex-direction: column;

    gap: 3px;
  }

  .experience time {
    white-space: normal;
  }

  footer {
    padding-left: 32px;
    padding-right: 32px;
  }
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 560px) {

  body {
    background: #ffffff;

    font-size: 14px;
  }

  .page {
    width: 100%;

    margin: 0;

    border: 0;

    border-radius: 0;
  }

  .header {
    padding: 30px 22px 24px;
  }

  .header h1 {
    font-size: 2.15rem;
  }

  .role {
    font-size: 1rem;
  }

  .header-label {
    font-size: 0.64rem;
  }

  .contact {
    display: block;

    margin-top: 22px;
  }

  .contact span,
  .contact a {
    display: inline-block;

    margin-right: 12px;

    margin-bottom: 7px;
  }

  main {
    padding: 0 22px;
  }

  section {
    padding: 32px 0;
  }

  section h2 {
    font-size: 1.15rem;
  }

  section:first-child p,
  .experience li,
  .project li,
  .certifications li {
    font-size: 0.88rem;
  }

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

  .skill {
    padding: 18px;
  }

  .education > div {
    align-items: flex-start;

    flex-direction: column;

    gap: 2px;
  }

  footer {
    padding: 20px 22px;
  }
}


/* ---------------------------------------------------------
   Print / PDF
   --------------------------------------------------------- */

@media print {

  @page {
    size: A4;

    margin: 10mm;
  }

  body {
    background: #ffffff;

    color: #111827;

    font-size: 9.5pt;

    line-height: 1.45;
  }

  .page {
    width: 100%;

    margin: 0;

    border: 0;

    border-radius: 0;
  }

  .header {
    padding: 20px 24px;

    background: #111827 !important;

    print-color-adjust: exact;

    -webkit-print-color-adjust: exact;
  }

  .header-label {
    display: none;
  }

  main {
    padding: 0 24px;
  }

  section {
    padding: 16px 0;
  }

  section h2 {
    margin-bottom: 10px;

    font-size: 12pt;
  }

  section:first-child p,
  .experience li,
  .project li,
  .certifications li,
  .skill p {
    font-size: 8.7pt;
  }

  .skills {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill {
    padding: 10px 12px;
  }

  .experience {
    padding-bottom: 12px;

    margin-bottom: 12px;
  }

  .project {
    padding: 11px 0;
  }

  footer {
    padding: 12px 24px;
  }

  a {
    color: inherit;

    text-decoration: none;
  }
}


/* ---------------------------------------------------------
   Accessibility
   --------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--primary);

  outline-offset: 3px;
}


/* ---------------------------------------------------------
   Reduced Motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}