/* ============================================
   Cem Güneş — Personal Website
   Design: Dark + Orange/Amber, 3D, Glassmorphism
   ============================================ */

:root {
  --bg: #0a0e1a;
  --bg-2: #0d1322;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf4;
  --text-dim: #9aa4b8;
  --text-muted: #6b7488;

  --accent: #ff8a3d;
  --accent-2: #ff5e3a;
  --accent-soft: rgba(255, 138, 61, 0.15);
  --accent-glow: rgba(255, 94, 58, 0.45);
  --cyan: #3dd5f3;
  --green: #4ade80;

  --grad: linear-gradient(135deg, #ff8a3d 0%, #ff5e3a 100%);
  --grad-soft: linear-gradient(135deg, rgba(255,138,61,0.18), rgba(255,94,58,0.08));
  --grad-text: linear-gradient(135deg, #ffb27a 0%, #ff8a3d 45%, #ff5e3a 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-glow: 0 0 0 1px rgba(255,138,61,0.18), 0 20px 60px -20px rgba(255,94,58,0.35);
  --shadow-card: 0 10px 40px -12px rgba(0,0,0,0.6);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

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

/* ===== Background Effects ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; border-radius: 50%; filter: blur(120px); z-index: 0; pointer-events: none;
  opacity: 0.5; animation: floatGlow 18s ease-in-out infinite;
}
.glow-1 { width: 520px; height: 520px; background: #ff5e3a; top: -160px; left: -120px; }
.glow-2 { width: 460px; height: 460px; background: #3dd5f3; top: 40%; right: -140px; opacity: 0.25; animation-delay: -6s; }
.glow-3 { width: 420px; height: 420px; background: #ff8a3d; bottom: -140px; left: 30%; opacity: 0.35; animation-delay: -12s; }
@keyframes floatGlow {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(60px,-40px) scale(1.1); }
  66% { transform: translate(-40px,50px) scale(0.95); }
}

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10,14,26,0.55);
  border-bottom: 1px solid transparent;
  transition: all 0.35s var(--ease);
}
.nav.scrolled {
  padding: 12px 0;
  background: rgba(10,14,26,0.82);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 14px; color: #fff; font-weight: 900; letter-spacing: -0.5px;
  box-shadow: var(--shadow-glow);
}
.logo-text { font-size: 17px; }
.logo-accent { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: var(--text-dim); font-size: 14.5px; font-weight: 500;
  position: relative; transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); transition: width 0.3s var(--ease); border-radius: 2px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; width: 40px; height: 40px;
  flex-direction: column; gap: 5px; justify-content: center; align-items: center;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: all 0.3s var(--ease);
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 24px -6px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px var(--accent-glow);
}
.btn-ghost {
  background: var(--surface); color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; border-radius: 10px; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 120px 0 60px; z-index: 1; overflow: hidden;
}
#heroCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.55;
}
.hero-inner { position: relative; z-index: 2; max-width: 920px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  font-size: 13px; color: var(--text-dim); font-weight: 500;
  margin-bottom: 28px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(74,222,128,0.18); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(74,222,128,0.18); }
  50% { box-shadow: 0 0 0 8px rgba(74,222,128,0.05); }
}
.hero-title { font-size: clamp(42px, 8vw, 88px); font-weight: 900; line-height: 1.02; letter-spacing: -0.03em; }
.hero-name { display: block; }
.gradient-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; background-size: 200% 200%; animation: gradShift 6s ease infinite;
}
@keyframes gradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero-subtitle {
  font-size: clamp(18px, 2.4vw, 24px); color: var(--text-dim); margin-top: 24px; font-weight: 400;
}
.hero-subtitle strong { color: var(--text); font-weight: 600; }
.typed { color: var(--accent); font-weight: 600; }
.cursor { display: inline-block; color: var(--accent); animation: blink 1s step-end infinite; margin-left: 2px; font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  margin-top: 22px; font-size: 16px; color: var(--text-dim); max-width: 640px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 64px; max-width: 720px;
}
.stat { text-align: left; }
.stat-num {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800; background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--border-strong);
  border-radius: 14px; z-index: 2;
}
.scroll-indicator span {
  display: block; width: 4px; height: 8px; background: var(--accent);
  border-radius: 2px; margin: 6px auto 0; animation: scrollDown 1.8s ease infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ===== Sections ===== */
.section { padding: 120px 0; position: relative; z-index: 1; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.02), transparent); }
.section-head { margin-bottom: 60px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(30px, 5vw, 52px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
}

/* ===== About ===== */
.about-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start;
}
.about-text p { color: var(--text-dim); margin-bottom: 18px; font-size: 16px; }
.about-text strong { color: var(--text); }
.about-text em { color: var(--accent); font-style: normal; font-weight: 600; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tag {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  transition: all 0.25s var(--ease);
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.about-card { position: relative; }
.card-glow {
  position: absolute; inset: -1px; border-radius: var(--radius);
  background: var(--grad); opacity: 0.4; filter: blur(20px); z-index: -1;
  transition: opacity 0.4s var(--ease);
}
.about-card:hover .card-glow { opacity: 0.7; }
.about-card-inner {
  background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 8px; box-shadow: var(--shadow-card);
}
.ac-card {
  background: var(--surface); border-radius: 14px; padding: 20px;
  font-family: 'JetBrains Mono', monospace;
}
.ac-row {
  display: flex; justify-content: space-between; padding: 12px 0;
  border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.ac-row:last-child { border-bottom: none; }
.ac-row span { color: var(--text-muted); }
.ac-row strong { color: var(--text); font-weight: 600; }
.online { color: var(--green) !important; }

/* ===== Expertise ===== */
.expertise-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.exp-card {
  position: relative; padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: all 0.4s var(--ease); transform-style: preserve-3d;
  overflow: hidden;
}
.exp-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: var(--grad-soft); opacity: 0; transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.exp-card:hover {
  border-color: var(--accent); transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.exp-card:hover::before { opacity: 1; }
.exp-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad); color: #fff; margin-bottom: 22px;
  box-shadow: 0 10px 24px -8px var(--accent-glow);
  transition: transform 0.4s var(--ease);
}
.exp-card:hover .exp-icon { transform: rotate(-6deg) scale(1.08); }
.exp-icon svg { width: 26px; height: 26px; }
.exp-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; position: relative; }
.exp-card p { color: var(--text-dim); font-size: 14.5px; position: relative; }

/* ===== Projects ===== */
.featured-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 70px;
}
.featured-card {
  position: relative; padding: 36px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border-strong);
  transition: all 0.4s var(--ease); overflow: hidden;
}
.featured-card.big { min-height: 320px; display: flex; flex-direction: column; }
.featured-card:hover {
  border-color: var(--accent); transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.featured-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.featured-tag {
  padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent);
}
.external-link {
  color: var(--text-muted); transition: color 0.25s; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 10px;
}
.external-link:hover { color: var(--accent); background: var(--surface-2); }
.external-link svg { width: 18px; height: 18px; }
.featured-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.featured-sub { font-size: 15px; color: var(--text-dim); margin-bottom: 16px; font-weight: 500; }
.featured-desc { color: var(--text-dim); font-size: 14.5px; flex: 1; margin-bottom: 20px; }
.featured-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.featured-tools span {
  padding: 4px 11px; border-radius: 7px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
}

.section-subhead {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px;
}
.section-subhead h3 { font-size: 22px; font-weight: 700; }
.github-link {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--accent);
  font-weight: 600; transition: gap 0.25s var(--ease);
}
.github-link:hover { gap: 12px; }

.repo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.repo-card {
  display: block; padding: 24px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  transition: all 0.35s var(--ease);
}
.repo-card:hover {
  border-color: var(--accent); transform: translateY(-3px); background: var(--surface-2);
}
.repo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.repo-head svg { width: 16px; height: 16px; color: var(--text-muted); }
.repo-lang {
  padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.repo-lang.php { background: rgba(119,123,180,0.18); color: #a5a9e8; border: 1px solid rgba(119,123,180,0.3); }
.repo-lang.ps { background: rgba(1,160,216,0.15); color: #5ec8e8; border: 1px solid rgba(1,160,216,0.3); }
.repo-lang.other { background: rgba(255,138,61,0.15); color: var(--accent); border: 1px solid var(--accent); }
.repo-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; font-family: 'JetBrains Mono', monospace; }
.repo-card p { font-size: 13.5px; color: var(--text-dim); margin-bottom: 16px; }
.repo-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }

/* ===== Tools ===== */
.tools-wrap {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.tool-chip {
  padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  transition: all 0.3s var(--ease); cursor: default;
}
.tool-chip:hover {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
  transform: translateY(-2px);
}

/* ===== Contact ===== */
.contact-card {
  position: relative; border-radius: 28px; padding: 8px;
  background: linear-gradient(135deg, rgba(255,138,61,0.3), rgba(255,94,58,0.05), rgba(61,213,243,0.15));
}
.contact-inner {
  background: var(--bg-2); border-radius: 22px; padding: 60px 40px; text-align: center;
}
.contact-desc { color: var(--text-dim); margin: 20px auto 40px; max-width: 560px; font-size: 16px; }
.contact-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 900px; margin: 0 auto;
}
.contact-link {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  transition: all 0.35s var(--ease);
}
.contact-link:hover {
  border-color: var(--accent); transform: translateY(-4px);
  background: var(--surface-2); box-shadow: var(--shadow-glow);
}
.cl-icon {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad); color: #fff;
}
.cl-text { display: flex; flex-direction: column; align-items: center; }
.cl-text strong { font-size: 14px; font-weight: 700; }
.cl-text small { font-size: 12px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* ===== Footer ===== */
.footer {
  padding: 40px 0; border-top: 1px solid var(--border); position: relative; z-index: 1;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { display: block; font-size: 15px; }
.footer-brand small { color: var(--text-muted); font-size: 12px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 14px; color: var(--text-dim); transition: color 0.25s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--text-muted); }

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(10,14,26,0.96); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    transform: translateY(-120%); transition: transform 0.4s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .repo-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-links { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .section { padding: 80px 0; }
  .expertise-grid { grid-template-columns: 1fr; }
  .repo-grid { grid-template-columns: 1fr; }
  .contact-links { grid-template-columns: 1fr; }
  .hero { padding-top: 100px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

/* ===== Tilt 3D (JS driven) ===== */
[data-tilt] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
