:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #eef3ff;
  --text: #172033;
  --muted: #647089;
  --primary: #315efb;
  --primary-dark: #2448c7;
  --accent: #14b8a6;
  --border: #dce3f0;
  --shadow: 0 18px 45px rgba(35, 55, 100, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220,227,240,.8);
}
.navbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; }
.logo span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 10px 13px; border-radius: 10px; font-weight: 650; font-size: .94rem; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { background: var(--surface-alt); color: var(--primary); }
.menu-toggle { display: none; border: 0; background: var(--surface-alt); border-radius: 10px; font-size: 1.4rem; padding: 8px 11px; cursor: pointer; }

.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(circle at 85% 10%, rgba(49,94,251,.18), transparent 30%),
    radial-gradient(circle at 15% 90%, rgba(20,184,166,.16), transparent 25%),
    linear-gradient(180deg, #fff, #f6f8ff);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
h1, h2, h3 { line-height: 1.2; margin-top: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -.055em; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 10px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 760px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 12px; font-weight: 750; border: 1px solid transparent; transition: .2s ease; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-secondary { background: #fff; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.code-card { background: #111827; color: #dbeafe; border-radius: 24px; padding: 28px; box-shadow: var(--shadow); transform: rotate(2deg); }
.code-card pre { margin: 0; overflow: auto; font: .95rem/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-key { color: #93c5fd; } .code-value { color: #6ee7b7; } .code-comment { color: #94a3b8; }

.section { padding: 82px 0; }
.section-header { max-width: 760px; margin-bottom: 38px; }
.section-header p { color: var(--muted); margin: 0; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: 0 8px 30px rgba(31,41,55,.06); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); transition: .22s ease; }
.icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-alt); color: var(--primary); font-size: 1.4rem; margin-bottom: 18px; }
.card p { color: var(--muted); margin-bottom: 0; }

.page-hero { padding: 72px 0 52px; background: linear-gradient(135deg, #eef3ff, #f8fbff); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 14px; }

.skill-card { display: flex; gap: 18px; align-items: flex-start; }
.skill-card .icon { flex: 0 0 48px; margin: 0; }
.timeline { position: relative; display: grid; gap: 24px; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-left: 56px; }
.timeline-dot { position: absolute; left: 8px; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); border: 5px solid #eaf0ff; }
.timeline-item .period { color: var(--primary); font-weight: 750; }
.timeline-item p { color: var(--muted); }

.project-card { overflow: hidden; padding: 0; }
.project-thumb { min-height: 190px; padding: 28px; display: flex; align-items: end; background: linear-gradient(135deg, #315efb, #14b8a6); color: #fff; }
.project-thumb.alt { background: linear-gradient(135deg, #7c3aed, #315efb); }
.project-thumb.warm { background: linear-gradient(135deg, #f97316, #ef4444); }
.project-body { padding: 24px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { font-size: .8rem; font-weight: 700; background: var(--surface-alt); color: var(--primary); padding: 5px 9px; border-radius: 999px; }

.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; }
.contact-list { display: grid; gap: 14px; margin-top: 24px; }
.contact-item { display: flex; gap: 14px; align-items: center; background: var(--surface); padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.contact-item strong { display: block; }
.contact-item span { color: var(--muted); font-size: .92rem; }
.form-group { margin-bottom: 17px; }
label { display: block; font-weight: 700; margin-bottom: 7px; }
input, textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; font: inherit; background: #fff; }
input:focus, textarea:focus { outline: 3px solid rgba(49,94,251,.13); border-color: var(--primary); }
textarea { min-height: 150px; resize: vertical; }
.notice { background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; padding: 13px 15px; border-radius: 12px; display: none; margin-top: 14px; }

.cta { background: #172033; color: #fff; border-radius: 26px; padding: 46px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta p { color: #cbd5e1; margin: 8px 0 0; }
.site-footer { margin-top: 70px; background: #111827; color: #cbd5e1; padding: 34px 0; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 880px) {
  .hero-grid, .contact-layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .code-card { transform: none; }
  .menu-toggle { display: block; }
  .nav-links { display: none; position: absolute; left: 16px; right: 16px; top: 70px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
}
@media (max-width: 600px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 68px; }
  .section { padding: 62px 0; }
  .cta { padding: 30px; align-items: flex-start; flex-direction: column; }
  h1 { font-size: 2.6rem; }
}

.new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 3px 7px;
    border-radius: 999px;

    background: var(--primary);
    color: #fff;

    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;

    box-shadow: 0 3px 10px rgba(13, 110, 253, 0.3);

    animation: newBadgePulse 2s infinite;
}

@keyframes newBadgePulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(13, 110, 253, 0.3);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 4px 16px rgba(13, 110, 253, 0.5);
    }
}
