@layer base {
  /* Global desktop zoom-out for uniqueness: all pages, big screens only */
  @media (min-width: 1280px) {
    html {
      font-size: 90%;
    }
  }
}
/* miatechh.tr — Personal Turkish Vibes (no emoji zone) */

/* ====================================================================
  Font Declarations - Local Fonts
  ====================================================================
  Loading local fonts to ensure consistent typography across the site.
*/

/* Outfit Font Family - Primary Body Font */
@font-face {
  font-family: "Outfit";
  src: url("./fonts/Outfit-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("./fonts/Outfit-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("./fonts/Outfit-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Mozilla Text Font - For Body Text and Code */
@font-face {
  font-family: "Mozilla Text";
  src: url("./fonts/MozillaText-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Mozilla Headline Condensed - For Headings */
@font-face {
  font-family: "Mozilla Headline Condensed";
  src: url("./fonts/MozillaHeadline_Condensed-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Turkish Flag Colors - Made Personal */
  --turkish-red: #e30a17;
  --turkish-white: #ffffff;

  /* Personal Dark Palette with Turkish Accents */
  --bg-primary: #0f0a0a;
  --bg-secondary: #1a1212;
  --bg-card: #241818;
  --bg-card-hover: #382828;

  --text-primary: #fff0f0;
  --text-secondary: #e8d5d5;
  --text-muted: #c0a0a0;
  --text-accent: #ff6b35;

  /* Turkish-inspired accent colors */
  --accent-red: var(--turkish-red);
  --accent-gold: #d4af37; /* Ottoman gold */
  --accent-copper: #b87333; /* Turkish copper */
  --accent-turquoise: #40e0d0; /* Turkish turquoise */

  --border-subtle: #382828;
  --border-turkish: linear-gradient(
    90deg,
    var(--turkish-red) 0%,
    var(--turkish-red) 100%
  );

  /* Warm, welcoming shapes */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-mosque: 12px 24px 12px 24px; /* Mosque-inspired curves */

  /* Warm shadows with Turkish colors */
  --shadow-soft: 0 4px 20px rgba(227, 10, 23, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-strong: 0 8px 32px rgba(212, 175, 55, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-turkish: 0 0 30px rgba(255, 107, 53, 0.25);
}

/* Accessibility */
@layer base {
  .skip-link {
    position: absolute;
    top: -40px;
    left: 12px;
    background: var(--accent-red);
    color: #0b0b11;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.2s ease;
    z-index: 10000;
  }
  .skip-link:focus {
    top: 12px;
    outline: 2px dashed #fff;
    outline-offset: 2px;
  }
}

/* Turkish-inspired animations */
@keyframes crescent-glow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    filter: brightness(1);
  }
  50% {
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5),
      0 0 30px rgba(227, 10, 23, 0.3);
    filter: brightness(1.1);
  }
}

@keyframes carpet-weave {
  0%,
  100% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
}

@keyframes tea-steam {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-2px) rotate(1deg);
  }
  50% {
    transform: translateY(-4px) rotate(0deg);
  }
  75% {
    transform: translateY(-2px) rotate(-1deg);
  }
}

@keyframes ottoman-pulse {
  0%,
  100% {
    box-shadow: var(--shadow-soft);
    transform: scale(1);
  }
  50% {
    box-shadow: var(--shadow-turkish);
    transform: scale(1.02);
  }
}

@keyframes turkish-delight {
  0%,
  100% {
    filter: brightness(1) saturate(1);
  }
  50% {
    filter: brightness(1.05) saturate(1.1);
  }
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Mozilla Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Turkish carpet-inspired background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 25% 25%,
      rgba(227, 10, 23, 0.08) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(212, 175, 55, 0.06) 0%,
      transparent 40%
    ),
    linear-gradient(
      45deg,
      transparent 30%,
      rgba(184, 115, 51, 0.04) 35%,
      transparent 40%
    );
  background-size: 300% 300%, 400% 400%, 200% 200%;
  animation: carpet-weave 15s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* Floating Turkish elements */
body::after {
  content: "";
  display: none;
}

/* Header - Ottoman Grandeur */
header {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-card) 100%
  );
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--accent-red);
  box-shadow: 0 4px 20px rgba(227, 10, 23, 0.1);
}

header::before {
  content: "";
  display: none;
}

header::after {
  content: "";
  display: none;
}

h1 {
  font-family: "Mozilla Headline Condensed", "Mozilla Text", "Outfit",
    sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    var(--accent-red) 0%,
    var(--accent-gold) 30%,
    var(--accent-copper) 60%,
    var(--accent-red) 100%
  );
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: crescent-glow 5s ease-in-out infinite;
  position: relative;
}

/* Ottoman-inspired underline */
h1::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--accent-red) 0%,
    var(--accent-gold) 50%,
    var(--accent-red) 100%
  );
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(227, 10, 23, 0.3);
}

.intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.6;
}

/* Main Content */
main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
  width: 100%;
}

/* Headings */
h2 {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text-accent);
  text-align: center;
  margin: 3rem 0 1.5rem;
  position: relative;
  animation: crescent-glow 6s ease-in-out infinite;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-gold));
  border-radius: 2px;
}

/* Card Container */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
  margin: 2rem 0;
}

/* Cards - Ottoman Luxury */
.card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-mosque);
  padding: 2.2rem 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(227, 10, 23, 0.1) 0%,
    rgba(212, 175, 55, 0.08) 50%,
    rgba(184, 115, 51, 0.06) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-10px) rotate(1deg);
  border-color: var(--accent-gold);
  animation: ottoman-pulse 2s ease-in-out infinite;
}

.card:hover::before {
  opacity: 1;
}

.card:nth-child(even) {
  transform: rotate(-0.8deg);
}

.card:nth-child(odd) {
  transform: rotate(0.8deg);
}

.card:hover:nth-child(even) {
  transform: translateY(-10px) rotate(-2.5deg);
}

.card:hover:nth-child(odd) {
  transform: translateY(-10px) rotate(2.5deg);
}

.card p {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* Links */
a {
  color: var(--accent-turquoise);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 500;
}

a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
  text-decoration-color: var(--accent-gold);
  text-underline-offset: 3px;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* Centered content */
.centered {
  text-align: center;
  background: var(--bg-secondary);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-subtle);
  margin: 3rem auto;
  position: relative;
  max-width: 700px;
}

.centered::before {
  content: "";
  display: none;
}

.centered p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  line-height: 1.6;
}

/* Footer - Turkish Hospitality */
footer {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-card) 100%
  );
  border-top: 4px solid var(--accent-red);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: auto;
  position: relative;
  box-shadow: 0 -4px 20px rgba(227, 10, 23, 0.1);
}

footer::before {
  content: "";
  display: none;
}

footer p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

footer a {
  color: var(--accent-red);
  font-weight: 600;
}

footer a:hover {
  color: var(--accent-gold);
}

.signature-footer-message {
  font-style: italic;
  color: var(--accent-copper);
  font-size: 0.95rem;
  opacity: 0.9;
  font-family: "Mozilla Text", monospace;
  margin-top: 1.2rem;
  padding: 1rem;
  background: rgba(227, 10, 23, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(227, 10, 23, 0.2);
}

/* Page transition */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 2.5rem 1rem;
  }

  header::before,
  header::after {
    font-size: 0.8rem;
    top: 15px;
  }

  main {
    padding: 2rem 1rem;
  }

  .card-container {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .card {
    padding: 1.8rem 1.5rem;
    min-height: 130px;
  }

  .card:nth-child(even),
  .card:nth-child(odd) {
    transform: none;
  }

  .card:hover:nth-child(even),
  .card:hover:nth-child(odd) {
    transform: translateY(-5px);
  }

  h1 {
    font-size: 2.4rem;
  }

  .intro {
    font-size: 1rem;
  }

  body::after {
    font-size: 0.6rem;
    top: 10px;
    right: 10px;
  }

  .centered {
    padding: 2rem 1.5rem;
    margin: 2rem 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Custom scrollbar with Turkish colors */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--accent-red), var(--accent-gold));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    to bottom,
    var(--accent-gold),
    var(--accent-copper)
  );
}

/* ===== Shared Dimension Layer (Mia Core) ===== */
:root {
  --dynamic-hue: 295; /* warmer purple bias for this city */
  --accent: hsl(var(--dynamic-hue), 72%, 60%);
  --accent-light: hsl(var(--dynamic-hue), 82%, 74%);
  --accent-dark: hsl(var(--dynamic-hue), 62%, 40%);
  --surface-1: rgba(22, 18, 26, 0.55);
  --surface-2: rgba(30, 24, 34, 0.7);
  --surface-border: color-mix(in srgb, var(--accent) 26%, var(--border-subtle));
}

/* Dimensional overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      80% 100% at 12% 22%,
      hsl(var(--dynamic-hue) 60% 18% / 0.18),
      transparent 52%
    ),
    radial-gradient(
      80% 100% at 88% 78%,
      hsl(calc(var(--dynamic-hue) + 40) 60% 16% / 0.18),
      transparent 52%
    );
  animation: bgShift 24s ease-in-out infinite;
  z-index: -1;
}
@keyframes bgShift {
  0% {
    transform: translateZ(0);
  }
  50% {
    transform: translateZ(0) scale(1.01);
  }
  100% {
    transform: translateZ(0);
  }
}

/* Writing & link sync */
main p,
.content-area p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1.02rem;
  margin: 0 0 1rem;
}
main a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
main a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* Gradient text helper */
.gradient-text {
  background: linear-gradient(
    90deg,
    hsl(var(--dynamic-hue) 80% 70%),
    hsl(calc(var(--dynamic-hue) + 60) 80% 70%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassy cards */
.card {
  background: var(--surface-2);
  border: 1.5px solid var(--surface-border);
  backdrop-filter: blur(10px);
}
.card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-strong);
}

/* Ripple press */
.card,
a {
  position: relative;
  overflow: hidden;
}
.card:active::after,
a:active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.18),
    transparent 40%
  );
  opacity: 1;
  transition: opacity 600ms ease;
}

/* Signature accent */
.signature-footer-message {
  color: var(--accent-light);
}

/* Unified dirs bar */
.dirs-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.dirs-bar a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1.5px solid var(--surface-border);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
  text-decoration: none;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}
.dirs-bar a:hover {
  border-color: var(--accent-light);
}
.dirs-bar a.active {
  border-color: var(--accent-light);
  background: color-mix(in srgb, var(--accent) 22%, var(--bg-card));
  cursor: default;
}
.dirs-bar a:active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.18),
    transparent 40%
  );
  opacity: 1;
  transition: opacity 600ms ease;
}
