@import url('https://api.fontshare.com/v2/css?f[]=general-sans@200,300,400,500,600,700&f[]=clash-display@200,300,400,500,600,700&display=swap');

/* Modern minimalist styling with subtle animations */

/* CSS Custom Properties for Theme Support */
:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-muted: #7f8c8d;
    --text-accent: #95a5a6;
    --border-light: #e8e8e8;
    --border-medium: #bdc3c7;
    --border-card: #e1e8ed;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
    --accent-blue: #3498db;
    --accent-blue-dark: #2980b9;
    --accent-green: #27ae60;
    --accent-red: #e74c3c;
    --accent-purple: #9b59b6;
    --gradient-bg-opacity: 0.03;
}

[data-theme="dark"],
html.dark-theme,
html.dark-theme body {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #242424;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #a0a0a0;
    --text-accent: #888888;
    --border-light: #333333;
    --border-medium: #444444;
    --border-card: #333333;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-heavy: rgba(0, 0, 0, 0.5);
    --accent-blue: #64b5f6;
    --accent-blue-dark: #42a5f5;
    --accent-green: #81c784;
    --accent-red: #e57373;
    --accent-purple: #ba68c8;
    --gradient-bg-opacity: 0.06;
}

/* Safari-specific dark mode fix - redundant but necessary */
html.dark-theme {
    --bg-primary: #121212 !important;
    --bg-secondary: #1e1e1e !important;
    --bg-tertiary: #242424 !important;
    --text-primary: #ffffff !important;
    --text-secondary: #e0e0e0 !important;
    --text-muted: #a0a0a0 !important;
    --text-accent: #888888 !important;
    --border-light: #333333 !important;
    --border-medium: #444444 !important;
    --border-card: #333333 !important;
    --accent-blue: #64b5f6 !important;
    --accent-blue-dark: #42a5f5 !important;
    --accent-green: #81c784 !important;
    --accent-red: #e57373 !important;
    --accent-purple: #ba68c8 !important;
    --gradient-bg-opacity: 0.06 !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    font-family: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}



/* Subtle animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, var(--gradient-bg-opacity)) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(79, 172, 254, var(--gradient-bg-opacity)) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, calc(var(--gradient-bg-opacity) * 0.7)) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundMove {
    0%, 100% { 
        transform: translateX(0px) translateY(0px) scale(1);
    }
    25% { 
        transform: translateX(-5px) translateY(-10px) scale(1.02);
    }
    50% { 
        transform: translateX(10px) translateY(-5px) scale(0.98);
    }
    75% { 
        transform: translateX(-8px) translateY(10px) scale(1.01);
    }
}

/* Layout */
.container {
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1000px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 992px) {
    .container {
        width: 970px;
        padding-left: 15px;
        padding-right: 15px;
    }
}

.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 20px;
}

/* Header Section */
#dhead {
    margin-top: 40px;
    margin-bottom: 60px;
}

#dhead .row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

#dpic {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#ddesc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
}

@media (max-width: 991px) {
    #dhead .row {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    #ddesc {
        align-items: center;
    }
}

h1 {
    font-family: 'Clash Display', 'General Sans', sans-serif;
    font-size: 48px;
    font-weight: 600;
    padding: 0;
    margin: 0 0 10px 0;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    position: relative;
}



h2 {
    font-weight: 300;
    font-style: italic;
    color: var(--text-muted);
    font-size: 20px;
    padding: 0;
    margin: 0 0 25px 0;
    line-height: 1.4;
}

@media (min-width: 992px) {
    h2 {
        max-width: 440px;
    }
}

#dpic img {
    width: 200px;
    height: 200px;
    border-radius: 100px;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#dpic img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Social Icons */
#dico {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

@media (max-width: 991px) {
    #dico {
        justify-content: center;
    }
}

/* Social Media Icons */
.iico {
    font-size: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.iico-resume {
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.iico-resume:hover {
    transform: translateY(-3px);
    color: var(--accent-green);
}

.iico:hover {
    transform: translateY(-3px);
    color: var(--accent-blue);
}

/* Specific colors for different social media platforms */
.fa-twitter:hover {
    color: #1da1f2;
}

.fa-github:hover {
    color: var(--text-primary);
}

.fa-medium:hover {
    color: #00ab6c;
}

.fa-linkedin:hover {
    color: #0077b5;
}

/* Email Links - Make them more visible in dark mode */
a[href^="mailto:"]{
    color: var(--accent-blue) !important;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

a[href^="mailto:"]:hover {
    color: var(--accent-blue-dark) !important;
    background-color: rgba(100, 181, 246, 0.1);
    border-bottom-color: var(--accent-blue);
}

/* Info Icon Toggle */
.info-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background: transparent;
    border: none;
    border-radius: 50%;
    width: auto;
    height: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-muted);
    box-shadow: none;
    padding: 0;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
}

.info-toggle:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
    color: var(--text-primary);
}

.info-toggle:focus {
    outline: none;
}

.info-icon {
    width: auto;
    height: auto;
    transition: transform 0.3s ease;
    filter: none;
    color: inherit;
    font-size: 18px;
    font-weight: 300;
    font-style: italic;
}

.info-toggle:hover .info-icon {
    transform: none;
    filter: none;
}

.info-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(5px);
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    margin-top: 5px;
}

.info-toggle:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.info-tooltiptext {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    box-shadow: 0 2px 6px var(--shadow-medium);
    position: relative;
}

.info-tooltiptext::before {
    display: none;
}

/* Divider */
hr {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-medium), transparent);
    padding: 0;
    margin: 50px 0;
    border: 0;
    transition: background 0.3s ease;
}

/* Timeline Section */
#history {
    margin-bottom: 60px;
}

.ico {
    grid-column: span 1;
    vertical-align: top;
    border-left: 2px solid var(--border-light);
    position: relative;
    transition: border-color 0.3s ease;
}

.ico:hover {
    border-left-color: var(--border-medium);
}

.ico img {
    border-radius: 8px;
    width: 100%;
    max-width: 70px;
    margin-left: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.ico img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px var(--shadow-heavy);
}

.desc {
    grid-column: span 10;
    vertical-align: top;
    font-size: 16px;
    padding-left: 25px;
    padding-bottom: 35px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.desc a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.desc a:hover {
    color: var(--accent-blue-dark);
    border-bottom-color: var(--accent-blue);
}

.entry {
    transition: transform 0.2s ease;
    margin-bottom: 10px;
}

.entry:hover {
    transform: translateX(5px);
}

.entry-dot {
    position: absolute;
    top: 5px;
    left: -8px;
    width: 12px;
    height: 12px;
    border-radius: 6px;
    background-color: var(--border-light);
    border: 3px solid var(--bg-primary);
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px var(--shadow-medium);
}

.entry:hover .entry-dot {
    background-color: var(--accent-blue);
    transform: scale(1.2);
}

.timespan {
    grid-column: span 1;
    font-size: 13px;
    text-align: right;
    padding-right: 8px;
    color: var(--text-accent);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Section Titles */
.ctitle {
    font-size: 32px;
    margin-bottom: 30px;
    margin-top: 50px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 10px;
    transition: color 0.3s ease;
}

.ctitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, var(--accent-blue), var(--accent-purple));
    border-radius: 1px;
}

/* About Me Section */
#about {
    margin-bottom: 50px;
}

.about-content {
    padding: 0;
}

.about-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.about-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .about-content p {
        font-size: 15px;
        line-height: 1.6;
    }
}

/* Writing Section Background */
.writing-section {
    padding-top: 1px;
    margin-top: 50px;
    padding-bottom: 30px;
    transition: background-color 0.3s ease;
    position: relative;
}

/* Featured Writing Section */
.nodot {
    list-style-type: none;
    padding-left: 0;
}

.nodot li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    transition: padding-left 0.2s ease, background-color 0.2s ease;
}

.nodot li:hover {
    padding-left: 10px;
    background-color: var(--bg-tertiary);
}

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

.nodot a:hover {
    color: var(--accent-blue);
}

/* Projects Section */
.project {
    margin-bottom: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
    transition: transform 0.2s ease, background-color 0.2s ease;
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

.project:hover {
    transform: translateY(-2px);
    background-color: var(--bg-tertiary);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.pico {
    float: left;
    margin-right: 15px;
}

.pico img {
    height: 70px;
    width: 70px;
    border-radius: 8px;
    border: 1px solid var(--border-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    object-fit: cover;
}

.pico img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.pdesc {
    overflow: hidden;
    line-height: 1.6;
    color: var(--text-secondary);
}

.pdesc a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.pdesc a:hover {
    color: var(--accent-blue-dark);
}

.pend {
    clear: both;
}

/* Publications Section */
.pub {
    font-size: 14px;
    border-left: 4px solid var(--border-medium);
    padding: 12px 0 12px 15px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease, background-color 0.2s ease;
    background-color: var(--bg-secondary);
    border-radius: 0 4px 4px 0;
}

.pub:hover {
    border-left-color: var(--accent-blue);
    background-color: var(--bg-tertiary);
}

.pub-title {
    display: inline;
    color: var(--text-primary);
    line-height: 1.5;
}

.pub-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pub-title a:hover {
    color: var(--accent-blue);
}

.pub-venue {
    display: inline;
    color: var(--accent-green);
    font-weight: 500;
}

.pub-authors {
    display: block;
    color: var(--accent-red);
    margin-top: 5px;
    font-style: italic;
}

/* Misc Section - Simple Styling */
.misc-item {
    padding: 10px 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    transition: padding-left 0.2s ease;
}

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

.misc-item:hover {
    padding-left: 8px;
}

.misc-item strong {
    color: var(--text-primary);
    font-weight: 500;
}

.misc-item a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.misc-item a:hover {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .row {
        gap: 0 10px;
    }
    
    h1 {
        font-size: 36px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .ctitle {
        font-size: 28px;
        margin-top: 40px;
    }
    
    #dpic img {
        width: 180px;
        height: 180px;
        border-radius: 90px;
    }
    
    .desc {
        font-size: 15px;
        padding-left: 20px;
    }
    
    .project {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* Smooth scrolling enhancement */
html {
    scroll-padding-top: 20px;
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Contact Form Styles */
.contact-content {
    max-width: 500px;
}

.contact-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    border-radius: 4px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--border-medium);
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form button {
    padding: 12px 24px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
}

.contact-form button:hover {
    background: var(--text-secondary);
    transform: translateY(-1px);
}

.contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#formStatus {
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

#formStatus.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--accent-green);
}

#formStatus.error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
}

/* Project Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: modalFade 0.3s ease-in-out;
}

@keyframes modalFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px var(--shadow-heavy);
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 10px 15px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
}

.modal-project-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.modal-project-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.modal-project-info {
    flex: 1;
}

.modal-project-info h2 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.github-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.github-link:hover {
    color: var(--accent-blue-dark);
}

.modal-project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
}

.modal-project-description h3 {
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-project-description ul {
    margin: 10px 0;
    padding-left: 25px;
}

.modal-project-description li {
    margin: 5px 0;
}

.project-expand-hint {
    font-size: 12px;
    color: var(--accent-blue);
    margin-top: 5px;
    font-style: italic;
    cursor: pointer;
}

.project {
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.project:hover {
    background-color: var(--bg-tertiary);
    transform: translateX(5px);
}

@media (max-width: 600px) {
    .modal-content {
        margin: 20% auto;
        max-width: 90%;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-project-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .modal-project-image {
        width: 120px;
        height: 120px;
    }
}
/* ===================================================================
   Additions: controls, status pill, now, skills, palette, reveal
   =================================================================== */

/* Smooth cross-page navigation where supported */
@view-transition {
    navigation: auto;
}

a {
    color: var(--accent-blue);
}

.about-content a {
    text-decoration: none;
    border-bottom: 1px solid var(--border-medium);
}

.about-content a:hover {
    border-bottom-color: var(--accent-blue);
}

#footer a {
    color: inherit;
}

/* Top-right controls */
.site-controls {
    position: fixed;
    top: 12px;
    right: 15px;
    z-index: 1001;
    display: flex;
    gap: 8px;
}

.ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    min-width: 34px;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.3s ease;
}

.ctrl-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
}

kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    padding: 1px 5px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .kbd-hint kbd {
        display: none;
    }
}

/* Status pill */
#statusPill:empty {
    display: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -10px 0 22px;
    padding: 5px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--bg-secondary);
}

.status-sep {
    color: var(--text-accent);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ctitle-note {
    margin-left: 12px;
    font-size: 13px;
    color: var(--text-accent);
    letter-spacing: 0;
}

/* Now */
.now-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.now-list li {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.now-label {
    color: var(--text-accent);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding-top: 2px;
}

@media (max-width: 600px) {
    .now-list li {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* Skills */
#skills {
    margin-bottom: 40px;
}

.skill-group {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    padding: 8px 0;
}

.skill-name {
    color: var(--text-accent);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding-top: 5px;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    font-size: 13.5px;
    padding: 3px 11px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .skill-group {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* Projects: live link + empty states */
.demo-link {
    margin-left: 6px;
    font-size: 13px;
    font-weight: 400 !important;
    white-space: nowrap;
}

.empty-note {
    color: var(--text-muted);
    font-style: italic;
}

/* Timeline on phones: date on its own line, smaller logo */
@media (max-width: 600px) {
    .entry.row {
        grid-template-columns: 56px 1fr;
        gap: 0 6px;
    }

    .timespan {
        grid-column: 1 / -1;
        text-align: left;
        padding: 0 0 6px 0;
    }

    .ico {
        grid-column: 1;
    }

    .ico img {
        max-width: 40px;
        margin-left: 10px;
    }

    .desc {
        grid-column: 2;
        padding-left: 8px;
    }
}

/* Command palette */
.palette {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 12vh 16px 16px;
}

.palette.open {
    display: block;
    animation: modalFade 0.15s ease-out;
}

.palette-box {
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 20px 60px var(--shadow-heavy);
    overflow: hidden;
}

.palette-input {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 18px;
    border: 0;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.palette-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 50vh;
    overflow-y: auto;
}

.palette-group {
    padding: 10px 12px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-accent);
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14.5px;
}

.palette-item i {
    width: 16px;
    text-align: center;
    color: var(--text-accent);
}

.palette-item.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.palette-item.active i {
    color: var(--accent-blue);
}

.palette-hint {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-accent);
}

.palette-empty {
    padding: 18px 12px;
    color: var(--text-muted);
    text-align: center;
}

.palette-foot {
    display: flex;
    gap: 16px;
    padding: 9px 14px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-accent);
}

.palette-foot kbd {
    margin-right: 3px;
}

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 10px);
    opacity: 0;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 14px;
    z-index: 2100;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Scroll reveal (class added by JS only for off-screen elements) */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    @view-transition {
        navigation: none;
    }
}

/* Inline email links in prose shouldn't get the padded button look */
.about-content a[href^="mailto:"] {
    padding: 0;
    border-radius: 0;
}

/* Project groups (AI / ML, Software) */
.proj-group {
    font-weight: 500;
    font-size: 18px;
    color: var(--text-primary);
    margin: 28px 0 8px;
}

/* Longer status text wraps cleanly on narrow screens */
.status-pill {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 2px;
}

/* Images inside the project modal */
.modal-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    margin: 4px 0 18px;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 0 0 18px;
}

.modal-grid img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--border-light);
}
