/* =========================================================
   Valmir Malokaj – Portfolio
   styles.css – Graphite / Mint
   ========================================================= */

:root {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #0b0c0f;
  --surface: #121418;
  --surface-2: #181b21;
  --line: #23262d;
  --line-strong: #2e323b;

  --ink: #f5f6f8;
  --ink-2: #b4b9c3;
  --muted: #7c828f;

  --accent: #3ddc97;
  --accent-ink: #0b0c0f;
  --accent-soft: rgba(61, 220, 151, 0.08);
  --accent-line: rgba(61, 220, 151, 0.35);

  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --measure: 62ch;
  --wrap: 1180px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }

p { max-width: var(--measure); text-wrap: pretty; }

a { color: var(--ink); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

code {
  font-family: var(--font-mono);
  font-size: .85em;
  color: var(--ink-2);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ---------- Labels ---------- */
.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #5ee6ab; color: var(--accent-ink); }

.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-2); background: var(--surface); color: var(--ink); }

/* ---------- Progress ---------- */
.progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: var(--accent);
  z-index: 1000;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  height: 68px;
  padding: 0 40px;
  background: rgba(11, 12, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent);
  background: var(--surface);
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }

.nav { display: flex; gap: 6px; }
.nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: var(--radius);
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.is-active { color: var(--ink); }
.nav a.is-active::after {
  content: ""; position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 1px; background: var(--accent);
}

.header-cta { height: 38px; padding: 0 16px; font-size: 13px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  cursor: pointer; padding: 0 10px;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--ink); transition: transform .25s var(--ease), opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Layout ---------- */
main { display: block; }

.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 112px 40px;
  border-top: 1px solid var(--line);
}

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head .label { display: block; margin-bottom: 18px; }
.section-head h2 { margin-bottom: 14px; }
.section-sub { color: var(--ink-2); font-size: 16px; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 112px 40px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 80px;
  align-items: center;
}

.hero-title { margin-bottom: 24px; }
.hero-title em { font-style: normal; color: var(--accent); }

.hero-lead { font-size: 17px; color: var(--ink-2); margin-bottom: 36px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-facts > div { padding: 18px 20px 18px 0; }
.hero-facts > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.hero-facts dt {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.hero-facts dd { font-size: 14px; color: var(--ink); display: flex; align-items: center; }

.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 8px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero-portrait { margin: 0; }
.portrait-placeholder {
  display: grid; place-items: center; gap: 12px;
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px; line-height: 1.5; text-align: center;
  padding: 24px;
}
.portrait-placeholder svg { width: 45%; height: auto; color: var(--line-strong); }
.hero-portrait img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  filter: grayscale(1) contrast(1.05);
  transition: filter .5s var(--ease);
}
.hero-portrait:hover img { filter: none; }
.hero-portrait figcaption {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px; font-size: 13px; color: var(--muted);
}

/* ---------- Über mich ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 80px;
  align-items: start;
}
.about-copy p { color: var(--ink-2); font-size: 16.5px; line-height: 1.75; }
.about-copy p + p { margin-top: 20px; }

.about-note {
  margin-top: 36px;
  padding: 22px 24px;
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  max-width: var(--measure);
}
.about-note .label { display: block; color: var(--accent); margin-bottom: 10px; }
.about-note p { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.about-note strong { color: var(--ink); font-family: var(--font-display); font-size: 17px; }

.about-stats {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  position: sticky; top: 100px;
}
.stat { padding: 26px 24px; }
.stat + .stat { border-top: 1px solid var(--line); }
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 40px; font-weight: 600;
  letter-spacing: -0.03em; line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.stat-label { font-size: 13px; color: var(--muted); }

/* ---------- Skills ---------- */
.skills-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 80px;
  align-items: start;
}

.skills-figure {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  position: sticky; top: 100px;
}
.skills-figure svg { display: block; width: 100%; height: auto; color: var(--ink-2); }
.fig-layer { transition: color .25s var(--ease), opacity .25s var(--ease); color: var(--ink-2); }
.fig-layer.is-lit { color: var(--accent); }
.skills-figure:has(.is-lit) .fig-layer:not(.is-lit) { opacity: .35; }
.fig-title { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: .04em; fill: currentColor; }
.fig-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; fill: var(--muted); }
.skills-figure figcaption { margin-top: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.skills-figure figcaption .label { margin-right: 8px; }

.skills-list { list-style: none; border-top: 1px solid var(--line); }
.skill {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease);
}
.skill-head { display: flex; flex-direction: column; gap: 6px; }
.skill h3 { font-size: 16px; }
.skill-tag {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.skill p { font-size: 15px; color: var(--ink-2); }

/* ---------- Projekte ---------- */
.projects-list { border-top: 1px solid var(--line); }

.project {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 220px;
  gap: 32px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  transition: background .2s var(--ease);
}
.project:hover { color: inherit; }
a.project:hover .project-title { color: var(--accent); }
a.project:hover .project-arrow { color: var(--accent); transform: translate(2px, -2px); }

.project.is-placeholder { cursor: default; }
.project.is-placeholder .project-title,
.project.is-placeholder .project-desc { color: var(--muted); }
.project.is-placeholder .project-arrow { opacity: .3; }

.project-index {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--muted);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.project-title { font-size: 20px; margin-bottom: 8px; transition: color .2s var(--ease); }
.project-desc { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tag {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .04em;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink-2);
}

.project-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  text-align: right;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.project-url { color: var(--ink-2); word-break: break-all; }
.project-note { font-style: italic; }
.project-arrow {
  width: 20px; height: 20px; margin-top: auto;
  color: var(--ink-2);
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.project-arrow svg { width: 100%; height: 100%; }
.projects-empty { padding: 40px 0; color: var(--muted); }

/* ---------- Noten ---------- */
.grades-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--line-strong);
  font-variant-numeric: tabular-nums;
}
.grades-table th {
  padding: 14px 16px 14px 0;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.grades-table td {
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink-2);
  font-size: 15px;
}
.grades-table tbody tr { transition: background .2s var(--ease); }
.grades-table tbody tr:hover { background: var(--surface); }

.grades-table .mod { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; width: 120px; }
.grades-table .num { text-align: right; }
.grades-table .grade { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); width: 80px; }
.grades-table .grade.is-top { color: var(--accent); }
.grades-table .bar-col { width: 26%; padding-left: 32px; padding-right: 0; }

.grade-bar {
  display: block; height: 4px; width: var(--w, 0%);
  background: var(--ink-2); border-radius: 2px;
  transition: width .9s var(--ease);
}
tr:has(.is-top) .grade-bar { background: var(--accent); }

.grades-table tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; color: var(--ink); padding-top: 22px; }
.grades-table tfoot .mod { color: var(--ink); }
.grades-table .grade.is-avg { font-size: 26px; color: var(--accent); }
.grade-bar.is-avg { height: 6px; background: var(--accent); }

.grades-note { margin-top: 20px; font-size: 13px; color: var(--muted); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Werdegang ---------- */
.timeline { list-style: none; max-width: 820px; border-top: 1px solid var(--line); }

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  padding: 30px 0 30px 28px;
  border-bottom: 1px solid var(--line);
}
.timeline-item::before {
  content: "";
  position: absolute; left: 0; top: 38px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
}
.timeline-item.is-current::before {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding-top: 4px;
}
.timeline-body h3 { font-size: 17px; margin-bottom: 4px; }
.timeline-org { font-size: 13.5px; color: var(--accent); margin-bottom: 10px; }
.timeline-body p:last-child { font-size: 15px; color: var(--ink-2); }

/* ---------- Kontakt ---------- */
.section-contact {
  background: var(--surface);
  max-width: none;
  padding-left: 0; padding-right: 0;
}
.contact-grid {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: start;
}
.contact-grid .section-head { margin-bottom: 0; }

.contact-list { border-top: 1px solid var(--line-strong); }
.contact-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-strong);
  align-items: center;
}
.contact-row dt {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.contact-row dd { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 15px; color: var(--ink); }
.contact-row a { color: var(--ink); font-weight: 500; }
.contact-row a:hover { color: var(--accent); }

.copy-btn {
  height: 28px; padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.copy-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.copy-btn.is-copied { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 1000;
  padding: 12px 16px;
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 500;
  opacity: 0; transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px 40px 40px;
  font-size: 13px; color: var(--muted);
}
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .grade-bar { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
  .skills-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 48px; }
  .about-grid { gap: 48px; }
}

@media (max-width: 820px) {
  .site-header { padding: 0 20px; height: 60px; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .nav {
    display: none;
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    padding: 12px 20px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; font-size: 15px; }
  .nav a.is-active::after { display: none; }

  .hero { grid-template-columns: 1fr; gap: 48px; padding: 64px 20px 80px; }
  .hero-portrait { order: -1; max-width: 320px; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts > div { padding: 14px 0; }
  .hero-facts > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }

  .section { padding: 72px 20px; }
  .section-head { margin-bottom: 40px; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-stats { position: static; display: grid; grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 18px 16px; }
  .stat + .stat { border-top: 0; border-left: 1px solid var(--line); }
  .stat-value { font-size: 28px; }

  .skills-layout { grid-template-columns: 1fr; gap: 40px; }
  .skills-figure { position: static; }
  .skill { grid-template-columns: 1fr; gap: 8px; }

  .project { grid-template-columns: 40px minmax(0, 1fr); gap: 16px 20px; }
  .project-meta {
    grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start;
    flex-wrap: wrap; gap: 12px; text-align: left;
  }
  .project-arrow { margin-top: 0; margin-left: auto; }

  .grades-table thead { display: none; }
  .grades-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .grades-table td { display: block; padding: 0; border: 0; width: auto; }
  .grades-table .mod { grid-column: 1; }
  .grades-table .grade { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .grades-table .bar-col { grid-column: 1 / -1; padding: 10px 0 0; }
  .grades-table tfoot tr { border-top: 1px solid var(--line-strong); }

  .timeline-item { grid-template-columns: 1fr; gap: 8px; padding-left: 24px; }
  .timeline-item::before { top: 36px; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; padding: 0 20px; }
  .contact-row { grid-template-columns: 1fr; gap: 8px; }

  .site-footer { padding: 28px 20px 36px; flex-direction: column; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .hero-actions .btn { width: 100%; }
}