/*
Theme Name: Excellence as a Habit
Theme URI: https://excellenceasahabit.com
Author: Excellence as a Habit
Description: A custom WordPress theme for the Excellence as a Habit tech blog.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: excellence
*/

:root{
  --bg: #3B3B3B;
  --ink: #FC733D;
  --link: #3D66FC;
  --bg-deep: #6a6a6a;
  --bg-light: #858585;
  --line: rgba(230,102,0,0.35);
  --paper: rgba(0,0,0,0.12);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'IBM Plex Serif', Georgia, serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
}

a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

/* ---------- header ---------- */
header{
  position: relative;
  padding: 80px 48px 48px;
  border-bottom: 1px solid var(--line);
}

h1.title{
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: uppercase;
}

.title em{
  font-style: normal;
  color: var(--bg);
  -webkit-text-stroke: 1.5px var(--ink);
}

.header-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.tagline{
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  max-width: none;
  opacity: 0.9;
  margin: 28px 0 0;
}

/* nav */
nav ul{
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

nav li{
  position: relative;
  padding: 0 20px 0 0;
  margin: 0 20px 8px 0;
  border-right: 1px solid var(--line);
}
nav li:last-child{ border-right: none; margin-right: 0; padding-right: 0; }

nav a{
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
nav a:hover{
  border-bottom-color: var(--link);
  text-decoration: none;
}

/* ---------- hero thesis ---------- */
.thesis{
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 72px 48px;
  border-bottom: 1px solid var(--line);
}

.thesis-text{
  flex: 1 1 480px;
  max-width: 720px;
}

.thesis blockquote{
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.42;
}

.thesis cite{
  display: block;
  margin-top: 22px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.thesis-image{
  flex: 0 1 320px;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--bg-deep);
}

.thesis-image svg{ width: 100%; height: 100%; display: block; }

@media (max-width: 860px){
  .thesis{ flex-direction: column; align-items: stretch; }
  .thesis-image{ max-width: 100%; }
}

/* ---------- category index ---------- */
.log{
  padding: 56px 48px 96px;
}

.log-head{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.log-head::after{
  content:"";
  flex:1;
  height: 1px;
  background: var(--line);
}

.grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card{
  position: relative;
  background: var(--bg);
  padding: 34px 34px 38px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.2s ease;
}
.card:hover{ background: var(--bg-light); }

.card .body{
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  justify-content: space-between;
}

.card .code{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0.6;
}

.card h2{
  font-family: var(--mono);
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 0.01em;
}

.card h2 a{
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--link), var(--link));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.2s ease;
  padding-bottom: 4px;
}
.card h2 a:hover{
  background-size: 100% 2px;
}

.card p{
  font-family: var(--serif);
  font-size: 0.92rem;
  opacity: 0.85;
  margin: 0;
  max-width: 36ch;
}

.card .corner{
  position: absolute;
  width: 14px; height: 14px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  top: 10px; left: 10px;
  opacity: 0.45;
}

@media (max-width: 720px){
  .grid{ grid-template-columns: 1fr; }
  header, .thesis, .log{ padding-left: 24px; padding-right: 24px; }
  nav li{ border-right: none; padding-right: 0; margin-right: 24px; }
}

/* ---------- footer ---------- */
footer{
  padding: 28px 48px 48px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
