/* ==========================================================================
   Ali Ömer Özcan — Bespoke Design Engineering System
   Human-Crafted, Anti-AI-Slop, Clean & High-End Visual Hierarchy
   ========================================================================== */

:root {
  --bg: #0b0c10;
  --surface: #12141c;
  --surface-elevated: #161924;
  --surface-hover: #1b1e2b;
  --surface-border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  /* Backwards compatibility aliases */
  --border: var(--surface-border);
  --muted: var(--fg-muted);
  --faint: var(--fg-faint);

  --fg: #f3f4f6;
  --fg-muted: #9499a8;
  --fg-faint: #5a5f70;

  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-glow: rgba(45, 212, 191, 0.25);
  --success: #10b981;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max-width: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle ambient lighting - no distracting loud neon meshes */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 500px;
  background: radial-gradient(ellipse at 50% 0%, rgba(45, 212, 191, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 28px;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

/* ---------- Navigation ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 12, 16, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

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

nav.nav-links a {
  font-size: 0.92rem;
  color: var(--fg-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all 0.2s var(--ease);
}

nav.nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

nav.nav-links a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--fg-muted);
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
}

.status-pulse {
  width: 7px;
  height: 7px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.status-pulse.status-open,
.status-pulse.is-open {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-pulse.status-busy,
.status-pulse.is-busy {
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.status-pulse.status-closed,
.status-pulse.is-closed {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.status-text-open { color: var(--success) !important; }
.status-text-busy { color: #f59e0b !important; }
.status-text-closed { color: #ef4444 !important; }

.menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.22s var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: #ffffff;
  color: #0b0c10;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.18);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border: 1px solid var(--surface-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: #ffffff;
}

.btn-ghost:active {
  transform: scale(0.98);
}

/* ---------- Hero Section (Spacious, Natural, Organic 3D) ---------- */
.hero-section {
  padding-top: 80px;
  padding-bottom: 90px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 191, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
  width: fit-content;
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero-role {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 1.12rem;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-meta-row {
  display: flex;
  gap: 24px;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--surface-border);
  font-size: 0.85rem;
  color: var(--fg-muted);
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta-item strong {
  color: #ffffff;
  font-weight: 600;
}

/* ---------- Hybrid 3D & Mini IDE Terminal Showcase ---------- */
.hero-showcase-container {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-3d-backdrop {
  position: absolute;
  inset: -30px;
  width: calc(100% + 60px);
  height: calc(100% + 60px);
  z-index: 1;
  pointer-events: auto;
  opacity: 0.65;
  cursor: grab;
}

.showcase-3d-backdrop:active {
  cursor: grabbing;
}

.terminal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  background: rgba(13, 15, 23, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 28px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  font-family: var(--font-mono);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.terminal-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.terminal-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ef4444; opacity: 0.85; }
.dot-yellow { background: #f59e0b; opacity: 0.85; }
.dot-green { background: #10b981; opacity: 0.85; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.terminal-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
}

.t-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s var(--ease);
}

.t-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.t-tab.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

.tab-badge {
  font-size: 0.62rem;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
  line-height: 1.1;
}

.tab-badge.ts {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.tab-badge.json {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.terminal-content {
  padding: 20px 22px;
  min-height: 250px;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}

.tab-pane {
  display: none;
}

.tab-pane.is-active {
  display: block;
  animation: fadeIn 0.2s var(--ease);
}

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

.terminal-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.t-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  word-break: break-word;
}

.t-prompt {
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.t-out {
  color: var(--fg);
}

.t-out-muted {
  color: var(--fg-muted);
}

.t-out-success {
  color: #10b981;
  font-weight: 500;
}

.t-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blinkCursor 0.9s step-end infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.code-block {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #e2e4ea;
  white-space: pre;
}

.code-block .k { color: #c084fc; font-weight: 600; }
.code-block .t { color: #38bdf8; }
.code-block .s { color: #a7f3d0; }
.code-block .b { color: #f472b6; }
.code-block .p { color: #93c5fd; }
.code-block .c { color: #64748b; }

/* ---------- Section Headers (Calm, Confident) ---------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-link {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  text-decoration: underline;
}

/* ---------- Projects Showcase Grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.28s var(--ease);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-elevated);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.project-thumb {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #141724;
  position: relative;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s var(--ease);
}

.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #ffffff;
}

.project-title a:hover {
  color: var(--accent);
}

.project-desc {
  font-size: 0.94rem;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-border);
  padding: 2px 8px;
  border-radius: 4px;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--surface-border);
  font-size: 0.88rem;
}

/* ---------- Engineering Philosophy (Editorial & Thoughtful) ---------- */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.philosophy-item {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s var(--ease);
}

.philosophy-item:hover {
  border-color: var(--border-hover);
}

.philosophy-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 14px;
  display: inline-block;
}

.philosophy-title {
  font-size: 1.18rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.philosophy-desc {
  color: var(--fg-muted);
  font-size: 0.93rem;
  line-height: 1.7;
}

/* ---------- Editorial Writing List ---------- */
.writing-list {
  display: flex;
  flex-direction: column;
}

.writing-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 12px;
  border-bottom: 1px solid var(--surface-border);
  gap: 20px;
  border-radius: 6px;
  transition: all 0.2s var(--ease);
}

.writing-row:hover {
  background: rgba(255, 255, 255, 0.02);
  padding-left: 18px;
}

.writing-row:hover .writing-title {
  color: var(--accent);
}

.writing-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #ffffff;
  transition: color 0.18s;
}

.writing-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-faint);
  white-space: nowrap;
}

/* ---------- Cards (General) ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s var(--ease);
}

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

/* ---------- Forms & Inputs ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s var(--ease);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: var(--surface-elevated);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 36px;
}

/* ---------- Footer ---------- */
footer {
  margin-top: auto;
  border-top: 1px solid var(--surface-border);
  padding: 40px 0;
  background: rgba(11, 12, 16, 0.4);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--fg-faint);
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.footer-links a {
  color: var(--fg-muted);
}

.footer-links a:hover {
  color: #ffffff;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 50px;
    padding-bottom: 60px;
  }

  .showcase-3d-wrapper {
    height: 340px;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.6rem;
  }

  nav.nav-links {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  nav.nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--surface-border);
    padding: 20px 28px;
    gap: 10px;
  }

  .writing-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
