/* Keith Casko — Portfolio
   Design: enterprise IT / infrastructure (late-2000s–early-2010s refined)
   Palette: navy, steel blue, white, light gray, charcoal
*/

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

:root {
  --navy:        #0b1d2e;
  --navy-2:      #10263d;
  --steel:       #1a6fa5;
  --steel-dark:  #155a86;
  --rule:        #d0d7df;
  --rule-soft:   #e4e8ee;
  --bg:          #f3f5f8;
  --panel:       #ffffff;
  --text:        #2b3540;
  --muted:       #566471;
  --muted-2:     #4b5663;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy-2);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .55em;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1em; }

a { color: var(--steel); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
  border-radius: 2px;
}

img { max-width: 100%; display: block; }

code {
  font-family: "Consolas", "Menlo", "Courier New", monospace;
  font-size: 0.92em;
  background: #eef2f6;
  border: 1px solid var(--rule-soft);
  padding: 0 4px;
  border-radius: 3px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 64px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--steel);
  position: relative;
}
.section-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -5px;
  height: 1px;
  background: var(--rule);
}
.section-head h2 { margin: 0; font-size: 26px; color: var(--navy-2); }
.section-head .subtitle { color: var(--muted); font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--steel);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand .name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.1px;
}
.brand .tagline {
  display: block;
  font-size: 12.5px;
  color: #a9b8c7;
  margin-top: 4px;
  letter-spacing: .25px;
}
.brand .location {
  display: inline-block;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid #3b556f;
  color: #8ea1b5;
  font-size: 12.5px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.site-nav a {
  display: block;
  padding: 8px 14px;
  color: #e4ecf3;
  font-size: 14px;
  border-radius: 3px;
  transition: background-color .12s ease, color .12s ease;
}
.site-nav a:hover { background: #16314a; text-decoration: none; color: #fff; }
.site-nav a.active {
  background: var(--steel);
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid #3b556f;
  color: #fff;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 3px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: 44px 0 56px; }
.hero-grid {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--steel);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(16, 38, 61, 0.06);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { font-size: 34px; margin-bottom: 18px; line-height: 1.2; }
.hero p { color: var(--muted-2); font-size: 16px; }
.hero .lede { color: var(--text); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn-primary { background: var(--steel); color: #fff; border-color: var(--steel-dark); }
.btn-primary:hover { background: var(--steel-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: #fff; color: var(--navy-2); border-color: #c3cbd4; }
.btn-secondary:hover { background: #eef2f6; border-color: #9fadbd; text-decoration: none; }

.hero-image {
  background: #e9edf1;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.image-placeholder {
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(45deg, #e3e8ed 0, #e3e8ed 10px, #eef2f6 10px, #eef2f6 20px);
  color: #5a6775;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  letter-spacing: .2px;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.project-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(16, 38, 61, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.project-card:hover {
  border-color: #9fb6ca;
  box-shadow: 0 4px 14px rgba(16, 38, 61, 0.10);
}
.project-card .thumb {
  background: #e9edf1;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card .thumb .image-placeholder { font-size: 12px; }
.project-card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.project-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--navy-2); }
.project-card:hover h3 { color: var(--steel-dark); }
.project-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted-2);
  margin-bottom: 16px;
  flex: 1;
}
.project-card .view-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--steel);
  align-self: flex-start;
}
.project-card .view-link::after { content: " \203A"; color: var(--steel); }

/* ---------- What I Work With ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.skill-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16, 38, 61, 0.04);
}
.skill-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-soft);
}
.skill-head .ico { width: 22px; height: 22px; flex: 0 0 22px; color: var(--steel); }
.skill-card h3 {
  font-size: 15px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--navy-2);
  margin: 0;
  line-height: 1.2;
}
.skill-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted-2);
}
.skill-card li { padding: 2px 0; }

/* ---------- Troubleshooting ---------- */
.notes-list {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 38, 61, 0.04);
}
.note-item {
  display: grid;
  grid-template-columns: 44px 1fr 24px;
  gap: 18px;
  align-items: start;
  padding: 18px 22px;
  border-bottom: 1px solid var(--rule-soft);
  transition: background-color .12s ease;
}
.note-item:last-child { border-bottom: 0; }
.note-item:hover { background: #f7f9fb; }
.note-item .icon {
  width: 36px;
  height: 36px;
  background: #eaf1f7;
  color: var(--steel);
  border: 1px solid #cfdbe6;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  font-family: "Consolas", monospace;
  letter-spacing: .5px;
}
.note-item h3 {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  margin: 0 0 4px;
  color: var(--steel);
}
.note-item:hover h3 { color: var(--steel-dark); }
.note-item p { margin: 0; color: var(--muted-2); font-size: 14px; }
.note-item ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted-2);
  font-size: 13.5px;
  line-height: 1.6;
}
.note-item li { padding: 1px 0; }
.note-item .chevron { color: #94a1ae; font-size: 20px; padding-top: 6px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}
.about-photo {
  background: #e9edf1;
  border: 1px solid var(--rule);
  border-radius: 3px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.about-text {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--steel);
  border-radius: 4px;
  padding: 22px 24px;
}
.about-text h3 { font-size: 19px; margin-bottom: 12px; }
.pull-quote {
  background: #eef2f6;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--steel);
  border-radius: 3px;
  padding: 20px 22px;
  font-style: italic;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
}
.pull-quote .mark {
  font-family: Georgia, serif;
  font-size: 34px;
  color: var(--steel);
  line-height: 0;
  position: relative;
  top: 10px;
  margin-right: 4px;
}

/* ---------- Education / Experience ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--steel);
  border-radius: 4px;
  padding: 22px 26px;
  box-shadow: 0 1px 2px rgba(16, 38, 61, 0.04);
}
.panel h3 { font-size: 18px; margin-bottom: 6px; }
.panel .meta { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.panel h4 {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13.5px;
  color: var(--navy-2);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.panel ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-2);
}
.panel li { padding: 2px 0; }

/* ---------- Contact banner ---------- */
.contact-cta {
  background: var(--navy);
  color: #e4ecf3;
  border-radius: 4px;
  border-top: 3px solid var(--steel);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.contact-cta h2 { color: #fff; margin: 0 0 6px; font-size: 22px; }
.contact-cta p { margin: 0; color: #a9b8c7; font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #a9b8c7;
  padding: 24px 0;
  margin-top: 48px;
  border-top: 4px solid var(--steel);
  font-size: 13.5px;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: #cfd8e1; }
.site-footer a:hover { color: #fff; }
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; padding: 32px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .contact-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  section { padding: 44px 0; }
  .hero { padding: 28px 0 36px; }
  .hero-grid { padding: 22px; }
  .hero h1 { font-size: 27px; }
  .section-head h2 { font-size: 22px; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .note-item { grid-template-columns: 36px 1fr; padding: 16px; }
  .note-item .chevron { display: none; }

  .brand .location { display: block; margin: 4px 0 0; padding-left: 0; border-left: 0; }
  .nav-toggle { display: inline-block; }
  .site-header .container { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 10px 12px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

.about-headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
