/* =========================================================
   DESIGN TOKENS
   A minimal, paper-like palette with one accent color borrowed
   from competitive-programming judges: the green used for an
   "Accepted" verdict. Numbers and labels use a monospace font,
   the way a judge or terminal would print them.
========================================================= */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #dfe7f2;
  --accent: #2563eb;
  --accent-soft: #eaf2ff;
  --accent-strong: #1d4ed8;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1040px;
}

/* =========================================================
   RESET / BASE
========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
}


p {
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* Small monospace label used above every section heading,
   styled like a code comment ("// about"). Ties the visual
   language back to the subject: someone who writes code. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
}

/* =========================================================
   LAYOUT HELPERS
========================================================= */
.nav,
.hero,
.section,
.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* =========================================================
   NAVIGATION
========================================================= */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav__name {
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.nav__links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav__links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================================================
   HERO
========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.hero__title {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero__bio {
  margin-top: 1.25rem;
  max-width: 48ch;
  color: var(--muted);
}

.hero__bio strong,
.hero__highlight strong {
  color: var(--ink);
  font-weight: 600;
}

.hero__divider {
  margin: 1.75rem 0;
  border: none;
  border-top: 1px solid var(--border);
  max-width: 48ch;
}

.hero__highlight {
  max-width: 50ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero__links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

/* --- Social row: circular icon links -------------------- */
.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.social-row a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.social-row a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.hero__cta {
  margin-top: 1.75rem;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 3rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.25rem 1.5rem 4rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(234, 242, 255, 0.9) 100%);
  box-shadow: var(--shadow);
}

.hero-section .text {
  max-width: 620px;
}

.hero-section h1 {
  font-size: clamp(2.3rem, 4.8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-section h1 span {
  color: var(--accent);
}

.hero-section .hero__bio {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-section .hero__divider {
  width: 100%;
  max-width: 9rem;
  margin: 1.4rem 0 1.2rem;
  border: none;
  border-top: 2px solid var(--accent);
}

.hero-section .hero__desc {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
}

.hero-section .hero__bottom {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-section .headshot {
  display: flex;
  justify-content: center;
  align-self: start;
  margin-top: -0.9rem;
}

.hero-section .headshot img {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 25px 55px rgba(37, 99, 235, 0.16);
}

@media (max-width: 860px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero-section .headshot {
    order: -1;
    align-self: center;
    margin-top: 0;
  }

  .hero-section .headshot img {
    width: min(100%, 260px);
  }
}

@media (max-width: 560px) {
  .hero-section .hero__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-section .social-row {
    margin-top: 0;
  }
}

/* --- Avatar: signature photo frame -----------------------
   Circular frame with a ring, ready to hold a real <img> once
   one is available. See the HTML comment above this element.
------------------------------------------------------------ */
.avatar {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  margin: 0 auto;
  background: var(--accent-soft);
  border: 6px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  object-fit: cover;
}

/* =========================================================
   GENERIC SECTION
========================================================= */
.section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  border-top: 1px solid var(--border);
}

.section__title {
  font-size: 1.7rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: inline-block;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 54%;
  height: 3px;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(37, 99, 235, 0.2) 100%);
}

.section__text {
  color: var(--muted);
  max-width: 65ch;
}

/* =========================================================
   SKILLS
========================================================= */
.skills {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skills__group h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(37, 99, 235, 0.05);
}

/* small spacing for inline icons inside tags */
.tag i {
  margin-right: 0.45rem;
  font-size: 0.95em;
  vertical-align: middle;
}

.tag--strong {
  border-color: var(--ink);
  color: var(--ink);
}

.tag--ac {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
}

/* =========================================================
   PUBLICATIONS
========================================================= */
.publication-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--shadow);
}

.publication__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.publication-card h3 {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.4;
}

.publication__desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.publication__contributors {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.publication__contributors span {
  font-weight: 600;
  color: var(--ink);
}

.publication__link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.25rem;
}

.publication__link:hover {
  text-decoration: underline;
}

/* =========================================================
   EDUCATION
========================================================= */
.education-list {
  display: grid;
  gap: 1rem;
}

.education-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}

.education-card__period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.education-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.education-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================================================
   PROJECTS
========================================================= */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.12);
}

.project-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-card__head h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.project-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.project-card__link {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: auto;
  padding-top: 0.4rem;
}

.project-card__link:hover {
  color: var(--accent);
}

/* =========================================================
   ACHIEVEMENTS
========================================================= */
.achievements {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  list-style: none;
  padding: 0;
}

.achievements li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink);
  line-height: 1.6;
}

.achievements li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 8px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--surface);
}

/* =========================================================
   PROBLEM SOLVING ACTIVITIES
========================================================= */
.ps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.ps-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.ps-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.12);
}

.ps-card__badge {
    display: flex;
    justify-content: center; /* Horizontal center */
    align-items: center;     /* Vertical center (optional) */
    margin-bottom: 20px;
}

.ps-card__badge img {
    width: 100px;
    height: auto;
    object-fit: contain;
}

.ps-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.ps-card__rating {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
}

.ps-card__rating-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.ps-card__desc {
  color: var(--muted);
  font-size: 0.88rem;
}

.ps-card__link {
  width: 100%;
  margin-top: 0.4rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

.ps-card__link:hover {
  color: var(--accent);
}

.section__note {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* =========================================================
   FOOTER
========================================================= */
.footer {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  border-top: 1px solid var(--border);
}

.footer .section__text {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.contact-form {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(234, 242, 255, 0.92) 100%);
  box-shadow: var(--shadow);
}

.contact-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #7b8ba5;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(37, 99, 235, 0.85);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}

.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-form__submit {
  width: 100%;
  margin-top: 0.95rem;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.contact-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.28);
  filter: brightness(1.02);
}

.footer__copy {
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero__text {
    order: 1;
  }

  .avatar {
    order: 0;
    width: 200px;
    height: 200px;
    font-size: 3.2rem;
  }

  .projects,
  .ps-grid {
    grid-template-columns: 1fr;
  }

  .nav__links {
    gap: 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
  }

  .avatar {
    width: 160px;
    height: 160px;
    font-size: 2.6rem;
  }
}
