/*
Theme Name: Mesut Ercosman
Theme URI: https://mesutercosman.example
Author: Mesut Ercosman
Description: Custom hand-coded portfolio theme for Mesut Ercosman, ITIL v4 Qualified Infrastructure/Cloud Engineer.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: mesut-ercosman
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  /* Colour palette */
  --color-bg: #0b1120;
  --color-bg-alt: #111a2e;
  --color-surface: #16213a;
  --color-border: #22304d;
  --color-border-strong: #56688c;
  --color-text: #e6ecf5;
  --color-text-muted: #93a2bd;
  --color-accent: #5eead4;
  --color-accent-strong: #99f6e7;
  --color-accent-muted: #2f6f68;
  --color-focus: #5eead4;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.25rem;

  --leading-tight: 1.2;
  --leading-normal: 1.6;

  /* Spacing scale (4px base unit) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;

  /* Layout */
  --container-max: 1120px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --header-height: 72px;
}

/* Breakpoints (reference only, used literally in media queries below):
   sm: 480px, md: 768px, lg: 1024px, xl: 1280px */

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, p, figure { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Visible focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Skip link
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-4);
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--space-12);
}

@media (max-width: 767px) {
  .section {
    padding-block: var(--space-10);
  }
}

.section--no-top {
  padding-top: 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-5);
}

.section-label::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--color-border);
}

.section-title {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  font-weight: 700;
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .section-title { font-size: var(--text-4xl); }
}

/* ==========================================================================
   Typography components
   ========================================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: 0.04em;
}

.text-muted { color: var(--color-text-muted); }

.lead {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 65ch;
  margin-bottom: var(--space-8);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #06251f;
}

.btn-primary:hover {
  background-color: var(--color-accent-strong);
}

.btn-secondary {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background-color: transparent;
}

.btn-secondary:hover {
  background-color: rgba(94, 234, 212, 0.1);
}

/* ==========================================================================
   Links
   ========================================================================== */
.link-accent {
  color: var(--color-accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.link-accent:hover {
  border-bottom-color: var(--color-accent);
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

/* ==========================================================================
   Site header / navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background-color: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.site-logo span {
  color: var(--color-accent);
}

.primary-nav {
  display: none;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.primary-nav a {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--color-accent);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  color: var(--color-text);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-toggle-icon::before {
  content: "";
  position: absolute;
  top: -6px;
}

.nav-toggle-icon::after {
  content: "";
  position: absolute;
  top: 6px;
}

.mobile-nav {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background-color: var(--color-bg);
  padding: var(--space-8) var(--space-5);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 90;
}

.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.mobile-nav a {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--color-text);
}

.mobile-nav a:hover,
.mobile-nav a[aria-current="page"] {
  color: var(--color-accent);
}

body.nav-open {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .primary-nav { display: block; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-block: var(--space-16) var(--space-12);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
}

@media (max-width: 767px) {
  .hero {
    padding-block: var(--space-10) var(--space-8);
    min-height: auto;
  }
}

.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: start;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 3fr 2fr;
    gap: var(--space-10);
  }

  /* Offsets the eyebrow line's own height so the box's top edge lines up
     with the hero title's top edge, not the eyebrow above it. */
  .hero-visual {
    margin-top: calc(var(--text-sm) * var(--leading-normal) + var(--space-4));
  }
}

.hero-eyebrow {
  margin-bottom: var(--space-4);
}

.hero-title {
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  font-weight: 700;
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .hero-title { font-size: var(--text-5xl); }
}

.hero-title .accent { color: var(--color-accent); }

.hero-summary {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 60ch;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* Profile photo: circular frame with a thin gradient border and soft glow */
.profile-photo {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--color-accent-strong), var(--color-accent-muted));
  box-shadow: 0 0 40px rgba(94, 234, 212, 0.22);
}

.profile-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface);
}

/* ==========================================================================
   Highlights grid
   ========================================================================== */
.highlights-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .highlights-grid { grid-template-columns: repeat(4, 1fr); }
}

.highlight-card .highlight-index,
.achievement-card .highlight-index {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  display: block;
}

.highlight-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.highlight-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.cta-band .section-title {
  margin-bottom: var(--space-4);
}

.cta-band p {
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ==========================================================================
   Site footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-8);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.footer-primary {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .footer-primary {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

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

.footer-meta {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

/* Statutory company information — UK trading disclosure details, kept
   visually distinct from the contact/copyright block above it. */
.footer-legal {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.6;
}

.footer-legal p {
  margin: 0;
}

.footer-legal-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .footer-legal-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2) var(--space-4);
  }
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.footer-legal-links a {
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.footer-legal-links a:hover,
.footer-legal-links a[aria-current="page"] {
  color: var(--color-accent);
}

/* ==========================================================================
   Page header (non-Home pages)
   ========================================================================== */
.page-header {
  padding-block: var(--space-10) var(--space-6);
}

.page-title {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  font-weight: 700;
}

@media (min-width: 768px) {
  .page-title { font-size: var(--text-4xl); }
}

/* ==========================================================================
   About page
   ========================================================================== */
.about-grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 3fr 2fr;
    align-items: start;
  }
}

.about-narrative p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 65ch;
  margin-bottom: var(--space-5);
}

.quick-facts h2 {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--color-accent);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-5);
}

.quick-facts dl {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.quick-fact {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.quick-fact:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.quick-fact dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quick-fact dd {
  margin: 0;
  font-size: var(--text-base);
}

/* ==========================================================================
   Skills & Expertise page
   ========================================================================== */
.skills-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

.skills-category h2 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}

/* ==========================================================================
   Experience timeline
   ========================================================================== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.timeline-item {
  display: grid;
  gap: var(--space-2);
}

.timeline-dates {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
}

.timeline-role {
  font-size: var(--text-xl);
  font-weight: 700;
}

.timeline-org {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.timeline-bullets li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.timeline-bullets li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ==========================================================================
   Career Highlights page
   ========================================================================== */
.achievements-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .achievements-grid { grid-template-columns: repeat(3, 1fr); }
}

.achievement-card h2 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.achievement-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ==========================================================================
   Certifications page
   ========================================================================== */
.cert-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
}

.cert-card {
  text-align: center;
}

.cert-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-accent);
}

.cert-card h2 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 2fr 3fr;
    align-items: start;
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-field label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  color: var(--color-text);
}

.form-field textarea {
  resize: vertical;
}

.form-notice {
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
}

.form-notice--success {
  border: 1px solid var(--color-accent);
  color: var(--color-accent-strong);
}

.form-notice--error {
  border: 1px solid #f97066;
  color: #fca39b;
}

/* Visually hidden honeypot field: kept out of sight, not display:none, so
   it stays part of the accessibility tree's hidden-but-present bait for bots
   while aria-hidden + tabindex="-1" keep real assistive-tech users away from it. */
.mesut-hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Legal pages (Privacy Policy, Cookie Policy, Terms of Use)
   ========================================================================== */
.legal-content {
  max-width: 70ch;
}

.legal-content h2 {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  font-weight: 700;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.legal-content > h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.legal-content ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.legal-content li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--color-text-muted);
}

.legal-content li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.legal-content .quick-facts {
  margin-bottom: var(--space-8);
}

.legal-updated {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
