:root {
  --bg-color: #0c0c0c;
  --surface-color: #1a1a1a;
  --border-color: #333333;
  --text-main: #e0e0e0;
  --text-muted: #888888;
  --accent-color: #ff5722; /* Industrial Orange */
  --accent-hover: #e64a19;
  --ogham-stone: #2a2d2b;
  --ogham-moss: #3d5a3d;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  --max-width: 1000px;
}

@font-face {
  font-family: 'Noto Sans Ogham';
  src: url('/fonts/NotoSansOgham-Regular.woff2') format('woff2'),
       url('/fonts/NotoSansOgham-Regular.ttf') format('truetype');
  font-display: swap;
  unicode-range: U+1680-169F;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--space-md); }
h3 { font-size: 1.5rem; margin-bottom: var(--space-xs); }

p { margin-bottom: var(--space-sm); color: var(--text-muted); }
strong { color: var(--text-main); font-weight: 600; }

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

/* Layout & Grid System */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.section-num {
  font-family: var(--font-mono);
  color: var(--accent-color);
  font-size: 1.25rem;
}

.section-header h2::before {
  content: '᚛';
  font-family: 'Noto Sans Ogham', serif;
  margin-right: 0.75rem;
  color: var(--accent-color);
  opacity: 0.4;
  font-size: 0.9em;
}

.section-header h2::after {
  content: '᚜';
  font-family: 'Noto Sans Ogham', serif;
  margin-left: 0.75rem;
  color: var(--accent-color);
  opacity: 0.4;
  font-size: 0.9em;
}

/* Ogham edge (fixed left side) */
.ogham-edge {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  writing-mode: vertical-lr;
  font-family: 'Noto Sans Ogham', serif;
  font-size: 0.875rem;
  color: var(--accent-color);
  opacity: 0.05;
  letter-spacing: 0.5em;
  padding: 2rem 0.5rem;
  user-select: none;
  pointer-events: none;
  z-index: -1;
}

/* Ogham rule (horizontal divider) */
.ogham-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
  color: var(--text-muted);
}

.ogham-rule::before,
.ogham-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.ogham-rule span {
  font-family: 'Noto Sans Ogham', serif;
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  opacity: 0.25;
  user-select: none;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(12, 12, 12, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: bold;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.nav-links a:hover {
  color: var(--text-main);
  text-decoration: none;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 60px;
}

.hero-subtitle {
  font-family: var(--font-mono);
  color: var(--accent-color);
  margin-bottom: var(--space-sm);
  display: block;
}

.hero-title {
  margin-bottom: var(--space-sm);
}

.hero-location {
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-location::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.hero-tagline {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  max-width: 600px;
  color: var(--text-muted);
}

/* Grid Cards (Skills & OSS) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: var(--space-md);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #555;
}

.card:hover::before {
  background-color: var(--accent-color);
}

.card-icon {
  font-family: var(--font-mono);
  color: var(--accent-color);
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

/* Skills Specific */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* OSS Specific */
.oss-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
}

.card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  color: inherit;
  text-decoration: none;
}

/* Empty State */
.empty-state {
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  border: 1px dashed var(--border-color);
  background: var(--surface-color);
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Timeline Section */
.timeline-blurb {
  max-width: 700px;
  margin-bottom: var(--space-lg);
}

.blurb-text {
  font-size: 1.125rem;
  color: var(--text-main);
  line-height: 1.7;
  font-style: italic;
  border-left: 2px solid var(--accent-color);
  padding-left: var(--space-sm);
}

.blurb-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: var(--space-xs);
  padding-left: var(--space-sm);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 20px 1fr;
  align-items: start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.timeline-item:hover {
  background-color: var(--surface-color);
  text-decoration: none;
  color: inherit;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  padding-top: 2px;
}

.timeline-dot {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.timeline-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-repo {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-color);
}

.timeline-title {
  font-size: 0.95rem;
  color: var(--text-main);
}

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

/* Ogham Aside (cultural callout in About section) */
.ogham-aside {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  max-width: 800px;
  padding: var(--space-md);
  background: var(--ogham-stone);
  border-left: 2px solid var(--ogham-moss);
}

.ogham-aside-edge {
  writing-mode: vertical-lr;
  font-family: 'Noto Sans Ogham', serif;
  font-size: 1rem;
  color: var(--ogham-moss);
  opacity: 0.5;
  letter-spacing: 0.3em;
  user-select: none;
  padding-top: 0.25rem;
}

.ogham-aside-content h4 {
  font-family: var(--font-mono);
  color: var(--accent-color);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.ogham-inline {
  font-family: 'Noto Sans Ogham', serif;
  color: var(--accent-color);
  opacity: 0.7;
}

.ogham-sample {
  font-family: 'Noto Sans Ogham', serif;
  font-size: 2.5rem;
  letter-spacing: 0.2em;
  color: var(--accent-color);
  opacity: 0.6;
  text-align: center;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-xs);
}

@media (max-width: 768px) {
  .ogham-aside {
    grid-template-columns: 1fr;
  }
  .ogham-aside-edge {
    writing-mode: horizontal-tb;
    letter-spacing: 0.5em;
  }
}

/* Contact */
.contact-wrapper {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--bg-color);
  background-color: var(--accent-color);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--accent-color);
  font-weight: bold;
  margin-top: var(--space-md);
  transition: all 0.2s ease;
}

.btn:hover {
  background-color: transparent;
  color: var(--accent-color);
  text-decoration: none;
}

/* Footer */
footer {
  padding: var(--space-lg) 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
}

.footer-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .section {
    padding: var(--space-lg) 0;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
    padding: var(--space-sm);
  }
  .timeline-date {
    text-align: left;
  }
  .timeline-dot {
    display: none;
  }
}
