 :root {
  --bg: #101828; --bg-soft: #162235; --panel: #1b2a3e; --light: #f4f6f3;
  --ink: #152238; --muted: #8e9aab; --muted-dark: #687587; --white: #f7fafc;
  --green: #38d6a0; --green-dark: #1ca77a; --line: rgba(255,255,255,.11);
  --font: "DM Sans", sans-serif; --display: "Space Grotesk", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--font); background: var(--bg); color: var(--white); line-height: 1.65; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.container { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.section { padding: 112px 0; }
.scroll-progress { position: fixed; z-index: 1000; inset: 0 auto auto 0; height: 3px; width: 0; background: var(--green); }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(16,24,40,.88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.nav { height: 78px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 21px var(--display); letter-spacing: -.8px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--bg); background: var(--green); font: 700 18px var(--display); }
.brand-dot, .accent { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 30px; color: #b5bfcc; font-size: 13px; font-weight: 600; }
.nav-links a { transition: color .2s; }
.nav-links a:hover, .hero-socials a:hover, .contact-links a:hover { color: var(--green); }
.nav-links .nav-cta { color: var(--bg); background: var(--green); border-radius: 7px; padding: 10px 16px; }
.nav-cta span { margin-left: 8px; }
.menu-toggle { display: none; background: none; border: 0; width: 38px; height: 38px; cursor: pointer; }
.menu-toggle span { display: block; width: 23px; height: 2px; background: white; margin: 6px auto; }
.hero { min-height: 690px; padding: 105px 0 28px; position: relative; overflow: hidden; background: radial-gradient(ellipse at 75% 38%, rgba(56,214,160,.10), transparent 35%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 50px; }
.availability { display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(56,214,160,.3); color: #a7e9d1; background: rgba(56,214,160,.07); border-radius: 99px; padding: 7px 13px; font-size: 11px; font-weight: 700; letter-spacing: .3px; margin-bottom: 31px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(56,214,160,.12); }
.eyebrow { color: var(--green-dark); font-size: 11px; letter-spacing: 2.2px; font-weight: 700; margin-bottom: 17px; }
.hero .eyebrow { color: #91a0b2; }
.hero h1 { font: 700 clamp(54px, 7vw, 84px)/1.05 var(--display); letter-spacing: -5px; margin-bottom: 17px; }
.hero h2 { font: 600 clamp(27px, 3.2vw, 39px)/1.22 var(--display); letter-spacing: -1.6px; }
.muted { color: #8f9bad; }
.gradient-text { background: linear-gradient(100deg, #e6fff5 5%, var(--green) 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-description { max-width: 520px; color: #a6b1c0; font-size: 15px; margin: 24px 0 29px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-height: 48px; display: inline-flex; align-items: center; gap: 20px; padding: 0 19px; border-radius: 7px; font-size: 13px; font-weight: 700; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--green); color: #102438; }
.button-primary:hover { background: #64e6b8; }
.button-ghost { border: 1px solid rgba(255,255,255,.2); color: #e7edf3; }
.button-ghost:hover { background: rgba(255,255,255,.06); }
.hero-socials { display: flex; gap: 24px; margin-top: 34px; }
.hero-socials a, .contact-links a { color: #9eabba; font-size: 12px; font-weight: 700; transition: color .2s; }
.hero-socials a span, .contact-links a span { color: var(--green); margin-left: 5px; }
.hero-art { min-height: 420px; display: grid; place-items: center; position: relative; }
.art-orbit { position: absolute; border: 1px solid rgba(56,214,160,.12); border-radius: 50%; transform: rotate(-25deg); }
.orbit-one { width: 440px; height: 310px; }
.orbit-two { width: 520px; height: 370px; transform: rotate(30deg); border-color: rgba(255,255,255,.07); }
.code-window { z-index: 2; width: min(100%, 440px); border-radius: 13px; background: #17263a; border: 1px solid rgba(255,255,255,.13); box-shadow: 0 28px 90px rgba(0,0,0,.32); overflow: hidden; transform: rotate(-3deg); }
.window-top { height: 43px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); color: #7f8da0; font: 11px var(--display); }
.window-dots { display: flex; gap: 5px; margin-right: 15px; }
.window-dots i, .graphic-bar i { width: 7px; height: 7px; border-radius: 50%; background: #ff6e67; }
.window-dots i:nth-child(2), .graphic-bar i:nth-child(2) { background: #f5c15b; }
.window-dots i:nth-child(3), .graphic-bar i:nth-child(3) { background: var(--green); }
.window-status { margin-left: auto; color: var(--green); }
.code-content { padding: 25px 21px 27px; font: 12px/2.2 ui-monospace, SFMono-Regular, Consolas, monospace; color: #d5deeb; white-space: nowrap; }
.code-line { display: inline-block; width: 28px; color: #53647a; user-select: none; }
.indent { padding-left: 24px; }
.code-purple { color: #c5a5ff; }.code-green { color: #78e4b9; }.code-yellow { color: #f4d58d; }.code-blue { color: #7cc8ff; }
.code-cursor { display: inline-block; height: 13px; width: 2px; background: var(--green); animation: blink 1s step-end infinite; margin-left: 4px; vertical-align: middle; }
@keyframes blink { 50% { opacity: 0; } }
.floating-card { z-index: 3; position: absolute; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(27,42,62,.94); box-shadow: 0 12px 35px rgba(0,0,0,.2); }
.floating-card b, .floating-card small { display: block; }.floating-card b { font: 600 12px var(--display); }.floating-card small { color: #8c9bad; font-size: 9px; }
.float-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--green); background: rgba(56,214,160,.1); font-weight: 700; }
.card-java { top: 45px; right: -3px; }.card-web { bottom: 45px; left: -7px; }
.hero-stamp { position: absolute; right: 13px; bottom: 10px; width: 82px; height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(56,214,160,.35); border-radius: 50%; color: var(--green); font: 700 8px var(--display); letter-spacing: 1.6px; transform: rotate(12deg); }
.hero-stamp b { font-size: 24px; line-height: 1.1; }
.hero-bottom { display: flex; align-items: center; gap: 15px; margin-top: 85px; color: #77869a; font-size: 9px; letter-spacing: 1.6px; font-weight: 700; }
.scroll-line { width: 55px; height: 1px; background: #536176; }.hero-location { margin-left: auto; letter-spacing: .3px; font-weight: 500; }
.section-light { background: var(--light); color: var(--ink); }
.section-heading { margin-bottom: 55px; }
.section-heading h2, .contact-wrap h2 { font: 700 clamp(38px, 5vw, 58px)/1.08 var(--display); letter-spacing: -2.8px; }
.heading-muted { color: #8994a2; }.heading-muted-dark { color: #8b97a2; }
.section-subtitle { color: var(--muted); max-width: 430px; font-size: 14px; margin-top: 17px; }
.section-light .section-subtitle { color: #748092; }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 100px; align-items: start; }
.about-lead > p { color: #59677a; font-size: 18px; line-height: 1.85; max-width: 620px; }
.text-link { display: inline-flex; gap: 22px; align-items: center; margin-top: 28px; color: #1c8769; font-size: 13px; font-weight: 700; border-bottom: 1px solid #a9d8c8; padding-bottom: 7px; }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 25px 18px; }
.fact { border-top: 1px solid #d8dedb; padding-top: 15px; }.fact strong { display: block; color: #15263a; font: 700 35px var(--display); letter-spacing: -1px; }.fact span { display: block; color: #718092; font-size: 11px; margin-top: 3px; }
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.skill-card { min-height: 245px; padding: 24px 21px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.012)); transition: transform .25s, border-color .25s; }
.skill-card:hover { transform: translateY(-6px); border-color: rgba(56,214,160,.4); }
.skill-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; }.skill-icon { color: var(--green); font: 700 23px var(--display); }.skill-index { color: #5e6d81; font: 11px var(--display); }
.skill-card h3 { font: 600 17px var(--display); margin-bottom: 16px; }.skill-tags, .project-stack { display: flex; flex-wrap: wrap; gap: 7px; }.skill-tags span, .project-stack span { color: #aab7c6; border: 1px solid rgba(255,255,255,.1); border-radius: 5px; padding: 5px 8px; font-size: 10px; }
.timeline { max-width: 850px; margin-left: 8px; }.timeline-item { display: grid; grid-template-columns: 28px 1fr; gap: 25px; padding-bottom: 40px; }.timeline-marker { position: relative; display: flex; justify-content: center; }.timeline-marker:after { content: ""; position: absolute; top: 14px; bottom: -5px; width: 1px; background: #d6dfda; }.timeline-item:last-child .timeline-marker:after { display: none; }.timeline-marker span { z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: var(--green-dark); box-shadow: 0 0 0 5px #dff5ec; margin-top: 7px; }
.timeline-content { padding-bottom: 27px; border-bottom: 1px solid #dce2de; }.timeline-item:last-child .timeline-content { border: 0; }.timeline-meta { display: flex; gap: 13px; align-items: center; color: #1c9873; font-size: 11px; font-weight: 700; margin-bottom: 9px; }.work-type { color: #7e8996; font-weight: 500; }.timeline-content h3 { font: 600 22px var(--display); color: #17263a; }.timeline-content h4 { color: #4d5c6e; font-size: 14px; margin-top: 3px; }.timeline-content p { color: #6c7988; font-size: 13px; margin: 12px 0 9px; }.timeline-content ul { padding-left: 18px; color: #667486; font-size: 12px; }.timeline-content li { margin: 5px 0; padding-left: 3px; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 40px; }.section-heading-row .section-subtitle { margin: 0 0 5px; max-width: 330px; }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #17263a; }.project-visual { height: 215px; padding: 17px 20px; position: relative; overflow: hidden; background: radial-gradient(circle at 78% 60%, rgba(56,214,160,.22), transparent 35%), #1c3045; }.project-purple .project-visual { background: radial-gradient(circle at 78% 60%, rgba(180,139,255,.22), transparent 35%), #242b45; }.project-orange .project-visual { background: radial-gradient(circle at 78% 60%, rgba(255,174,105,.2), transparent 35%), #342c35; }.project-visual-top { position: relative; z-index: 2; display: flex; justify-content: space-between; color: #9aaabc; font: 10px var(--display); letter-spacing: 1.4px; }.project-arrow { font-size: 18px; color: var(--green); }.project-graphic { position: absolute; inset: 50px 0 0; display: grid; place-items: center; }.graphic-window { position: relative; z-index: 2; width: 55%; height: 125px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: rgba(13,25,41,.82); transform: perspective(500px) rotateY(-13deg) rotateX(4deg); box-shadow: 0 15px 35px rgba(0,0,0,.22); padding: 11px; }.graphic-bar { display: flex; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 7px; }.graphic-bar i { width: 5px; height: 5px; }.graphic-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; }.graphic-lines b { height: 4px; width: 65%; border-radius: 4px; background: rgba(125,164,180,.4); }.graphic-lines b:nth-child(2) { width: 85%; }.graphic-lines b:nth-child(3) { width: 45%; }.graphic-lines b:nth-child(4) { width: 72%; }.graphic-blocks { display: flex; gap: 7px; margin-top: 11px; }.graphic-blocks i { width: 22%; height: 18px; border-radius: 3px; background: rgba(56,214,160,.28); }.graphic-blocks i:nth-child(2) { background: rgba(255,255,255,.12); }.graphic-orb { position: absolute; width: 145px; height: 145px; border-radius: 50%; border: 1px solid rgba(56,214,160,.3); right: 17%; top: -12px; }.project-purple .graphic-orb { border-color: rgba(180,139,255,.4); }.project-orange .graphic-orb { border-color: rgba(255,174,105,.4); }
.project-info { padding: 24px; }.project-category { color: var(--green); text-transform: uppercase; letter-spacing: 1.3px; font-size: 9px; font-weight: 700; }.project-info h3 { font: 600 23px var(--display); margin: 7px 0 9px; }.project-description { color: #a3afbe; font-size: 12px; min-height: 58px; }.project-details { color: #8797aa; font-size: 11px; padding-left: 16px; margin: 12px 0 16px; }.project-details li { margin: 4px 0; }.project-stack span { font-size: 9px; padding: 4px 7px; }.project-link { display: inline-flex; margin-top: 18px; color: var(--green); font-size: 12px; font-weight: 700; }.project-note { display: inline-block; margin-top: 18px; color: #687b90; font-size: 10px; font-style: italic; }
.education-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; }.education-layout .section-heading { margin-bottom: 0; }.education-list { border-top: 1px solid #d9dfdc; }.education-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 15px; align-items: start; padding: 23px 0; border-bottom: 1px solid #d9dfdc; }.education-number { color: #1c9873; font: 12px var(--display); padding-top: 3px; }.education-item h3 { font: 600 16px var(--display); }.education-item p { color: #718092; font-size: 12px; margin-top: 5px; }.education-period { color: #6d7a88; font-size: 11px; white-space: nowrap; padding-top: 3px; }
.achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }.achievement-card { min-height: 125px; padding: 19px; border: 1px solid var(--line); border-radius: 9px; display: flex; gap: 13px; align-items: flex-start; position: relative; background: rgba(255,255,255,.025); }.achievement-icon { font-size: 20px; }.achievement-card h3 { font: 600 14px var(--display); padding-right: 12px; }.achievement-card p { color: #8f9daf; font-size: 11px; margin-top: 5px; }.achievement-number { position: absolute; right: 13px; bottom: 9px; color: #536176; font: 10px var(--display); }
.contact-section { background: radial-gradient(ellipse at 85% 45%, rgba(56,214,160,.1), transparent 36%), #142238; }.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }.contact-wrap h2 { font-size: clamp(43px, 5vw, 62px); }.contact-copy { max-width: 430px; color: #9eacbd; font-size: 14px; margin-top: 23px; }.contact-panel { padding: 30px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.035); }.contact-label { color: #92a1b3; font-size: 10px; letter-spacing: 1.6px; font-weight: 700; margin-bottom: 12px; }.contact-email { display: flex; justify-content: space-between; align-items: center; font: 600 clamp(16px, 2vw, 22px) var(--display); word-break: break-word; }.contact-email span { color: var(--green); }.contact-divider { height: 1px; background: rgba(255,255,255,.12); margin: 25px 0 18px; }.contact-links { display: flex; flex-wrap: wrap; gap: 18px 25px; }
.footer { padding: 25px 0; background: #0c1421; border-top: 1px solid var(--line); }.footer-inner { display: flex; align-items: center; gap: 25px; }.footer .brand { font-size: 17px; }.footer .brand-mark { width: 29px; height: 29px; font-size: 15px; }.footer p, .copyright { color: #77869a; font-size: 10px; }.back-top { color: #a8b5c4; font-size: 11px; margin-left: auto; }.copyright { margin-left: 15px; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; transition-delay: var(--delay, 0ms); }.reveal.visible { opacity: 1; transform: translateY(0); }
@media (max-width: 950px) {
  .nav-links { gap: 17px; }.nav-links a { font-size: 11px; }
  .hero-grid { gap: 25px; }.hero-art { transform: scale(.9); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { gap: 50px; }.contact-wrap { gap: 35px; }
}
@media (max-width: 700px) {
  .container { width: min(100% - 36px, 540px); }.section { padding: 78px 0; }.nav { height: 68px; }
  .menu-toggle { display: block; }.nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 18px 22px 24px; background: #142238; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; }.nav-links.open { display: flex; }.nav-links a { padding: 12px 4px; font-size: 13px; }.nav-links .nav-cta { text-align: center; margin-top: 9px; }
  .hero { padding-top: 70px; }.hero-grid { grid-template-columns: 1fr; }.hero h1 { letter-spacing: -3px; }.hero-art { min-height: 330px; margin: 5px -10px 0; transform: scale(.88); }.code-window { width: min(100%, 410px); }.card-java { right: 0; }.card-web { left: 0; }.hero-bottom { margin-top: 42px; }.hero-location { display: none; }
  .section-heading { margin-bottom: 37px; }.section-heading h2 { letter-spacing: -2px; }.about-grid, .education-layout, .contact-wrap { grid-template-columns: 1fr; gap: 42px; }.about-lead > p { font-size: 16px; }.about-facts { gap: 18px; }
  .skills-grid { gap: 10px; }.skill-card { padding: 19px 15px; min-height: 225px; }.skill-card h3 { font-size: 15px; }
  .section-heading-row { display: block; }.section-heading-row .section-subtitle { margin-top: 16px; }.projects-grid { grid-template-columns: 1fr; }.project-visual { height: 190px; }.project-description { min-height: 0; }
  .education-item { grid-template-columns: 28px 1fr; }.education-period { grid-column: 2; padding-top: 0; }.achievement-grid { grid-template-columns: 1fr 1fr; }.contact-panel { padding: 23px 19px; }.footer-inner { flex-wrap: wrap; gap: 14px 20px; }.footer p { order: 3; width: 100%; }.back-top { margin-left: auto; }.copyright { margin-left: 0; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 53px; }.hero h2 { font-size: 27px; }.hero-art { transform: scale(.78); margin: -10px -30px; }.skills-grid, .achievement-grid { grid-template-columns: 1fr; }.skill-card { min-height: auto; }.skill-card-top { margin-bottom: 15px; }.hero-bottom { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


/* ===== PERSONAL PHOTO, BRAND INTRO & INTERACTIVE EXTRAS ===== */
.site-loader {
  position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 17px; background: #101828;
  transition: opacity .65s ease, visibility .65s ease;
}
.site-loader.loader-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-mark {
  width: 76px; height: 76px; display: grid; place-items: center; border-radius: 24px;
  background: var(--green); color: #101828; font: 700 42px var(--display);
  box-shadow: 0 0 0 0 rgba(56,214,160,.4); animation: loaderPulse 1.35s ease-in-out infinite;
}
.loader-mark span { color: #f7fafc; }
.loader-track { width: 115px; height: 3px; border-radius: 9px; overflow: hidden; background: rgba(255,255,255,.13); }
.loader-track span { display: block; width: 40%; height: 100%; background: var(--green); animation: loaderRun 1.2s ease-in-out infinite; }
.site-loader p { color: #91a0b2; font: 600 9px var(--display); letter-spacing: 2px; }
@keyframes loaderPulse { 50% { transform: translateY(-5px) scale(1.04); box-shadow: 0 0 0 13px rgba(56,214,160,0); } }
@keyframes loaderRun { from { transform: translateX(-120%); } to { transform: translateX(300%); } }

.theme-toggle {
  width: 37px; height: 37px; flex: 0 0 37px; border: 1px solid var(--line);
  border-radius: 50%; color: var(--green); background: rgba(255,255,255,.04);
  font-size: 20px; cursor: pointer; transition: transform .25s, background .25s;
}
.theme-toggle:hover { transform: rotate(25deg); background: rgba(56,214,160,.12); }

.portrait-card {
  position: absolute; z-index: 4; width: 190px; right: -10px; bottom: 12px;
  padding: 7px 7px 0; border-radius: 16px; background: rgba(245,248,247,.96);
  box-shadow: 0 24px 65px rgba(0,0,0,.42); transform: rotate(4deg);
  animation: portraitFloat 6s ease-in-out infinite;
}
.portrait-card img { display: block; width: 100%; height: 225px; object-fit: cover; object-position: center 28%; border-radius: 11px 11px 5px 5px; }
.portrait-caption { display: flex; align-items: center; gap: 8px; padding: 10px 7px 12px; color: #142238; }
.portrait-caption b, .portrait-caption small { display: block; }
.portrait-caption b { font: 700 11px var(--display); }
.portrait-caption small { color: #6b7886; font-size: 9px; margin-top: 1px; }
.portrait-status { width: 8px; height: 8px; border-radius: 50%; background: #24bd83; box-shadow: 0 0 0 4px rgba(36,189,131,.14); }
.portrait-glow { position: absolute; inset: -14px; z-index: -1; border-radius: 22px; background: rgba(56,214,160,.17); filter: blur(22px); }
@keyframes portraitFloat { 0%,100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

.back-to-top {
  position: fixed; z-index: 90; right: 25px; bottom: 25px; width: 44px; height: 44px;
  border: 1px solid rgba(56,214,160,.35); border-radius: 50%; background: var(--green);
  color: #102438; font-size: 23px; cursor: pointer; opacity: 0; visibility: hidden;
  transform: translateY(12px); transition: .25s; box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

.project-card { transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.project-card:hover { transform: translateY(-7px); border-color: rgba(56,214,160,.35); box-shadow: 0 22px 55px rgba(0,0,0,.18); }
.project-visual .graphic-window { transition: transform .4s ease; }
.project-card:hover .graphic-window { transform: perspective(500px) rotateY(-5deg) rotateX(0) translateY(-5px); }

/* Optional light theme, toggled from the header. */
body.light-theme { --bg: #edf3f1; --bg-soft: #e3ece8; --panel: #ffffff; --white: #142238; --muted: #647386; --line: rgba(20,34,56,.13); }
body.light-theme .site-header { background: rgba(237,243,241,.9); }
body.light-theme .nav-links { color: #536276; }
body.light-theme .hero { background: radial-gradient(ellipse at 75% 38%, rgba(56,214,160,.18), transparent 35%), #edf3f1; }
body.light-theme .hero h1, body.light-theme .hero h2 { color: #142238; }
body.light-theme .hero-description, body.light-theme .hero-socials a { color: #59697b; }
body.light-theme .code-window { background: #18283b; }
body.light-theme .skill-card { background: rgba(255,255,255,.72); border-color: rgba(20,34,56,.13); }
body.light-theme .skill-card h3 { color: #142238; }
body.light-theme .skill-tags span { color: #526276; border-color: rgba(20,34,56,.15); }
body.light-theme .section:not(.section-light):not(.contact-section) { background: #edf3f1; color: #142238; }
body.light-theme .section:not(.section-light):not(.contact-section) .section-heading h2 { color: #142238; }
body.light-theme .section:not(.section-light):not(.contact-section) .heading-muted-dark { color: #718092; }
body.light-theme .contact-section { background: #dfece7; color: #142238; }
body.light-theme .contact-copy, body.light-theme .contact-label { color: #5b6b7d; }
body.light-theme .contact-panel { border-color: rgba(20,34,56,.15); background: rgba(255,255,255,.55); }
body.light-theme .contact-email { color: #142238; }
body.light-theme .footer { background: #e2ebe7; border-color: rgba(20,34,56,.12); }
body.light-theme .footer p, body.light-theme .copyright, body.light-theme .back-top { color: #59697b; }

@media (max-width: 950px) {
  .portrait-card { width: 160px; right: -2px; bottom: 15px; }
  .portrait-card img { height: 190px; }
  .hero-art { padding-right: 35px; }
}
@media (max-width: 700px) {
  .theme-toggle { margin-left: auto; margin-right: 12px; }
  .portrait-card { width: 140px; right: 5px; bottom: 6px; }
  .portrait-card img { height: 165px; }
  .portrait-caption { padding: 8px 5px 9px; }
  .hero-art { padding-right: 15px; }
}
@media (max-width: 420px) {
  .portrait-card { width: 122px; right: 0; bottom: 8px; }
  .portrait-card img { height: 145px; }
  .portrait-caption b { font-size: 9px; }
  .portrait-caption small { font-size: 8px; }
}
