@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root { --ink: #172235; --muted: #697487; --paper: #f5f6f2; --white: #fff; --teal: #087e8b; --yellow: #f4b942; --line: #dce2df; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif; background: var(--paper); color: var(--ink); min-height: 100vh; }
.site-header { background: var(--ink); color: var(--white); padding: 34px 6vw 42px; position: relative; overflow: hidden; }
.site-header::after { content: ''; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(244,185,66,.5); border-radius: 50%; left: 5%; top: -155px; }
.header-inner, main, .footer-inner { max-width: 1240px; margin: auto; }
.header-inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 22px 28px; position: relative; z-index: 1; }
.brand-mark { width: 70px; height: 70px; display: grid; place-items: center; border: 2px solid var(--yellow); color: var(--yellow); font: 800 1.2rem Georgia, serif; transform: rotate(-6deg); }
.brand-copy h1 { font-size: clamp(1.7rem, 4vw, 3.3rem); line-height: 1.25; margin: 5px 0 8px; }
.eyebrow, .section-kicker, .note-label { color: var(--yellow); letter-spacing: 2px; font: 700 .72rem 'Segoe UI', sans-serif; }
.header-intro { color: #c4ccd2; font-size: 1rem; }
.header-nav { grid-column: 2; display: flex; flex-wrap: wrap; gap: 9px; }
.nav-btn { color: #dce8e8; border: 1px solid #4b5a68; padding: 8px 18px; text-decoration: none; font-size: .9rem; transition: .25s ease; }
.nav-btn:hover, .nav-btn.active { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
main { padding: 0 24px 70px; }
.intro-strip { margin: -25px 0 70px; position: relative; z-index: 2; background: var(--white); border-bottom: 3px solid var(--yellow); display: grid; grid-template-columns: repeat(3, 1fr); box-shadow: 0 12px 30px rgba(23,34,53,.09); }
.intro-strip div { padding: 22px 28px; border-left: 1px solid var(--line); }
.intro-strip div:last-child { border-left: 0; }
.intro-strip strong, .intro-strip span { display: block; }
.intro-strip strong { font-size: .85rem; margin-bottom: 5px; }
.intro-strip span { color: var(--muted); font-size: .8rem; }
.certificate-section { margin-bottom: 82px; scroll-margin-top: 25px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 28px; gap: 20px; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); margin-top: 6px; }
.section-note { color: var(--muted); font-size: .9rem; }
.python-layout { display: grid; grid-template-columns: minmax(220px, .7fr) 2fr; gap: 28px; align-items: start; }
.course-note { background: var(--teal); color: var(--white); padding: 28px; border-right: 6px solid var(--yellow); position: sticky; top: 20px; }
.course-note h3 { font-size: 1.35rem; margin: 14px 0 17px; }
.course-note p { color: #e5f3f2; font-size: .88rem; line-height: 1.9; }
.course-note ul { list-style: none; margin-top: 15px; }
.course-note li { border-top: 1px solid rgba(255,255,255,.2); padding: 8px 0; color: #e5f3f2; font-size: .82rem; }
.course-note li::before { content: '—'; color: var(--yellow); margin-left: 8px; }
.img-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.python-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.img-wrapper { background: var(--white); border: 1px solid var(--line); position: relative; overflow: hidden; aspect-ratio: 1.45; transition: transform .3s ease, box-shadow .3s ease; }
.img-wrapper:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(23,34,53,.15); }
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quera-card { grid-column: span 2; aspect-ratio: 1.65; border: 3px solid var(--yellow); }
.card-tag { position: absolute; z-index: 1; top: 10px; right: 10px; background: var(--yellow); color: var(--ink); padding: 4px 8px; font: 700 .62rem 'Segoe UI', sans-serif; letter-spacing: 1px; }
.projects-section { margin-bottom: 30px; scroll-margin-top: 25px; }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.project-card { display: grid; grid-template-columns: 72px 1fr; min-height: 230px; background: var(--ink); color: var(--white); border-top: 4px solid var(--yellow); }
.project-number { padding: 24px 18px; color: var(--yellow); font: 800 1.6rem Georgia, serif; border-left: 1px solid #354152; }
.project-content { padding: 24px 26px 22px; display: flex; flex-direction: column; align-items: flex-start; }
.project-type { color: var(--yellow); font: 700 .68rem 'Segoe UI', sans-serif; letter-spacing: 1.5px; }
.project-card h3 { font-size: 1.3rem; margin: 12px 0 10px; }
.project-card p { color: #c4ccd2; font-size: .86rem; line-height: 1.9; }
.project-link { margin-top: auto; padding-top: 18px; color: var(--yellow); text-decoration: none; font-size: .85rem; font-weight: 700; }
.project-link:hover { color: var(--white); }
.project-link span { display: inline-block; margin-right: 5px; direction: ltr; }
footer { background: var(--ink); color: var(--white); padding: 48px 24px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
footer h2 { font-size: 1.5rem; margin-top: 10px; }
footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 25px; justify-content: flex-end; }
footer a { color: #dce8e8; text-decoration: none; font-size: .88rem; }
footer a:hover { color: var(--yellow); }
footer small { display: block; color: #82929c; margin-top: 4px; }
@media (max-width: 800px) {
    .site-header { padding: 26px 20px 32px; }
    .header-inner { grid-template-columns: auto 1fr; }
    .header-nav { grid-column: 1 / -1; }
    main { padding: 0 16px 45px; }
    .intro-strip { grid-template-columns: 1fr; margin-bottom: 48px; }
    .intro-strip div { border-left: 0; border-bottom: 1px solid var(--line); padding: 15px 20px; }
    .intro-strip div:last-child { border-bottom: 0; }
    .section-heading { display: block; }
    .section-note { margin-top: 8px; }
    .python-layout { grid-template-columns: 1fr; }
    .course-note { position: static; }
    .img-gallery, .python-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .quera-card { grid-column: span 2; }
    .projects-grid { grid-template-columns: 1fr; }
    .footer-inner { display: block; }
    footer ul { justify-content: flex-start; margin-top: 28px; }
}
@media (max-width: 430px) {
    .brand-mark { width: 54px; height: 54px; font-size: .95rem; }
    .brand-copy h1 { font-size: 1.5rem; }
    .nav-btn { flex: 1; text-align: center; padding: 8px 7px; }
    .img-gallery, .python-gallery { grid-template-columns: 1fr; }
    .quera-card { grid-column: auto; }
}
