*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #181a1d;
  /* Very dark cool metal */
  --ink2: #505458;
  /* Flywheel / dark metal */
  --ink3: #8a9196;
  /* Connecting rod / medium blue-gray */
  --paper: #ffffff;
  /* Lighter than piston, ultra light silver */
  --cream: #f7f7f7;
  /* Piston / light aluminum background */
  --gold: #b8935a;
  /* Engine rim light / brass */
  --gold2: #ffa7339a;
  /* Spark orange */
  --line: #d0d5d9;
  /* Crankshaft / light chrome borders */
  --white: #ffffff;
}

/* --- LANGUAGE DISPLAY TOGGLE --- */
html[lang="tr"] .en {
  display: none !important;
}

html[lang="en"] .tr {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: transparent;
  color: var(--ink);
  overflow-x: hidden;
}

/* ── ENGINE CANVAS ── */
#engine-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

body.nav-on #engine-canvas {
  opacity: 0;
  pointer-events: none;
}

/* ── LANG BUTTON ── */
#langBtn {
  position: fixed;
  top: 1rem;
  right: 1.4rem;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(245, 244, 239, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  padding: .3rem .85rem;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink3);
  cursor: pointer;
  transition: border-color .2s, color .2s;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .07);
}

#langBtn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

#langBtn .flag {
  font-size: .82rem;
  line-height: 1;
}

body.nav-on #langBtn {
  top: .88rem;
}

/* ── TOP NAV ── */
#topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.4rem;
  height: 54px;
  background: var(--paper);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform .4s ease;
}

#topnav.visible {
  transform: translateY(0);
}

.nav-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  align-items: center;
  padding-right: 6rem;
}

.nav-links a {
  font-size: .74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink3);
  text-decoration: none;
  transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

/* ── CONTENT LAYER ── */
.content-layer {
  position: relative;
  z-index: 1;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .25;
}

.card {
  position: relative;
  width: 100%;
  max-width: 700px;
  background: var(--paper);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 12px 40px rgba(0, 0, 0, .07), 0 40px 80px rgba(0, 0, 0, .05);
  padding: 3.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
}

.card-eyebrow {
  font-size: .67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--gold);
  margin-bottom: .8rem;
}

.card-name {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
}

.card-title {
  font-size: .88rem;
  color: var(--ink3);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.card-contacts {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.card-contact-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  color: var(--ink2);
}

.card-contact-row svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.card-contact-row a {
  color: inherit;
  text-decoration: none;
}

.card-cv-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.6rem;
  padding: .55rem 1.2rem;
  border: 1px solid var(--gold);
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  text-decoration: none;
  transition: background .2s, color .2s;
  align-self: flex-start;
}

.card-cv-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.card-cv-btn:hover {
  background: var(--gold);
  color: var(--ink);
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--ink3);
  font-size: .67rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .2em;
  cursor: pointer;
  user-select: none;
}

.scroll-arrow {
  width: 17px;
  height: 17px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  margin-top: 5px;
}

/* ── SECTIONS ── */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.bg-alt {
  background: var(--cream);
}

.bg-dark {
  background: var(--ink);
}

.bg-clear {
  background: var(--paper);
}

.s-label {
  font-size: .67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--gold);
  margin-bottom: .5rem;
}

.s-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 3rem;
}

.s-title-light {
  color: #fff;
}

/* ABOUT */
.about-body {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink2);
  margin-bottom: 1.2rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-meta {
  display: flex;
  flex-direction: column;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-key {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink3);
  flex-shrink: 0;
}

.meta-val {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

/* EXPERIENCE */
.exp-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.exp-item:first-child {
  padding-top: 0;
}

.exp-item:last-child {
  border-bottom: none;
}

.exp-date {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  line-height: 1.4;
  padding-top: .15rem;
}

.exp-company {
  font-size: .75rem;
  color: var(--ink3);
  margin-top: .35rem;
  font-style: italic;
  line-height: 1.5;
}

.exp-role {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: .9rem;
  line-height: 1.25;
}

.exp-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.exp-points li {
  font-size: .87rem;
  color: var(--ink2);
  line-height: 1.65;
  padding-left: 1.1rem;
  position: relative;
}

.exp-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* EDUCATION */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.edu-card {
  border: 1px solid var(--line);
  padding: 1.8rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.edu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
}

.edu-year {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--gold);
  margin-bottom: .5rem;
}

.edu-school {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: .3rem;
  line-height: 1.25;
}

.edu-dept {
  font-size: .82rem;
  color: var(--ink3);
}

/* SKILLS */
.skills-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.skill-cat-title {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--gold);
  margin-bottom: 1.2rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.skill-tag {
  font-size: .8rem;
  font-weight: 500;
  padding: .4rem .9rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink2);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
}

.lang-row {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: .3rem;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
}

.lang-name {
  font-weight: 500;
  color: var(--ink2);
}

.lang-level {
  font-size: .7rem;
  color: var(--ink3);
  font-style: italic;
}

/* PROJECTS */
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.proj-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.proj-thumb {
  height: 120px;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
  position: relative;
}

.proj-thumb.c1 {
  background: linear-gradient(135deg, #16181b, #2a3240);
}

.proj-thumb.c2 {
  background: linear-gradient(135deg, #16181b, #3d2e1c);
}

.proj-thumb.c3 {
  background: linear-gradient(135deg, #151618, #2a2e33);
}

.proj-thumb.c4 {
  background: linear-gradient(135deg, #16181b, #4a2800);
}

.proj-num {
  font-family: 'DM Serif Display', serif;
  font-size: 3.5rem;
  color: rgba(255, 255, 255, .06);
  position: absolute;
  top: .3rem;
  right: 1rem;
  line-height: 1;
}

.proj-thumb-label {
  font-size: .64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--gold2);
  position: relative;
  z-index: 1;
}

.proj-body {
  padding: 1.5rem;
}

.proj-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: .6rem;
  line-height: 1.3;
}

.proj-desc {
  font-size: .82rem;
  color: var(--ink3);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.proj-tag {
  font-size: .63rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .55rem;
  background: var(--paper);
  color: var(--ink3);
  border-radius: 2px;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-intro {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--ink3);
  margin-bottom: 2.5rem;
}

.c-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #2e3238;
}

.c-row:last-child {
  border-bottom: none;
}

.c-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #363b42;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.c-icon svg {
  width: 15px;
  height: 15px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.c-label {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--ink3);
  font-weight: 600;
  margin-bottom: .15rem;
}

.c-val {
  font-size: .88rem;
  color: var(--line);
  font-weight: 500;
}

.c-val a {
  color: var(--line);
  text-decoration: none;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--gold);
  color: var(--ink);
  padding: .9rem 2rem;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.btn-gold:hover {
  background: var(--gold2);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: transparent;
  color: var(--ink3);
  padding: .9rem 2rem;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  text-decoration: none;
  border: 1px solid var(--ink2);
  transition: color .2s, border-color .2s;
}

.btn-ghost:hover {
  color: var(--line);
  border-color: var(--ink3);
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: .75rem;
  color: var(--ink3);
  background: var(--ink);
}

/* GEO/AI search visibility: visually hidden ordered list */
.sr-listicle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(100%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {

  .about-body,
  .edu-grid,
  .skills-body,
  .proj-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .nav-links {
    display: none;
    /* Hide topnav links on mobile for simplicity, or implement a hamburger menu later if needed */
  }

  .card {
    padding: 2rem;
  }
}