/* ============================================================
   Devaraj Kumar Daniel — Personal Site
   Clean corporate theme · navy + white · no external deps
   ============================================================ */

:root {
  /* Color */
  --navy:        #0f2c4c;
  --navy-deep:   #0a2038;
  --accent:      #2f6fd1;
  --accent-soft: #e8f0fb;
  --ink:         #16202c;
  --ink-soft:    #4a5a6a;
  --line:        #e3e8ee;
  --bg:          #ffffff;
  --bg-alt:      #f5f7fa;

  /* Type */
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --maxw: 1080px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 8px 24px rgba(16, 32, 56, .06);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--navy);
  font-weight: 700;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  font-size: .95rem;
  letter-spacing: .04em;
}
.brand-name { font-size: 1.02rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.75rem);
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  padding: .35rem 0;
  position: relative;
}
.nav-links a:hover { color: var(--navy); text-decoration: none; }
.nav-links a.active { color: var(--navy); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-cta {
  background: var(--navy);
  color: #fff !important;
  padding: .5rem 1.1rem !important;
  border-radius: 8px;
}
.nav-cta:hover { background: var(--navy-deep); }
.nav-cta::after { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: .98rem;
  padding: .8rem 1.5rem;
  border-radius: 9px;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--navy-deep); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 75% -10%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, #fff, var(--bg-alt));
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
  max-width: 880px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero-title .accent { color: var(--accent); }
.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: 2.5rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.hero-badges li {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  padding: .5rem .9rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-alt { background: var(--bg-alt); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section-head.center {
  justify-content: center;
  text-align: center;
}
.section-index {
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .1em;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  letter-spacing: -0.01em;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.about-text p { font-size: 1.05rem; color: var(--ink-soft); }
.about-facts {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.fact {
  background: #fff;
  padding: 1.1rem 1.25rem;
}
.fact-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: .25rem;
}
.fact-value { font-weight: 600; color: var(--navy); }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.skill-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(16, 32, 56, .1);
}
.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: .65rem;
  border-bottom: 2px solid var(--accent-soft);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.tag-list li {
  font-size: .85rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--accent-soft);
  padding: .35rem .75rem;
  border-radius: 7px;
}
.tag-list.small li {
  font-size: .78rem;
  background: var(--bg-alt);
  color: var(--ink-soft);
}

/* ---------- Experience timeline ---------- */
.timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--line);
  margin-left: .5rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  padding: 0 0 2.5rem 2rem;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -9px; top: 6px;
  width: 16px; height: 16px;
  background: #fff;
  border: 3px solid var(--accent);
  border-radius: 50%;
}
.timeline-date {
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-soft);
}
.timeline-body h3 { font-size: 1.2rem; }
.timeline-org {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .85rem;
}
.timeline-body ul {
  display: grid;
  gap: .55rem;
}
.timeline-body li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}
.timeline-body li::before {
  content: "";
  position: absolute;
  left: 0; top: .65em;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(16, 32, 56, .1);
}
.project-card h3 { font-size: 1.2rem; }
.project-sub {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin: .35rem 0 1rem;
}
.project-card p:not(.project-sub) { color: var(--ink-soft); flex: 1; }
.project-card .tag-list { margin-top: 1rem; }

/* Sub-group heading within Projects */
.projects-subhead {
  font-size: 1.35rem;
  margin: 3rem 0 .35rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.projects-subnote {
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
  max-width: 60ch;
}

/* Download buttons */
.project-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--accent-soft);
  border: 1px solid transparent;
  padding: .45rem .8rem;
  border-radius: 8px;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.btn-download:hover {
  text-decoration: none;
  background: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.dl-type {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--line);
  padding: .1rem .4rem;
  border-radius: 4px;
}
.btn-download:hover .dl-type { background: var(--accent-soft); }

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.edu-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.edu-block h3 {
  font-size: 1.1rem;
  margin-bottom: 1.1rem;
  padding-bottom: .65rem;
  border-bottom: 2px solid var(--accent-soft);
}
.edu-degree { font-weight: 700; color: var(--navy); margin: 0; }
.edu-school { color: var(--ink-soft); margin: .35rem 0 0; }
.cert-list { display: grid; gap: .7rem; }
.cert-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink-soft);
}
.cert-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Contact ---------- */
.section-contact {
  background:
    radial-gradient(900px 400px at 50% 120%, rgba(47, 111, 209, .25), transparent 60%),
    var(--navy);
  color: #fff;
  text-align: center;
}
.section-contact h2 { color: #fff; }
.section-contact .section-index { color: #8fb6ee; }
.contact-inner { max-width: 680px; }
.contact-lead {
  font-size: 1.1rem;
  color: #cdd9e7;
  margin-bottom: 2rem;
}
.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: 1.75rem;
}
.section-contact .btn-primary {
  background: #fff;
  color: var(--navy);
}
.section-contact .btn-primary:hover { background: #e8f0fb; }
.section-contact .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .4);
}
.section-contact .btn-ghost:hover { border-color: #fff; }
.contact-email {
  font-size: .95rem;
  color: #8fb6ee;
  margin: 0;
  letter-spacing: .02em;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #9fb0c2;
  padding-block: 1.5rem;
  font-size: .9rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-top { color: #9fb0c2; }
.footer-top:hover { color: #fff; }

/* ---------- Scroll reveal ---------- */
.section, .timeline-item, .skill-card, .project-card {
  --reveal-y: 14px;
}
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition: opacity .55s ease, transform .55s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: .35rem; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--pad) 1rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: .75rem 0; }
  .nav-links a.active::after { display: none; }
  .nav-cta { margin-top: .5rem; text-align: center; }

  .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); }
}
