/* =====================================
   Berkay Arda — Portfolio Styles
   ===================================== */

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

:root {
  --bg: #0a0a0a;
  --bg-2: #050505;
  --card: rgba(255, 255, 255, 0.06);
  --card-2: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.10);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.75);
  --accent: #7b28b3;
  --accent-2: #27ae60;
  --accent-glow: rgba(137, 9, 139, 0.35);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* prevents fixed navbar from covering anchor targets */
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.2px;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  padding: 0.4rem 0.2rem;
  position: relative;
  transition: 0.25s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 5px auto;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 5%;
}

.section-head {
  max-width: 980px;
  margin: 0 auto 2.2rem;
}

.section-head h2 {
  font-size: 2.1rem;
  letter-spacing: -0.4px;
}

.section-head p {
  margin-top: 0.6rem;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
  padding: 9rem 5% 4rem;
  background:
    radial-gradient(circle at 18% 18%, var(--accent-glow) 0%, transparent 38%),
    radial-gradient(circle at 85% 25%, rgba(39, 174, 96, 0.22) 0%, transparent 35%);
}

.eyebrow {
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 4.2vw, 4rem);
  line-height: 1.08;
  margin-bottom: 0.6rem;
}

.accent-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.highlight {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.4rem 0 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.1px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
}

.quick-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.84);
  font-weight: 650;
}

.hero-image {
  display: grid;
  place-items: center;
  perspective: 900px;
  animation: avatarFloat 7s ease-in-out infinite;
  will-change: transform;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image { animation: none; }
  .profile-img { transition: none; }
}

.profile-img {
  width: min(420px, 78vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 70px rgba(123, 40, 179, 0.25);
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 250ms ease;
  will-change: transform;
  transform: translateZ(0);
}

/* ---------- Skills ---------- */
.skills {
  background: var(--bg-2);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.skill-card {
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  transition: 0.25s ease;
}

.skill-card:hover {
  border-color: rgba(123, 40, 179, 0.45);
  box-shadow: 0 18px 55px rgba(123, 40, 179, 0.18);
  transform: translateY(-4px);
}

.skill-card i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.skill-card h3 {
  margin-bottom: 0.35rem;
}

.skill-card p {
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Experience ---------- */
.timeline {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 1.2rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 1rem;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 1.2rem;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(123, 40, 179, 0.18);
}

.timeline-card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.timeline-card .meta {
  color: rgba(255, 255, 255, 0.68);
  margin: 0.25rem 0 0.8rem;
  font-weight: 650;
}

.timeline-card ul {
  padding-left: 1.2rem;
}

.timeline-card li {
  margin: 0.25rem 0;
  color: rgba(255, 255, 255, 0.84);
}

/* ---------- Projects ---------- */
.projects {
  background: var(--bg);
}

.category-heading {
  max-width: 1100px;
  margin: 2rem auto 0.6rem;
  color: rgba(255, 255, 255, 0.88);
}

.project-card {
  max-width: 1100px;
  margin: 1rem auto;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--card-2);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: 0.25s ease;
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.45);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.project-header h3 {
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.28rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.chip {
  font-size: 0.82rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.expand-btn {
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.expand-btn:hover {
  border-color: rgba(123, 40, 179, 0.45);
}

.project-info {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.25s ease;
}

.project-card.active .project-info {
  max-height: 5000px;
  opacity: 1;
  margin-top: 1rem;
}

.project-info p,
.project-info li {
  color: rgba(255, 255, 255, 0.84);
}

.project-info a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  text-decoration: none;
}

.project-info a:hover {
  text-decoration: underline;
}

.project-info ul {
  padding-left: 1.2rem;
  margin: 0.7rem 0 0.2rem;
}

.project-video {
  margin-top: 1rem;
}

.project-video video {
  width: 100%;
  max-width: 720px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* Horizontal Image Gallery */
.image-gallery {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 1rem 0 0.2rem;
  scroll-snap-type: x mandatory;
}

.image-gallery img {
  width: 260px;
  height: auto;
  border-radius: 14px;
  flex-shrink: 0;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.10);
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

.image-gallery img:hover {
  transform: scale(1.02);
}

/* ---------- Contact ---------- */
.contact {
  background: var(--bg-2);
}

.contact-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: 0.25s ease;
}

.contact-card:hover {
  border-color: rgba(39, 174, 96, 0.35);
  transform: translateY(-3px);
}

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

.contact-card p {
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Footer ---------- */
.footer {
  padding: 2.4rem 5%;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #060606;
}

.social-links {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.social-links a {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.86);
  transition: 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 92%;
  max-height: 92%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.20);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 42px;
  color: white;
  cursor: pointer;
  z-index: 10001;
  background: transparent;
  border: none;
}

.nav-arrow {
  cursor: pointer;
  position: absolute;
  top: 50%;
  font-size: 56px;
  color: white;
  padding: 10px 18px;
  user-select: none;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  z-index: 10001;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.prev-btn {
  left: 18px;
}

.next-btn {
  right: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 7.2rem;
    text-align: center;
  }

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

  .quick-badges {
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 5%;
    left: 5%;
    display: none;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.1rem;
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.6rem 0.4rem;
  }
}
