/* Portfolio QA + Software Development — zero external CSS dependencies */
:root {
  color-scheme: dark;
  --bg: #0c1421;
  --bg-lift: #101c2c;
  --surface: #152337;
  --surface-strong: #192b42;
  --border: rgba(174, 198, 229, 0.14);
  --text: #ecf2fa;
  --muted: #adbbcd;
  --muted-2: #8798ad;
  --accent: #7db8ff;
  --accent-bright: #a4d2ff;
  --radius: 16px;
  --max-width: 1160px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
#top { position: absolute; top: 0; left: 0; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.65; }
/* Allow long names and enlarged text to reflow inside grid and flex items. */
main { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
main:focus, .site-header:focus, section[tabindex="-1"]:focus { outline: none; }
body::before { content: ''; position: absolute; inset: 0 0 auto; height: 950px; pointer-events: none; background: radial-gradient(ellipse at 78% 18%, rgba(37,94,159,.18), transparent 48%); z-index: -1; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 4px; }
::selection { color: #07111f; background: var(--accent); }
.container { width: min(calc(100% - 48px), var(--max-width)); margin-inline: auto; }
.section { padding-block: 112px; }
.section-bordered { border-top: 1px solid var(--border); }
.section-label, .eyebrow, .project-kicker { color: var(--accent); font-size: .75rem; font-weight: 750; letter-spacing: .115em; text-transform: uppercase; }
.section-label { margin: 0 0 24px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.16; letter-spacing: -.035em; }
h2 { margin-bottom: 24px; font-size: clamp(2.1rem, 4.2vw, 3.55rem); max-width: 750px; }
h3 { font-size: 1.3rem; }
p { color: var(--muted); }
.text-accent, .gradient-text { color: var(--accent); }
.gradient-text { background: linear-gradient(100deg, #8ac1ff 0%, #5a9bf3 58%, #bbdfff 100%); background-clip: text; -webkit-background-clip: text; color: transparent; }
.skip-link { position: absolute; top: -60px; left: 20px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: #eff7ff; color: #07121f; font-weight: 700; }
.skip-link:focus { top: 15px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; height: 80px; background: rgba(12,20,33,.83); border-bottom: 1px solid transparent; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); transition: border-color .2s ease, background .2s ease; }
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(12,20,33,.96); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.1rem; font-weight: 800; letter-spacing: -.045em; white-space: nowrap; }
.brand span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: clamp(15px, 2.5vw, 34px); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #b8c5d5; font-size: .9rem; font-weight: 600; transition: color .15s; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent-bright); }
.menu-toggle { display: none; }
/* Keep navigation inside the header when text is enlarged. */
@media (min-width: 641px) {
  .site-header { height: auto; }
  .header-inner { min-height: 80px; }
  .site-nav { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
}

/* Hero */
.hero { padding-block: 106px 116px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: 70px; align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; }
.eyebrow-line { width: 26px; height: 1px; background: var(--accent); }
h1 { margin-bottom: 28px; font-size: clamp(3.3rem, 5.8vw, 5.5rem); font-weight: 850; line-height: 1.07; letter-spacing: -.065em; }
.hero-lead { max-width: 670px; font-size: 1.075rem; color: #bfccdc; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 55px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 46px; padding: 11px 20px; border-radius: 10px; font-size: .925rem; font-weight: 750; line-height: 1.25; transition: background .16s, border-color .16s, transform .16s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #061222; background: #88c0ff; }
.button-primary:hover { background: #b3daff; }
.button-secondary { color: #e3edf9; border: 1px solid rgba(150,177,211,.42); background: rgba(18,31,49,.54); }
.button-secondary:hover { background: #1d3049; border-color: #7197c1; }
.hero-stats { display: flex; gap: 30px; align-items: center; }
.hero-stats div:not(.stat-separator) { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.55rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
.hero-stats span { color: var(--muted-2); font-size: .8rem; }
.hero-stats .stat-separator { height: 36px; width: 1px; background: var(--border); }
.hero-visual { position: relative; isolation: isolate; }
.hero-glow { position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(50,124,234,.26), transparent 65%); filter: blur(17px); }
.signal-frame { border: 1px solid rgba(129,177,236,.28); border-radius: 18px; overflow: hidden; background: linear-gradient(145deg,rgba(27,47,76,.98),rgba(13,24,39,.98)); box-shadow: 0 25px 75px rgba(0,0,0,.33), inset 0 1px 1px rgba(255,255,255,.05); transform: perspective(1100px) rotateY(-6deg) rotateX(2deg); }
.signal-top, .signal-bottom { display: flex; justify-content: space-between; align-items: center; padding: 15px 22px; font: 650 .69rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; color: #7994b4; letter-spacing: .04em; }
.signal-top { border-bottom: 1px solid var(--border); }
.dots { display: flex; gap: 6px; }.dots i { width: 7px; height: 7px; border-radius: 50%; background: #456686; }.dots i:first-child { background: #7bb9ff; }
.signal-body { padding: 27px 26px 14px; }
.signal-row { display: flex; align-items: center; gap: 18px; }
.signal-index { font: 750 .78rem ui-monospace,monospace; color: #75aef0; }
.signal-row div { display: grid; gap: 2px; flex: 1; }
.signal-row strong { font-size: .98rem; letter-spacing: -.025em; }
.signal-row small { color: #95a9c1; font-size: .72rem; }
.status-dot { width: 8px; height: 8px; background: #66d8bd; border-radius: 50%; box-shadow: 0 0 0 4px rgba(102,216,189,.08); }
.signal-track { height: 33px; margin: 10px 0 10px 12px; border-left: 1px dashed #44617c; }
.signal-track span { display: block; height: 50%; width: 1px; }
.signal-bottom { padding-top: 22px; border-top: 1px solid var(--border); }
.signal-code { color: var(--accent); font-size: 1rem; }

/* About + sections */
.section-two-col { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 8vw, 130px); }
.prose p { font-size: 1.06rem; line-height: 1.85; }
.prose strong { color: var(--text); }
.about-note { display: flex; align-items: flex-start; gap: 17px; margin-top: 30px; padding: 19px 21px; border: 1px solid rgba(125,184,255,.22); border-left: 3px solid var(--accent); background: rgba(33,69,110,.18); border-radius: 0 11px 11px 0; font-size: .92rem; color: #d5e3f5; }
.about-note-mark { flex: 0 0 auto; font-size: 1.25rem; color: var(--accent); }
.section-heading { margin-bottom: 42px; }
.section-heading p:last-child { max-width: 650px; color: var(--muted); font-size: 1.05rem; }
.qa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card { min-height: 233px; padding: 30px; background: linear-gradient(156deg,#16253a,#121f31); border: 1px solid var(--border); border-radius: var(--radius); }
.feature-card h3 { margin: 18px 0 14px; font-size: 1.2rem; }
.feature-card p { margin: 0; font-size: .92rem; line-height: 1.66; }
.feature-num { color: var(--accent); font: 750 .79rem/1.2 ui-monospace,SFMono-Regular,Consolas,monospace; }
.feature-card-highlight { background: linear-gradient(143deg,rgba(39,83,140,.38),#14273d); border-color: rgba(125,184,255,.28); }
.section-footnote { margin: 30px 0 0; font-size: .86rem; color: var(--muted-2); }

/* Projects */
.section-projects { background: linear-gradient(180deg,#0f1a2a,#0c1421); border-block: 1px solid var(--border); }
.group-heading { font-size: 1.23rem; letter-spacing: -.02em; margin: 0 0 22px; }
.personal-heading { margin-top: 72px; }
.projects-grid { display: grid; gap: 20px; }
.projects-grid-primary { grid-template-columns: repeat(2,minmax(0,1fr)); }
.project-card, .personal-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #132136; }
.project-card { display: flex; flex-direction: column; }
.project-art { height: auto; aspect-ratio: 16 / 9; flex-shrink: 0; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 80% 12%,rgba(132,196,255,.18),transparent 32%),linear-gradient(135deg,#1b3960,#102038); }
.project-art::before { content: ''; position: absolute; inset: 24px; border: 1px solid rgba(180,218,255,.12); border-radius: 12px; }
.project-art::after { content: ''; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(122,180,248,.16); border-radius: 50%; transform: translate(110px,105px); }
.project-screenshot { height: auto; aspect-ratio: 16 / 9; background: #edf0f7; }
.project-screenshot::before, .project-screenshot::after { content: none; }
.project-screenshot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.art-notimy { background: radial-gradient(circle at 80% 12%,rgba(101,229,205,.18),transparent 36%),linear-gradient(132deg,#123e43,#112638); }
.art-toros { background: radial-gradient(circle at 80% 12%,rgba(190,170,248,.16),transparent 36%),linear-gradient(132deg,#343452,#182139); }
.art-symbol { position: relative; z-index: 1; font-size: 5.5rem; line-height: 1; letter-spacing: -.09em; font-weight: 850; color: rgba(238,246,255,.9); text-shadow: 0 8px 30px rgba(0,0,0,.17); }
.art-wordmark { font-size: 4.7rem; }
.art-period { color: var(--accent); }
.art-caption { position: absolute; left: 23px; bottom: 20px; font: 700 .65rem ui-monospace,monospace; letter-spacing: .1em; color: rgba(226,240,255,.74); }
.project-content { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.project-content h4, .personal-card h4 { margin: 11px 0 14px; font-size: 1.62rem; }
.project-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 11px 0 14px; }
.project-content .project-title h4 { min-width: 0; margin: 0; }
.project-card .project-title h4 { font-size: clamp(1.1rem, 2.1vw, 1.62rem); }
.project-content > p, .personal-card > p { font-size: .95rem; line-height: 1.75; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid rgba(156,185,224,.21); border-radius: 6px; background: rgba(37,62,93,.45); color: #b9cde5; font-size: .77rem; font-weight: 650; line-height: 1.45; }
.project-content > .tags { margin: auto 0 0; padding-top: 12px; }
.project-details { margin-top: 23px; padding-top: 15px; border-top: 1px solid var(--border); }
.project-details summary { min-height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; list-style: none; font-size: .91rem; color: var(--accent-bright); font-weight: 700; }
.project-details summary::-webkit-details-marker { display: none; }
.project-details summary span[aria-hidden] { font-size: 1.35rem; font-weight: 400; line-height: 1; }
.project-details[open] summary span[aria-hidden] { transform: rotate(45deg); }
.project-details ul { padding-left: 19px; margin: 17px 0 4px; color: var(--muted); font-size: .88rem; line-height: 1.65; }
.project-details li + li { margin-top: 8px; }
.inline-link { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; min-height: 44px; color: var(--accent-bright); font-size: .91rem; font-weight: 750; white-space: nowrap; }
.inline-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.projects-grid-personal { grid-template-columns: repeat(2,minmax(0,1fr)); }
.personal-card { padding: 30px; display: flex; flex-direction: column; }
.personal-card-with-preview { padding: 0; }
.personal-card-with-preview .project-art { height: auto; aspect-ratio: 16 / 9; flex-shrink: 0; }
.personal-card h4 { font-size: 1.35rem; }
.personal-card .tags { margin-top: auto; padding-top: 14px; }
.opensource { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; margin-top: 25px; border: 1px solid rgba(125,184,255,.22); border-radius: var(--radius); padding: 32px; background: radial-gradient(circle at 100% 0,rgba(85,145,215,.11),transparent 55%),#142339; }
.opensource .section-label { margin-bottom: 10px; }
.opensource h3 { margin: 0 0 10px; font-size: 1.35rem; }
.opensource p:not(.section-label) { margin: 0; max-width: 690px; font-size: .92rem; }

/* Skills */
.stack-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.stack-group { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(21,35,55,.72); }
.stack-group h3 { margin-bottom: 20px; font-size: 1.08rem; }
.tags-lg { gap: 9px; }
.tags-lg span { padding: 7px 11px; color: #d6e2f2; background: rgba(35,59,88,.5); }
.stack-group-wide { grid-column: 1 / -1; }
.stack-caveat { margin: 18px 0 0; font-size: .85rem; color: var(--muted-2); }

/* Contact and footer */
.contact-section { padding-top: 25px; }
.contact-box { display: grid; grid-template-columns: 1.4fr 1fr; gap: 70px; align-items: center; padding: 56px; border: 1px solid rgba(125,184,255,.25); border-radius: 22px; background: radial-gradient(circle at 85% 25%,rgba(76,143,221,.17),transparent 43%),#132238; }
.contact-box h2 { font-size: clamp(2rem,3.9vw,3.2rem); }
.contact-box p:not(.section-label) { margin-bottom: 0; }
.contact-actions { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(11,21,35,.4); }
.contact-actions .button { width: 100%; gap: 8px; padding-inline: 12px; font-size: .9rem; }
.site-footer { margin-top: 100px; padding: 27px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner p { margin: 0; color: var(--muted-2); font-size: .83rem; }
.footer-inner div { display: flex; flex-wrap: wrap; gap: 8px 27px; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted-2); font-size: .83rem; }
.footer-inner a:hover { color: var(--accent); }

/* Privacy notice shares the same visual system */
.legal-page { max-width: 820px; }
.legal-page h1 { font-size: clamp(2.6rem, 5vw, 4rem); }
.legal-page h2 { margin-top: 45px; margin-bottom: 13px; font-size: 1.45rem; }
.legal-page p, .legal-page li { color: var(--muted); }
.legal-page a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.legal-page strong { color: var(--text); }

/* Content stays visible before observation, including keyboard and fragment jumps. */
[data-reveal].is-visible { animation: reveal .45s ease; }
@keyframes reveal { from { transform: translateY(12px); } to { transform: translateY(0); } }

@media (max-width: 1040px) {
  .hero-grid { gap: 34px; }
  .signal-frame { transform: none; }
  .section-two-col { gap: 50px; }
  .feature-card { padding: 24px; }
}
@media (max-width: 820px) {
  .section { padding-block: 78px; }
  .hero { padding-block: 75px 85px; }
  .hero-grid, .section-two-col, .contact-box { grid-template-columns: 1fr; }
  .hero-visual { max-width: 540px; width: 100%; margin: 15px auto 0; }
  .hero-copy { max-width: 700px; }
  .hero-actions { margin-bottom: 36px; }
  .qa-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact-box { gap: 26px; padding: 38px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: .83rem; }
}
@media (max-width: 640px) {
  .container { width: min(calc(100% - 36px), var(--max-width)); }
  .site-header { height: auto; position: relative; }
  .header-inner { flex-wrap: wrap; padding-block: 12px; gap: 8px; }
  .site-nav { flex: 1 1 100%; flex-wrap: wrap; gap: 0 16px; }
  .site-nav a { padding-block: 8px; }
  .site-header.menu-ready { height: 68px; position: sticky; }
  .menu-ready .header-inner { flex-wrap: nowrap; padding-block: 0; }
  .brand { font-size: 1rem; }
  .menu-ready .menu-toggle { width: 44px; height: 44px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: white; cursor: pointer; }
  .menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .menu-ready .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 68px); overflow-y: auto; padding: 15px 18px 24px; background: #111e30; border-bottom: 1px solid var(--border); box-shadow: 0 15px 30px rgba(0,0,0,.27); }
  .menu-ready .site-nav.is-open { display: flex; align-items: stretch; flex-direction: column; gap: 0; flex-wrap: nowrap; }
  .site-nav a { padding: 13px 10px; font-size: 1rem; }
  .hero { padding-top: 58px; }
  h1 { font-size: clamp(2.85rem, 11vw, 4rem); }
  h2 { font-size: clamp(2.15rem, 8vw, 3rem); }
  .hero-lead { font-size: 1rem; }
  .hero-stats { gap: 16px; }
  .hero-stats div:not(.stat-separator) { min-width: 0; }
  .hero-stats .stat-separator { flex-shrink: 0; }
  .signal-body { padding-inline: 18px; }
  .signal-row { gap: 12px; }
  .signal-row div { min-width: 0; }
  .status-dot, .eyebrow-line { flex-shrink: 0; }
  .hero-stats strong { font-size: 1.3rem; }
  .hero-stats span { font-size: .74rem; }
  .qa-grid, .projects-grid-primary, .projects-grid-personal, .stack-grid { grid-template-columns: 1fr; }
  .stack-group-wide { grid-column: auto; }
  .feature-card { min-height: auto; }
  .personal-heading { margin-top: 48px; }
  .opensource { grid-template-columns: 1fr; padding: 24px; }
  .opensource .button { justify-self: start; }
  .contact-box { padding: 29px 24px; }
  .site-footer { margin-top: 40px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal].is-visible { animation: none; }
}
@media (forced-colors: active) {
  .gradient-text { background: none; color: CanvasText; }
  .button, .menu-toggle, .project-card, .personal-card { border: 1px solid ButtonText; }
  .menu-toggle span { background: ButtonText; }
}
