/* ============================================================
   EMRE BEKTAŞ — PORTFOLIO STYLESHEET
   Premium minimal design · Black/white/gray palette
   ============================================================ */

/* ======================== VARIABLES ======================== */
:root {
  /* --- Light theme --- */
  --bg-primary:    #FAFAFA;
  --bg-secondary:  #F0F0F2;
  --bg-card:       #FFFFFF;
  --bg-card-hover: #FFFFFF;

  --text-primary:   #111111;
  --text-secondary: #555555;
  --text-muted:     #999999;

  --accent:        #6366F1;
  --accent-soft:   rgba(99, 102, 241, 0.10);
  --accent-hover:  #4F46E5;

  --border:        rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  --shadow-sm:  0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 14px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.08);

  --nav-bg:     rgba(250,250,250,.82);
  --nav-blur:   saturate(180%) blur(16px);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: .28s cubic-bezier(.4,0,.2,1);
}

/* --- Dark theme --- */
[data-theme="dark"] {
  --bg-primary:    #0D0D0F;
  --bg-secondary:  #151518;
  --bg-card:       #1A1A1F;
  --bg-card-hover: #222228;

  --text-primary:   #F0F0F2;
  --text-secondary: #A0A0AA;
  --text-muted:     #666670;

  --accent:        #818CF8;
  --accent-soft:   rgba(129, 140, 248, 0.10);
  --accent-hover:  #A5B4FC;

  --border:        rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  --shadow-sm:  0 1px 3px rgba(0,0,0,.25);
  --shadow-md:  0 4px 14px rgba(0,0,0,.30);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.40);

  --nav-bg:     rgba(13,13,15,.82);
}


/* ======================== RESET & BASE ======================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
}

/* ======================== CONTAINER ======================== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* ======================== NAVIGATION ======================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: .25rem;
}

.nav-link {
  padding: .5rem .85rem;
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text-primary);
  transition: background var(--transition), color var(--transition);
}

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

/* Show/hide sun/moon icons */
[data-theme="light"] #themeIconDark  { display: none; }
[data-theme="dark"]  #themeIconLight { display: none; }

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ======================== BUTTONS ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(99,102,241,.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.btn-sm {
  padding: .45rem 1rem;
  font-size: .8rem;
}

.btn-lg {
  padding: .9rem 2rem;
  font-size: 1rem;
}


/* ======================== HERO ======================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1120px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  max-width: 580px;
}

.hero-badge {
  display: inline-block;
  padding: .35rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50px;
  margin-bottom: 1.25rem;
  letter-spacing: .3px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: .75rem;
}

.highlight {
  background: linear-gradient(135deg, var(--accent) 0%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.hero-description {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Hero image */
.hero-image-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0;
}

.hero-image-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--border);
  animation: ring-pulse 4s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { opacity: .4; transform: scale(1); }
  50%      { opacity: .15; transform: scale(1.04); }
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow-lg);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  color: var(--text-muted);
  animation: bounce 2.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}


/* ======================== SECTIONS ======================== */
.section {
  padding: 6rem 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.5px;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 4px;
  margin: 1rem auto 0;
}


/* ======================== ABOUT ======================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: .975rem;
  line-height: 1.8;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.highlight-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.highlight-card i {
  font-size: 1.7rem;
  color: var(--accent);
  flex-shrink: 0;
}

.highlight-card h4 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .15rem;
}

.highlight-card p {
  font-size: .8rem;
  color: var(--text-muted);
}


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

.skill-group {
  padding: 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.skill-group:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.skill-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  margin-bottom: .75rem;
}

.skill-group-title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .85rem;
}

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

.skill-tag {
  display: inline-block;
  padding: .3rem .7rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.skill-group:hover .skill-tag {
  border-color: var(--accent-soft);
}


/* ======================== TIMELINE ======================== */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-strong);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 1.2rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1rem;
  transform: translateX(-50%);
  z-index: 1;
  transition: background var(--transition);
}

[data-theme="dark"] .timeline-marker {
  background: var(--bg-secondary);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.timeline-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.timeline-type {
  display: inline-block;
  padding: .2rem .6rem;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .5rem;
}

.timeline-type--work {
  background: rgba(99, 102, 241, .10);
  color: var(--accent);
}

.timeline-type--edu {
  background: rgba(34, 197, 94, .10);
  color: #22C55E;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.timeline-role {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-bottom: .6rem;
}

.timeline-details {
  padding-left: 1.1rem;
}

.timeline-details li {
  position: relative;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
  line-height: 1.6;
  list-style: disc;
}


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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.project-image-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.project-image-wrapper.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  color: #fff;
  font-size: 1.6rem;
}

.project-card:hover .project-image-overlay {
  opacity: 1;
}

.project-content {
  padding: 1.4rem 1.5rem;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.project-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: .9rem;
  line-height: 1.65;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: 1rem;
}

.project-tags span {
  padding: .22rem .6rem;
  font-size: .72rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50px;
}

.project-links {
  display: flex;
  gap: .5rem;
}

/* Upcoming project card */
.project-card--upcoming {
  opacity: .7;
  border-style: dashed;
}

.project-card--upcoming:hover {
  opacity: 1;
}


/* ======================== CERTIFICATES ======================== */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.certificate-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.certificate-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.certificate-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.certificate-info h4 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .15rem;
}

.certificate-info p {
  font-size: .8rem;
  color: var(--text-muted);
}


/* ======================== CONTACT ======================== */
.contact-wrapper {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-cards {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), color var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.contact-card i {
  font-size: 1.3rem;
}


/* ======================== FOOTER ======================== */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

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

.footer-copy {
  font-size: .8rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: .75rem;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.footer-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}


/* ======================== ANIMATIONS ======================== */

/* Fade-up entrance (triggered by JS IntersectionObserver) */
.anim-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}

.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ======================== RESPONSIVE ======================== */

/* Tablet */
@media (max-width: 900px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-content { max-width: 100%; }

  .hero-cta { justify-content: center; }

  .hero-image-wrapper {
    width: 220px;
    height: 220px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

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

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

/* Mobile */
@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s ease, opacity .35s ease;
    z-index: 999;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1.1rem;
    padding: .8rem 1.5rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    padding: 6rem 1.25rem 2rem;
    min-height: auto;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-image-wrapper {
    width: 180px;
    height: 180px;
  }

  .section {
    padding: 4rem 0;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .certificates-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    justify-content: center;
  }

  .contact-cards {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-card {
    justify-content: center;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-marker {
    left: -2rem;
    width: 30px;
    height: 30px;
    font-size: .85rem;
  }
}
