/*
 * Main stylesheet for Dr. Hakan Gonen's personal portfolio.
 * This file defines variables, global resets, layout styles,
 * responsive breakpoints and component styling. It is designed
 * to complement the dark, gradient aesthetic set out in the
 * project brief.
 */

:root {
  /* Primary colour palette and gradients */
  --gradient: linear-gradient(90deg, #a46cd6 0%, #ff6fd8 50%, #ffc54d 100%);
  --bg-gradient: radial-gradient(circle at top left, #05001c, #0e003a, #14004a, #1a0058, #220066);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.12);
  --primary-text: #ffffff;
  --secondary-text: #c5c5d2;
  --accent: #ff6fd8;

  /* Custom gradients for new colour scheme */
  /* Hero name gradient: 0% #6D00FB @60%, 44% #D726F2 @60%, 100% #FBE5AC @100% */
  --hero-name-gradient: linear-gradient(90deg, rgba(109, 0, 251, 0.6) 0%, rgba(215, 38, 242, 0.6) 44%, rgba(251, 229, 172, 1) 100%);
  /* Hero sub tagline gradient: 0% #FBE5AC @100%, 100% #D726F2 @60% */
  --hero-strategy-gradient: linear-gradient(90deg, rgba(251, 229, 172, 1) 0%, rgba(215, 38, 242, 0.6) 100%);
  /* Button gradient for hero and contact: 0% #FBE5AC @100%, 100% #6D00FB @60% */
  --btn-gradient: linear-gradient(90deg, rgba(251, 229, 172, 1) 0%, rgba(109, 0, 251, 0.6) 100%);
  /* Section titles and case headings gradient: 0% #D726F2 @60%, 100% #FBE5AC @100% */
  --title-gradient: linear-gradient(90deg, rgba(215, 38, 242, 0.6) 0%, rgba(251, 229, 172, 1) 100%);
  /* About text gradient: 0% #FBE5AC @100%, 100% #6D00FB @60% */
  --about-gradient: linear-gradient(90deg, rgba(251, 229, 172, 1) 0%, rgba(109, 0, 251, 0.6) 100%);

  /* Timeline circle gradient: 0% #FBE5AC @100% to 100% #6D00FB @60% */
  --timeline-circle-gradient: linear-gradient(90deg, rgba(251, 229, 172, 1) 0%, rgba(109, 0, 251, 0.6) 100%);

  /* Tag hover gradient: 0% #FBE5AC @100% to 100% #6D00FB @60% */
  --tag-hover-gradient: linear-gradient(90deg, rgba(251, 229, 172, 1) 0%, rgba(109, 0, 251, 0.6) 100%);
  /* Nav link hover gradient: same as tag hover */
  --nav-hover-gradient: linear-gradient(90deg, rgba(251, 229, 172, 1) 0%, rgba(109, 0, 251, 0.6) 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--primary-text);
  /* Use a solid black background across the site */
  background: #000;
  overflow-x: hidden;
}

/* Navbar styling */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Left and right margins of 120px on large screens */
  padding: 1rem 120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.navbar .nav-logo img {
  width: 40px;
  height: 40px;
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  /* Provide 70px gap between nav items (approx 4.375rem) */
  gap: 4.375rem;
}

.navbar .nav-links li a {
  position: relative;
  text-decoration: none;
  color: var(--secondary-text);
  font-size: 1rem;
  font-weight: 500;
  /* Smooth hover transition for nav links */
  transition: background 0.4s ease-in-out, color 0.4s ease-in-out, -webkit-text-fill-color 0.4s ease-in-out;
}

.navbar .nav-links li a:hover {
  /* Use gradient text on hover */
  background: var(--nav-hover-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar .nav-links li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.navbar .nav-links li a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--secondary-text);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Hero section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6rem 0 4rem;
  text-align: center;
  /* Override hero background to solid black */
  background: #000;
}

.hero h1 {
  /* Use Outfit light and a larger size for the heading */
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 5.56rem); /* 89px max */
  /* Apply custom gradient for the main heading */
  background: var(--hero-name-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.hero h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 1.375rem; /* 22px */
  color: var(--secondary-text);
  margin-bottom: 0.3rem;
}

.hero h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 1.375rem; /* 22px */
  /* Apply gradient to the strategy tagline */
  background: var(--hero-strategy-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
}

/* Generic button style used across the site (hero, about etc.) */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  /* Use new button gradient (FBE5AC to 6D00FB) */
  background: var(--btn-gradient);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 1rem; /* 16px */
  color: #000;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.25);
}

/* Generic section layout */
section {
  /* Provide generous top and bottom padding to separate sections from the fixed navbar */
  padding: 6rem 0;
  /* Provide large left/right margins instead of fixed widths */
  margin-left: 120px;
  margin-right: 120px;
  /* Ensure anchor scrolling positions the section below the fixed navbar */
  scroll-margin-top: 90px;
}

/* Center the contents of the contact section vertically and horizontally */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section-title {
  /* Make section titles uppercase with medium weight and 32px size */
  font-size: 2rem; /* 32px */
  font-weight: 500; /* medium */
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 3rem;
  /* Use new gradient for section titles */
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* About section */
.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.about-text {
  flex: 1.3;
}

.about-text p {
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
  /* Override gradient: set text colour to white */
  color: var(--primary-text);
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}

.tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Add spacing above the "View My Journey" button so it doesn’t hug the tags */
.journey-btn {
  display: inline-block;
  margin-top: 1.5rem;
}

.tag {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  /* Use a white stroke at 30% opacity for keyword tags */
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--secondary-text);
  font-size: 0.85rem;
  cursor: pointer;
  /* Smooth hover transition for tags */
  transition: background 0.4s ease-in-out, color 0.4s ease-in-out, border-color 0.4s ease-in-out;
}

.tag:hover {
  /* Apply gradient on hover */
  background: var(--tag-hover-gradient);
  color: #000;
  border-color: transparent;
}

/* Position the 'More…' link away from the timeline line to avoid overlap */
/* Align the "More…" link with the timeline items.
   Use left padding instead of margin so the vertical timeline line
   does not overlap with the text. */
.timeline-more {
  margin-top: 2rem;
  padding-left: 3.5rem;
}

.timeline-more a {
  font-size: 0.95rem;
  /* Remove underline */
  text-decoration: none;
  /* Apply gradient to "More…" link */
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Timeline (Work Experience) */
.timeline {
  position: relative;
  margin-left: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  width: 1px;
  height: 100%;
  /* White vertical line with 30% opacity */
  background: rgba(255, 255, 255, 0.3);
}

.timeline-item {
  position: relative;
  margin: 2.5rem 0;
  padding-left: 3.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0.3rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  /* Gradient for timeline circles */
  background: var(--timeline-circle-gradient);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.timeline-item h4 {
  font-size: 1.3rem;
  /* Light weight and italic for role titles */
  font-weight: 300;
  font-style: italic;
  color: var(--primary-text);
  margin-bottom: 0.2rem;
}

.timeline-item h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  /* Apply gradient to company names */
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.timeline-item .date {
  display: block;
  font-size: 0.85rem;
  color: var(--secondary-text);
  margin-bottom: 0.6rem;
}

.timeline-item ul {
  padding-left: 1rem;
}

.timeline-item ul li {
  position: relative;
  font-size: 0.95rem;
  color: var(--secondary-text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.timeline-item ul li::before {
  content: '\2022';
  position: absolute;
  left: -1rem;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 0;
  top: 0.5rem;
}

/* Selected Works */
.case-studies {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.case-card {
  flex: 1;
  min-width: 280px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
}

.case-card .logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.case-card .logo-title img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.case-card .logo-title h3 {
  font-size: 1.4rem;
  font-weight: 600;
  /* Use section title gradient for case study titles */
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.case-card .field {
  margin-top: 1.2rem;
}

.case-card .field h4 {
  font-size: 1rem;
  font-weight: 600;
  /* Apply gradient to field headings */
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
}

.case-card .field p {
  font-size: 0.95rem;
  color: var(--secondary-text);
  line-height: 1.5;
}

/* Metrics */
.metrics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.metric-box {
  flex: 1;
  min-width: 150px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.metric-box .number {
  font-size: 3rem; /* 48px */
  font-weight: 500; /* medium weight */
  margin-bottom: 0.4rem;
  /* Use the new gradient for metric numbers */
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-box .label {
  font-size: 1.5rem; /* 24px */
  font-weight: 200; /* extra light */
  color: var(--secondary-text);
  letter-spacing: 0.5px;
}

/* Contact Section */
.contact-form {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.contact-form p {
  font-size: 1rem;
  color: var(--secondary-text);
  margin-bottom: 2rem;
  line-height: 1.5;
}

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

.contact-form input,
.contact-form textarea {
  padding: 0.8rem 1rem;
  /* Increase the opacity slightly for better contrast */
  background: rgba(255, 255, 255, 0.06);
  /* Make borders lighter to stand out from the dark background */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: var(--primary-text);
  font-size: 0.95rem;
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  /* Slightly lighter placeholder for better readability */
  color: #999;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form button {
  align-self: center;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  /* Use the new button gradient */
  background: var(--btn-gradient);
  border: none;
  /* Button text should be black and 16px regular */
  color: #000;
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.25);
}

/* Contact details styling */
.contact-details {
  /* Center align contents both horizontally and vertically */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
  /* Even spacing between lines */
  gap: 0.4rem;
}

.contact-details p {
  /* Remove margin and let flex gap handle spacing */
  margin-bottom: 0;
}

/* Name styling */
.contact-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 1.5rem; /* 24px */
  color: var(--primary-text);
}

/* Other details (email, phone, link) */
.contact-details p:not(.contact-name) {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 1rem; /* 16px */
  color: var(--secondary-text);
}

.contact-details a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.3s ease;
}

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

/* Testimonials section under metrics */
.testimonials {
  margin-top: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  /* Center align testimonials and allow one at a time */
  text-align: center;
  position: relative;
  display: block;
  overflow: hidden;
}

.testimonials p {
  font-size: 1.1rem;
  color: var(--secondary-text);
  font-style: italic;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 800px;
}

/* Hide all testimonials by default */
.testimonials .testimonial {
  display: none;
}

/* Show the active testimonial */
.testimonials .testimonial.active {
  display: block;
}

/* Footer */
.footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--secondary-text);
  font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 900px) {
  .navbar .nav-links {
    gap: 1rem;
  }
}

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

  .navbar .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    right: 2rem;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  }

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

  .about-content {
    flex-direction: column;
  }

  /* Center align about text and tags on mobile */
  .about-text {
    text-align: center;
  }

  .tags {
    justify-content: center;
  }

  .journey-btn {
    margin-left: auto;
    margin-right: auto;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-item {
    padding-left: 2.5rem;
  }

  .timeline-item::before {
    left: 0;
  }

  .case-studies {
    flex-direction: column;
  }

  .case-card {
    width: 100%;
  }

  .metrics-grid {
    flex-direction: column;
    align-items: center;
  }

  /* Reduce horizontal padding on the navbar and sections for small screens */
  .navbar {
    padding: 1rem 1rem;
  }
  section {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}