/* ============================================================
   style.css — Sethuraman M Personal Site
   Based on original design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:      #f5f0ea;
  --card:    #fdfaf6;
  --accent1: #b5651d;
  --accent2: #c8956c;
  --accent3: #e8d5c0;
  --text:    #2c1f0e;
  --muted:   #7a6652;
  --border:  #e0cdb8;
  --tag:     #ede0d0;
  --nav-height: 3.5rem;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(245,240,234,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  min-height: var(--nav-height);
  padding: 0.65rem 1.5rem;
}
.nav-header {
  display: contents;
}
.nav-links {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 1.25rem 2rem;
  max-width: 100%;
}
.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent1); }
.nav-github {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  text-transform: none;
  letter-spacing: 0;
  z-index: 2;
}
.nav-github:hover { transform: translateY(calc(-50% - 2px)); }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, top 0.25s ease, bottom 0.25s ease, opacity 0.25s ease;
}
.nav-toggle-icon {
  position: relative;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after { bottom: -7px; }
nav.nav-open .nav-toggle-icon { background-color: transparent; }
nav.nav-open .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}
nav.nav-open .nav-toggle-icon::after {
  bottom: 0;
  transform: rotate(-45deg);
}
.github-repo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.github-repo-link:hover {
  color: var(--accent1);
  border-color: var(--accent2);
  background: var(--accent3);
}
.github-icon { flex-shrink: 0; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-height) + 3rem) 1.25rem 3rem;
  background: linear-gradient(145deg, #f0e6d6 0%, #fdf8f2 60%, #ecddc8 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, #d4956040 0%, transparent 70%);
}
.hero::after {
  content: '';
  position: absolute; bottom: -60px; left: -60px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, #b5651d25 0%, transparent 70%);
}
.hero-inner { text-align: center; max-width: 780px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: var(--accent3); color: var(--accent1);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; padding: 0.4rem 1.1rem; border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  color: var(--text); line-height: 1.1; margin-bottom: 0.6rem;
}
.hero h1 span { color: var(--accent1); }
.hero-title {
  font-size: 1rem; color: var(--muted); font-weight: 500;
  letter-spacing: 0.04em; margin-bottom: 1.8rem;
}
.hero-summary {
  font-size: 0.97rem; color: var(--muted); line-height: 1.8;
  max-width: 620px; margin: 0 auto 2.2rem;
}
.hero-contacts {
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center;
}
.hero-contacts a,
.hero-contacts button.hero-cta {
  text-decoration: none; background: var(--card);
  border: 1px solid var(--border); color: var(--accent1);
  padding: 0.5rem 1.2rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero-contacts button.hero-cta { -webkit-appearance: none; appearance: none; }
.hero-contacts a:hover,
.hero-contacts button.hero-cta:hover { background: var(--accent3); transform: translateY(-2px); }
.hero-contacts button.hero-cta:disabled {
  opacity: 0.8;
  cursor: wait;
  transform: none;
}

/* SECTIONS */
section { padding: 5rem 2rem; scroll-margin-top: 5rem; }
section:nth-child(even) { background: var(--card); }
.section-inner { max-width: 880px; margin: 0 auto; }
.section-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent2); margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; color: var(--text); margin-bottom: 2.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--accent3);
}

/* EXPERIENCE */
.exp-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.8rem 2rem; margin-bottom: 1.4rem;
  position: relative; transition: box-shadow 0.2s, transform 0.2s;
}
.exp-card:hover { box-shadow: 0 8px 30px #b5651d15; transform: translateY(-3px); }
.exp-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; }
.exp-role { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.exp-company { color: var(--accent1); font-weight: 600; font-size: 0.92rem; margin-top: 0.2rem; }
.exp-list { margin-top: 1rem; padding-left: 1.1rem; }
.exp-list li { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.5rem; line-height: 1.6; }
.exp-list li strong { color: var(--accent1); }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.2rem; }
.skill-group {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.4rem 1.6rem;
  transition: box-shadow 0.2s;
}
.skill-group:hover { box-shadow: 0 6px 24px #b5651d12; }
.skill-group-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent1); margin-bottom: 0.9rem;
}

/* TAGS */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  background: var(--tag); color: var(--accent1);
  font-size: 0.78rem; font-weight: 600; padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

/* PROJECTS */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.2rem; }
.proj-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.6rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.proj-card:hover { box-shadow: 0 8px 28px #b5651d15; transform: translateY(-3px); }
.proj-title { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 0.5rem; }
.proj-desc { font-size: 0.87rem; color: var(--muted); line-height: 1.65; margin-bottom: 0.9rem; }

/* EDUCATION */
.edu-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.2rem; }
.edu-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.6rem;
}
.edu-degree { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 0.3rem; }
.edu-school { color: var(--accent1); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.edu-detail { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.gpa-badge {
  display: inline-block; margin-top: 0.6rem;
  background: var(--accent3); color: var(--accent1);
  font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.8rem; border-radius: 999px;
}

/* CERTIFICATIONS */
.cert-group { margin-bottom: 2.5rem; }
.cert-group:last-child { margin-bottom: 0; }
.cert-group-title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent1);
  margin-bottom: 1rem; padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--accent3);
}
.cert-list { display: flex; flex-wrap: wrap; gap: 1rem; }
.cert-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.2rem 1.5rem;
  display: flex; align-items: flex-start; gap: 0.9rem;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  text-decoration: none; color: inherit;
  flex: 1 1 280px; max-width: 100%;
}
a.cert-card:hover {
  box-shadow: 0 4px 20px #b5651d15;
  border-color: var(--accent2);
  transform: translateY(-2px);
  color: var(--accent1);
}
.cert-card--progress {
  border-style: dashed;
  background: var(--card);
}
.cert-card--progress:hover { transform: none; }
.cert-icon { font-size: 1.5rem; flex-shrink: 0; }
.cert-body { min-width: 0; text-align: left; }
.cert-name { font-weight: 600; font-size: 0.9rem; color: var(--text); line-height: 1.35; }
.cert-issuer { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; line-height: 1.4; }
.cert-meta { font-size: 0.72rem; color: var(--accent1); margin-top: 0.35rem; font-weight: 600; }
.cert-verify {
  display: inline-block; margin-top: 0.45rem;
  font-size: 0.72rem; font-weight: 700; color: var(--accent1);
}
a.cert-card:hover .cert-verify { text-decoration: underline; }

/* CONTACT */
.contact-grid { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.3rem 1.5rem; text-align: center;
  text-decoration: none; color: var(--text);
  transition: box-shadow 0.2s, transform 0.2s; display: block;
}
.contact-item:hover { box-shadow: 0 6px 22px #b5651d18; transform: translateY(-3px); color: var(--accent1); }
.contact-icon { font-size: 1.6rem; margin-bottom: 0.5rem; }
.contact-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.2rem;
}
.contact-value { font-size: 0.88rem; font-weight: 600; }
.contact-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.contact-row .contact-item { padding: 1.2rem 0.5rem; min-width: 0; }
.contact-row .contact-value { font-size: clamp(0.68rem, 1.5vw, 0.88rem); }
.contact-item-email .contact-value {
  font-size: clamp(0.75rem, 2.5vw, 0.88rem);
  word-break: break-word;
}

/* FOOTER */
footer {
  text-align: center; padding: 2rem;
  font-size: 0.78rem; color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* SCROLL ANIMATION */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .nav-links { gap: 1rem 1.25rem; }
  .nav-links a { font-size: 0.72rem; }
  section { padding: 4rem 1.5rem; }
  .section-title { font-size: 1.75rem; }
}

@media (max-width: 900px) {
  :root { --nav-height: auto; }
  section[id] { scroll-margin-top: 4.5rem; }

  nav {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 1rem 0;
  }
  .nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding-bottom: 0.65rem;
  }
  .nav-github {
    position: static;
    transform: none;
    max-width: calc(100% - 3rem);
  }
  .nav-github:hover { transform: translateY(-2px); }
  .nav-github .github-repo-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding-bottom: 0.5rem;
    border-top: 1px solid var(--border);
  }
  nav.nav-open .nav-links { display: flex; }
  .nav-links a {
    padding: 0.85rem 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
    white-space: normal;
    text-align: center;
  }
  .nav-links a:last-child { border-bottom: none; }

  .hero { padding: calc(4.5rem + 1rem) 1rem 2.5rem; min-height: auto; }
  .hero-title { font-size: 0.92rem; }
  .hero-summary { font-size: 0.9rem; }
  .hero-contacts a,
  .hero-contacts button.hero-cta { font-size: 0.75rem; padding: 0.45rem 0.9rem; }

  .section-title { font-size: 1.55rem; margin-bottom: 2rem; }
  .exp-card { padding: 1.25rem 1.1rem; }
  .exp-top { flex-direction: column; align-items: flex-start; }
  .cert-card { width: 100%; }

  .contact-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .nav-github .github-repo-text { display: none; }
  .nav-github { padding: 0.45rem 0.55rem; }

  .hero h1 { font-size: clamp(2rem, 10vw, 2.6rem); }
  .hero-contacts { flex-direction: column; align-items: center; }
  .hero-contacts a,
  .hero-contacts button.hero-cta { width: 100%; max-width: 280px; text-align: center; }

  section { padding: 3rem 1rem; }
  .section-inner { width: 100%; }
  .skills-grid,
  .projects-grid,
  .edu-cards { grid-template-columns: 1fr; }

  .contact-row { grid-template-columns: 1fr; }
  .contact-row .contact-item { padding: 1.1rem 1rem; }
  .contact-item-email .contact-value { font-size: 0.8rem; }

  footer { padding: 1.5rem 1rem; font-size: 0.72rem; }
}

@media print {
  nav, button#downloadBtn { display: none !important; }
  body { background: white; }
  .reveal { opacity: 1 !important; transform: none !important; }
  section { padding: 2rem 1rem; }
  .exp-card, .skill-group, .proj-card, .edu-card, .cert-card, .contact-item {
    break-inside: avoid; box-shadow: none !important;
  }
}

/* HERO PHOTO */
.hero-photo-wrap { margin-bottom: 1.6rem; }
.hero-photo {
  width: clamp(110px, 28vw, 140px);
  height: clamp(110px, 28vw, 140px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent3);
  box-shadow: 0 8px 32px rgba(181, 101, 29, 0.2), 0 0 0 8px rgba(181, 101, 29, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-photo:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 40px rgba(181, 101, 29, 0.3), 0 0 0 10px rgba(181, 101, 29, 0.1);
}
