/* CSS Custom Properties */
:root {
  --primary-color: #ffcb04;
  --primary-light: #fff7b2;
  --primary-dark: #dfbf0b;
  --secondary-color: #e6b603;
  --bg-primary: #080213;
  --bg-secondary: #171122;
  --text-primary: #dff1f5;
  --text-secondary: #f8f9fa;
  --text-muted: #e9ecef;
  --border-color: #4a4a4a;
  --transition: all 0.3s ease;
  --border-radius: 10px;
  --border-radius-sm: 5px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  max-width: 100vw;
  overflow-x: hidden;
}

html {
    max-width: 100vw;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Utility Classes */
.hidden {
  display: none;
}

.show {
  display: block;
}

/* Links and Buttons */
a {
  color: var(--primary-color);
  text-decoration: none;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-primary);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary:hover {
  background-color: var(--primary-dark);
  color: var(--bg-primary);
}

.reveal-btn {
  background: var(--primary-color);
  color: var(--bg-primary);
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.reveal-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.reveal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Navigation */
.main-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand a {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nav-brand a:hover {
  color: var(--primary-color);
  transform: translateY(-1px);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

@media (max-width: 768px) {
  .main-nav .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-menu {
    gap: 1rem;
  }
}

/* Header and Hero Section */
header {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 80px 0;
  text-align: center;
  border-bottom: 2px solid var(--primary-color);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 0.6fr;
  gap: 4rem;
  align-items: start;
  text-align: left;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .tagline {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  opacity: 0.9;
}

.hero .subtitle {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  opacity: 0.9;
  font-weight: 500;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* Calendar Component */
#my-cal-inline-30min {
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  height: 25em;
  transition: height 0.5s ease;
  position: relative;
}

#my-cal-inline-30min iframe {
  border: none;
  outline: none;
  width: 100%;
  height: 100%;
}

/* Main Content and Sections */
main {
  padding: 60px 0;
}

section {
  margin-bottom: 80px;
}

h2 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--border-color);
  margin: 1rem auto;
  opacity: 0.6;
}

/* Card Components */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
}

.card-shadow {
  box-shadow: var(--shadow);
}

.card-shadow-lg {
  box-shadow: var(--shadow-lg);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-category {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border-left: 3px solid var(--border-color);
  border: 1px solid var(--border-color);
}

.skill-category h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  border: 1px var(--border-color) solid;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-primary);
}

/* Experience Section */
.experience-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.experience-title {
  flex: 1;
}

.experience-title h3 {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.company {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.1rem;
}

.duration {
  background: var(--primary-color);
  color: var(--bg-primary);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.achievements {
  list-style: none;
  margin: 1rem 0;
}

.achievements li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.achievements li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-weight: bold;
}

.tech-stack {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  margin-top: 1rem;
}

.tech-stack strong {
  color: var(--text-secondary);
}

/* About Section */
.about-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.about-text {
  text-align: center;
  font-size: 1.2rem;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-highlight {
  color: #ffffff;
}

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

/* Contact Section */
.contact {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 60px 0;
  text-align: center;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.contact h2 {
  color: var(--text-primary);
}

.contact-intro {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.contact .cta-buttons {
  margin-top: 2rem;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-item a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Email Reveal Section */
.email-reveal {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 500px;
  text-align: center;
}

.email-reveal h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.email-reveal p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.email-display {
  background: var(--bg-primary);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  margin-top: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.1rem;
}
/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

#expand-calendar {
  display: inline-block;
  font-size: 0.75em;
  text-align: right;
  width: 100%;
  margin: 0.5em 0;
}

#collapse-calendar {
  display: none;
  /* display: inline-block; */
  font-size: 0.75em;
  text-align: right;
  width: 100%;
  margin: 0.5em 0;
}

.mobile-only {
  display: none !important;
}

.header-calendar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, var(--bg-secondary) 0%, transparent 100%);
  z-index: 10;
  transition: transform 1s ease, opacity 1s ease;
  pointer-events: auto;
  transform: translateZ(0);
  will-change: transform;
  isolation: isolate;
}

.header-calendar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg-secondary) 0%, transparent 100%);
  pointer-events: none;
}

.header-calendar::before {
  content: "⌄";
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.5rem;
  /* font-weight: bold; */
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  /* #my-cal-inline-30min {
    margin: auto;
    display: none;
  }

  #my-cal-inline-30min.show {
    display: block !important;
  } */

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .experience-header {
    flex-direction: column;
    gap: 1rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-info {
    flex-direction: column;
    gap: 1rem;
  }

  .email-reveal {
    padding: 2rem 0;
  }
}

/* Blog Styles */
.posts-list {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.post-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.post-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.post-item h2 {
  margin-bottom: 1rem;
  text-align: left;
}

.post-item h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-item h2 a:hover {
  color: var(--text-primary);
}

.post-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  justify-content: flex-end;
  align-items: center;
  opacity: 0.8;
}

.post-meta-top time {
  color: var(--text-muted);
  font-weight: 400;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-muted);
  justify-content: center;
  align-items: center;
}

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

.post-summary {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 1rem;
}

.post-summary ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.post-summary li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.post-summary li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2em;
}

.post-summary h1,
.post-summary h2,
.post-summary h3,
.post-summary h4,
.post-summary h5,
.post-summary h6 {
  display: none;
}

.post-summary hr {
  display: none;
}

.post {
  max-width: 800px;
  margin: 0 auto;
}

.post-header {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  margin-bottom: 3rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.post-content {
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content h2 {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  opacity: 0.6;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
}

.post-content code {
  background: var(--bg-primary);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  color: var(--text-secondary);
}

.post-content pre {
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.post-item .tags {
  justify-content: center;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.post-header .tags {
  width: 100%;
  justify-content: center;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.tag {
  background: var(--bg-primary);
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
}

.author {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Blog responsive */
@media (max-width: 768px) {
  .post-header {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }
  
  .post-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .post-meta-top {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    opacity: 0.7;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
  }
  
  .post-header .tags {
    margin-top: 1rem;
  }
  
  .post-content {
    font-size: 0.95rem;
  }
  
  .post-content h1,
  .post-content h2,
  .post-content h3 {
    font-size: 1.5rem;
  }
}