:root {
  --bg: #0c0504;
  --surface: #150705;
  --surface-2: #21100b;
  --surface-3: #2a1510;
  --text: #fff2e9;
  --muted: #c8a99a;
  --soft: #87695d;
  --line: rgba(255, 153, 102, 0.18);
  --line-strong: rgba(255, 153, 102, 0.36);
  --red: #d9362b;
  --orange: #ff7a1a;
  --amber: #ffb05c;
  --green: #67d391;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(217, 54, 43, 0.24), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(255, 122, 26, 0.16), transparent 32%),
    linear-gradient(180deg, #070302 0%, var(--bg) 42%, #120605 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -48px;
  z-index: 10000;
  background: var(--orange);
  color: #170602;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}

#progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--amber));
  z-index: 9999;
}

#matrixCanvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.42;
  pointer-events: none;
}

.cursor-dot {
  position: fixed;
  z-index: 9998;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--orange);
  box-shadow: 0 0 18px rgba(255, 122, 26, 0.75);
  transform: translate(-50%, -50%);
  animation: cursorFade 0.7s ease forwards;
}

@keyframes cursorFade {
  from {
    opacity: 0.85;
    transform: translate(-50%, -40%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -150%) scale(0.3);
  }
}

.istanbul-clock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(15, 5, 3, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.istanbul-clock span {
  display: block;
  color: var(--soft);
  font-size: 0.68rem;
}

.istanbul-clock strong {
  display: block;
  color: var(--amber);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 44px);
  background: rgba(9, 4, 3, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(217, 54, 43, 0.24), rgba(255, 122, 26, 0.18));
  color: var(--amber);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.brand-text {
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.nav a,
.header-link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 0.92rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.nav a.active,
.header-link:hover {
  color: var(--text);
  background: rgba(255, 122, 26, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-select {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-2);
  border-radius: 7px;
  padding: 8px 10px;
}

.section {
  position: relative;
  padding: clamp(72px, 10vw, 118px) clamp(18px, 4vw, 44px);
}

.section > *,
.hero-grid,
.proof-grid,
.site-footer {
  max-width: var(--max);
  margin-inline: auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.eyebrow {
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 0.78rem;
  margin: 0 0 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.98;
  margin-bottom: 22px;
  letter-spacing: 0;
}

h1 strong {
  display: block;
  color: transparent;
  background: linear-gradient(135deg, #fff1e7, var(--orange) 44%, #ff5147);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lede {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
}

.btn.primary {
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  box-shadow: 0 18px 44px rgba(217, 54, 43, 0.26);
}

.btn.secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn:hover,
.mini-btn:hover {
  transform: translateY(-1px);
}

.availability-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 590px;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid rgba(103, 211, 145, 0.28);
  background: rgba(103, 211, 145, 0.08);
  border-radius: var(--radius);
}

.availability-card p {
  color: var(--muted);
  margin: 4px 0 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(103, 211, 145, 0.1);
  flex: 0 0 auto;
}

.terminal-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.08), transparent),
    rgba(5, 2, 1, 0.8);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.identity-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(217, 54, 43, 0.16), rgba(255, 122, 26, 0.08)),
    rgba(255, 255, 255, 0.026);
}

.identity-card img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 176, 92, 0.48);
  box-shadow: 0 0 0 8px rgba(255, 122, 26, 0.08);
}

.identity-card strong {
  display: block;
  font-size: 1.35rem;
}

.identity-card span {
  display: block;
  color: var(--muted);
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-top span:nth-child(1) { background: #ff5147; }
.terminal-top span:nth-child(2) { background: #ffb05c; }
.terminal-top span:nth-child(3) { background: #67d391; }

.terminal-top p {
  margin: 0 0 0 auto;
  color: var(--soft);
  font: 0.78rem "JetBrains Mono", Consolas, monospace;
}

.terminal-body {
  padding: 22px;
  font: 0.92rem/1.8 "JetBrains Mono", Consolas, monospace;
}

.terminal-body.compact {
  min-height: 242px;
  max-height: 320px;
  overflow: auto;
}

.terminal-body p {
  margin: 0 0 6px;
}

.terminal-body b {
  color: var(--orange);
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 22px;
}

.terminal-action {
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 122, 26, 0.08);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
}

.terminal-action:hover {
  border-color: var(--orange);
  background: rgba(255, 122, 26, 0.16);
}

.terminal-workbench {
  grid-column: 1 / -1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.08), transparent),
    rgba(5, 2, 1, 0.78);
  overflow: hidden;
}

.terminal-command {
  color: var(--orange);
}

.terminal-muted {
  color: var(--soft);
}

.terminal-value {
  color: var(--amber);
  padding-left: 18px;
}

.typing::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 4px;
  background: var(--orange);
  vertical-align: -0.18em;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

.proof-band {
  padding-block: 26px;
  border-block: 1px solid var(--line);
  background: rgba(255, 122, 26, 0.035);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.proof-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.028);
}

.proof-item span {
  display: block;
  color: var(--orange);
  font: 900 1.7rem "JetBrains Mono", Consolas, monospace;
}

.proof-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4.6vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 1.04rem;
}

.alt {
  background: linear-gradient(180deg, rgba(255, 122, 26, 0.045), rgba(217, 54, 43, 0.035));
  border-block: 1px solid var(--line);
}

.about-grid,
.cv-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.panel,
.project-card,
.lab-card,
.skill-panel,
.timeline-item {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
  border-radius: var(--radius);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.16);
}

.panel {
  padding: 24px;
}

.panel h3,
.skill-panel h3,
.lab-card h3 {
  margin-bottom: 12px;
}

.panel p {
  color: var(--muted);
}

.profile-facts dl {
  margin: 0;
}

.profile-facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.profile-facts div:last-child {
  border-bottom: 0;
}

.profile-facts dt {
  color: var(--soft);
  font-weight: 800;
}

.profile-facts dd {
  margin: 0;
  color: var(--text);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter {
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.filter.active,
.filter:hover {
  color: var(--text);
  border-color: var(--orange);
  background: rgba(255, 122, 26, 0.12);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  padding: 20px;
  display: flex;
  min-height: 370px;
  flex-direction: column;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover,
.lab-card:hover,
.skill-panel:hover {
  border-color: var(--line-strong);
}

.project-card.is-hidden {
  display: none;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.project-meta span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 800;
}

.project-card h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.project-card p,
.project-card li {
  color: var(--muted);
}

.project-card ul {
  padding-left: 18px;
  margin-bottom: 18px;
}

.project-card a {
  margin-top: auto;
  color: var(--orange);
  text-decoration: none;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.labs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lab-card {
  padding: 22px;
  min-width: 0;
}

.lab-card.wide {
  grid-column: 1 / -1;
}

.lab-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.lab-heading span {
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--amber);
  background: rgba(255, 176, 92, 0.1);
  font-weight: 800;
  font-size: 0.72rem;
}

.lab-card p,
.lab-card label {
  color: var(--muted);
}

.input,
.textarea {
  width: 100%;
  color: var(--text);
  background: #080302;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  outline: none;
}

.textarea {
  resize: vertical;
  min-height: 128px;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.input:focus,
.textarea:focus {
  border-color: var(--orange);
}

.meter {
  height: 9px;
  margin: 14px 0 10px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  transition: width 0.25s ease, background 0.25s ease;
}

.lab-output {
  min-height: 24px;
  margin-bottom: 0;
}

.mini-btn {
  min-height: 40px;
  padding: 0 14px;
  margin-top: 12px;
  border: 0;
  border-radius: var(--radius);
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red), var(--orange));
  cursor: pointer;
}

.code-output {
  min-height: 120px;
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #080302;
  color: var(--amber);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
  font: 0.86rem/1.6 "JetBrains Mono", Consolas, monospace;
}

.log-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.log-table th,
.log-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.log-table th {
  color: var(--amber);
  background: rgba(255, 122, 26, 0.08);
  font-size: 0.8rem;
}

.log-table td {
  color: var(--muted);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.82rem;
}

.skill-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.skill-panel {
  padding: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.84rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  max-width: 880px;
}

.timeline-item {
  position: relative;
  padding: 20px 20px 20px 24px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 3px;
  background: linear-gradient(var(--red), var(--orange));
  border-radius: 99px;
}

.timeline-item span {
  color: var(--orange);
  font-weight: 900;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.timeline-item p {
  color: var(--muted);
  margin-bottom: 0;
}

.cv-card h3 {
  font-size: 1.7rem;
}

.cv-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.cv-list div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
}

.cv-list strong {
  color: var(--amber);
}

.cv-list span {
  color: var(--muted);
}

.contact-section {
  padding-bottom: 80px;
}

.contact-cards {
  display: grid;
  gap: 12px;
}

.contact-cards a {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.026);
}

.contact-cards a:hover {
  border-color: var(--orange);
}

.contact-cards strong {
  color: var(--text);
}

.contact-cards span {
  color: var(--orange);
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(18px, 4vw, 44px);
  border-top: 1px solid var(--line);
  color: var(--soft);
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .project-grid,
  .skill-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 880px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    justify-content: stretch;
    flex-direction: column;
  }

  .nav.open {
    display: flex;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .hero-grid,
  .about-grid,
  .cv-grid,
  .contact-grid,
  .labs-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .identity-card {
    grid-template-columns: 74px 1fr;
  }

  .identity-card img {
    width: 74px;
    height: 74px;
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: 64px;
  }

  .hero {
    min-height: auto;
  }

  .project-grid,
  .skill-columns,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 0;
  }

  .profile-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .site-footer {
    display: grid;
  }

  .istanbul-clock {
    display: none;
  }

  .terminal-actions {
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .cursor-dot,
  #matrixCanvas {
    display: none;
  }
}
