:root {
  --content-width: 1440px;
  --ink: #eef3f8;
  --muted: #9ba9b9;
  --dark: #0b1220;
  --dark-soft: #111b2b;
  --line: rgba(255, 255, 255, .1);
  --accent: #56e0b5;
  --accent-blue: #6ab7ff;
  --paper: #f3f1eb;
  --paper-ink: #18202c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--dark);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: .65rem 1rem;
  background: var(--accent);
  color: var(--dark);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  width: min(100%, var(--content-width));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 5vw, 5rem);
}
.logo {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 800;
}
.logo > span:first-child {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
}
.logo-text { font-size: .9rem; letter-spacing: .05em; }
nav { display: flex; gap: clamp(1.5rem, 3vw, 3.5rem); }
nav a {
  position: relative;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -.45rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}
nav a:hover, nav a:focus-visible { color: var(--ink); }
nav a:hover::after, nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.menu-toggle { display: none; }

.hero {
  position: relative;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .7fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  padding: 9rem clamp(1.25rem, 8vw, 9rem) 6rem;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.hero-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .18;
}
.glow-one { width: 28rem; height: 28rem; background: var(--accent); top: 10%; left: -12%; }
.glow-two { width: 25rem; height: 25rem; background: var(--accent-blue); right: -10%; bottom: 5%; }
.eyebrow {
  margin: 0 0 1.3rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero .eyebrow { display: flex; align-items: center; gap: .7rem; }
.hero .eyebrow span { width: 2rem; height: 1px; background: var(--accent); }
h1, h2, h3 {
  margin-top: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.08;
}
h1 {
  max-width: 800px;
  margin-bottom: 1.6rem;
  font-size: clamp(3.2rem, 7vw, 7rem);
  letter-spacing: -.055em;
}
h1 em, .contact h2 em { color: var(--accent); font-style: normal; }
.lead {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 3.45rem;
  padding: 0 1.5rem;
  border: 1px solid transparent;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .04em;
  transition: transform .25s ease, background .25s ease;
}
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--accent); color: var(--dark); }
.button-primary:hover { background: #80ebca; }
.button-ghost { border-color: var(--line); color: var(--ink); }
.button-ghost:hover { border-color: var(--accent); }
.quick-facts {
  display: flex;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin: 3.5rem 0 0;
}
.quick-facts div { padding-left: 1rem; border-left: 1px solid var(--line); }
.quick-facts dt { font-family: "Space Grotesk", sans-serif; font-size: 1.2rem; font-weight: 700; }
.quick-facts dd { margin: .15rem 0 0; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }

.portrait-wrap { position: relative; max-width: 390px; justify-self: center; }
.portrait-card {
  position: relative;
  padding: .7rem;
  background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.025));
  border: 1px solid var(--line);
}
.portrait-card::before {
  content: "";
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 5rem;
  height: 5rem;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.portrait-card img {
  width: 100%;
  min-width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  filter: saturate(.78) contrast(1.06);
}
.portrait-label {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .9rem .4rem .25rem;
  color: var(--muted);
  font-size: .75rem;
}
.status-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 .25rem rgba(86,224,181,.12);
}
.code-card {
  position: absolute;
  left: -5.5rem;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  width: 260px;
  padding: 1rem 1.2rem;
  background: rgba(7, 13, 23, .92);
  border: 1px solid var(--line);
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,.3);
  backdrop-filter: blur(14px);
}
.code-card span { margin-bottom: .65rem; color: var(--muted); font-size: .65rem; }
.code-card code { color: #b9c7d4; font-size: .7rem; line-height: 1.7; }

.section {
  display: grid;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  grid-template-columns: 55px minmax(400px, .95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 8vw, 9rem);
  border-top: 1px solid var(--line);
}
.section-number {
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: .75rem;
  letter-spacing: .12em;
}
.section-heading h2 {
  max-width: 100%;
  margin-bottom: 0;
  font-size: clamp(2.3rem, 3.35vw, 3.7rem);
  letter-spacing: -.045em;
}
.intro .section-heading h2 {
  font-size: clamp(2.25rem, 3.15vw, 3.45rem);
}
.intro-copy { max-width: 780px; }
.intro-copy p {
  margin: 0 0 1.5rem;
  color: #bbc5cf;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
}

.projects {
  background: #0d1523;
  box-shadow: 0 0 0 100vmax #0d1523;
  clip-path: inset(0 -100vmax);
}
.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 100%;
  min-height: 310px;
  padding: clamp(1.4rem, 3vw, 2.3rem);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(86,224,181,.5);
}
.project-featured {
  min-height: 350px;
  background:
    linear-gradient(110deg, rgba(86,224,181,.12), transparent 55%),
    rgba(255,255,255,.025);
}
.project-featured::after {
  content: "LEVEL NOW";
  position: absolute;
  right: -1rem;
  bottom: -2.5rem;
  color: rgba(255,255,255,.035);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700;
  white-space: nowrap;
}
.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: auto;
  color: var(--accent);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.project-card h3 {
  position: relative;
  z-index: 1;
  margin: 2.5rem 0 .8rem;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  overflow-wrap: normal;
}
.project-service {
  min-height: auto;
}
.project-service h3 {
  max-width: 18ch;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
}
.project-card p {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}
.project-card .tag-list { position: relative; z-index: 1; }
.project-card .tag-list li { border-color: var(--line); color: #b9c5d0; }
.service-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem 1.5rem;
  padding: 0;
  margin: 1.6rem 0 .4rem;
  list-style: none;
}
.service-list li {
  position: relative;
  padding-left: 1.2rem;
  color: #bdc7d1;
  font-size: .78rem;
}
.service-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}
.project-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
  min-width: 210px;
  margin-top: 2rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: .76rem;
  font-weight: 800;
  transition: background .25s ease, color .25s ease;
}
.project-link:hover { background: var(--accent); color: var(--dark); }

.experience {
  background: var(--paper);
  color: var(--paper-ink);
  border-top: 0;
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}
.experience .eyebrow { color: #147a61; }
.experience .section-number { color: #6e7781; }
.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: .4rem;
  bottom: .4rem;
  left: 108px;
  width: 1px;
  background: #ccd0cd;
}
.timeline-item {
  display: grid;
  grid-template-columns: 85px 20px 1fr;
  gap: 1.5rem;
  padding-bottom: 3rem;
}
.timeline-date {
  padding-top: .15rem;
  color: #69717b;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.timeline-marker {
  position: relative;
  z-index: 2;
  width: .72rem;
  height: .72rem;
  margin: .3rem auto 0;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: #16886a;
  box-shadow: 0 0 0 1px #16886a;
}
.company {
  margin: 0 0 .35rem;
  color: #147a61;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.timeline-content h3 { margin-bottom: .8rem; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.timeline-content > p:last-of-type { max-width: 720px; margin-top: 0; color: #5e6771; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.2rem 0 0; list-style: none; }
.tag-list li {
  padding: .35rem .7rem;
  border: 1px solid #cbd1ce;
  color: #4d5a63;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.skills {
  background: var(--dark-soft);
  box-shadow: 0 0 0 100vmax var(--dark-soft);
  clip-path: inset(0 -100vmax);
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.skill-card {
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease;
}
.skill-card:hover { transform: translateY(-4px); border-color: rgba(86,224,181,.5); }
.skill-icon { margin-bottom: 2.5rem; color: var(--accent); font-size: .65rem; letter-spacing: .08em; }
.skill-card h3 { margin-bottom: .8rem; font-size: 1.35rem; }
.skill-card p { min-height: 5rem; margin: 0; color: var(--muted); font-size: .88rem; }
.skill-meter { height: 2px; margin-top: 1.8rem; background: rgba(255,255,255,.08); }
.skill-meter span { display: block; width: var(--level); height: 100%; background: var(--accent); }
.tool-cloud {
  grid-column: 3;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}
.tool-cloud span {
  padding: .55rem .85rem;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  color: #bdc7d1;
  font-size: .72rem;
}

.education {
  background: #0d1523;
  box-shadow: 0 0 0 100vmax #0d1523;
  clip-path: inset(0 -100vmax);
}
.education-grid { display: grid; gap: .8rem; }
.education-card {
  position: relative;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--line);
  overflow: hidden;
}
.education-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.education-card:hover::after { transform: scaleX(1); }
.education-card span { color: var(--accent); font-size: .65rem; font-weight: 800; letter-spacing: .1em; }
.education-card h3 { margin: .6rem 0 .5rem; font-size: 1.2rem; }
.education-card p { margin: 0; color: var(--muted); font-size: .84rem; }

.contact {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 75vh;
  padding: 6rem 1.25rem;
  overflow: hidden;
  background: var(--paper);
  color: var(--paper-ink);
  text-align: center;
}
.contact::before {
  content: "KAPCSOLAT";
  position: absolute;
  color: rgba(24,32,44,.035);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(5rem, 17vw, 15rem);
  font-weight: 700;
  white-space: nowrap;
}
.contact-inner { position: relative; z-index: 1; }
.contact .eyebrow { color: #147a61; }
.contact h2 { margin-bottom: 1.5rem; font-size: clamp(2.5rem, 6vw, 6rem); letter-spacing: -.05em; }
.contact p:not(.eyebrow) { color: #606b74; }
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}
.contact-links a {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  min-width: min(100%, 270px);
  padding: 1rem 1.2rem;
  border: 1px solid #c9ceca;
  font-size: .84rem;
  font-weight: 700;
  transition: background .25s ease, color .25s ease;
}
.contact-links a:hover { background: var(--paper-ink); color: white; }
.contact-links span { color: #16886a; }

footer {
  display: flex;
  justify-content: space-between;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding: 1.5rem clamp(1.25rem, 8vw, 9rem);
  color: var(--muted);
  font-size: .72rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr .55fr; padding-left: 5vw; padding-right: 5vw; }
  .code-card { display: none; }
  .section { grid-template-columns: 40px 1fr; }
  .section-heading { grid-column: 2; }
  .section > :nth-child(n+3) { grid-column: 2; }
  .tool-cloud { grid-column: 2; }
}

@media (max-width: 1050px) {
  .project-card {
    min-height: auto;
    padding: clamp(1.5rem, 5vw, 2.5rem);
  }
  .project-card h3 {
    max-width: 18ch;
    font-size: clamp(1.75rem, 5vw, 2.8rem);
  }
}

@media (max-width: 760px) {
  .site-header { position: absolute; padding: 1rem 1.25rem; }
  .logo-text { display: none; }
  .menu-toggle {
    position: relative;
    z-index: 2;
    display: grid;
    gap: .38rem;
    width: 2.7rem;
    height: 2.7rem;
    place-content: center;
    border: 1px solid var(--line);
    background: var(--dark);
    color: white;
  }
  .menu-toggle span:not(.sr-only) { width: 1.25rem; height: 1px; background: currentColor; transition: transform .25s ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }
  nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(11,18,32,.98);
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  nav.open { transform: none; }
  nav a { font-size: 1.1rem; }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 4rem;
    padding: 8.5rem 1.25rem 5rem;
  }
  .hero-copy { order: 1; }
  .portrait-wrap { order: 2; width: min(80%, 330px); }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .quick-facts { gap: 1rem; justify-content: space-between; }
  .quick-facts div { padding-left: .7rem; }
  .quick-facts dd { font-size: .58rem; }
  .section {
    display: block;
    padding: 5rem 1.25rem;
  }
  .section-number { margin-bottom: 1.5rem; }
  .section-heading { margin-bottom: 3rem; }
  .skill-grid { grid-template-columns: 1fr; }
  .service-list { grid-template-columns: 1fr; }
  .timeline::before { left: 5px; }
  .timeline-item { grid-template-columns: 12px 1fr; gap: 1.1rem; }
  .timeline-date { grid-column: 2; order: 2; padding: 0; }
  .timeline-marker { grid-column: 1; grid-row: 1 / span 3; margin-top: .3rem; }
  .timeline-content { grid-column: 2; order: 3; }
  .contact-links { flex-direction: column; }
  footer { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
