@font-face {
    font-family: 'Space Mono';
    src: url('fonts/SpaceMono-Regular.ttf') format('truetype');
    font-weight: 100;
    /* font-style: normal; */
    font-display: swap;
  }

:root {
    --stripe-purple: #5433ff;
    --stripe-purple-light: #6e52ff;
    --text-primary: #1a1f36;
    --text-secondary: #000000;
    --text-tertiary: #697386;
    --border-color: #e6e8eb;
    --accent-purple: rgba(84, 51, 255, 0.1);
    --background: #ffffff;
    --background-semi: rgba(248, 250, 252, 0.9);
    --dot-size: 2px;
    --dot-space: 24px;
}

.accent-bold {
  color: var(--stripe-purple);
  font-weight: 600;
}

[data-theme="dark"] {
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    /* --background: #090A12; */
    --border-color: #1e293b;
    --accent-purple: rgba(139, 92, 246, 0.2);
    --background: #0C111E;
    /* --background-semi: rgba(6, 11, 18, 0.9); */
}

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

body {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: 
        radial-gradient(circle at var(--dot-space) var(--dot-space), var(--border-color) var(--dot-size), transparent var(--dot-size)),
        var(--background);
    background-size: var(--dot-space) var(--dot-space);
    -webkit-font-smoothing: antialiased;
  }

html {
    overflow-x: hidden;
}

.dotted-line {
  width: 1px;
  height: 200px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 50%, transparent 50%);
  background-size: 10px 10px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

header {
    padding: 1.75rem 0;
    /* border: 1px solid transparent;
    border-image: repeating-linear-gradient(
        to right,
        var(--border-color) 0,
        var(--border-color) 4px,
        transparent 4px,
        transparent 8px
    ) 1; */
    background: 
        radial-gradient(circle at var(--dot-space) var(--dot-space), var(--border-color) var(--dot-size), transparent var(--dot-size)),
        var(--background);
    background-size: var(--dot-space) var(--dot-space);
    backdrop-filter: blur(8px);
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
}

.header-spacer {
    flex-grow: 1;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.name-logo {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    z-index: 100;
}

.name-logo:hover {
    color: var(--stripe-purple);
}

.theme-toggle {
    color: var(--text-primary);
    background-color: transparent;
    border: none;
    margin-left: 1rem;
    z-index: 100;
}

.theme-toggle:hover {
    color: var(--stripe-purple);
}

.theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    z-index: 200;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--stripe-purple);
}

section {
    padding: 4rem 0;
    position: relative;
}

/* This adds the circular "node" to the start of each section */
section > h2::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.5rem; /* Adjusted for new context */
    width: 2px;
    height: 1.5rem;
    background: var(--stripe-purple);
    transform: translateX(-50%);
    z-index: 1;
}

.circular-image {
    display: block;
    margin: 0 auto;
}

.intro {
    display: grid;
    /* grid-template-columns: 2fr 1fr; */
    gap: 4rem;
    align-items: center;
}

.intro-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.intro-text > h2::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.8rem; /* Adjusted for new context */
    width: 2px;
    height: 1.5rem;
    background: var(--stripe-purple);
    transform: translateX(-50%);
    z-index: 1;
}

.intro-text > h1::before,
.now-page > section:first-of-type > h1::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 4rem; /* Adjusted for new context */
    width: 2px;
    height: 2.5rem;
    background: var(--stripe-purple);
    transform: translateX(-50%);
    z-index: 1;
}

.intro-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: justify;
}

/* Hyperlink styling */
.intro-text a, 
.blog-content a,
.current-status a,
p a,
.blog-text a,
article a {
    color: var(--stripe-purple);
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

article p,
.blog-text p,
.blog-content p {
    text-align: justify;
}

.intro-text a:hover, 
.blog-content a:hover,
.current-status a:hover,
p a:hover,
.blog-text a:hover,
article a:hover {
    text-decoration: underline;
}

/* Dark mode support */
[data-theme="dark"] .intro-text a,
[data-theme="dark"] .blog-content a,
[data-theme="dark"] .current-status a,
[data-theme="dark"] p a,
[data-theme="dark"] .blog-text a,
[data-theme="dark"] article a {
    color: var(--stripe-purple-light);
}

.profile-image {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    background: #e6e8eb;
    margin-left: auto;
}

.circular-image {
    border-radius: 50%;
}

.current-status {
    background: var(--background);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.current-status p {
    text-align: justify;
}

.status-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.writing-preview h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.post-list {
    list-style: none;
    position: relative;
}


.post-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    transition: transform 0.2s ease, padding-left 0.2s ease;
}

.post-item:hover {
    transform: translateY(-2px);
    padding-left: 0.75rem;
    background-color: var(--background);
    border-radius: 4px;
}

.post-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 0;
    background-color: var(--stripe-purple);
    border-radius: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}

.post-item:hover::before {
    width: 6px;
    height: 6px;
    opacity: 1;
}

.post-item:last-child {
    border-bottom: none;
}

.post-title {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
    flex: 1 1 auto;
    margin-right: 1rem;
}

.post-title:hover {
    color: var(--stripe-purple);
    transform: translateX(2px);
}

.post-date {
    color: var(--text-tertiary);
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.post-item:hover .post-date {
    color: var(--stripe-purple);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    display: grid;
    grid-template-rows: auto 1fr;
    border-radius: 8px;
    padding: 1.5rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--stripe-purple);
    text-decoration: none;
}

.project-link:hover .project-title {
    color: var(--stripe-purple);
}

.project-card:hover .project-title {
    color: var(--stripe-purple);
}
  
  .project-title {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
  }

.project-title {
    font-weight: 600;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: justify;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent-purple);
    color: var(--stripe-purple);
    border-radius: 1rem;
    font-weight: 500;
}

.button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--accent-purple);
    color: var(--stripe-purple);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.button:hover {
    background: var(--background);
    border-color: var(--stripe-purple);
}

a.button:hover {
    text-decoration: none;
}


footer {
    margin-top: 4rem;
    position: relative;
}

footer::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        var(--border-color) 0,
        var(--border-color) 4px,
        transparent 4px,
        transparent 8px
    );
    margin-bottom: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    padding: 0 2rem;
}


.footer-section {
    max-width: none;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-about p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-links,
.footer-quick-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links li a,
.footer-quick-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links li svg {
    width: 1.25rem;
    height: 1.25rem;
}

.footer-links li a:hover,
.footer-quick-links a:hover {
    color: var(--stripe-purple);
}

.contact-info {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-bottom {
    margin-top: 0rem;
    padding-top: 2rem;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
}

.footer-social a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: var(--stripe-purple);
}

[data-theme="dark"] .footer-social a:hover {
    color: var(--stripe-purple-light);
}

[data-theme="dark"] .project-card:hover {
    border-color: var(--stripe-purple-light);
    background: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .post-title:hover,
[data-theme="dark"] .nav-links a:hover {
    color: var(--stripe-purple-light);
}

.email-link {
    color: #5433FF;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}



.mobile-menu-toggle {
    display: none;
    color: var(--text-primary);
    background-color: transparent;
    border: none;
    z-index: 100;
}

.mobile-menu-toggle:hover {
    color: var(--stripe-purple);
}

/* --- Styles for /now page and preview --- */

/* Separator on the homepage */
.now-separator {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    margin: 4rem 0 0 0;
}

/* General list styling for /now sections */
.now-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.now-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

/* Custom bullet point for the lists */
.now-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--stripe-purple);
    font-weight: bold;
}

/* Timestamp style for both pages */
.timestamp {
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

/* "Back to home" link on now.html */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
}

.back-link:hover {
    color: var(--stripe-purple);
}

/* Specific heading styles for the dedicated now.html page */
.now-page h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.now-page h2 {
    font-size: 1.5rem;
    margin-top: 4rem; /* Add space above "Previously" */
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.now-page h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.now-page p {
    text-align: justify;
    margin-bottom: 1rem;
}

/* --- Add this to your styles.css file --- */

/* Styles the /now heading on the homepage to look like other headings */
.now-header-link {
    color: inherit; /* Makes the link inherit the color of the h2 tag */
    text-decoration: none; /* Removes the underline */
}

.now-header-link:hover {
    color: var(--stripe-purple); /* Adds a hover effect */
}

@media (max-width: 420px) {


    body {
        font-size: 0.95rem;
    }

    .intro-text h1 {
        font-size: 2rem;
    }

    .intro-text p {
        font-size: 1rem;
    }

    .footer-section h3 {
        font-size: 0.95rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .post-title {
        font-size: 1rem;
    }

    .post-date {
        font-size: 0.85rem;
    }

    .intro {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-image {
        margin: 0 auto;
    }

    .circular-image {
      border-radius: 50%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

    header {
        position: relative;
        z-index: 101;
        backdrop-filter: none;
    }

    .header-content {
        justify-content: space-between;
    }
    
    .header-content > * {
        z-index: 102;
    }
    
    .name-logo {
        margin-right: 1rem;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 103;
    }

    .nav-overlay.active {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: 60%;
        background-color: var(--background-semi);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 151;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        padding: 1rem 0;
        font-size: 1.25rem;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-primary);
        display: block;
        width: 100%;
        text-align: left;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .theme-toggle {
        order: 2;
        margin-left: 0.5rem;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-section.footer-about {
        grid-column: 1 / -1;
    }

    .footer-section {
        max-width: none;
    }

    .mobile-menu-toggle {
        display: block;
        margin-left: 1rem;
    }

}

main.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem; /* Adds overall vertical padding */
    position: relative; /* Crucial for positioning the line */
}

section {
    padding: 0; /* Removes all padding from sections */
    position: relative;
}

/* Adds space between sections */
section + section {
    margin-top: 4rem;
}

main.container::before {
    content: '';
    position: absolute;
    left: 0.5rem; /* Positions line in the left padding */
    top: 0;
    bottom: 0;
    width: 1px;
    background: repeating-linear-gradient(
        to bottom,
        var(--border-color) 0,
        var(--border-color) 4px,
        transparent 4px,
        transparent 8px
    );
}