/* Tema: açık / koyu — tasarım referanslarına uygun değişkenler */
:root,
[data-theme="light"] {
  --bg: #ffffff;
  --bg-muted: #f8f9fa;
  --bg-elevated: #f3f4f6;
  --text: #111827;
  --text-muted: #4b5563;
  --accent: #4f46e5;
  --label: #0d9488;
  --border: #e5e7eb;
  --header-bg: rgba(255, 255, 255, 0.85);
  --btn-primary-fg: #ffffff;
  --btn-outline-fg: var(--accent);
  --cta-top: linear-gradient(90deg, var(--accent), #7c3aed);
  --shadow: 0 18px 50px -24px rgba(17, 24, 39, 0.25);
  --shadow-card: 0 10px 40px -20px rgba(17, 24, 39, 0.18);
  --radius: 12px;
  --radius-lg: 16px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --max-w: 1120px;
}

[data-theme="dark"] {
  --bg: #0b0e14;
  --bg-muted: #12161f;
  --bg-elevated: #151a24;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #a5a6f6;
  --label: #5eead4;
  --border: #1e293b;
  --header-bg: rgba(11, 14, 20, 0.88);
  --btn-primary-fg: #0b0e14;
  --btn-outline-fg: var(--text);
  --cta-top: linear-gradient(90deg, #5eead4, var(--accent));
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 12px 40px -18px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(100% - 2.5rem, var(--max-w));
  margin-inline: auto;
}

.text-accent {
  color: var(--accent);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0 0 1rem;
}

.eyebrow--center {
  text-align: center;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  max-width: min(100% - 2.5rem, calc(var(--max-w) + 2rem));
  margin-inline: auto;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--accent);
  text-decoration: none;
}

.logo--footer {
  color: var(--text);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-icon {
  display: grid;
  place-items: center;
}

.theme-icon[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .header-inner {
    gap: 0.75rem;
  }

  .nav {
    flex: 1;
    justify-content: flex-end;
    gap: 0.65rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* Sections */
.section {
  padding: clamp(4rem, 10vw, 6.5rem) 0;
}

.hero {
  padding-top: clamp(3rem, 8vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    max-width: 420px;
    margin-inline: auto;
  }
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.hero-desc {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--btn-primary-fg);
  border: 2px solid transparent;
}

.btn-outline {
  background: transparent;
  color: var(--btn-outline-fg);
  border: 2px solid var(--accent);
}

.hero-photo-wrap {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-photo {
  width: 100%;
  aspect-ratio: 520 / 620;
  object-fit: cover;
  background: var(--bg-elevated);
}

/* About */
.about {
  background: var(--bg-muted);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.about-body {
  color: var(--text-muted);
}

.about-body p {
  margin: 0 0 1rem;
}

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

/* Skills */
.section-head {
  margin-bottom: 2.5rem;
}

.section-head--center {
  text-align: center;
}

.section-head--center h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-head--row h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.link-arrow {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
}

.link-arrow:hover {
  text-decoration: underline;
}

.skills-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.875rem;
}

@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.skill-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 0.75rem;
  text-align: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.skill-name {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.skill-cat {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: var(--shadow-card);
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon {
  color: var(--accent);
}

.project-code-icon {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.project-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.project-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags li {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--label);
  border: 1px solid var(--border);
}

[data-theme="dark"] .project-tags li {
  color: var(--accent);
}

/* CTA */
.cta .container {
  max-width: min(100% - 2.5rem, 900px);
}

.cta-box {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cta-top);
}

.cta-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.cta-desc {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.cta-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.cta-email:hover {
  text-decoration: underline;
}

.cta-socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
}

.cta-socials a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}

.cta-socials a:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--bg-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}
