:root {
  --bg: #0b0f19;
  --surface: #141b2d;
  --surface-alt: #101625;
  --surface-hover: #19233a;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --text: #ffffff;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --header-height: 76px;
  --cta: #3b82f6;
}

[data-theme="light"] {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-alt: #eef3fa;
  --surface-hover: #f4f8ff;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --text: #182230;
  --muted: #667085;
  --border: #dfe6ef;
  --shadow: 0 18px 45px rgba(13, 42, 74, 0.09);
  --cta: #2563eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 8%, rgba(59, 130, 246, 0.07), transparent 22rem),
    var(--bg);
  line-height: 1.7;
  transition: background .35s, color .35s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.section { position: relative; padding: 96px 0; }
.section-muted { background: var(--surface-alt); }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 9999; padding: 10px 16px; background: var(--accent); color: #fff; border-radius: 6px; }
.skip-link:focus { top: 16px; }

.header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: .3s;
}
[data-theme="light"] .header { background: rgba(247, 249, 252, 0.88); }
.header.scrolled { border-color: var(--border); box-shadow: 0 12px 35px rgba(0, 0, 0, .18); }
.navbar { height: 100%; display: flex; align-items: center; justify-content: space-between; position: relative; }
.logo, .footer-logo { font-family: "Poppins", sans-serif; font-size: 22px; font-weight: 700; letter-spacing: 1px; color: var(--text); }
.logo span, .footer-logo span { color: var(--accent); text-shadow: 0 0 20px rgba(59, 130, 246, .55); }
.nav-menu { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-link { position: relative; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s; }
.nav-link::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -10px; height: 2px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 12px var(--accent); transition: left .25s, right .25s; }
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link.active::after { left: 0; right: 0; }
.nav-actions { display: flex; align-items: center; gap: 8px; order: 3; }
.theme-toggle, .menu-toggle {
  width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text); display: grid; place-items: center; transition: .25s;
}
.theme-toggle:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 0 18px var(--accent-soft); }
.theme-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon { display: none; }.sun-icon { display: block; }
[data-theme="light"] .sun-icon { display: block; }[data-theme="light"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }[data-theme="dark"] .moon-icon { display: block; }
.menu-toggle { display: none; border-radius: 8px; }
.menu-toggle span { width: 20px; height: 2px; background: var(--text); transition: .25s; }

.hero {
  min-height: 720px; display: flex; align-items: center;
  padding-top: calc(var(--header-height) + 58px); overflow: hidden;
  background:
    linear-gradient(90deg, rgba(59,130,246,.04) 1px, transparent 1px),
    linear-gradient(rgba(59,130,246,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}
.hero::before {
  content: ""; position: absolute; width: 430px; height: 430px; right: 5%;
  border-radius: 50%; background: rgba(59,130,246,.08);
  filter: blur(80px); pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 72px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; margin-bottom: 16px; }
.eyebrow span { width: 34px; height: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero h1 { font-family: "Poppins", sans-serif; font-size: clamp(48px, 5.8vw, 76px); line-height: 1.04; letter-spacing: -3px; color: var(--text); margin-bottom: 16px; }
.hero h1 strong { color: var(--accent); text-shadow: 0 0 36px rgba(59,130,246,.18); }
.hero-role { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.hero-description { max-width: 590px; color: var(--muted); font-size: 16px; }
.hero-buttons { display: flex; gap: 12px; margin-top: 30px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 9px; padding: 12px 22px; font-size: 14px; font-weight: 700; transition: transform .25s, box-shadow .25s, background .25s, border-color .25s; }
.button-primary { background: var(--cta); color: #fff; box-shadow: 0 14px 32px rgba(59,130,246,.22); }
.button-primary:hover { transform: translateY(-3px); background: #4d8ff5; box-shadow: 0 18px 38px rgba(59,130,246,.32); }
.button-secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.button-secondary:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); box-shadow: 0 14px 30px var(--accent-soft); }
.hero-visual { position: relative; min-height: 510px; display: grid; place-items: center; }
.portrait-frame {
  position: relative; width: 380px; height: 470px; border-radius: 190px 190px 28px 28px;
  overflow: hidden; background: linear-gradient(145deg, #192640, #101625);
  border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0,0,0,.38), 0 0 60px rgba(59,130,246,.09);
}
.portrait-frame::after { content: ""; position: absolute; inset: 0; z-index: 3; box-shadow: inset 0 -100px 70px rgba(11,15,25,.32); pointer-events: none; }
.portrait-frame img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; filter: saturate(.75); }
.portrait-accent { position: absolute; width: 250px; height: 250px; border: 1px solid rgba(59,130,246,.22); border-radius: 50%; right: -80px; top: -60px; box-shadow: 0 0 40px rgba(59,130,246,.08); }
.floating-badge {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; min-width: 145px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(20,27,45,.94); backdrop-filter: blur(12px); box-shadow: var(--shadow);
}
[data-theme="light"] .floating-badge { background: rgba(255,255,255,.94); }
.floating-badge span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 0 18px rgba(59,130,246,.3); }
.floating-badge p { font-size: 11px; font-weight: 700; color: var(--text); }
.badge-top { top: 105px; right: -18px; }.badge-bottom { bottom: 55px; left: -22px; }

.section-heading { margin-bottom: 44px; }.section-heading h2 { font-family: "Poppins", sans-serif; font-size: clamp(32px, 4vw, 44px); line-height: 1.2; color: var(--text); }
.about-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: 58px; align-items: center; }
.about-photo { position: relative; height: 440px; border-radius: 16px; overflow: hidden; background: var(--surface-alt); border: 1px solid var(--border); box-shadow: var(--shadow); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7); }
.photo-label { position: absolute; left: 16px; bottom: 16px; padding: 7px 10px; border-radius: 6px; background: rgba(11,15,25,.88); color: #fff; font-size: 11px; }
.portrait-frame img, .about-photo img { object-fit: cover; }
.about-content h3 { font-family: "Poppins", sans-serif; font-size: 28px; color: var(--text); margin-bottom: 22px; }
.identity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 22px; }
.identity-grid div { min-height: 68px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.identity-grid span { display: block; color: var(--muted); font-size: 11px; }.identity-grid strong { display: block; color: var(--text); font-size: 13px; margin-top: 3px; }
.about-content > p { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.motivation { display: flex; gap: 12px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.motivation-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 0 22px rgba(59,130,246,.25); }
.motivation small { display: block; color: var(--accent); font-size: 11px; font-weight: 700; }.motivation strong { color: var(--text); font-size: 13px; }

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skill-card { padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: transform .25s, box-shadow .25s, border-color .25s; }
.skill-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(0,0,0,.22), 0 0 24px var(--accent-soft); border-color: rgba(59,130,246,.24); }
.skill-card-wide { grid-column: 1 / -1; }.skill-head { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; }
.skill-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; font-weight: 800; color: #fff; }
.html-icon { background: #e76832; }.css-icon { background: #2879c9; }.js-icon { background: #e5bb2e; color: #322b05; }.ui-icon { background: #8a4fc5; }.figma-icon { background: #ee6c5b; }.web-icon { background: #397ec8; }.test-icon { background: #2c9873; }
.skill-head h3 { font-size: 15px; color: var(--text); }.skill-head p { color: var(--muted); font-size: 11px; }.skill-head strong { font-size: 13px; color: var(--accent); }
.progress { height: 6px; margin-top: 14px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.07); }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #77aafa); box-shadow: 0 0 12px rgba(59,130,246,.45); transition: width 1s ease; }
.skill-card.visible .progress span { width: var(--progress); }.skill-note { margin-top: 16px; color: var(--muted); font-size: 12px; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: transform .35s, box-shadow .35s, border-color .35s; }
.project-card:hover { transform: translateY(-9px); box-shadow: 0 24px 55px rgba(0,0,0,.32), 0 0 30px var(--accent-soft); border-color: rgba(59,130,246,.38); }
.project-image { position: relative; height: 220px; overflow: hidden; background: var(--surface-alt); }
.project-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.82); transition: transform .45s, filter .45s; }
.project-card:hover .project-image img { transform: scale(1.045); filter: saturate(1) brightness(.92); }
.project-badge { position: absolute; left: 12px; top: 12px; padding: 6px 9px; border-radius: 5px; background: rgba(11,15,25,.88); color: #fff; font-size: 10px; font-weight: 700; border: 1px solid rgba(255,255,255,.08); }
.project-content { position: relative; padding: 22px; }.project-number { position: absolute; right: 18px; top: 18px; color: rgba(156,163,175,.22); font-family: "Poppins", sans-serif; font-size: 24px; font-weight: 700; }
.project-content h3 { color: var(--text); font-size: 18px; margin-bottom: 8px; }.project-content > p:not(.project-number) { min-height: 66px; color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; list-style: none; }.tags li { padding: 5px 8px; border-radius: 5px; background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border); font-size: 10px; font-weight: 700; }
.project-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px; font-weight: 700; }.project-link span { transition: transform .2s; }.project-link:hover span { transform: translate(3px,-3px); }

.education-card { min-height: 180px; display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 28px; padding: 28px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.education-logo { width: 100px; height: 100px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--accent), #1d4ed8); color: #fff; font-family: "Poppins", sans-serif; font-weight: 700; box-shadow: 0 0 35px rgba(59,130,246,.2); }
.education-info span { color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; }.education-info h3 { color: var(--text); font-size: 22px; margin: 3px 0 6px; }.education-info p { color: var(--muted); font-size: 13px; }
.education-status { align-self: start; margin-top: 8px; padding: 8px 12px; border-radius: 99px; background: rgba(44,152,115,.12); color: #67d7aa; border: 1px solid rgba(44,152,115,.18); font-size: 12px; font-weight: 700; }
.education-status span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #67d7aa; margin-right: 5px; box-shadow: 0 0 10px rgba(103,215,170,.6); }

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; }.contact-info h3 { font-family: "Poppins", sans-serif; color: var(--text); font-size: 24px; margin-bottom: 8px; }.contact-info > p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.contact-list { display: grid; gap: 10px; }.contact-list .placeholder-link { min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.contact-list .placeholder-link > span { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.contact-list small, .contact-list strong { display: block; }.contact-list small { color: var(--muted); font-size: 10px; }.contact-list strong { color: var(--text); font-size: 12px; }.contact-list em { float: right; margin-top: -25px; color: #d49a63; font-size: 9px; font-style: normal; }
.contact-form { padding: 28px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text); font-size: 12px; font-weight: 700; }.form-group input, .form-group textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; outline: none; padding: 11px 12px; background: var(--surface-alt); color: var(--text); font-size: 13px; transition: border .2s, box-shadow .2s; }
.form-group textarea { resize: vertical; }.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }.form-group.invalid input, .form-group.invalid textarea { border-color: #ef6b6b; }.error-message { min-height: 18px; display: block; color: #f87171; font-size: 10px; }.form-status { margin-top: 10px; color: var(--accent); font-size: 12px; }

.footer { padding: 30px 0; border-top: 1px solid var(--border); background: var(--bg); }.footer-content { display: grid; grid-template-columns: 1fr 1.2fr 1fr 1fr; align-items: center; gap: 20px; }.footer-content strong { color: var(--text); font-size: 12px; }.footer-content p { color: var(--muted); font-size: 11px; }
.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 44px; height: 44px; border: 1px solid rgba(59,130,246,.25); border-radius: 50%; background: var(--surface); color: var(--accent); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }.back-to-top:hover { background: var(--accent); color: #fff; transform: translateY(-3px); box-shadow: 0 14px 30px rgba(59,130,246,.3); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .hero-grid { gap: 30px; }.hero-visual { min-height: 470px; }.portrait-frame { width: 330px; height: 420px; }.badge-top { right: -5px; }.badge-bottom { left: -5px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }.project-card:last-child { grid-column: 1 / -1; max-width: calc(50% - 11px); }.about-grid { gap: 32px; }.contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header-height: 68px; }.container { width: min(100% - 32px, 1120px); }.section { padding: 72px 0; }
  .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }.menu-toggle.active span:nth-child(2) { opacity: 0; }.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-menu { position: absolute; left: 0; right: 0; top: calc(100% + 8px); flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .25s; }.nav-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }.nav-link { display: block; padding: 12px 14px; }.nav-link::after { display: none; }
  .hero { min-height: auto; padding-top: calc(var(--header-height) + 48px); background-size: 48px 48px; }.hero-grid { grid-template-columns: 1fr; }.hero-content { text-align: center; }.eyebrow { justify-content: center; }.hero-description { margin-inline: auto; }.hero-buttons { justify-content: center; }.hero-visual { min-height: 430px; }
  .about-grid { grid-template-columns: 1fr; }.about-photo { max-width: 420px; width: 100%; margin-inline: auto; }.projects-grid { grid-template-columns: 1fr; }.project-card:last-child { grid-column: auto; max-width: none; }.project-content > p:not(.project-number) { min-height: auto; }
  .education-card { grid-template-columns: 78px 1fr; }.education-logo { width: 78px; height: 78px; }.education-status { grid-column: 2; justify-self: start; }.contact-grid { grid-template-columns: 1fr; }.footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 24px, 1120px); }.section { padding: 62px 0; }.logo { font-size: 18px; }.theme-toggle, .menu-toggle { width: 38px; height: 38px; }
  .hero { padding-top: calc(var(--header-height) + 38px); }.hero h1 { font-size: 39px; letter-spacing: -1.7px; }.hero-role { font-size: 16px; }.hero-description { font-size: 14px; }.hero-buttons { flex-direction: column; }.button { width: 100%; }
  .hero-visual { min-height: 390px; }.portrait-frame { width: 270px; height: 350px; }.badge-top { top: 55px; right: 0; }.badge-bottom { bottom: 25px; left: 0; }.floating-badge { min-width: 125px; }
  .section-heading { margin-bottom: 32px; }.identity-grid { grid-template-columns: 1fr; }.about-photo { height: 350px; }.skills-grid { grid-template-columns: 1fr; }.skill-card-wide { grid-column: auto; }.skill-head { grid-template-columns: 44px 1fr auto; }.skill-icon { width: 44px; height: 44px; }
  .project-image { height: 200px; }.education-card { grid-template-columns: 64px 1fr; gap: 16px; padding: 20px 16px; }.education-logo { width: 64px; height: 64px; }.education-info h3 { font-size: 18px; }.form-row { grid-template-columns: 1fr; }.contact-form { padding: 20px 16px; }.contact-list em { display: none; }.footer-content { grid-template-columns: 1fr; text-align: center; }.footer-logo { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
