:root {
  --navy: #101216;
  --blue: #2457e6;
  --yellow: #f5c518;
  --paper: #f7f9ff;
  --white: #ffffff;
  --text: #1b1e25;
  --muted: #606777;
  --line: #dce1ec;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "DM Sans", sans-serif; color: var(--text); background: var(--paper); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .93); border-bottom: 1px solid rgba(16, 18, 22, .12); backdrop-filter: blur(12px); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; font-weight: 700; letter-spacing: .06em; }
.logo span { color: var(--yellow); }
.nav-links { display: flex; gap: 30px; font-weight: 600; font-size: .94rem; }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--blue); }
.menu-button { display: none; background: none; border: 0; cursor: pointer; }
.menu-button span { display: block; width: 24px; height: 2px; margin: 5px; background: var(--navy); }

.hero { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 70px; padding-block: 90px; }
.eyebrow { color: var(--blue); font-size: .78rem; font-weight: 700; letter-spacing: .18em; margin-bottom: 13px; }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; color: var(--navy); line-height: 1.15; }
h1 { font-size: clamp(3.8rem, 8vw, 7rem); letter-spacing: -.065em; }
h2 { font-size: clamp(2.25rem, 4vw, 3.6rem); letter-spacing: -.045em; }
.hero-text { max-width: 590px; margin: 25px 0 36px; color: var(--muted); font-size: 1.15rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.button { padding: 13px 22px; border: 2px solid var(--navy); font-weight: 700; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--navy); }
.button.primary { color: white; background: var(--navy); }
.button.secondary { background: transparent; }

.profile-wrap { position: relative; min-height: 520px; display: grid; place-items: center; isolation: isolate; }
.hero-grid { position: absolute; width: 82%; height: 82%; right: 0; top: 8%; z-index: -3; background-image: linear-gradient(rgba(20,33,61,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(20,33,61,.1) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(to bottom right, transparent 2%, black 35%, transparent 92%); }
.orbit { position: absolute; z-index: -2; border-radius: 50%; }
.orbit-one { width: 150px; height: 150px; top: 14px; right: -18px; border: 12px solid var(--yellow); background: transparent; }
.orbit-two { width: 125px; height: 125px; bottom: 8px; left: 10px; border: 19px solid var(--blue); }
.profile-card { position: relative; z-index: 2; width: min(365px, 82%); overflow: hidden; background: var(--white); border: 2px solid var(--navy); padding: 17px; transform: rotate(-2.5deg); box-shadow: 15px 15px 0 var(--navy); transition: transform .35s ease, box-shadow .35s ease; }
.profile-card:hover { transform: rotate(0) translateY(-7px); box-shadow: 10px 18px 0 var(--navy); }
.card-topline { display: flex; justify-content: space-between; padding: 0 2px 12px; font-size: .66rem; font-weight: 700; letter-spacing: .16em; }
.avatar { position: relative; aspect-ratio: 1.1; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: white; background: var(--blue); font-family: "Space Grotesk", sans-serif; }
.avatar::before { content: ""; position: absolute; width: 215px; height: 215px; border: 35px solid rgba(255,255,255,.12); border-radius: 50%; }
.avatar::after { content: ""; position: absolute; inset: 17px; border: 1px solid rgba(255,255,255,.32); }
.avatar strong { position: relative; z-index: 1; font-size: clamp(4.5rem, 9vw, 6.4rem); line-height: .9; letter-spacing: -.06em; }
.avatar-small { position: relative; z-index: 1; margin-bottom: 10px; padding: 3px 9px; color: var(--navy); background: var(--yellow); font-size: .67rem; font-weight: 700; letter-spacing: .14em; transform: rotate(-4deg); }
.avatar-line { position: relative; z-index: 1; width: 52px; height: 4px; margin-top: 20px; background: white; }
.profile-photo { justify-content: flex-end; }
.profile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; z-index: 1; }
.profile-photo::after { z-index: 2; }
.profile-photo .avatar-small { position: absolute; z-index: 3; top: 14px; left: 14px; }
.profile-photo .avatar-line { position: absolute; z-index: 3; bottom: 14px; right: 14px; }
.profile-caption { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.profile-caption div { display: flex; flex-direction: column; }
.profile-caption div:last-child { padding-left: 15px; border-left: 1px solid var(--line); }
.profile-caption strong { color: var(--navy); font-size: 1rem; }
.profile-caption span { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.barcode { width: 70px; height: 19px; margin: 14px 0 0 auto; background: repeating-linear-gradient(90deg, var(--navy) 0 2px, transparent 2px 4px, var(--navy) 4px 5px, transparent 5px 8px); }
.mini-note { position: absolute; z-index: 4; display: flex; flex-direction: column; border: 2px solid var(--navy); box-shadow: 7px 7px 0 var(--navy); }
.mini-note > span { font-size: .63rem; font-weight: 700; letter-spacing: .16em; }
.mini-note strong { color: var(--navy); font-family: "Space Grotesk", sans-serif; }
.note-top { top: 28px; left: 4px; padding: 12px 16px; background: var(--white); transform: rotate(-7deg); }
.note-top strong { display: flex; align-items: center; gap: 7px; font-size: .84rem; }
.note-top i { display: inline-block; width: 8px; height: 8px; background: #36a866; border-radius: 50%; box-shadow: 0 0 0 3px rgba(54,168,102,.18); }
.note-bottom { right: -5px; bottom: 28px; min-width: 190px; padding: 14px 17px; background: var(--white); border-top: 6px solid var(--yellow); transform: rotate(4deg); }
.note-bottom strong { margin: 5px 0 2px; font-size: 1.05rem; }
.note-bottom small { color: rgba(20,33,61,.75); font-size: .7rem; }
.scribble { position: absolute; left: 9px; bottom: 130px; z-index: 4; color: var(--blue); font-family: "Space Grotesk", sans-serif; font-size: 4.5rem; font-weight: 700; transform: rotate(-18deg); }

.section { padding-block: 110px; }
.section-heading { margin-bottom: 48px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.card { background: var(--white); border: 1px solid var(--line); }
.about-text { padding: 38px; font-size: 1.06rem; }
.about-text p + p { margin-top: 18px; }
.bio-card { padding: 18px 32px; }
.bio-card div { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.bio-card div:last-child { border: 0; }
.bio-card span { color: var(--muted); font-size: .9rem; }

.education-section { color: white; background: #101216; }
.education-section h2, .education-section h3 { color: white; }
.education-section .eyebrow { color: var(--yellow); }
.timeline { border-top: 1px solid rgba(255,255,255,.25); }
.timeline-item { display: grid; grid-template-columns: 250px 1fr; padding: 30px 0; border-bottom: 1px solid rgba(255,255,255,.25); }
.timeline-item .year { color: var(--yellow); font-weight: 700; }
.timeline-item p { margin-top: 6px; color: #aeb8ce; }

.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.skill-card { min-height: 230px; padding: 28px; transition: transform .2s; }
.skill-card:hover { transform: translateY(-7px); }
.skill-card > span { display: block; color: var(--blue); font-weight: 700; margin-bottom: 35px; }
.skill-card h3 { margin-bottom: 12px; }
.skill-card p { color: var(--muted); font-size: .94rem; }
.hobbies { margin-top: 65px; }
.hobbies h3 { margin-bottom: 20px; }
.hobby-list { display: flex; flex-wrap: wrap; gap: 12px; }
.hobby-list span { padding: 10px 17px; background: #eaf0ff; border: 1px solid #cdd9ff; border-radius: 30px; font-weight: 600; }

.projects-section { overflow: hidden; color: white; background: #101216; }
.projects-section .eyebrow { color: var(--yellow); }
.projects-section h2, .projects-section h3 { color: white; }
.projects-intro { display: grid; grid-template-columns: 1fr .8fr; gap: 70px; align-items: end; }
.projects-intro > p { max-width: 530px; margin-bottom: 48px; color: #aeb4c2; font-size: 1.05rem; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card { position: relative; padding: 14px 14px 26px; color: white; background: #191c23; border: 1px solid #333844; cursor: pointer; transition: transform .3s ease, border-color .3s ease; }
.project-card:hover, .project-card:focus-visible { transform: translateY(-9px); border-color: var(--yellow); outline: none; }
.project-card-featured { transform: translateY(24px); }
.project-card-featured:hover, .project-card-featured:focus-visible { transform: translateY(15px); }
.project-image { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: #252936; }
.project-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.9); transition: transform .45s ease, filter .45s ease; }
.project-card:hover .project-image img { transform: scale(1.04); filter: saturate(1); }
.project-meta { display: flex; justify-content: space-between; gap: 15px; margin: 18px 0 12px; color: var(--yellow); font-size: .63rem; font-weight: 700; letter-spacing: .14em; }
.project-card h3 { font-size: 1.5rem; }
.project-card p { min-height: 76px; margin: 12px 0 24px; color: #abb2c1; font-size: .94rem; }
.project-open { font-size: .72rem; font-weight: 700; letter-spacing: .1em; }

.project-dialog { width: min(1030px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow-y: auto; color: var(--text); background: var(--white); border: 0; box-shadow: 0 28px 90px rgba(0,0,0,.4); }
.project-dialog::backdrop { background: rgba(8, 10, 15, .82); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 13px; right: 16px; z-index: 4; width: 42px; height: 42px; color: white; background: var(--navy); border: 1px solid rgba(255,255,255,.4); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.dialog-layout { display: block; }
.dialog-visual { position: relative; aspect-ratio: 2 / 1; max-height: 390px; overflow: hidden; background: var(--navy); }
.dialog-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.dialog-content { position: relative; padding: 65px 55px 45px; }
.dialog-number { position: absolute; top: 22px; right: 68px; color: #e8ebf2; font-family: "Space Grotesk", sans-serif; font-size: 4.5rem; font-weight: 700; line-height: 1; }
.dialog-content h2 { position: relative; margin-bottom: 16px; font-size: clamp(2.2rem, 4vw, 3.5rem); }
.dialog-lead { position: relative; max-width: 560px; color: var(--muted); font-size: 1.05rem; }
.dialog-story { display: grid; gap: 0; margin: 34px 0; border-top: 1px solid var(--line); }
.dialog-story section { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dialog-story span { color: var(--blue); font-size: .7rem; font-weight: 700; letter-spacing: .14em; }
.dialog-story p { font-size: .94rem; }

.contact-section { position: relative; padding-block: 90px; background: var(--white); border-top: 8px solid var(--blue); }
.contact-section::before { content: ""; position: absolute; top: -8px; left: 0; width: 14%; height: 8px; background: var(--yellow); }
.contact-box { display: grid; grid-template-columns: .85fr 1.15fr; gap: 100px; align-items: start; }
.contact-section .eyebrow { color: var(--navy); }
.contact-section h2 { margin-bottom: 18px; }
.contact-links { border-top: 2px solid var(--navy); }
.contact-links a { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid rgba(20,33,61,.4); }
.contact-links a:hover strong { transform: translateX(4px); }
.contact-links strong { transition: transform .2s; }

footer { padding-block: 26px; color: white; background: #101216; font-size: .9rem; }
.footer-content { display: flex; justify-content: space-between; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 25px; padding-block: 75px; }
  .profile-wrap { min-height: 500px; }
  .about-grid, .contact-box { grid-template-columns: 1fr; gap: 30px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .contact-box { gap: 45px; }
  .projects-intro { grid-template-columns: 1fr; gap: 0; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-card-featured { transform: none; }
  .dialog-visual { min-height: 0; }
}

@media (min-width: 851px) {
  .hero-copy h1 { font-size: clamp(3.25rem, 5.3vw, 5.7rem); }
}

@media (max-width: 620px) {
  .container { width: min(100% - 28px, 1120px); }
  .menu-button { display: block; }
  .nav-links { position: absolute; top: 72px; left: 0; right: 0; display: none; flex-direction: column; gap: 0; background: var(--white); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 15px 22px; }
  h1 { font-size: 3.6rem; }
  .section { padding-block: 80px; }
  .skills-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; }
  .bio-card div { grid-template-columns: 1fr; gap: 4px; }
  .profile-wrap { min-height: 460px; }
  .profile-card { width: 82%; }
  .note-top { top: 8px; left: 0; }
  .note-bottom { right: 0; bottom: 12px; }
  .scribble { display: none; }
  .skill-card { min-height: auto; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card p { min-height: auto; }
  .dialog-content { padding: 54px 24px 30px; }
  .dialog-number { right: 22px; font-size: 3.4rem; }
  .dialog-story section { grid-template-columns: 1fr; gap: 7px; }
  .dialog-visual { min-height: 0; }
  .contact-links a { flex-direction: column; gap: 3px; }
  .footer-content { gap: 20px; }
}
