/* ============================================
   EGEMEN — eg4dev portfolio
   Tasarım dili: macOS masaüstü / pencere metaforu
   Palet: beyaz ve gri tonları, premium & minimal
   ============================================ */

:root {
  --white: #FFFFFF;
  --bg-soft: #F5F5F7;
  --bg-soft-2: #ECECEE;
  --surface: #FFFFFF;
  --border: #E4E4E7;
  --border-strong: #D7D7DC;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #A1A1A6;
  --accent: #0071E3;
  --accent-soft: #EAF2FD;
  --green: #28C840;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 10px 30px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
  --shadow-lg: 0 30px 70px rgba(0,0,0,.13), 0 10px 24px rgba(0,0,0,.06);

  --radius-window: 18px;
  --radius-icon: 24px;
  --radius-card: 16px;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --menubar-h: 38px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-display);
  background:
    radial-gradient(ellipse 1200px 700px at 50% -10%, #FFFFFF 0%, #F6F6F8 55%, #F0F0F3 100%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding-top: var(--menubar-h);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* subtle film-grain texture for premium depth */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ===================== MENU BAR ===================== */
.menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--menubar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  font-size: 13px;
}

.menubar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.menubar-mark {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: var(--text-primary);
  color: var(--white);
  flex-shrink: 0;
}
.menubar-title { font-weight: 700; letter-spacing: -.01em; }
.menubar-links { display: flex; gap: 16px; }
.menubar-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color .15s ease;
}
.menubar-links a:hover { color: var(--text-primary); }

.menubar-right { display: flex; align-items: center; gap: 16px; color: var(--text-secondary); }
.menubar-status { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.menubar-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(40,200,64,.15);
}
.menubar-clock { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-primary); }
.menubar-date { white-space: nowrap; }

@media (max-width: 720px) {
  .menubar-links, .menubar-date { display: none; }
}

/* ===================== DESKTOP / LAYOUT ===================== */
.desktop {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* ===================== HERO ===================== */
.hero {
  min-height: calc(78vh - var(--menubar-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  animation: rise .9s cubic-bezier(.16,1,.3,1) both;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--text-tertiary);
  margin: 0;
}

.hero-title {
  font-size: clamp(3.6rem, 13vw, 9.5rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .92;
  margin: 0;
  background: linear-gradient(180deg, #2C2C2E 0%, #000000 65%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(15px, 2.4vw, 19px);
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(40,200,64,.15);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== APP ICON GRID ===================== */
.icon-grid {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 6vw, 64px);
  padding: 20px 0 8px;
  animation: rise 1s cubic-bezier(.16,1,.3,1) .15s both;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 108px;
}

.icon-glyph {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #FFFFFF 0%, #F2F2F4 100%);
  border: 1px solid var(--border);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255,255,255,.9);
  color: var(--text-primary);
  transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease, border-color .35s ease;
}
.icon-glyph svg { width: 30px; height: 30px; }

.icon-about  { background: linear-gradient(160deg, #FFFFFF 0%, #F4F2F0 100%); }
.icon-projects { background: linear-gradient(160deg, #FFFFFF 0%, #F0F2F4 100%); }
.icon-contact { background: linear-gradient(160deg, #FFFFFF 0%, #F2F1F4 100%); }

.icon-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color .25s ease;
}

.app-icon:hover .icon-glyph,
.app-icon:focus-visible .icon-glyph {
  transform: translateY(-6px) scale(1.05);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.9);
  border-color: var(--border-strong);
}
.app-icon:hover .icon-label,
.app-icon:focus-visible .icon-label { color: var(--text-primary); }

.app-icon:active .icon-glyph { transform: translateY(-2px) scale(.98); }

.scroll-hint {
  text-align: center;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  letter-spacing: .03em;
  margin: 30px 0 70px;
}

/* ===================== WINDOWS (sections) ===================== */
.window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-window);
  box-shadow: var(--shadow-lg);
  margin-bottom: 56px;
  overflow: hidden;
  scroll-margin-top: calc(var(--menubar-h) + 18px);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #FBFBFC 0%, #F4F4F6 100%);
  border-bottom: 1px solid var(--border);
}

.traffic-lights { display: flex; gap: 7px; }
.tl { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.tl.red { background: #FF5F57; }
.tl.yellow { background: #FEBC2E; }
.tl.green { background: #28C840; }

.window-title {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-right: 42px;
}
.window-bar-spacer { width: 42px; }

.window-body { padding: clamp(28px, 5vw, 48px); }

/* --- Hakkımda --- */
.about-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}
.about-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0 0 14px;
}
.about-paragraph {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0 0 16px;
}
.about-paragraph:last-child { margin-bottom: 0; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .about-body { grid-template-columns: 1fr; gap: 32px; }
}

/* --- Projeler --- */
.projects-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  background: linear-gradient(160deg, #FFFFFF 0%, #FAFAFB 100%);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}
.project-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: rgba(40,200,64,.1);
  padding: 3px 9px;
  border-radius: 100px;
}
.project-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -.01em;
}
.project-card p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.project-tools { display: flex; gap: 8px; margin-bottom: 16px; }
.project-tools span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
}
.project-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

@media (max-width: 720px) {
  .projects-body { grid-template-columns: 1fr; }
}

/* --- İletişim --- */
.contact-intro {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 26px;
  max-width: 46ch;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.contact-row:last-child { margin-bottom: 0; }
.contact-row:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}
.contact-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.contact-label { font-size: 11.5px; color: var(--text-tertiary); font-family: var(--font-mono); }
.contact-value { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.contact-arrow { color: var(--text-tertiary); font-size: 16px; }

/* ===================== DOCK ===================== */
.dock {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  z-index: 90;
}
.dock-item {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: transform .18s cubic-bezier(.16,1,.3,1), box-shadow .18s ease;
  position: relative;
  will-change: transform;
}
.dock-item svg { width: 19px; height: 19px; }
.dock-item:hover, .dock-item:focus-visible { box-shadow: var(--shadow-sm); }

.dock-item::after {
  content: attr(data-label);
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--text-primary);
  color: var(--white);
  padding: 5px 9px;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.dock-item:hover::after { opacity: 1; }

@media (max-width: 600px) {
  .dock { display: none; }
}

/* ===================== FOOTER ===================== */
.copyright {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 0 24px 100px;
  margin: 0;
}

@media (max-width: 600px) {
  .copyright { padding-bottom: 36px; }
}
