/* Import JetBrains Mono for that hacker/terminal aesthetic */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&display=swap');

:root {
    /* Hacker aesthetic color palette with cyberpunk purple */
    --color-primary: #0a0a0a;
    --color-secondary: #404040;
    --color-accent: #a855f7;
    --color-accent-alt: #9333ea;
    --color-background: #fafafa;
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-border: #333333;

    /* Terminal-inspired typography */
    --font-size-base: 13px;
    --font-size-lg: 15px;
    --font-size-sm: 12px;

    /* Dashed border for that ASCII/terminal feel */
    --border: dashed 1px var(--color-border);
    --border-solid: solid 1px var(--color-border);
}

img {
  max-width: 100%;   /* shrink to parent’s width if too big */
  height: auto;      /* keep aspect ratio */
  display: block;    /* removes extra whitespace under inline images */
}

html {
    height: 100%;
}

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: var(--font-size-base);
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-background);
    max-width: 80ch;
    margin: 0 auto;
    padding: 0 1rem;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Terminal-inspired typography */
h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

h2::before {
    content: "## ";
    color: var(--color-accent-alt);
    font-weight: 400;
}

h3 {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

h3::before {
    content: "$ ";
    color: var(--color-accent);
    font-weight: 400;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.15s ease-out, text-shadow 0.15s ease-out;
    cursor: pointer;
}

a:hover {
    color: var(--color-accent-alt);
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

header {
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-top: var(--border);
    border-bottom: var(--border);
}

footer {
    border-top: var(--border);
    margin-top: 3rem;
    margin-bottom: 0.5rem;
}

/* GIF SHOWCASE */
.gif-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.showcase-gif {
    max-width: 100px;
    height: auto;
    display: block;
}

.footer-decoration {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0.5rem 0 0 0;
    flex-wrap: wrap;
}

.footer-gif {
    max-width: 150px;
    height: auto;
    display: block;
}

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

.nav-icon {
    height: 20px;
    width: auto;
    display: block;
}

nav ul {
    margin: 0.75rem 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 1.25rem;
}

nav li::before {
    content: "[";
    color: var(--color-border);
    margin-right: 0.15em;
}

nav li::after {
    content: "]";
    color: var(--color-border);
    margin-left: 0.15em;
}

nav a {
    font-size: var(--font-size-base);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: lowercase;
    color: var(--color-secondary);
    transition: color 0.15s ease-out;
}

nav a:hover {
    color: var(--color-accent);
    text-shadow: none;
}

/* PORTRAIT AND CONTENT LAYOUT */
.portrait-content-container {
    display: flex;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
    align-items: flex-start;
}

.portrait-column {
    flex: 0 0 auto;
}

.portrait-wrapper {
    position: sticky;
    top: 2rem;
}

.portrait-image {
    height: 100%;
    max-height: 280px;
    width: auto;
    display: block;
}

.content-column {
    flex: 1;
    min-width: 0;
}

.content-wrapper {
    max-width: 100%;
}

.content-wrapper ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.content-wrapper li {
    margin-bottom: 0.75rem;
    color: var(--color-text);
    line-height: 1.6;
}

.db-highlight {
    color: var(--color-accent);
}

.db-highlight a {
    font-weight: 500;
}

.contact-nudge {
    color: var(--color-text-muted);
    margin-top: -0.5rem;
}


/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .portrait-content-container {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem 0;
        align-items: center;
    }

    .portrait-column {
        flex: none;
        text-align: center;
    }

    .portrait-wrapper {
        position: static;
    }

    .portrait-image {
        max-width: 200px;
        max-height: 200px;
    }

    header {
        margin-top: 1.5rem;
    }

    nav ul {
        justify-content: center;
        gap: 1.25rem;
    }

    .gif-showcase {
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .showcase-gif {
        max-width: 80px;
    }

    .footer-gif {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .portrait-image {
        max-width: 160px;
        max-height: 160px;
    }

    h3 {
        font-size: 1.15rem;
    }
}

/* TERMINAL CURSOR ANIMATION */
@keyframes blink-cursor {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.terminal-cursor::after {
    content: "▊";
    color: var(--color-accent);
    animation: blink-cursor 1s step-end infinite;
    margin-left: 0.1em;
}

/* PORTRAIT ANIMATION - subtle glitch effect */
@keyframes subtle-twist {
    0% {
        transform: rotate(5deg);
    }
    25% {
        transform: rotate(-7deg);
    }
    50% {
        transform: rotate(10deg);
    }
    75% {
        transform: rotate(-8deg);
    }
    100% {
        transform: rotate(4deg);
    }
}

.twist-on-hover {
    display: inline-block;
    cursor: pointer;
}

.twist-on-hover:hover {
    animation: subtle-twist 2s step-end infinite;
}

/* Respect user's motion preferences for accessibility */
@media (prefers-reduced-motion: reduce) {
    .twist-on-hover {
        animation: none;
    }
    .twist-on-hover:hover {
        animation: none;
    }
    .terminal-cursor::after {
        animation: none;
    }
}


/* PHOTO GRID STYLES */
.photo-grid-container {
    max-width: 80ch;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 1rem;
    width: 100%;
}

.photo-grid img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s ease-out, filter 0.15s ease-out;
    cursor: pointer;
    filter: grayscale(0%);
}

.photo-grid img:hover {
    opacity: 0.9;
    filter: grayscale(10%);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .photo-grid img {
        transition: opacity 0.15s ease-out;
    }
    .photo-grid img:hover {
        opacity: 0.9;
        filter: grayscale(0%);
    }
}

/* READING LIST */
.reading-list {
    margin-top: 2rem;
}

.reading-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reading-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: dashed 1px var(--color-border);
    color: var(--color-text);
}

.reading-status {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    width: 3rem;
    text-align: center;
}

.reading-current { color: var(--color-accent); }
.reading-done    { color: var(--color-text-muted); }
.reading-queue   { color: var(--color-secondary); }

/* Photo grid responsive styles */
@media (max-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .photo-grid-container {
        padding: 1rem 0;
    }
}
