@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #14213a;
  --muted: #66738a;
  --primary: #3867f4;
  --primary-dark: #234bd0;
  --line: #e6ebf3;
  --soft: #edf2ff;
  --shadow: 0 18px 50px rgba(27, 47, 89, .09);
}
body.dark {
  --bg: #101827;
  --surface: #172337;
  --text: #f1f5ff;
  --muted: #a7b3c8;
  --primary: #7c9aff;
  --primary-dark: #6282ed;
  --line: #293850;
  --soft: #202f4a;
  --shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; transition: background .25s, color .25s; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.container { width: min(1120px, calc(100% - 44px)); margin: 0 auto; }
.section { padding: 105px 0; }
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.logo { font: 800 2rem 'Outfit', sans-serif; color: var(--text); letter-spacing: -3px; }
.logo span, h1 span, h2 span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link { color: var(--muted); font-size: .9rem; font-weight: 600; transition: color .2s; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.theme-toggle, .menu-toggle { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 50%; width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem; }
.menu-toggle { display: none; border-radius: 10px; padding: 9px; }
.menu-toggle span { display: block; height: 2px; background: var(--text); margin: 4px 0; }
.hero { min-height: 720px; padding-top: 150px; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 70px; }
.eyebrow { color: var(--primary); font-size: .72rem; font-weight: 700; letter-spacing: 2.4px; margin-bottom: 20px; }
.eyebrow-line { display: inline-block; width: 27px; height: 2px; background: var(--primary); vertical-align: middle; margin-right: 8px; }
.hello { color: var(--muted); font-size: 1.15rem; margin-bottom: 5px; }
h1, h2, h3 { font-family: 'Outfit', sans-serif; line-height: 1.12; }
h1 { font-size: clamp(3.3rem, 6.5vw, 5.8rem); letter-spacing: -3px; font-weight: 800; }
.hero-role { font-size: 1.15rem; font-weight: 600; margin-top: 22px; }
.role-dot { color: var(--primary); padding: 0 7px; }
.hero-description { color: var(--muted); max-width: 510px; margin-top: 18px; font-size: 1.02rem; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 18px; border-radius: 8px; padding: 13px 21px; font-weight: 700; font-size: .9rem; border: 1px solid transparent; cursor: pointer; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 9px 22px rgba(56, 103, 244, .22); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--line); color: var(--text); background: var(--surface); }
.social-links { display: flex; align-items: center; gap: 12px; margin-top: 37px; }
.social-links a { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.social-links a:hover { color: var(--primary); border-color: var(--primary); }
.social-note { font-size: .8rem; color: var(--muted); margin-left: 3px; }
.hero-visual { min-height: 430px; display: grid; place-items: center; position: relative; }
.portrait-frame { width: min(350px, 78%); aspect-ratio: .82; border-radius: 48% 48% 22px 22px; background: linear-gradient(145deg, #dce6ff, #a9c1ff); padding: 12px; transform: rotate(3deg); box-shadow: var(--shadow); position: relative; z-index: 1; }
.portrait-placeholder { width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(145deg, #eaf0ff, #c6d5ff); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #3158bd; }
.portrait-initials { font: 800 5rem 'Outfit'; letter-spacing: -5px; }
.portrait-caption { font-size: .65rem; font-weight: 700; letter-spacing: 2px; }
.floating-card { position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 13px 17px; border-radius: 12px; }
.floating-card strong, .floating-card small { display: block; }
.floating-card strong { font-size: .85rem; }
.floating-card small { color: var(--muted); font-size: .72rem; }
.card-top { top: 65px; right: -5px; }
.card-bottom { bottom: 48px; left: -12px; }
.spark, .code-icon { color: var(--primary); font-size: 1.6rem; font-weight: 800; }
.circle-decoration { position: absolute; width: 420px; height: 420px; border: 1px solid #cbd8ff; border-radius: 50%; }
.scroll-cue { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: .63rem; letter-spacing: 2px; display: flex; align-items: center; gap: 10px; }
.scroll-cue span { width: 1px; height: 28px; background: var(--primary); }
.about-section { background: var(--surface); }
.two-column { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; }
.section-heading h2, .center-heading h2, .contact-copy h2 { font-size: clamp(2.5rem, 4.4vw, 3.8rem); letter-spacing: -1.8px; }
.heading-line { width: 55px; height: 4px; border-radius: 5px; background: var(--primary); margin-top: 28px; }
.about-content p { color: var(--muted); margin-bottom: 15px; }
.about-content .lead { font-size: 1.3rem; color: var(--text); font-weight: 600; line-height: 1.5; }
.edit-note { background: var(--soft); color: var(--muted); border-left: 3px solid var(--primary); padding: 11px 14px; font-size: .82rem; border-radius: 0 7px 7px 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 28px; }
.info-grid div { display: flex; flex-direction: column; gap: 4px; }
.info-label { color: var(--primary); font-size: .65rem; font-weight: 700; letter-spacing: 1.5px; }
.info-grid strong, .info-grid a { font-size: .9rem; }
.info-grid a { color: var(--primary); font-weight: 600; }
.center-heading { text-align: center; max-width: 650px; margin: 0 auto 48px; }
.center-heading > p:last-child { color: var(--muted); margin-top: 15px; }
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.skill-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 27px 22px; transition: transform .25s, box-shadow .25s; }
.skill-card:hover, .project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.skill-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; font: 800 1.15rem 'Outfit'; margin-bottom: 20px; }
.orange { background: #fff0e7; color: #e86b2d; }.blue { background: #eaf0ff; color: #3867f4; }.yellow { background: #fff7dc; color: #c18b00; }.green { background: #e4f8ee; color: #218c57; }
.skill-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.skill-card p { color: var(--muted); font-size: .85rem; }
.education-section { background: var(--surface); }
.timeline { max-width: 760px; margin: 55px auto 0; border-left: 2px solid var(--line); padding-left: 34px; }
.timeline-item { position: relative; padding-bottom: 35px; }
.timeline-dot { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--primary); left: -42px; top: 5px; box-shadow: 0 0 0 5px var(--soft); }
.timeline-date, .project-type { color: var(--primary); font-size: .68rem; font-weight: 700; letter-spacing: 1.5px; }
.timeline-item h3 { font-size: 1.3rem; margin: 7px 0; }
.timeline-place { color: var(--text) !important; font-weight: 600; }
.timeline-item p:last-child { color: var(--muted); margin-top: 8px; }
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 45px; }
.project-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.project-art { height: 230px; display: grid; place-items: center; position: relative; overflow: hidden; }
.project-art-one { background: linear-gradient(135deg, #dce6ff, #a7bcff); }
.project-art-two { background: linear-gradient(135deg, #d8f3ed, #a1d8cb); }
.project-art > span { position: absolute; top: 18px; left: 20px; color: rgba(28, 55, 116, .55); font: 700 1.2rem 'Outfit'; }
.browser-window { width: 65%; min-height: 130px; background: white; border-radius: 9px; padding: 24px; box-shadow: 0 14px 35px rgba(32, 57, 112, .16); color: #17294e; display: flex; flex-direction: column; justify-content: center; }
.browser-window i { width: 6px; height: 6px; background: #9eb4ed; border-radius: 50%; position: absolute; top: 66px; margin-left: calc(var(--i, 0) * 12px); }
.browser-window b { font: 700 1.25rem 'Outfit'; margin-top: 10px; }
.browser-window small { color: #7382a1; margin-top: 6px; }
.mini-dashboard { width: 65%; height: 140px; background: white; border-radius: 10px; box-shadow: 0 14px 35px rgba(32, 87, 75, .15); padding: 20px; display: flex; gap: 10px; align-items: center; color: #245d52; }
.mini-dashboard div { width: 25%; height: 48px; border-radius: 6px; background: #d9f2e9; }
.mini-dashboard strong { position: absolute; margin-top: 90px; font: 700 1rem 'Outfit'; }
.project-info { padding: 25px; }
.project-info h3 { font-size: 1.45rem; margin: 7px 0; }
.project-info > p:not(.project-type) { color: var(--muted); font-size: .9rem; }
.text-link { display: inline-block; color: var(--primary); font-size: .84rem; font-weight: 700; margin-top: 17px; }
.project-note { margin-top: 24px; }
.contact-section { background: #101d37; color: white; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.contact-copy h2 { font-size: clamp(2.8rem, 5vw, 4.2rem); }
.contact-copy > p:not(.eyebrow) { color: #aab7d0; max-width: 400px; margin: 22px 0; }
.contact-email, .linkedin-contact { display: block; color: #a9bcff; font-weight: 600; margin-top: 13px; }
.contact-form { background: #192947; border: 1px solid #2a3c5e; border-radius: 15px; padding: 30px; display: flex; flex-direction: column; }
.contact-form label { font-size: .8rem; font-weight: 600; margin: 12px 0 7px; }
.contact-form input, .contact-form textarea { border: 1px solid #344766; background: #13223d; border-radius: 7px; padding: 12px 13px; color: white; outline: none; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #89a4ff; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #8796b1; }
.submit-btn { margin-top: 20px; }
.form-hint { color: #aab7d0; font-size: .72rem; margin-top: 12px; }
.footer { background: #0b1529; color: #aab7d0; padding: 22px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .8rem; }
.footer .logo { color: white; font-size: 1.7rem; }
.footer-inner > a:last-child { color: #a9bcff; }
.back-to-top { position: fixed; right: 22px; bottom: 22px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--primary); color: white; font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; z-index: 50; }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 850px) {
  .nav-links { gap: 17px; }
  .hero-grid { gap: 25px; }
  .two-column, .contact-grid { gap: 45px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .container { width: min(100% - 34px, 520px); }
  .section { padding: 76px 0; }
  .nav { height: 68px; }
  .menu-toggle { display: block; margin-left: auto; margin-right: 10px; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 18px 25px 23px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 17px; }
  .nav-links.open { display: flex; }
  .hero { min-height: auto; padding: 120px 0 75px; }
  .hero-grid, .two-column, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 30px; }
  h1 { font-size: clamp(3.1rem, 15vw, 4.5rem); }
  .hero-visual { min-height: 360px; }
  .portrait-frame { width: 260px; }
  .circle-decoration { width: 310px; height: 310px; }
  .card-top { right: 0; top: 40px; }
  .card-bottom { left: 0; bottom: 30px; }
  .scroll-cue { display: none; }
  .two-column { gap: 35px; }
  .skills-grid { gap: 12px; }
  .skill-card { padding: 20px 16px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { gap: 35px; }
  .contact-form { padding: 22px; }
  .footer-inner { flex-wrap: wrap; }
  .footer-inner p { order: 3; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


.portrait-placeholder img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 25%;
  border-radius: inherit;
}
