/* ahmets.io homepage — dark editorial portfolio.
   Self-contained: loaded only by the standalone home template (layouts/index.html).
   Blog and the notes section keep using main.css. */

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-card: #f4efe6;
  --fg: #ededed;
  --fg-dim: #8a8a8a;
  --fg-faint: #5a5a5a;
  --rule: #1d1d1d;
  --accent: #6f72ff;
  --accent-dim: #4a4cb0;
  --tag-bg: rgba(255,255,255,0.04);
  --tag-border: rgba(255,255,255,0.10);
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
html[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-2: #ffffff;
  --bg-card: #ebe6dc;
  --fg: #161616;
  --fg-dim: #6a6a6a;
  --fg-faint: #a0a0a0;
  --rule: #e0dcd4;
  --tag-bg: rgba(0,0,0,0.035);
  --tag-border: rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 28px 72px;
}

/* ===== Header status line ===== */
.status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}
.status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111,114,255,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(111,114,255,0); }
}
.status .sep { color: var(--fg-faint); margin: 0 4px; }
.status strong { color: var(--fg); font-weight: 500; }

/* ===== Hero ===== */
.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
h1.name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: 1.0;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--fg-dim);
  letter-spacing: 0.005em;
}

/* theme toggle */
.theme-btn {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--fg-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center; justify-content: center;
  transition: border-color .2s, color .2s, transform .2s;
}
.theme-btn:hover { color: var(--fg); border-color: var(--fg-dim); transform: rotate(-12deg); }
.theme-btn svg { width: 16px; height: 16px; }

/* ===== Bio ===== */
.bio {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--fg);
  max-width: 64ch;
  margin: 32px 0 28px;
  text-wrap: pretty;
}
.bio em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--fg);
}

/* ===== Inline link row ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  font-size: 14px;
  color: var(--fg);
  margin-top: 32px;
}
.links a {
  position: relative;
  padding-bottom: 2px;
  transition: color .2s;
}
.links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform-origin: left;
  transition: opacity .2s;
}
.links a:hover::after { opacity: 1; }

/* ===== Section header ===== */
.section { margin-top: 64px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}
.section-head .label .slash { color: var(--accent); margin-right: 8px; }
.section-head .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.section-head .meta-accent { color: var(--accent); }

/* ===== Writing list ===== */
.post {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  transition: padding-left .25s ease, color .2s;
}
.post:last-of-type { border-bottom: 1px solid var(--rule); }
.post:hover { padding-left: 8px; }
.post:hover .post-title { color: var(--accent); }
.post-title {
  font-size: 15.5px;
  color: var(--fg);
  transition: color .2s;
}
.post-date {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
}
.all-posts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: 22px;
  transition: color .2s, gap .2s;
}
.all-posts:hover { color: var(--accent); gap: 12px; }
.medium-note {
  display: block;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-faint);
}

/* ===== Project grid ===== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 28px;
}
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }

.proj-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  transition: transform .35s ease, border-color .35s ease;
}
.project:hover .proj-thumb {
  transform: translateY(-3px);
  border-color: rgba(111,114,255,0.45);
}
.proj-thumb .th-head {
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
}
.proj-thumb .th-head .d {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(111,114,255,0.15);
  flex: 0 0 auto;
}

.proj-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  margin: 16px 0 6px;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.proj-desc {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.55;
  text-wrap: pretty;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-dim);
  padding: 3px 8px;
  border: 1px solid var(--tag-border);
  background: var(--tag-bg);
  border-radius: 3px;
  letter-spacing: 0.02em;
}

/* ===== Project thumbnails — dark technical motifs (theme-aware via tokens) ===== */

/* 1 · CSPM posture report */
.th-posture .th-rows { display: flex; flex-direction: column; gap: 9px; font-size: 11.5px; color: var(--fg-dim); }
.th-posture .th-rows > div { display: flex; align-items: center; gap: 9px; }
.th-posture .ic {
  width: 14px; height: 14px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 3px; font-size: 9px; line-height: 1;
}
.th-posture .ic.ok { color: #3fb27f; background: rgba(63,178,127,0.13); }
.th-posture .ic.bad { color: #d9605f; background: rgba(217,96,95,0.13); }

/* 2 · CIS controller node grid */
.th-grid .th-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; flex: 1; align-content: center; }
.th-grid .th-cells span {
  aspect-ratio: 1; border-radius: 3px;
  background: var(--tag-bg); border: 1px solid var(--tag-border);
}
.th-grid .th-cells span.on { background: rgba(111,114,255,0.45); border-color: rgba(111,114,255,0.7); }
.th-grid .th-cells span.warn { background: rgba(210,162,76,0.40); border-color: rgba(210,162,76,0.7); }

/* 3 · kubectl terminal */
.th-term .th-code { font-size: 10.5px; line-height: 1.85; color: var(--fg-dim); white-space: pre; overflow: hidden; }
.th-term .th-code .p { color: var(--accent); }
.th-term .th-code .ok { color: #3fb27f; }
.th-term .th-code .warn { color: #d2a24c; }

/* 4 · recon attack-path graph */
.th-graph .th-svg { flex: 1; width: 100%; min-height: 0; }
.th-graph .e { stroke: var(--tag-border); stroke-width: 1.5; }
.th-graph .e.on { stroke: var(--accent); stroke-width: 1.5; opacity: 0.65; }
.th-graph .n { fill: var(--bg-2); stroke: var(--fg-faint); stroke-width: 1.5; }
.th-graph .n.on { stroke: var(--accent); fill: rgba(111,114,255,0.25); }
.th-graph .n.target { stroke: #d9605f; fill: rgba(217,96,95,0.22); }

/* ===== Work history ===== */
.role {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.role:last-of-type { border-bottom: 1px solid var(--rule); }
.role-head {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 15.5px;
}
.role-head .co { color: var(--fg); font-weight: 500; }
.role-head .at { color: var(--fg-faint); }
.role-head .title { color: var(--fg-dim); font-style: italic; font-family: var(--font-display); font-size: 17px;}
.role-period {
  grid-column: 2; grid-row: 1 / span 2;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--accent);
  letter-spacing: 0.04em; white-space: nowrap; padding-top: 4px;
}
.role-desc { color: var(--fg-dim); font-size: 14.5px; max-width: 68ch; text-wrap: pretty; }

/* ===== Certifications ===== */
.cert {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.cert:last-of-type { border-bottom: 1px solid var(--rule); }

/* keep the row content above the glow layers */
.cert > * { position: relative; z-index: 1; }

/* soft purple light that washes in from the left on hover */
.cert::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120% 140% at -6% 50%,
              rgba(111,114,255,0.11),
              rgba(111,114,255,0.035) 28%,
              transparent 50%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.cert:hover::before { opacity: 1; }

/* glowing accent bar that grows from the centre and pulses */
.cert::after {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 2px;
  height: 0%;
  background: var(--accent);
  border-radius: 2px;
  transform: translateY(-50%);
  opacity: 0;
  transition: height .35s ease, opacity .35s ease;
  pointer-events: none;
  z-index: 2;
}
.cert:hover::after {
  height: 72%;
  opacity: 1;
  animation: certGlow 1.8s ease-in-out infinite;
}
@keyframes certGlow {
  0%, 100% { box-shadow: 0 0 8px 0 rgba(111,114,255,0.55); }
  50%      { box-shadow: 0 0 18px 2px rgba(111,114,255,0.9); }
}
@media (prefers-reduced-motion: reduce) {
  .cert:hover::after { animation: none; }
}

.cert-main { min-width: 0; }
.cert-title {
  font-size: 15px;
  color: var(--fg);
  transition: color .3s ease, text-shadow .3s ease;
}
.cert:hover .cert-title {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(111,114,255,0.5);
}
.cert-issuer { font-size: 12.5px; color: var(--fg-dim); margin-top: 2px; font-family: var(--font-mono); letter-spacing: 0.02em;}
.cert-date {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--accent);
  letter-spacing: 0.04em; white-space: nowrap;
}
.verify-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  padding: 6px 10px;
  border: 1px solid var(--tag-border);
  background: var(--tag-bg);
  border-radius: 4px;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
  transition: color .2s, border-color .2s, background .2s, gap .2s;
  white-space: nowrap;
}
.verify-btn:hover {
  color: var(--accent); border-color: var(--accent);
  background: rgba(111,114,255,0.08); gap: 9px;
}
.verify-btn.is-static { cursor: default; }
.verify-btn.is-static:hover {
  color: var(--fg-dim); border-color: var(--tag-border);
  background: var(--tag-bg); gap: 6px;
}

/* Below ~700px the full-width rows stack: date/period drops under the title. */
@media (max-width: 700px) {
  .role { grid-template-columns: 1fr; }
  .role-period { grid-column: 1; grid-row: auto; padding-top: 0;}
  .cert { grid-template-columns: 1fr auto; }
  .cert .cert-date { grid-column: 2; grid-row: 1; }
  .cert .verify-btn { grid-column: 1 / span 2; justify-self: start; }
}

/* ===== Contact ===== */
.contact { margin-top: 4px; }
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 18px;
  transition: color .25s ease;
}
.contact-email .ca {
  font-family: var(--font-body);
  font-size: 26px;
  color: var(--fg-faint);
  transition: transform .25s ease, color .25s ease;
}
.contact-email:hover { color: var(--accent); }
.contact-email:hover .ca { color: var(--accent); transform: translateX(7px); }
.contact-blurb {
  color: var(--fg-dim);
  max-width: 54ch;
  text-wrap: pretty;
  margin: 0 0 30px;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.contact-links a {
  color: var(--fg-dim);
  transition: color .2s ease;
}
.contact-links a:hover { color: var(--accent); }
.contact-links .ext { color: var(--fg-faint); }
.contact-links a:hover .ext { color: var(--accent); }

/* ===== Footer ===== */
footer {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
footer .center { text-align: center; flex: 1; }
footer span { white-space: nowrap; }

@media (max-width: 540px) {
  .wrap { padding: 64px 22px 56px; }
  h1.name { font-size: 44px; }
  .contact-email { font-size: 26px; }
  footer { flex-direction: column; gap: 6px; align-items: flex-start; }
  footer .center { text-align: left; }
}
