/* ============================================================
   Tamer Guven — Personal Portfolio
   Color System & Design Tokens
   ============================================================ */

:root {
  /* Background layers */
  --bg-primary:    #0f1419;
  --bg-secondary:  #161c25;
  --bg-tertiary:   #1d2433;
  --bg-card:       #1a2030;
  --bg-card-hover: #242d3d;

  /* Accent */
  --accent:        #00d9ff;
  --accent-dim:    rgba(0, 217, 255, 0.15);
  --accent-glow:   rgba(0, 217, 255, 0.3);

  /* Text */
  --text-primary:   #f0f2f5;
  --text-secondary: #b0b6c1;
  --text-muted:     #7a8492;

  /* Borders */
  --border:        rgba(255, 255, 255, 0.06);
  --border-hover:  rgba(0, 212, 245, 0.3);

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Spacing */
  --section-pad-y: 120px;
  --container-max: 1120px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   Reset & Base
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

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

ul, ol {
  list-style: none;
}

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

/* ============================================================
   Utility
   ============================================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 48px;
  color: var(--text-primary);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 32px;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.nav.scrolled {
  background: rgba(8, 8, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s ease;
  position: relative;
}

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

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

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

.nav-cta {
  font-size: 13px !important;
  padding: 8px 20px;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  color: var(--accent) !important;
  transition: background 0.25s ease, color 0.25s ease !important;
}

.nav-cta:hover {
  background: var(--accent-dim);
}

.nav-cta::after {
  display: none !important;
}

/* Language toggle */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-toggle {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.lang-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

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

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 32px 32px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 0;
  width: 1px;
  height: 140%;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 217, 255, 0.1) 50%, transparent 100%);
  pointer-events: none;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideInLeft 0.8s var(--ease-out) forwards;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: slideInRight 0.8s var(--ease-out) forwards;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-headline {
  font-size: clamp(48px, 9vw, 80px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2.5px;
  color: var(--text-primary);
  margin: 0;
}

.hero-headline .accent {
  background: linear-gradient(135deg, #00d9ff 0%, #00b8d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0;
  font-family: var(--font-mono);
}

.hero-sub {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.hero-actions .btn {
  min-width: 160px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  white-space: nowrap;
  min-width: 160px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 4px 16px rgba(0, 217, 255, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(0, 217, 255, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

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

.btn-arrow {
  transition: transform 0.25s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ============================================================
   About
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 16px;
}

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

.about-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: border-color 0.3s ease;
}

.metric-card:hover {
  border-color: var(--border-hover);
}

.metric-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================================
   Research & Achievements
   ============================================================ */

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.research-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.research-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.research-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ============================================================
   Projects
   ============================================================ */

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

.projects-grid {
  display: grid;
  gap: 32px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.3);
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 2px;
}

.project-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-detail-block h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.project-detail-block p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  letter-spacing: 0.5px;
}

.project-impact {
  margin-top: auto;
}

.project-impact-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-impact-value::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   Experience
   ============================================================ */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.experience-list::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.experience-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  padding: 32px 0;
  position: relative;
}

.experience-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.experience-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg-primary);
  position: relative;
  top: 6px;
  z-index: 1;
  flex-shrink: 0;
}

.experience-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.experience-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.experience-role {
  font-size: 18px;
  font-weight: 700;
}

.experience-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.experience-org {
  font-size: 15px;
  color: var(--accent);
  font-weight: 500;
}

.experience-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
  margin-top: 4px;
}

.experience-desc li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
}

.experience-desc li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.experience-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.experience-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-mono);
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
}

.experience-btn:hover {
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.experience-btn .btn-arrow {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.experience-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ============================================================
   Skills
   ============================================================ */

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

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color 0.3s ease;
}

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

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-item {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-item::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================
   Contact
   ============================================================ */

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

.contact-section .section-label {
  justify-content: center;
}

.contact-section .section-label::before {
  display: none;
}

.contact-headline {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.contact-sub {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 500px;
  margin: 0 auto 40px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.contact-link:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--accent-dim);
}

.contact-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 968px) {
  :root {
    --section-pad-y: 80px;
  }

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

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

  .project-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px;
  }

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

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .nav {
    padding: 0 20px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transition: right 0.35s var(--ease-out);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .hero {
    padding: 72px 20px 32px;
  }

  .hero-wrapper {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-left {
    animation: slideInLeft 0.8s var(--ease-out) forwards;
  }

  .hero-right {
    animation: slideInRight 0.8s var(--ease-out) forwards;
  }

  .hero-headline {
    font-size: clamp(32px, 8vw, 52px);
    letter-spacing: -1.5px;
  }

  .hero-role {
    font-size: 14px;
    letter-spacing: 1px;
  }

  .hero-sub {
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    min-width: auto;
    justify-content: center;
  }

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

  .experience-header {
    flex-direction: column;
    gap: 4px;
  }

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

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

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

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
  }
}
