/* ---------- FONTS (saját kiszolgálás, latin + latin-ext a magyar ékezetekhez) ---------- */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Sora'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/sora-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/sora-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --band: #ffffff;
  --text: #16191f;
  --text-muted: #5a6472;
  --border: #e3e7ec;
  --accent: #2f6df0;
  --on-accent: #ffffff;
  --accent-soft: #e7efff;
  --accent-text: #1a4fb8;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.10);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --nav-h: 64px;
  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}
html[data-theme="dark"] {
  --bg: #0c0f16;
  --surface: #141925;
  --surface-2: #1b2230;
  --band: #10141f;
  --text: #eef1f6;
  --text-muted: #9aa6b8;
  --border: #242c3a;
  --accent: #5b8cff;
  --on-accent: #0c0f16; /* fehér szöveg #5b8cff-on csak 3,2:1 lenne (WCAG AA alatt) */
  --accent-soft: #18233d;
  --accent-text: #9bb8ff;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.45);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }

/* ---------- SKIP LINK ---------- */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
  padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- NAV ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
header.nav.scrolled { border-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { font-size: 14.5px; color: var(--text-muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 10px; cursor: pointer; transition: color .2s, border-color .2s; font-size: 18px;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 10px 18px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: color .2s, border-color .2s, transform .2s, box-shadow .2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle { display: none; }

/* ---------- HERO ---------- */
.hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 78% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(45% 45% at 10% 30%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 700; margin: 16px 0 12px; }
.hero .role { font-size: clamp(16px, 2.4vw, 21px); font-weight: 600; color: var(--accent-text); margin-bottom: 22px; }
.hero .lead { font-size: 18px; color: var(--text-muted); max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14.5px; color: var(--text-muted); }
.hero-meta a { display: inline-flex; align-items: center; gap: 7px; transition: color .2s; }
.hero-meta a:hover { color: var(--accent); }

/* avatar card */
.avatar-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px; box-shadow: var(--shadow-lg); text-align: center;
}
.avatar-card .name { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.avatar-card .sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.avatar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.avatar-stats .stat { background: var(--surface-2); border-radius: 12px; padding: 14px 10px; }
.avatar-stats .num { font-family: var(--font-head); font-weight: 700; font-size: 26px; color: var(--accent); }
.avatar-stats .lbl { font-size: 12px; color: var(--text-muted); line-height: 1.35; margin-top: 2px; }

/* ---------- SECTIONS ---------- */
section { padding: 80px 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 17px; }

/* kiemelt (sávos) szekció háttér */
.band { background: var(--band); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* about */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about-grid p { color: var(--text-muted); font-size: 17px; margin-bottom: 18px; }
.about-grid p strong { color: var(--text); font-weight: 600; }
.about-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.about-side h3 { font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.about-grid .about-summary { font-size: 15px; margin-bottom: 20px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-text);
}
.tag.muted { background: var(--surface-2); color: var(--text-muted); }

/* AI cards */
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ai-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform .25s, border-color .25s, box-shadow .25s;
  /* A span 5 = a kártya gyerekelemeinek száma (ico, h3, p, .ai-result, .tagrow).
     A subgrid miatt a sorok a kártyák között egymáshoz igazodnak.
     Ha új elem kerül a kártyába, ezt a számot is növelni kell! */
  display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start;
}
.ai-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.ai-card .ico { font-size: 26px; margin-bottom: 14px; }
.ai-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.ai-card p { font-size: 14.5px; color: var(--text-muted); }
.ai-result {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--accent-text); line-height: 1.4;
}
.ai-card .tagrow { margin-top: 12px; gap: 6px; align-items: flex-start; align-content: flex-start; }
.ai-card .tag { font-size: 12px; padding: 4px 9px; }
@media (max-width: 960px) { .ai-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ai-grid { grid-template-columns: 1fr; } }

/* projects */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.proj-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.proj-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.proj-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent); opacity: .85; }
.proj-tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); padding: 4px 10px; border-radius: 6px; margin-bottom: 16px; }
.proj-card h3 { font-size: 19px; margin-bottom: 14px; }
.proj-block { margin-bottom: 12px; }
.proj-block .k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); display: block; margin-bottom: 2px; }
.proj-block .v { font-size: 15px; color: var(--text); }
.proj-result { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; align-items: baseline; gap: 10px; }
.proj-result .big { font-family: var(--font-head); font-weight: 700; font-size: 28px; color: var(--accent); }
.proj-result .desc { font-size: 14px; color: var(--text-muted); }

/* competencies */
.comp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.comp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.comp-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.comp-card .head .ico { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 20px; }
.comp-card .head h3 { font-size: 17px; }
.comp-list { list-style: none; }
.comp-list li { font-size: 14.5px; color: var(--text-muted); padding: 7px 0 7px 24px; position: relative; }
.comp-list li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* timeline */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -28px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl-item .when { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.tl-item h3 { font-size: 17px; margin: 4px 0 4px; }
.tl-item p { font-size: 14.5px; color: var(--text-muted); }

/* contact */
.contact { text-align: center; }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 48px 36px; box-shadow: var(--shadow-lg); max-width: 720px; margin: 0 auto;
}
.contact-card h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 12px; }
.contact-card p { color: var(--text-muted); font-size: 17px; margin-bottom: 28px; }
.contact-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact-pill {
  display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 500;
  padding: 12px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg);
  transition: color .2s, border-color .2s, transform .2s;
}
.contact-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.contact-pill .ico { font-size: 18px; color: var(--accent); }

/* footer */
footer.site { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.footer-inner p { font-size: 14px; color: var(--text-muted); }
.footer-inner .links { display: flex; gap: 16px; }
.footer-inner .links a { font-size: 14px; color: var(--text-muted); transition: color .2s; }
.footer-inner .links a:hover { color: var(--accent); }

/* reveal animáció – csak ha a JS fut (html.js), különben a tartalom JS nélkül is látható */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* mobile menu */
.mobile-menu { display: none; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .avatar-card { max-width: 360px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
  .mobile-menu {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 24px;
    flex-direction: column; gap: 4px; box-shadow: var(--shadow);
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a { padding: 12px 8px; font-weight: 500; color: var(--text-muted); border-radius: 8px; }
  .mobile-menu a:hover { background: var(--surface-2); color: var(--text); }
  section { padding: 60px 0; }
  .hero { padding: 56px 0 48px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
}

/* mozgásérzékeny felhasználók: animációk és smooth scroll kikapcsolva */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .ai-card:hover, .proj-card:hover, .contact-pill:hover, .btn-primary:hover { transform: none; }
}

/* a skip link fókuszt ad a <main>-nek (tabindex=-1), ott nem kell keret */
main:focus { outline: none; }
