@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');
/* import Google Fonts */

:root{
    --backgorund: #FFFFFF;
    --foreground: #A6212C;
    --muted: #F5F5F5;
    --muted-foreground: #525252;
    --border: #000000;
    --border-light: #E5E5E5;
    /* Colour System */

    --accent-red: #A6212C;
    --accent-red-light: rgba(166, 33, 44, 0.15)

    --font-display: 'Playfaor Display', Georgia serif;
    --font-body: 'Source Serif 4', Georgia Serif;
    --font-mono: 'JetBrains Mono', monospace;
    /* Typography */
}

html {
    scroll-behavior: smooth;
}

*, *::before,*::after{
    box-sizing: border-box;
    border-radius: 0px !important;
    box-shadow: none !important;
    /* global resets and artstyle enforcement */
}

body{
    background-color: var(--backgorund);
    color: var(--foreground);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.625;
    margin: 0;
}

h1, h2, h3, h4, h5, h6, .font-display{
    font-family: var(--font-display);
    color: var(--foreground);
    letter-spacing: -0.025em;
    /* Tighten tracking slightly */
    line-height: 1.1;
    font-weight: 600;
    margin: 0;
}

*:focus-visible{
    outline: 3px solid var(--foreground);
    outline-offset: 3px;
}
/* Accessibility Focus States */

/*Core Texture Utility Classes */
.texture-lines {
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        var(--foreground) 1px,
        var(--foreground) 2px
    );
    background-size: 100% 4px;
    opacity: 0.015;
} /* Primary Pattern: Horizontal Lines */

.texture-grid {
    background-image:
        linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
} /* Secondary Pattern： Grid */

.texture-noise {
    position: relative;
} 

.texture-noise::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
} /* noise texture */

/* .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 6vw;
}
*/

.container {
    width: 92%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 2px solid var(--foreground);
}

.logo {
    font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; 
}

.main-nav { 
    display: flex; gap: 2rem; font-family: var(--font-mono); font-size: 0.875rem; 
}

.main-nav a {
    position: relative;
    text-decoration: none;
    color: var(--foreground);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--foreground);
    
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.main-nav a:hover { 
    text-decoration: underline; text-underline-offset: 4px; 
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.hero {
    padding: 8rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem); /* 响应式超大标题 */
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.hero-subtitle {
    font-size: 1.5rem;
    max-width: 600px;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.btn-primary {
    font-family: var(--font-mono);
    /*background: var(--foreground);*/
    background: var(--accent-red-light);
    /* color: var(--background); */
    color: var(--accent-red);
    padding: 1rem 2rem;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    /*border: 2px solid var(--foreground);*/
    border: 2px solid var(--accent-red);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.btn-primary:hover {
    background: var(--accent-red);
    /* color: var(--foreground); */
    color: var(--backgorund);
}

.btn-box {
    display: block;

    font-family: var(--font-mono);
    /*background: var(--foreground);*/
    background: var(--accent-red-light);
    /* color: var(--background); */
    color: var(--accent-red);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    /*border: 2px solid var(--foreground);*/
    border: 2px solid var(--accent-red);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.btn-box:hover {
    background: var(--accent-red);
    /* color: var(--foreground); */
    color: var(--backgorund);
}

.project-card:hover h3 {
    color: var(--backgorund);
    border-color: var(--backgoround);
}

.divider-thick { 
    border: none;
    border-top: 4px solid var(--foreground); 
    margin: 0; 
}

.divider-thin { 
    border: none;
    border-top: 1px solid var(--foreground); 
    margin: 1rem 0; 
}

.work-section { 
    padding: 6rem 0; 
}

.section-title { 
    font-size: 3rem; margin-bottom: 4rem; text-transform: uppercase; 
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.project-card {
    border: 1px solid var(--foreground);
    padding: 1.5rem;
    transition: all 0.1s ease;
    background: var(--background);
    width:100%;
}

a.project-card {
    text-decoration: none;
    color: var(--foreground);
}

.project-card:hover {
    background: var(--foreground);
    color: var(--background);
}

.project-card:hover .divider-thin { 
    border-color: var(--background); 
}

.project-card:hover .project-image-placeholder { 
    border-color: var(--background); 
}

a.project-card:hover,
a.project-card:hover * {
    background-color: var(--accent-red);
    color: var(--backgorund) !important;
    border-color: var(--backgorund) !important;
}
        
.project-image-placeholder {
    width: 100%;
    height: 250px;
    border: 1px solid var(--foreground);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    overflow: hidden;
    position: relative;
}

.project-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.site-footer {
    padding: 3rem 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.masonry-gallery {
    column-count: 3;
    column-gap: 2rem; 
    padding: 4rem 0;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 2rem; 
    
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform; 
}

.masonry-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--foreground); 
}

.masonry-item:hover {
    opacity: 0.8;
}

.portfolio-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 20px 0;
}

.portfolio-image {
  
  -webkit-filter: grayscale(100%); 
          filter: grayscale(100%);
  -webkit-transition: -webkit-filter 0.5s ease;
            transition: filter 0.5s ease;
  
  
  max-width: 100%;
  height: auto;
  display: block;
}

.portfolio-image:hover {
  -webkit-filter: grayscale(0%);
    filter: grayscale(0%);
}

/* about me design */

.about-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 6vw; 
    align-items: center;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.about-image img:hover {
    filter: grayscale(0%);
}

.contact-email {
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.5;
}

.social-link {
    text-decoration: none;
    color: var(--foreground);
    position: relative;
    display: inline-block;
}

.social-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--foreground);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.social-link:hover::after {
    transform: scaleX(1);
}

.blinking-cursor {
    font-weight: 300;
    color: var(--foreground);
}

.blinking-cursor.is-blinking {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .masonry-gallery { column-count: 2; }
}

@media (max-width: 640px) {
    .masonry-gallery { column-count: 1; }
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .about-image .project-image-placeholder {
        height: 50vh;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

