/* ==========================================================================
   fatihk.bond — Personal Website Design System
   Standard: Anti-Slop Compliant, Balanced Craft, High Contrast, Modern Web
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Obsidian Palette (Tinted Dark Obsidian - Never dead 000000) */
  --bg-body: #0b0d13;
  --bg-card: #12151f;
  --bg-surface: #171b27;
  --bg-surface-hover: #1e2434;
  --bg-elevated: #151824;

  /* Accents ("One Accent, One Voice" - Titanium Warm Amber) */
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-subtle: rgba(245, 158, 11, 0.09);
  --accent-border: rgba(245, 158, 11, 0.28);
  --accent-glow: rgba(245, 158, 11, 0.15);

  /* Hairline Borders */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.22);

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Spacing & Layout */
  --container-max: 1040px;
  --ease-natural: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 200ms var(--ease-natural);
}

/* --------------------------------------------------------------------------
   1. Reset & Defensive Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0; /* Defensive CSS: Prevents flex/grid blowouts */
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Best Practices */
h1, h2, h3, h4 {
  color: var(--text-main);
  text-wrap: balance;
  line-height: 1.25;
}

p, li, blockquote {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

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

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

.mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Background Grid Texture (Subtle & Crisp) */
.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
  mask-image: radial-gradient(circle at 50% 20%, black 50%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, black 50%, transparent 85%);
}

/* --------------------------------------------------------------------------
   2. Site Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(11, 13, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--transition);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-monogram {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), border-color var(--transition);
}

.brand-link:hover .brand-monogram {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.brand-letter {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-nav {
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-nav:hover {
  background: var(--accent);
  color: #0b0d13;
}

/* --------------------------------------------------------------------------
   3. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  z-index: 1;
  padding-top: clamp(48px, 8vw, 84px);
  padding-bottom: clamp(48px, 8vw, 84px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.role-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(2.4rem, 1.8rem + 3vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #ffffff;
  margin-bottom: 14px;
}

.hero-tagline {
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.35rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1.45;
  margin-bottom: 18px;
  max-width: 54ch;
}

.hero-bio {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 30px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #090b0f;
  border: 1px solid var(--accent);
}

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

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* Avatar Frame */
.hero-visual {
  display: flex;
  justify-content: center;
}

.avatar-frame {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transition: border-color var(--transition), transform var(--transition);
}

.avatar-frame:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.avatar-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.avatar-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 10px 4px 4px;
  letter-spacing: 0.05em;
}

.caption-sep {
  opacity: 0.35;
}

/* --------------------------------------------------------------------------
   4. Section Headers
   -------------------------------------------------------------------------- */
.section-header {
  margin-bottom: clamp(32px, 5vw, 44px);
}

.section-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.09em;
  margin-bottom: 8px;
}

.section-heading {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.section-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   5. Projects Section (2-Column Grid, Zero Overflow)
   -------------------------------------------------------------------------- */
.projects-section {
  position: relative;
  z-index: 1;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.project-card:hover {
  background: var(--bg-surface);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.project-meta {
  margin-bottom: 12px;
}

.project-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.project-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin-bottom: 10px;
}

.project-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
}

.project-tech span {
  color: var(--text-muted);
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   6. Architectural Showcase Banner
   -------------------------------------------------------------------------- */
.banner-section {
  position: relative;
  z-index: 1;
  padding-top: 24px;
  padding-bottom: 24px;
}

.banner-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.banner-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: brightness(0.85);
  transition: filter var(--transition), transform 400ms var(--ease-natural);
}

.banner-card:hover .banner-img {
  filter: brightness(0.95);
  transform: scale(1.01);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 13, 19, 0.92) 0%, rgba(11, 13, 19, 0.4) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: clamp(20px, 4vw, 36px);
}

.banner-content {
  max-width: 68ch;
}

.banner-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.banner-quote {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-main);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   7. Stack & Capabilities Section
   -------------------------------------------------------------------------- */
.stack-section {
  position: relative;
  z-index: 1;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.stack-group {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
}

.stack-group-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.stack-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack-list li {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.stack-list strong {
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   8. Philosophy & Approach Section
   -------------------------------------------------------------------------- */
.philosophy-section {
  position: relative;
  z-index: 1;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.philosophy-card:hover {
  background: var(--bg-surface);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 14px;
  line-height: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   9. Contact Section
   -------------------------------------------------------------------------- */
.contact-section {
  position: relative;
  z-index: 1;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(60px, 8vw, 88px);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.contact-card-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.contact-prompt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.contact-email {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 10px 18px;
  border-radius: 8px;
  margin-bottom: 14px;
  align-self: flex-start;
  transition: all var(--transition);
}

.contact-email:hover {
  background: var(--accent);
  color: #0b0d13;
  transform: translateY(-1px);
}

.contact-note {
  font-size: 12px;
  color: var(--text-muted);
}

.location-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.loc-key {
  color: var(--text-muted);
  font-size: 12px;
}

.loc-val {
  color: var(--text-main);
  font-weight: 500;
}

#live-time {
  color: var(--accent);
  font-weight: 700;
}

.social-note {
  font-size: 10.5px;
  color: var(--text-muted);
  background: var(--bg-body);
  border: 1px dashed var(--border-medium);
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   10. Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.footer-domain {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   11. Responsive Breakpoints (Defensive & Zero Overflow)
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    margin-bottom: 8px;
  }

  .avatar-frame {
    max-width: 240px;
  }

  .projects-grid,
  .stack-grid,
  .philosophy-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .banner-img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 540px) {
  .header-inner {
    height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-link {
    font-size: 12.5px;
  }

  .btn {
    width: 100%;
  }

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

/* --------------------------------------------------------------------------
   12. High Contrast a11y Support
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .project-card,
  .stack-group,
  .philosophy-card,
  .contact-card,
  .avatar-frame,
  .brand-monogram,
  .btn-nav,
  .btn {
    border: 2px solid CanvasText;
  }
}
