@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg: #0b0f19;
  --panel: rgba(17, 24, 39, 0.6);
  --panel-hover: rgba(23, 37, 84, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(168, 85, 247, 0.4);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --link: #38bdf8;
  --link-hover: #60a5fa;
  --accent: #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.3);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.3);
  --warning-bg: rgba(245, 158, 11, 0.08);
  --warning-border: rgba(245, 158, 11, 0.25);
  --warning-text: #fcd34d;
  --ok-bg: rgba(16, 185, 129, 0.08);
  --ok-border: rgba(16, 185, 129, 0.25);
  --ok-text: #6ee7b7;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Grotesk', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Site Layout */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner, .site-main, .site-footer-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.brand {
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 50%, var(--link) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav a:hover, .nav a.active {
  color: var(--link);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.site-main {
  padding-top: 48px;
  padding-bottom: 56px;
}

/* Glassmorphism Cards */
.hero, .card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Headings */
.hero h1, .card h1 {
  font-family: var(--font-heading);
  margin-top: 0;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #f3f4f6;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #f3f4f6;
  margin-top: 1.6rem;
  margin-bottom: 0.8rem;
}

p, li {
  font-size: 1.05rem;
  color: #d1d5db;
  margin-bottom: 1.2rem;
}

ol, ul {
  margin-left: 20px;
  margin-bottom: 1.2rem;
}

li {
  margin-bottom: 0.6rem;
}

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

a:hover {
  color: var(--link-hover);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.meta {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 24px;
}

/* Page list layout */
.page-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 0;
  list-style: none;
  margin: 32px 0;
}

.page-list li {
  margin: 0;
}

.page-list a {
  display: block;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.page-list a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-list a:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(168, 85, 247, 0.15), 0 0 2px rgba(168, 85, 247, 0.4);
}

.page-list a:hover::before {
  opacity: 1;
}

.page-list a strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.page-list a .meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

/* Callout blocks */
.notice {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 28px 0;
  color: var(--warning-text);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.03);
}

.notice strong {
  color: #fff;
}

.clean {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 28px 0;
  color: var(--ok-text);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.03);
}

.clean strong {
  color: #fff;
}

/* Code styling */
code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: .15rem .35rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--link-hover);
}

/* Footer styles */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: rgba(9, 13, 22, 0.8);
  margin-top: 40px;
}

.site-footer-inner {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer-inner p {
  margin: 0;
  font-size: 0.9rem;
}

/* Placeholder class (just in case) */
.placeholder {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.05);
  border: 1px dashed var(--cyan);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Digital Clock Widget */
.clock-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 24px 0 32px 0;
  padding: 24px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  width: 100%;
}

.clock-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow), 0 0 40px rgba(6, 182, 212, 0.1);
  letter-spacing: 0.05em;
  line-height: 1;
}

.clock-colon {
  animation: blink 1s infinite;
  display: inline-block;
  width: 0.3em;
  text-align: center;
}

.clock-ampm {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
  margin-left: 10px;
  text-transform: uppercase;
}

.clock-meta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.clock-date {
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.clock-battery {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ok-text);
}

.clock-battery-icon {
  width: 20px;
  height: 12px;
  border: 2px solid var(--ok-text);
  border-radius: 3px;
  position: relative;
  display: inline-block;
}

.clock-battery-icon::before {
  content: '';
  position: absolute;
  top: 3px;
  right: -4px;
  width: 2px;
  height: 4px;
  background: var(--ok-text);
}

.clock-battery-icon::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 6px;
  background: var(--ok-text);
  animation: charge 2s infinite alternate;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes charge {
  0% { width: 2px; }
  100% { width: 14px; }
}

/* App Portal Layout */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.app-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.03) 0%, rgba(168, 85, 247, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.15), 0 0 2px rgba(168, 85, 247, 0.4);
}

.app-card:hover::before {
  opacity: 1;
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.app-icon {
  font-size: 2rem;
  width: 54px;
  height: 54px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.app-card:hover .app-icon {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.app-card h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.app-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.app-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.app-links li {
  margin: 0;
}

.app-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.app-links a::after {
  content: '→';
  transition: transform 0.2s ease;
  color: var(--link);
}

.app-links a:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--link);
}

.app-links a:hover::after {
  transform: translateX(4px);
}

.app-card.coming-soon {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.01);
  opacity: 0.7;
}

.app-card.coming-soon .app-icon {
  background: rgba(168, 85, 247, 0.05);
  border-color: rgba(168, 85, 247, 0.1);
  color: var(--accent);
}

.app-card.coming-soon h2 {
  color: var(--muted);
}

/* Responsiveness */
@media (max-width: 640px) {
  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }
  
  .nav {
    margin-top: 10px;
    width: 100%;
    justify-content: flex-start;
    gap: 15px;
  }
  
  .hero, .card {
    padding: 24px;
    border-radius: 20px;
  }
  
  .site-footer-inner {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }
  
  .clock-time {
    font-size: 2.8rem;
  }
}
